MCPcopy
hub / github.com/Doorman11991/smallcode / formatForPrompt

Method formatForPrompt

src/session/bootstrap.js:47–56  ·  view source on GitHub ↗

Format for system prompt injection. Returns '' if nothing found.

()

Source from the content-addressed store, hash-verified

45
46 /** Format for system prompt injection. Returns '' if nothing found. */
47 formatForPrompt() {
48 const r = this.detect();
49 if (!r) return '';
50 const s = r.summary.length > this.maxChars
51 ? r.summary.slice(0, this.maxChars - 1) + '…'
52 : r.summary;
53 // Label as "Project" — caller may relabel as "Workspace context" to avoid
54 // models treating this as a complete project description.
55 return `\n\nProject: ${s}`;
56 }
57
58 invalidate() { this._cache = null; }
59

Callers

nothing calls this directly

Calls 1

detectMethod · 0.95

Tested by

no test coverage detected