release: v2.0.1 - Advanced Knowledge Mix & Architectural Intelligence
This commit is contained in:
@@ -33,6 +33,9 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
await provider._sendChronicleProjects();
|
||||
await provider._restoreActiveSessionIntoView();
|
||||
await provider._sendReadyStatus();
|
||||
// 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();
|
||||
return true;
|
||||
case 'getReadyStatus':
|
||||
await provider._sendReadyStatus();
|
||||
@@ -100,6 +103,50 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
provider._lmStudio?.lifecycle.onModelSelected(data.value);
|
||||
return true;
|
||||
}
|
||||
case 'getKnowledgeMix': {
|
||||
// Ship the current global Knowledge Mix to the webview so the slider can
|
||||
// initialize. Per-agent overrides ride along with the agent map data.
|
||||
const cfg = vscode.workspace.getConfiguration('g1nation');
|
||||
const w = cfg.get<number>('knowledgeMix.secondBrainWeight', 50);
|
||||
const clamped = Math.max(0, Math.min(100, Math.round(typeof w === 'number' ? w : 50)));
|
||||
provider._view?.webview.postMessage({
|
||||
type: 'knowledgeMix',
|
||||
value: { weight: clamped, source: 'global' },
|
||||
});
|
||||
return true;
|
||||
}
|
||||
case 'setKnowledgeMix': {
|
||||
const raw = typeof data.value === 'number' ? data.value : NaN;
|
||||
if (!Number.isFinite(raw)) return true;
|
||||
const clamped = Math.max(0, Math.min(100, Math.round(raw)));
|
||||
// Use whichever scope already holds the value to avoid the same "Workspace
|
||||
// override shadows Global update" desync that the `model` case guards against.
|
||||
const { target } = pickConfigTarget('g1nation', 'knowledgeMix.secondBrainWeight');
|
||||
await vscode.workspace.getConfiguration('g1nation').update('knowledgeMix.secondBrainWeight', clamped, target);
|
||||
logInfo(`Knowledge Mix (global) updated to: ${clamped}`, { target });
|
||||
return true;
|
||||
}
|
||||
// ── Project Architecture (Feature 2) ──────────────────────────────────
|
||||
case 'getArchitectureStatus':
|
||||
await provider._sendArchitectureStatus();
|
||||
return true;
|
||||
case 'openArchitectureDoc':
|
||||
await provider._openArchitectureDoc();
|
||||
return true;
|
||||
case 'refreshArchitecture':
|
||||
await provider._refreshArchitecture();
|
||||
return true;
|
||||
case 'detachArchitecture':
|
||||
await provider._detachArchitecture();
|
||||
return true;
|
||||
case 'activateArchitectureFromText': {
|
||||
// Optional explicit-toggle path: webview can pass arbitrary text
|
||||
// (e.g. the current input draft) for one-shot intent detection.
|
||||
if (typeof data.text === 'string') {
|
||||
await provider._tryActivateArchitectureFromText(data.text);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case 'proactiveTrigger':
|
||||
await provider._handleProactiveSuggestion(data.context);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user