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

Function readerRules

graph-ui/src/browser-ai/chat-model.ts:95–100  ·  view source on GitHub ↗

What the open file is, what is counted from it, and what an answer about it may say (K12).

(context: BrowserChatReaderContext)

Source from the content-addressed store, hash-verified

93
94/** What the open file is, what is counted from it, and what an answer about it may say (K12). */
95function readerRules(context: BrowserChatReaderContext): string {
96 const kind = fileKind(context.source?.path ?? context.path ?? '');
97 const facts = readerFacts(context);
98 return `${kind ? `\nThe current file is a ${kind}.` : ''}${facts.length ? `\n${workflowWords.heading}\n${facts.map(line => `- ${line}`).join('\n')}` : ''}\nAnswer from the current file and describe what it literally contains. Unless the user asks for it, do not write new code, scripts or commands, `
99 + 'and never name tools, libraries, languages or values that are not in the file. Do not repeat the file; summarize it. If the file does not answer the question, say so.';
100}
101
102/** The open file in words, not as a JSON record: from "status":"ready" the model made up
103 * a pull request status "ready" (K12). */

Callers 2

readerSystemContextFunction · 0.85
buildChatMessagesFunction · 0.85

Calls 2

fileKindFunction · 0.90
readerFactsFunction · 0.90

Tested by

no test coverage detected