MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / formatTraversalResult

Function formatTraversalResult

src/tools/memory-tools.ts:50–57  ·  view source on GitHub ↗
(result: TraversalResult)

Source from the content-addressed store, hash-verified

48}
49
50function formatTraversalResult(result: TraversalResult): string {
51 return [
52 ` [${result.node.type}] ${result.node.label} (depth: ${result.depth}, score: ${result.relevanceScore})`,
53 ` Content: ${result.node.content.slice(0, 120)}${result.node.content.length > 120 ? "..." : ""}`,
54 result.pathRelations.length > 1 ? ` Path: ${result.pathRelations.join(" ")}` : "",
55 ` ID: ${result.node.id} | Accessed: ${result.node.accessCount}x`,
56 ].filter(Boolean).join("\n");
57}
58
59export async function toolUpsertMemoryNode(options: UpsertMemoryNodeOptions): Promise<string> {
60 const node = await upsertNode(options.rootDir, options.type, options.label, options.content, options.metadata);

Callers 2

toolSearchMemoryGraphFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected