MCPcopy Create free account
hub / github.com/Noumena-Network/code / loadSessionMemoryPrompt

Function loadSessionMemoryPrompt

src/services/SessionMemory/prompts.ts:112–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 * Use {{variableName}} syntax for variable substitution (e.g., {{currentNotes}}, {{notesPath}})
111 */
112export async function loadSessionMemoryPrompt(): Promise<string> {
113 const promptPath = join(
114 getClaudeConfigHomeDir(),
115 'session-memory',
116 'config',
117 'prompt.md',
118 )
119
120 try {
121 return await readFile(promptPath, { encoding: 'utf-8' })
122 } catch (e: unknown) {
123 const code = getErrnoCode(e)
124 if (code === 'ENOENT') {
125 return getDefaultUpdatePrompt()
126 }
127 logError(toError(e))
128 return getDefaultUpdatePrompt()
129 }
130}
131
132/**
133 * Parse the session memory file and analyze section sizes

Callers 1

Calls 5

readFileFunction · 0.85
getErrnoCodeFunction · 0.85
getDefaultUpdatePromptFunction · 0.85
logErrorFunction · 0.50
toErrorFunction · 0.50

Tested by

no test coverage detected