MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / selectionSubject

Function selectionSubject

graph-ui/src/browser-ai/symbol-source.ts:45–50  ·  view source on GitHub ↗
(context: BrowserChatContext | undefined)

Source from the content-addressed store, hash-verified

43
44/** The symbol an explanation is about, whether its source is read or already carried. */
45export function selectionSubject(context: BrowserChatContext | undefined): { name: string; kind?: string } | undefined {
46 if (!context || context.text.length > 128_000) return undefined;
47 const galaxy = readGalaxyEvidence(context.text);
48 if (galaxy) return galaxy.rootCount === 1 && galaxy.roots[0] ? { name: galaxy.roots[0].name, kind: galaxy.roots[0].kind } : undefined;
49 return architectureTarget(context);
50}
51
52/** A bounded, validated source block for the explanation, or undefined when the reply is
53 * not that symbol's source. The repository-relative path of the selection is kept. */

Callers 2

explainFunction · 0.90
sendFunction · 0.90

Calls 2

readGalaxyEvidenceFunction · 0.90
architectureTargetFunction · 0.85

Tested by

no test coverage detected