MCPcopy Create free account
hub / github.com/Eversmile12/sharedcontext / formatContext

Function formatContext

src/core/engine.ts:120–128  ·  view source on GitHub ↗
(facts: Fact[])

Source from the content-addressed store, hash-verified

118 * Lean format — no scope, no tags, no metadata. Just facts.
119 */
120export function formatContext(facts: Fact[]): string {
121 if (facts.length === 0) return "";
122
123 const lines = facts.map(
124 (f) => `- ${simplifyKey(f.key, f.scope)}: ${f.value}`
125 );
126
127 return `[MEMORY]\n${lines.join("\n")}\n[/MEMORY]`;
128}

Callers 2

engine.test.tsFile · 0.85
startMcpServerFunction · 0.85

Calls 1

simplifyKeyFunction · 0.85

Tested by

no test coverage detected