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

Function entryDraft

graph-ui/src/compiler/card-compiler.ts:407–434  ·  view source on GitHub ↗
(entryPoints: readonly SymbolSearchHit[], rank: number)

Source from the content-addressed store, hash-verified

405}
406
407function entryDraft(entryPoints: readonly SymbolSearchHit[], rank: number): Draft[] {
408 if (entryPoints.length === 0) {
409 return [];
410 }
411 const names = entryPoints.map((hit) => {
412 const where = hit.filePath === undefined
413 ? ''
414 : ` (${hit.filePath}${hit.line === undefined ? '' : `:${hit.line}`})`;
415 return `${hit.name}${where}`;
416 });
417 const first = entryPoints[0];
418 const source: CardSource = { name: first.name };
419 if (first.qualifiedName !== undefined) {
420 source.qualifiedName = first.qualifiedName;
421 }
422 if (first.filePath !== undefined) {
423 source.filePath = first.filePath;
424 }
425 if (first.line !== undefined) {
426 source.line = first.line;
427 }
428 return [{
429 kind: 'entry',
430 lines: [`The index flags these symbols as entry points: ${listOf(names)}.`],
431 source,
432 rank,
433 }];
434}
435
436function overviewDrafts(packet: FactPacket, rank: number): Draft[] {
437 const facts = packet.overview;

Callers 1

compileCardsFunction · 0.85

Calls 1

listOfFunction · 0.85

Tested by

no test coverage detected