Release v2.1.8: Company Agent roster overhaul and UI polish

This commit is contained in:
g1nation
2026-05-14 22:25:48 +09:00
parent ac0085ab53
commit 6b10d002fa
21 changed files with 674 additions and 331 deletions
+22 -3
View File
@@ -299,13 +299,32 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
return true;
}
case 'deleteCompanyAgent': {
// Drop a user-defined agent. Built-ins refuse — backend enforces.
const { removeCustomAgent } = await import('../features/company');
// Delete any agent (built-in via hide, custom via outright removal).
// Backend checks pipeline usage and refuses if any stage references it.
const { removeCompanyAgent } = await import('../features/company');
const agentId = typeof data.agentId === 'string' ? data.agentId : '';
if (!agentId) return true;
const result = await removeCustomAgent(provider._context, agentId);
const result = await removeCompanyAgent(provider._context, agentId);
provider._view?.webview.postMessage({
type: 'deleteCompanyAgentResult',
value: result.ok
? { ok: true, agentId, kind: result.kind }
: { ok: false, agentId, reason: result.reason },
});
if (result.ok) {
await provider._sendCompanyStatus();
await provider._sendCompanyAgents();
}
return true;
}
case 'restoreHiddenAgent': {
// Bring a previously-hidden built-in back into the manage panel.
const { restoreHiddenAgent } = await import('../features/company');
const agentId = typeof data.agentId === 'string' ? data.agentId : '';
if (!agentId) return true;
const result = await restoreHiddenAgent(provider._context, agentId);
provider._view?.webview.postMessage({
type: 'restoreHiddenAgentResult',
value: result.ok ? { ok: true, agentId } : { ok: false, reason: result.reason },
});
if (result.ok) {