diff --git a/src/frontend/src/api.ts b/src/frontend/src/api.ts index a7e7ea2..44e7222 100644 --- a/src/frontend/src/api.ts +++ b/src/frontend/src/api.ts @@ -93,7 +93,7 @@ export const api = { try { const data = await fetchJ<{ tasks: any[] }>(`${API_BASE}/api/projects/${p}/tasks`); for (const t of (data.tasks || []).map(adaptTask)) { - t.sourceMeta = { ...t.sourceMeta, project_id: p, project_name: projectsMap[p]?.name || p }; + t.sourceMeta = { ...t.sourceMeta, project_id: p, project_name: (projectsMap.projects as Record)[p]?.name || p }; allTasks.push(t); } } catch { /* skip */ } @@ -179,9 +179,9 @@ export const api = { // ── 操作类 ── - setModel: async (agentId: string, model: string): Promise => ({ ok: false, error: 'Not implemented' }), - setDispatchChannel: async (channel: string): Promise => ({ ok: false, error: 'Not implemented' }), - agentWake: async (agentId: string): Promise => ({ ok: false, error: 'Not implemented' }), + setModel: async (_agentId: string, _model: string): Promise => ({ ok: false, error: 'Not implemented' }), + setDispatchChannel: async (_channel: string): Promise => ({ ok: false, error: 'Not implemented' }), + agentWake: async (_agentId: string): Promise => ({ ok: false, error: 'Not implemented' }), taskAction: async (taskId: string, action: string, reason: string): Promise => { try {