MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / view

Method view

src/mcp/explore-session-state.ts:265–276  ·  view source on GitHub ↗

* The bounded view passed INTO a tool call. Trimmed to the most recent * EXPLORE_SESSION_LIMITS.MAX_VIEW_CALLS calls per project: it crosses a * worker boundary on every explore, so it carries what a dedup/decay decision * needs and not the whole history.

()

Source from the content-addressed store, hash-verified

263 * needs and not the whole history.
264 */
265 view(): ExploreSessionView {
266 return {
267 projects: [...this.projects.values()].map((state) => ({
268 projectRoot: state.projectRoot,
269 callCount: state.callCount,
270 responseBytes: state.responseBytes,
271 calls: state.calls
272 .slice(-EXPLORE_SESSION_LIMITS.MAX_VIEW_CALLS)
273 .map((c) => ({ ...c, files: c.files.map((f) => ({ ...f, ranges: [...f.ranges] })) })),
274 })),
275 };
276 }
277
278 /** Drop everything. Used by tests; a real session just goes away instead. */
279 clear(): void {

Callers 2

withSessionViewMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected