Feat/language detection (#31)

* feat: implementation of language detection

* run utility scripts in tasks

* fix: addiitonal fixes for background utilities

* feat: toast() also for utility scripts

---------

Co-authored-by: hugo <hugoms@me.com>
This commit is contained in:
Georg Bauer
2026-03-03 14:36:15 +01:00
committed by GitHub
parent 5747925503
commit 32b66e1677
37 changed files with 2616 additions and 55 deletions

View File

@@ -110,6 +110,9 @@ export const electronAPI: ElectronAPI = {
getAll: () => ipcRenderer.invoke('scripts:getAll'),
getEnabledMacroSlugs: () => ipcRenderer.invoke('scripts:getEnabledMacroSlugs'),
rebuildFromFiles: () => ipcRenderer.invoke('scripts:rebuildFromFiles'),
startTask: (taskId: string, name: string) => ipcRenderer.invoke('scripts:startTask', taskId, name),
completeTask: (taskId: string) => ipcRenderer.invoke('scripts:completeTask', taskId),
failTask: (taskId: string, error: string) => ipcRenderer.invoke('scripts:failTask', taskId, error),
},
// Templates
@@ -376,6 +379,9 @@ export const electronAPI: ElectronAPI = {
// Media Analysis
analyzeMediaImage: (mediaId: string, language?: string) => ipcRenderer.invoke('chat:analyzeMediaImage', mediaId, language),
// Post Language Detection
detectPostLanguage: (title: string, content: string) => ipcRenderer.invoke('chat:detectPostLanguage', title, content),
// Event listeners for streaming/progress
onStreamDelta: (callback: (data: { conversationId: string; delta: string }) => void) => {
const subscription = (_event: Electron.IpcRendererEvent, data: { conversationId: string; delta: string }) => callback(data);