release: v2.0.8 - UX Persistence & Per-Agent Knowledge Mix (2026-05-14)
This commit is contained in:
@@ -203,6 +203,21 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case 'setCompanyAgentKnowledgeMix': {
|
||||
// Per-agent Knowledge Mix override. `null`/missing value falls
|
||||
// back to the global slider. The dispatcher reads this on the
|
||||
// *next* turn — no restart required.
|
||||
const { setAgentKnowledgeMix } = await import('../features/company');
|
||||
const agentId = typeof data.agentId === 'string' ? data.agentId : '';
|
||||
if (!agentId) return true;
|
||||
const raw = data.value;
|
||||
const weight = (raw === null || raw === undefined || !Number.isFinite(Number(raw)))
|
||||
? null
|
||||
: Math.max(0, Math.min(100, Math.round(Number(raw))));
|
||||
await setAgentKnowledgeMix(provider._context, agentId, weight);
|
||||
await provider._sendCompanyAgents();
|
||||
return true;
|
||||
}
|
||||
case 'setCompanyAgentPrompt': {
|
||||
// Patch one agent's persona / specialty / tagline. Each field is
|
||||
// optional in the payload; passing an *empty string* explicitly
|
||||
|
||||
Reference in New Issue
Block a user