v0.4.0: 工具与审批(业务工具骨架 + Approval Card)

This commit is contained in:
Rick Ye
2026-09-05 09:47:50 +08:00
parent fe70cb0f71
commit 807fab4f20
15 changed files with 472 additions and 16 deletions
+8
View File
@@ -105,6 +105,14 @@ export function registerIpc(): AgentService {
return pass(() => service.setSystemPrompt(text))
})
// ---- 工具审批 ----
ipcMain.handle('approval:resolve', (_event, id: unknown, approved: unknown) => {
if (typeof id !== 'string' || typeof approved !== 'boolean') throw new Error('invalid approval')
service.approvals.settle(id, approved)
service.broadcastEvent({ type: 'approval_settled', id, approved, timedOut: false })
return Promise.resolve()
})
ipcMain.handle('app:versions', () => ({
app: process.env.npm_package_version ?? '0.0.0',
electron: process.versions.electron,