Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions src/viewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1491,23 +1491,13 @@ <h1>agentmemory</h1>
await apiGet('sessions'),
await apiGet('memories?latest=true&limit=500'),
await apiGet('graph/stats'),
await apiGet('audit?limit=5'),
await apiGet('semantic'),
await apiGet('procedural'),
await apiGet('relations'),
await apiGet('lessons'),
await apiGet('crystals')
await apiGet('audit?limit=5')
];
state.dashboard.health = results[0];
state.dashboard.sessions = (results[1] && results[1].sessions) || [];
state.dashboard.memories = (results[2] && results[2].memories) || [];
state.dashboard.graphStats = results[3];
state.dashboard.recentAudit = (results[4] && results[4].entries) || [];
state.dashboard.semantic = (results[5] && results[5].facts) || (results[5] && results[5].semantic) || [];
state.dashboard.procedural = (results[6] && results[6].procedures) || (results[6] && results[6].procedural) || [];
state.dashboard.lessons = (results[8] && results[8].lessons) || [];
state.dashboard.crystals = (results[9] && results[9].crystals) || [];
state.dashboard.relations = (results[7] && results[7].relations) || [];
state.dashboard.loaded = true;
renderDashboard();
} catch (err) {
Expand Down Expand Up @@ -1721,12 +1711,15 @@ <h1>agentmemory</h1>
var semFacts = d.semantic || [];
var procItems = d.procedural || [];
var relItems = d.relations || [];
var consolidationDeferred = d.semantic === undefined;

html += '<hr class="section-rule">';
html += '<div class="two-col">';

html += '<div class="card"><div class="card-title">Semantic Memory</div>';
if (semFacts.length === 0) {
if (consolidationDeferred) {
html += '<div style="font-size:13px;color:var(--ink-faint);font-style:italic;">Not loaded on the dashboard to keep large memory stores responsive.</div>';
} else if (semFacts.length === 0) {
html += '<div style="font-size:13px;color:var(--ink-faint);font-style:italic;">No semantic facts yet. Observations will be consolidated into semantic memories over time.</div>';
} else {
semFacts.slice(0, 5).forEach(function(f) {
Expand All @@ -1744,7 +1737,9 @@ <h1>agentmemory</h1>
html += '</div>';

html += '<div class="card"><div class="card-title">Procedural Memory</div>';
if (procItems.length === 0) {
if (consolidationDeferred) {
html += '<div style="font-size:13px;color:var(--ink-faint);font-style:italic;">Not loaded on the dashboard to keep large memory stores responsive.</div>';
} else if (procItems.length === 0) {
html += '<div style="font-size:13px;color:var(--ink-faint);font-style:italic;">No procedures yet. Repeated patterns will be extracted as procedures.</div>';
} else {
procItems.slice(0, 5).forEach(function(p) {
Expand All @@ -1766,10 +1761,10 @@ <h1>agentmemory</h1>
html += '</div>';

html += '<div class="card" style="margin-top:16px;"><div class="card-title">Consolidation Status</div>';
html += '<div class="consolidation-row"><span class="cl">Semantic facts</span><span class="cv">' + semFacts.length + '</span></div>';
html += '<div class="consolidation-row"><span class="cl">Procedures</span><span class="cv">' + procItems.length + '</span></div>';
html += '<div class="consolidation-row"><span class="cl">Relations</span><span class="cv">' + relItems.length + '</span></div>';
if (semFacts.length === 0 && procItems.length === 0 && relItems.length === 0) {
html += '<div class="consolidation-row"><span class="cl">Semantic facts</span><span class="cv">' + (consolidationDeferred ? '&mdash;' : semFacts.length) + '</span></div>';
html += '<div class="consolidation-row"><span class="cl">Procedures</span><span class="cv">' + (consolidationDeferred ? '&mdash;' : procItems.length) + '</span></div>';
html += '<div class="consolidation-row"><span class="cl">Relations</span><span class="cv">' + (consolidationDeferred ? '&mdash;' : relItems.length) + '</span></div>';
if (!consolidationDeferred && semFacts.length === 0 && procItems.length === 0 && relItems.length === 0) {
html += '<div style="font-size:12px;color:var(--ink-faint);margin-top:8px;line-height:1.5;">Consolidation distills session observations into durable facts and repeatable procedures. It runs on a schedule when <code>CONSOLIDATION_ENABLED=true</code> and an LLM provider key are set, or on demand via <code>memory_consolidate</code>.</div>';
}
html += '</div>';
Expand Down
7 changes: 1 addition & 6 deletions test/viewer-session-id.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ describe("viewer session rendering", () => {
"/agentmemory/memories",
"/agentmemory/graph/stats",
"/agentmemory/audit",
"/agentmemory/semantic",
"/agentmemory/procedural",
"/agentmemory/relations",
"/agentmemory/lessons",
"/agentmemory/crystals",
]);
});

Expand All @@ -228,7 +223,7 @@ describe("viewer session rendering", () => {
releaseSessions();
await Promise.all([initialLoad, pendingRefresh]);

expect(paths).toHaveLength(20);
expect(paths).toHaveLength(10);
});

it("attaches the saved viewer bearer to API calls", async () => {
Expand Down