release: v2.0.6 - Intelligence & UX Optimization (2026-05-14)
This commit is contained in:
+48
-9
@@ -804,21 +804,28 @@
|
||||
break;
|
||||
}
|
||||
case 'architectureStatus': {
|
||||
// Show / hide the chip + reflect current state.
|
||||
// Three-state chip:
|
||||
// active — full info + Open/Refresh/Detach
|
||||
// inactive — name + [Attach] button (user previously detached, OR doc not yet generated)
|
||||
// hidden — no project + no workspace
|
||||
const chip = document.getElementById('archChip');
|
||||
const title = document.getElementById('archChipTitle');
|
||||
const meta = document.getElementById('archChipMeta');
|
||||
if (!chip || !title || !meta) break;
|
||||
const v = msg.value || {};
|
||||
if (!v.active) {
|
||||
chip.setAttribute('data-active', 'false');
|
||||
break;
|
||||
if (v.active) {
|
||||
chip.setAttribute('data-state', 'active');
|
||||
title.textContent = `${v.projectName || 'Project'} architecture`;
|
||||
const updatedLabel = v.lastUpdated ? `updated ${formatRelativeTime(v.lastUpdated)}` : 'just attached';
|
||||
const autoLabel = v.autoUpdate === false ? 'Auto-update Off' : 'Auto-update On';
|
||||
meta.textContent = `${updatedLabel} · ${autoLabel}`;
|
||||
} else if (v.canAttach && v.projectName) {
|
||||
chip.setAttribute('data-state', 'inactive');
|
||||
title.textContent = `${v.projectName} architecture`;
|
||||
meta.textContent = v.detached ? 'detached — click Attach to re-enable' : 'not yet activated';
|
||||
} else {
|
||||
chip.setAttribute('data-state', 'hidden');
|
||||
}
|
||||
chip.setAttribute('data-active', 'true');
|
||||
title.textContent = `${v.projectName || 'Project'} architecture`;
|
||||
const updatedLabel = v.lastUpdated ? `updated ${formatRelativeTime(v.lastUpdated)}` : 'just attached';
|
||||
const autoLabel = v.autoUpdate === false ? 'Auto-update Off' : 'Auto-update On';
|
||||
meta.textContent = `${updatedLabel} · ${autoLabel}`;
|
||||
break;
|
||||
}
|
||||
case 'architectureRefreshFailed': {
|
||||
@@ -830,6 +837,34 @@
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'architectureRefreshResult': {
|
||||
// Trust-building stats card: shows exactly what the
|
||||
// refresh did so users don't have to guess whether the
|
||||
// 0.1s click actually accomplished anything.
|
||||
const v = msg.value || {};
|
||||
const card = document.createElement('div');
|
||||
card.className = 'arch-refresh-card';
|
||||
const noChanges = (v.newlyAnalyzed | 0) === 0 && (v.deleted | 0) === 0;
|
||||
if (noChanges) card.classList.add('no-changes');
|
||||
const head = noChanges
|
||||
? `📋 ${escAttr(v.projectName || 'Project')} architecture — 변경 사항 없음`
|
||||
: `📋 ${escAttr(v.projectName || 'Project')} architecture refreshed`;
|
||||
const parts = [
|
||||
`${v.newlyAnalyzed | 0} newly analysed`,
|
||||
`${v.cached | 0} cached`,
|
||||
];
|
||||
if ((v.deleted | 0) > 0) parts.push(`${v.deleted | 0} deleted`);
|
||||
parts.push(`${v.durationMs | 0}ms`);
|
||||
card.innerHTML =
|
||||
`<div class="arc-head">${head}</div>` +
|
||||
`<div class="arc-meta">${parts.join(' · ')}</div>`;
|
||||
const chatEl = document.getElementById('chat');
|
||||
if (chatEl) {
|
||||
chatEl.appendChild(card);
|
||||
chatEl.scrollTop = chatEl.scrollHeight;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'knowledgeMix': {
|
||||
// Initial sync: reflect whatever weight is currently in settings.
|
||||
if (msg.value && typeof msg.value.weight === 'number') {
|
||||
@@ -1386,6 +1421,10 @@
|
||||
if (_archOpenBtn) _archOpenBtn.onclick = () => vscode.postMessage({ type: 'openArchitectureDoc' });
|
||||
if (_archRefreshBtn) _archRefreshBtn.onclick = () => vscode.postMessage({ type: 'refreshArchitecture' });
|
||||
if (_archDetachBtn) _archDetachBtn.onclick = () => vscode.postMessage({ type: 'detachArchitecture' });
|
||||
// [Attach] is visible only in the inactive chip state; clicking it
|
||||
// re-enables architecture mode for the current workspace's project.
|
||||
const _archAttachBtn = document.getElementById('archAttachBtn');
|
||||
if (_archAttachBtn) _archAttachBtn.onclick = () => vscode.postMessage({ type: 'attachArchitecture' });
|
||||
|
||||
// ── 1인 기업 (Company) Mode chip + manage overlay ─────────────────────
|
||||
// The chip itself toggles enabled/disabled. The ▾ button opens the
|
||||
|
||||
Reference in New Issue
Block a user