fix: prompt caching, conversation length management and token usage display

This commit is contained in:
2026-02-26 20:07:06 +01:00
parent daf8addb53
commit 9149c21bdf
20 changed files with 317 additions and 7 deletions

View File

@@ -339,6 +339,11 @@ export const electronAPI: ElectronAPI = {
ipcRenderer.on('chat-title-updated', subscription);
return () => ipcRenderer.removeListener('chat-title-updated', subscription);
},
onTokenUsage: (callback: (data: import('./shared/electronApi').ChatTokenUsage) => void) => {
const subscription = (_event: Electron.IpcRendererEvent, data: import('./shared/electronApi').ChatTokenUsage) => callback(data);
ipcRenderer.on('chat-token-usage', subscription);
return () => ipcRenderer.removeListener('chat-token-usage', subscription);
},
// A2UI streaming
onA2UIMessage: (callback: (data: { conversationId: string; message: import('./a2ui/types').A2UIServerMessage }) => void) => {