Spaces:
Configuration error
Configuration error
fix: resolve stuck command palette default display and UTF-8 mojibake
Browse files1234193 unmodified lines19819920020120220320411 unmodified lines21621721821922022122222345 unmodified lines26927027127227327427543 unmodified lines319320321322323324325485 unmodified lines811812813814815816817494 unmodified lines1312131313141315131613171318131913201321132213231324376 unmodified lines170117021703170417051706170740 unmodified lines174817491750175117521753175449 unmodified lines1804180518061807180818091810107 unmodified lines1918191919201921192219231924848 unmodified lines2773277427752776277727782779523 unmodified lines3303330433053306330733083309233 unmodified lines354335443545354635473548354988 unmodified lines363836393640364136423643364441 unmodified lines368636873688368936903691369214 unmodified lines37073708370937103711371237137 unmodified lines3721372237233724372537263727372889 unmodified lines3818381938203821382238233824<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">193 unmodified linesoutline-offset: -2px;}/* ── B6.3 Loading skeleton states ──────────────────────────────────── */@keyframes shimmer {0% { background-position: -200% 0; }100% { background-position: 200% 0; }11 unmodified lines.skeleton-line { height: 14px; margin-bottom: 6px; }.skeleton-line.short { width: 60%; }/* ── B1 Command palette ────────────────────────────────────────────── */#cmd-palette { display: contents; }#cmd-backdrop {position: fixed; inset: 0;background: rgba(0,0,0,0.45);45 unmodified lines.cmd-main { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.cmd-sub { font-size: 11px; color: var(--ink-faint); flex-shrink: 0; }/* ── B5 MCP Tool Tester tab ────────────────────────────────────────── */.tools-list { display: flex; flex-direction: column; gap: 0; max-width: 900px; }.tool-row {border: 1px solid var(--border-light); border-top: none;43 unmodified lines.badge-ok { color: var(--green); }.badge-err { color: var(--accent); }/* ── B4 Onboarding card ─────────────────────────────────────────────── */.onboarding-card {border: 2px solid var(--border); padding: 28px 32px;max-width: 640px; margin: 32px auto; background: var(--cream);485 unmodified lines}.empty-state .empty-link { color: var(--accent); text-decoration: underline; font-size: 13px; font-style: normal; }/* Feature flag banner system — compact collapsed by default */.flag-banners {padding: 0 12px 10px 12px;background: var(--bg);494 unmodified lines<div id="view-memories" class="view" role="tabpanel" aria-labelledby="tab-btn-memories"></div><div id="view-timeline" class="view" role="tabpanel" aria-labelledby="tab-btn-timeline"></div><div id="view-tools" class="view" role="tabpanel" aria-labelledby="tab-btn-tools"></div><!-- legacy view containers removed — backed by endpoints that no longer exist --><!-- Command Palette (B1) --><div id="cmd-palette" hidden role="dialog" aria-modal="true" aria-label="Command Palette"><div id="cmd-backdrop"></div><div id="cmd-panel"><input id="cmd-input" type="text" placeholder="Search folders, memories, tabs…" autocomplete="off" aria-label="Command palette search"><ul id="cmd-results" role="listbox" aria-label="Search results"></ul></div></div>376 unmodified linesvar fp = f.folderPath || '';var aid = f.agentId || '';var obs = f.obsCount || 0;var updated = f.lastUpdated ? new Date(f.lastUpdated).toLocaleString() : '—';html += '<tr class="folder-row" data-folder="' + esc(fp) + '" data-agent="' + esc(aid) + '" style="border-bottom:1px solid var(--border-light);cursor:pointer;" onmouseover="this.style.background=\'var(--bg-subtle)\'" onmouseout="this.style.background=\'\'">';html += '<td style="padding:10px 12px;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" title="' + esc(fp) + '"><span style="font-family:var(--font-mono);font-size:12px;">' + esc(fp) + '</span></td>';html += '<td style="padding:10px 12px;"><span style="background:var(--bg-inset);padding:2px 8px;border-radius:3px;font-size:11px;font-weight:600;">' + esc(aid) + '</span></td>';40 unmodified lineshtml += '<span style="font-size:11px;color:var(--ink-muted);font-family:var(--font-mono);">' + esc(ts) + '</span>';html += '</div>';if (o.title) html += '<div style="font-weight:600;font-size:14px;color:var(--ink);margin-bottom:4px;">' + esc(o.title) + '</div>';if (o.text) html += '<div style="font-size:13px;color:var(--ink-secondary);line-height:1.5;white-space:pre-wrap;">' + esc(o.text.length > 300 ? o.text.slice(0,300)+'…' : o.text) + '</div>';html += '</div>';});}49 unmodified linesasync function loadGraph() {var el = document.getElementById('view-graph');el.innerHTML = '<div class="graph-container"><div class="graph-canvas-wrap"><canvas id="graph-canvas"></canvas><div class="graph-controls"><button title="Zoom In" data-action="zoom-graph" data-dir="1">+</button><button title="Zoom Out" data-action="zoom-graph" data-dir="-1">−</button><div class="ctrl-divider"></div><button title="Recenter" data-action="recenter-graph">⌖</button></div><div class="graph-tooltip" id="graph-tooltip"></div></div><div class="graph-sidebar" id="graph-sidebar"></div></div>';state.graph.queryError = null;var graphData;107 unmodified lines});html += '</div>';html += '<button class="btn" style="margin-top:14px;width:100%;font-size:11px;padding:8px;letter-spacing:0.06em;transition:all 0.15s ease;" data-action="rebuild-graph">↻ Rebuild Graph</button>';html += '<div id="selected-node-panel"></div>';var __focus = captureSearchFocus(['graph-search']);sb.innerHTML = html;848 unmodified lineshtml += '</div>';if (o.title) html += '<div style="font-weight:600;font-size:13px;color:var(--ink);margin-bottom:3px;">' + esc(o.title) + '</div>';if (o.text) {var excerpt = o.text.length > 200 ? o.text.slice(0, 200) + '…' : o.text;html += '<div style="font-size:12px;color:var(--ink-secondary);line-height:1.5;">' + esc(excerpt) + '</div>';}html += '</div>';523 unmodified lineshost.innerHTML = '<button type="button" class="flag-summary" data-action="toggle-flags" aria-expanded="' + (expanded ? 'true' : 'false') + '" aria-controls="flag-list">' +pills +'<span class="flag-count">Feature flags</span>' +'<span style="color:var(--ink-faint);">— click to ' + (expanded ? 'collapse' : 'expand') + '</span>' +'<span class="flag-toggle" aria-hidden="true">' + (expanded ? '▲' : '▼') + '</span>' +'</button>' +'<div class="flag-list' + (expanded ? ' open' : '') + '" id="flag-list">' + listHtml + '</div>';233 unmodified linesvar doneClass = done ? ' done' : '';return '<div class="onboarding-step">' +'<div class="step-header">' +'<div class="step-num' + doneClass + '">' + (done ? '✓' : num) + '</div>' +'<div class="step-title">' + title + '</div>' +'</div>' +'<div class="step-code-wrap">' +88 unmodified lineshtml += '<div id="tool-panel" style="display:none;">' +'<h3 id="tool-panel-title"></h3>' +'<textarea id="tool-args-editor" spellcheck="false">{}</textarea>' +'<div><button id="tool-run-btn">Run â–¶</button></div>' +'<div id="tool-response" style="display:none;"></div>' +'<div class="tool-history" id="tool-history-wrap"></div>' +'</div>';41 unmodified linesrespEl.style.display = '';return;}btn.textContent = 'Running…';btn.disabled = true;try {var result = await apiFetchRaw('/agentmemory/mcp/tools', {14 unmodified linesrespEl.className = 'error';respEl.style.display = '';} finally {btn.textContent = 'Run â–¶';btn.disabled = false;}});7 unmodified linesvar html = '<details class="tool-history"><summary>History (' + _toolHistory.length + ')</summary>';_toolHistory.forEach(function(h) {var badge = h.ok? '<span class="badge-ok">✓ ok</span>': '<span class="badge-err">✗ err</span>';html += '<details class="tool-history-entry">' +'<summary>' + badge + ' <span style="font-weight:600;">' + esc(h.name) + '</span>' +' <span style="color:var(--ink-faint);font-size:10px;">' + h.ts.slice(11,19) + '</span></summary>' +89 unmodified lines// Global keydown handler for command palettedocument.addEventListener('keydown', function(e) {// Ctrl+K or Cmd+K — open paletteif ((e.ctrlKey || e.metaKey) && e.key === 'k') {e.preventDefault();if (_cmdOpen) { closeCommandPalette(); } else { openCommandPalette(); }1234193 unmodified lines19819920020120220320411 unmodified lines21621721821922022122222322445 unmodified lines27027127227327427527643 unmodified lines320321322323324325326485 unmodified lines812813814815816817818494 unmodified lines1313131413151316131713181319132013211322132313241325376 unmodified lines170217031704170517061707170840 unmodified lines174917501751175217531754175549 unmodified lines1805180618071808180918101811107 unmodified lines1919192019211922192319241925848 unmodified lines2774277527762777277827792780523 unmodified lines3304330533063307330833093310233 unmodified lines354435453546354735483549355088 unmodified lines363936403641364236433644364541 unmodified lines368736883689369036913692369314 unmodified lines37083709371037113712371337147 unmodified lines3722372337243725372637273728372989 unmodified lines3819382038213822382338243825<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">193 unmodified linesoutline-offset: -2px;}/* -- B6.3 Loading skeleton states --------------------------------- */@keyframes shimmer {0% { background-position: -200% 0; }100% { background-position: 200% 0; }11 unmodified lines.skeleton-line { height: 14px; margin-bottom: 6px; }.skeleton-line.short { width: 60%; }/* -- B1 Command palette ------------------------------------------- */#cmd-palette { display: contents; }#cmd-palette[hidden] { display: none !important; }#cmd-backdrop {position: fixed; inset: 0;background: rgba(0,0,0,0.45);45 unmodified lines.cmd-main { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.cmd-sub { font-size: 11px; color: var(--ink-faint); flex-shrink: 0; }/* -- B5 MCP Tool Tester tab --------------------------------------- */.tools-list { display: flex; flex-direction: column; gap: 0; max-width: 900px; }.tool-row {border: 1px solid var(--border-light); border-top: none;43 unmodified lines.badge-ok { color: var(--green); }.badge-err { color: var(--accent); }/* -- B4 Onboarding card ------------------------------------------- */.onboarding-card {border: 2px solid var(--border); padding: 28px 32px;max-width: 640px; margin: 32px auto; background: var(--cream);485 unmodified lines}.empty-state .empty-link { color: var(--accent); text-decoration: underline; font-size: 13px; font-style: normal; }/* Feature flag banner system -- compact collapsed by default */.flag-banners {padding: 0 12px 10px 12px;background: var(--bg);494 unmodified lines<div id="view-memories" class="view" role="tabpanel" aria-labelledby="tab-btn-memories"></div><div id="view-timeline" class="view" role="tabpanel" aria-labelledby="tab-btn-timeline"></div><div id="view-tools" class="view" role="tabpanel" aria-labelledby="tab-btn-tools"></div><!-- legacy view containers removed -- backed by endpoints that no longer exist --><!-- Command Palette (B1) --><div id="cmd-palette" hidden role="dialog" aria-modal="true" aria-label="Command Palette"><div id="cmd-backdrop"></div><div id="cmd-panel"><input id="cmd-input" type="text" placeholder="Search folders, memories, tabs..." autocomplete="off" aria-label="Command palette search"><ul id="cmd-results" role="listbox" aria-label="Search results"></ul></div></div>376 unmodified linesvar fp = f.folderPath || '';var aid = f.agentId || '';var obs = f.obsCount || 0;var updated = f.lastUpdated ? new Date(f.lastUpdated).toLocaleString() : '\u2014';html += '<tr class="folder-row" data-folder="' + esc(fp) + '" data-agent="' + esc(aid) + '" style="border-bottom:1px solid var(--border-light);cursor:pointer;" onmouseover="this.style.background=\'var(--bg-subtle)\'" onmouseout="this.style.background=\'\'">';html += '<td style="padding:10px 12px;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" title="' + esc(fp) + '"><span style="font-family:var(--font-mono);font-size:12px;">' + esc(fp) + '</span></td>';html += '<td style="padding:10px 12px;"><span style="background:var(--bg-inset);padding:2px 8px;border-radius:3px;font-size:11px;font-weight:600;">' + esc(aid) + '</span></td>';40 unmodified lineshtml += '<span style="font-size:11px;color:var(--ink-muted);font-family:var(--font-mono);">' + esc(ts) + '</span>';html += '</div>';if (o.title) html += '<div style="font-weight:600;font-size:14px;color:var(--ink);margin-bottom:4px;">' + esc(o.title) + '</div>';if (o.text) html += '<div style="font-size:13px;color:var(--ink-secondary);line-height:1.5;white-space:pre-wrap;">' + esc(o.text.length > 300 ? o.text.slice(0,300)+'\u2026' : o.text) + '</div>';html += '</div>';});}49 unmodified linesasync function loadGraph() {var el = document.getElementById('view-graph');el.innerHTML = '<div class="graph-container"><div class="graph-canvas-wrap"><canvas id="graph-canvas"></canvas><div class="graph-controls"><button title="Zoom In" data-action="zoom-graph" data-dir="1">+</button><button title="Zoom Out" data-action="zoom-graph" data-dir="-1">−</button><div class="ctrl-divider"></div><button title="Recenter" data-action="recenter-graph">⌖</button></div><div class="graph-tooltip" id="graph-tooltip"></div></div><div class="graph-sidebar" id="graph-sidebar"></div></div>';state.graph.queryError = null;var graphData;107 unmodified lines});html += '</div>';html += '<button class="btn" style="margin-top:14px;width:100%;font-size:11px;padding:8px;letter-spacing:0.06em;transition:all 0.15s ease;" data-action="rebuild-graph">↻ Rebuild Graph</button>';html += '<div id="selected-node-panel"></div>';var __focus = captureSearchFocus(['graph-search']);sb.innerHTML = html;848 unmodified lineshtml += '</div>';if (o.title) html += '<div style="font-weight:600;font-size:13px;color:var(--ink);margin-bottom:3px;">' + esc(o.title) + '</div>';if (o.text) {var excerpt = o.text.length > 200 ? o.text.slice(0, 200) + '\u2026' : o.text;html += '<div style="font-size:12px;color:var(--ink-secondary);line-height:1.5;">' + esc(excerpt) + '</div>';}html += '</div>';523 unmodified lineshost.innerHTML = '<button type="button" class="flag-summary" data-action="toggle-flags" aria-expanded="' + (expanded ? 'true' : 'false') + '" aria-controls="flag-list">' +pills +'<span class="flag-count">Feature flags</span>' +'<span style="color:var(--ink-faint);">— click to ' + (expanded ? 'collapse' : 'expand') + '</span>' +'<span class="flag-toggle" aria-hidden="true">' + (expanded ? '▲' : '▼') + '</span>' +'</button>' +'<div class="flag-list' + (expanded ? ' open' : '') + '" id="flag-list">' + listHtml + '</div>';233 unmodified linesvar doneClass = done ? ' done' : '';return '<div class="onboarding-step">' +'<div class="step-header">' +'<div class="step-num' + doneClass + '">' + (done ? '\u2713' : num) + '</div>' +'<div class="step-title">' + title + '</div>' +'</div>' +'<div class="step-code-wrap">' +88 unmodified lineshtml += '<div id="tool-panel" style="display:none;">' +'<h3 id="tool-panel-title"></h3>' +'<textarea id="tool-args-editor" spellcheck="false">{}</textarea>' +'<div><button id="tool-run-btn">Run ▶</button></div>' +'<div id="tool-response" style="display:none;"></div>' +'<div class="tool-history" id="tool-history-wrap"></div>' +'</div>';41 unmodified linesrespEl.style.display = '';return;}btn.textContent = 'Running...';btn.disabled = true;try {var result = await apiFetchRaw('/agentmemory/mcp/tools', {14 unmodified linesrespEl.className = 'error';respEl.style.display = '';} finally {btn.textContent = 'Run \u25b6';btn.disabled = false;}});7 unmodified linesvar html = '<details class="tool-history"><summary>History (' + _toolHistory.length + ')</summary>';_toolHistory.forEach(function(h) {var badge = h.ok? '<span class="badge-ok">✓ ok</span>': '<span class="badge-err">✗ err</span>';html += '<details class="tool-history-entry">' +'<summary>' + badge + ' <span style="font-weight:600;">' + esc(h.name) + '</span>' +' <span style="color:var(--ink-faint);font-size:10px;">' + h.ts.slice(11,19) + '</span></summary>' +89 unmodified lines// Global keydown handler for command palettedocument.addEventListener('keydown', function(e) {// Ctrl+K or Cmd+K -- open paletteif ((e.ctrlKey || e.metaKey) && e.key === 'k') {e.preventDefault();if (_cmdOpen) { closeCommandPalette(); } else { openCommandPalette(); }
src/viewer/index.html+22-21