release: v2.0.2 - Structural Integrity & Automated Context Management
This commit is contained in:
+15
-15
@@ -660,7 +660,7 @@
|
||||
break;
|
||||
case 'modelsList': {
|
||||
modelSel.innerHTML = '';
|
||||
const inlineModelSel = document.getElementById('inlineModelSel');
|
||||
const inlineModelSel = document.getElementById('modelInlineSel');
|
||||
if (inlineModelSel) inlineModelSel.innerHTML = '';
|
||||
// [State Persistence - Tier 2] LocalStorage에서 마지막 선택 모델 복원 시도
|
||||
const _savedModel = localStorage.getItem('g1nation_last_model');
|
||||
@@ -690,8 +690,10 @@
|
||||
if (_savedModel && _savedModel !== msg.value.selected && msg.value.models.includes(_savedModel)) {
|
||||
vscode.postMessage({ type: 'model', value: _savedModel });
|
||||
}
|
||||
if (typeof updateInputPlaceholder === 'function') updateInputPlaceholder();
|
||||
statusLabel.innerText = `Model: ${_preferredModel}`;
|
||||
// The model name is now visible inside the footer pill itself,
|
||||
// so statusLabel is reserved for actual status (autoContinue
|
||||
// progress, etc.). Keep it empty in steady state.
|
||||
statusLabel.innerText = '';
|
||||
// Refresh per-agent model dropdown options (if currently visible) so it stays in sync.
|
||||
if (typeof refreshAgentMapModelOptions === 'function') refreshAgentMapModelOptions();
|
||||
break;
|
||||
@@ -820,7 +822,7 @@
|
||||
// clearing the override should restore the previous selection.
|
||||
const pinned = msg.value && msg.value.model;
|
||||
if (pinned) {
|
||||
const inlineSel = document.getElementById('inlineModelSel');
|
||||
const inlineSel = document.getElementById('modelInlineSel');
|
||||
// Add an option if it isn't already known so the value can stick.
|
||||
const ensureOption = (sel) => {
|
||||
if (!sel) return;
|
||||
@@ -835,8 +837,9 @@
|
||||
};
|
||||
ensureOption(modelSel);
|
||||
ensureOption(inlineSel);
|
||||
statusLabel.innerText = `Model: ${pinned} (agent override)`;
|
||||
if (typeof updateInputPlaceholder === 'function') updateInputPlaceholder();
|
||||
// The pill shows the model directly; surface the override as a tooltip
|
||||
// instead of a duplicate status string.
|
||||
if (inlineSel) inlineSel.title = `Model pinned by current agent: ${pinned}`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1149,13 +1152,13 @@
|
||||
document.getElementById('historyBtn').onclick = () => vscode.postMessage({ type: 'getSessions' });
|
||||
document.getElementById('historyBtn').addEventListener('click', () => historyOverlay.classList.add('visible'));
|
||||
document.getElementById('closeHistoryBtn').onclick = () => historyOverlay.classList.remove('visible');
|
||||
// The input placeholder is now a constant brand label — the model name
|
||||
// lives in the footer pill itself, so we don't repeat it here.
|
||||
const updateInputPlaceholder = () => {
|
||||
if (typeof input !== 'undefined' && input) {
|
||||
input.placeholder = `Ask ${modelSel ? modelSel.value : 'AI'}...`;
|
||||
}
|
||||
if (typeof input !== 'undefined' && input) input.placeholder = 'Ask Astra...';
|
||||
};
|
||||
|
||||
// Shared handler so the top-bar dropdown and the inline-below-input dropdown
|
||||
// Shared handler so the header dropdown and the footer pill dropdown
|
||||
// always commit the same way and stay visually synced.
|
||||
const applyModelSelection = (selectedModel, originEl) => {
|
||||
if (!selectedModel) return;
|
||||
@@ -1168,15 +1171,12 @@
|
||||
// [State Persistence - Tier 1] VS Code 전역 설정에 동기화 (영구 저장)
|
||||
vscode.postMessage({ type: 'model', value: selectedModel });
|
||||
// Mirror the value to the *other* dropdown so both pickers reflect reality.
|
||||
const inlineSel = document.getElementById('inlineModelSel');
|
||||
const inlineSel = document.getElementById('modelInlineSel');
|
||||
if (originEl !== modelSel && modelSel.value !== selectedModel) modelSel.value = selectedModel;
|
||||
if (inlineSel && originEl !== inlineSel && inlineSel.value !== selectedModel) inlineSel.value = selectedModel;
|
||||
updateInputPlaceholder();
|
||||
// 상태 레이블 즉시 업데이트
|
||||
statusLabel.innerText = `Model: ${selectedModel}`;
|
||||
};
|
||||
modelSel.onchange = () => applyModelSelection(modelSel.value, modelSel);
|
||||
const _inlineModelSelEl = document.getElementById('inlineModelSel');
|
||||
const _inlineModelSelEl = document.getElementById('modelInlineSel');
|
||||
if (_inlineModelSelEl) {
|
||||
_inlineModelSelEl.onchange = () => applyModelSelection(_inlineModelSelEl.value, _inlineModelSelEl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user