release: v2.0.3 - AI 1-Person Company Engine & Business Intelligence
This commit is contained in:
@@ -18,6 +18,15 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
case 'promptWithFile':
|
||||
provider._lmStudio?.activity.bump();
|
||||
await provider._context.globalState.update(SidebarChatProvider.blankChatStateKey, false);
|
||||
// ── 1인 기업 모드 우선 분기 ──
|
||||
// When company mode is active, route the prompt through the
|
||||
// CEO planner / sequential dispatcher / synthesis pipeline
|
||||
// instead of the normal single-agent path. The user-facing
|
||||
// chat surface is the same — only the runtime differs.
|
||||
if (provider.isCompanyModeEnabled() && typeof data.value === 'string' && data.value.trim()) {
|
||||
await provider._runCompanyTurn(data.value.trim());
|
||||
return true;
|
||||
}
|
||||
await provider._handlePrompt(data);
|
||||
await provider._autoWriteChronicleAfterPrompt();
|
||||
await provider._saveCurrentSession();
|
||||
@@ -36,6 +45,9 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
// Restore the Project Architecture chip + watcher if the active project
|
||||
// was already running in architecture mode in a previous VS Code session.
|
||||
await provider._sendArchitectureStatus();
|
||||
// Restore the Company chip from globalState so the user sees the same
|
||||
// mode they had on at last shutdown.
|
||||
await provider._sendCompanyStatus();
|
||||
return true;
|
||||
case 'getReadyStatus':
|
||||
await provider._sendReadyStatus();
|
||||
@@ -147,6 +159,45 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// ── 1인 기업 모드 메시지 라우팅 ────────────────────────────────────
|
||||
case 'getCompanyStatus':
|
||||
await provider._sendCompanyStatus();
|
||||
return true;
|
||||
case 'getCompanyAgents':
|
||||
await provider._sendCompanyAgents();
|
||||
return true;
|
||||
case 'setCompanyEnabled': {
|
||||
const { setCompanyEnabled } = await import('../features/company');
|
||||
await setCompanyEnabled(provider._context, !!data.value);
|
||||
await provider._sendCompanyStatus();
|
||||
return true;
|
||||
}
|
||||
case 'setCompanyName': {
|
||||
const { setCompanyName } = await import('../features/company');
|
||||
await setCompanyName(provider._context, typeof data.value === 'string' ? data.value : '');
|
||||
await provider._sendCompanyStatus();
|
||||
return true;
|
||||
}
|
||||
case 'setCompanyActiveAgents': {
|
||||
const { setActiveAgents } = await import('../features/company');
|
||||
const ids = Array.isArray(data.value)
|
||||
? data.value.filter((v: unknown): v is string => typeof v === 'string')
|
||||
: [];
|
||||
await setActiveAgents(provider._context, ids);
|
||||
await provider._sendCompanyStatus();
|
||||
await provider._sendCompanyAgents();
|
||||
return true;
|
||||
}
|
||||
case 'setCompanyAgentModel': {
|
||||
const { setAgentModelOverride } = await import('../features/company');
|
||||
const agentId = typeof data.agentId === 'string' ? data.agentId : '';
|
||||
const model = typeof data.model === 'string' ? data.model : '';
|
||||
if (agentId) {
|
||||
await setAgentModelOverride(provider._context, agentId, model);
|
||||
await provider._sendCompanyAgents();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case 'proactiveTrigger':
|
||||
await provider._handleProactiveSuggestion(data.context);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user