()
| 997 | } |
| 998 | |
| 999 | private async saveApiConversationHistory(): Promise<boolean> { |
| 1000 | try { |
| 1001 | await saveApiMessages({ |
| 1002 | messages: structuredClone(this.apiConversationHistory), |
| 1003 | taskId: this.taskId, |
| 1004 | globalStoragePath: this.globalStoragePath, |
| 1005 | }) |
| 1006 | return true |
| 1007 | } catch (error) { |
| 1008 | console.error("Failed to save API conversation history:", error) |
| 1009 | return false |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | /** |
| 1014 | * Public wrapper to retry saving the API conversation history. |
no test coverage detected