v0.4.0: 工具与审批(业务工具骨架 + Approval Card)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user