release: v2.0.4 - Advanced Business Orchestration & UI Polishing
This commit is contained in:
@@ -198,6 +198,26 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case 'setCompanyAgentPrompt': {
|
||||
// Patch one agent's persona / specialty / tagline. Each field is
|
||||
// optional in the payload; passing an *empty string* explicitly
|
||||
// clears that field (back to the default from `agents.ts`).
|
||||
// Sending `null` for the whole override resets every field at once.
|
||||
const { setAgentPromptOverride } = await import('../features/company');
|
||||
const agentId = typeof data.agentId === 'string' ? data.agentId : '';
|
||||
if (!agentId) return true;
|
||||
const v = data.override;
|
||||
const override = v === null
|
||||
? null
|
||||
: {
|
||||
persona: typeof v?.persona === 'string' ? v.persona : undefined,
|
||||
specialty: typeof v?.specialty === 'string' ? v.specialty : undefined,
|
||||
tagline: typeof v?.tagline === 'string' ? v.tagline : undefined,
|
||||
};
|
||||
await setAgentPromptOverride(provider._context, agentId, override);
|
||||
await provider._sendCompanyAgents();
|
||||
return true;
|
||||
}
|
||||
case 'proactiveTrigger':
|
||||
await provider._handleProactiveSuggestion(data.context);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user