({
messages,
taskId,
globalStoragePath,
}: {
messages: ApiMessage[]
taskId: string
globalStoragePath: string
})
| 107 | } |
| 108 | |
| 109 | export async function saveApiMessages({ |
| 110 | messages, |
| 111 | taskId, |
| 112 | globalStoragePath, |
| 113 | }: { |
| 114 | messages: ApiMessage[] |
| 115 | taskId: string |
| 116 | globalStoragePath: string |
| 117 | }) { |
| 118 | const taskDir = await getTaskDirectoryPath(globalStoragePath, taskId) |
| 119 | const filePath = path.join(taskDir, GlobalFileNames.apiConversationHistory) |
| 120 | await safeWriteJson(filePath, messages) |
| 121 | } |
no test coverage detected