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