( sessionPath: string, params: Record<string, string>, )
| 139 | |
| 140 | /** Execute the save_memory tool call */ |
| 141 | export async function executeMemoryTool( |
| 142 | sessionPath: string, |
| 143 | params: Record<string, string>, |
| 144 | ): Promise<string> { |
| 145 | const { content, category } = params; |
| 146 | if (!content) return 'error: missing content'; |
| 147 | |
| 148 | const entry = await saveMemory(sessionPath, content, category || 'other'); |
| 149 | return `Memory saved: [${entry.category}] ${entry.content}`; |
| 150 | } |
| 151 | |
| 152 | // --------------------------------------------------------------------------- |
| 153 | // SP injection — build a compact memory summary for the system prompt |
no test coverage detected