personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'hopper-k7zdemkw-chat-progress-line'

+73
+5
convey/static/app.css
··· 1155 1155 50% { opacity: 1; } 1156 1156 } 1157 1157 1158 + .thinking-elapsed { 1159 + opacity: 0.5; 1160 + font-variant-numeric: tabular-nums; 1161 + } 1162 + 1158 1163 .chat-bar-response { 1159 1164 font-size: 13px; 1160 1165 line-height: 1.5;
+68
convey/templates/app.html
··· 352 352 } 353 353 }); 354 354 355 + function getProgressLabel(msg) { 356 + if (!msg) return null; 357 + if (msg.event === 'thinking') return 'Reasoning\u2026'; 358 + if (msg.event === 'tool_start') { 359 + var cmd = (msg.args && msg.args.command) || ''; 360 + if (!cmd && msg.args) { 361 + Object.values(msg.args).some(function(value) { 362 + if (typeof value === 'string') { 363 + cmd = value; 364 + return true; 365 + } 366 + return false; 367 + }); 368 + } 369 + 370 + if (cmd.includes('sol call journal search')) return 'Searching your journal\u2026'; 371 + if (cmd.includes('sol call journal events') || cmd.includes('sol call calendar list')) return 'Looking up events\u2026'; 372 + if (cmd.includes('sol call navigate')) return 'Navigating\u2026'; 373 + if (cmd.includes('sol call transcripts')) return 'Reading transcripts\u2026'; 374 + if (cmd.includes('sol call journal read')) return 'Reading your notes\u2026'; 375 + if (cmd.includes('sol call journal agents')) return 'Checking daily insights\u2026'; 376 + return 'Working\u2026'; 377 + } 378 + return null; 379 + } 380 + 381 + function updateThinkingLabel(text) { 382 + var barEl = document.getElementById('chatBarThinking'); 383 + var panelEl = document.getElementById('panelThinking'); 384 + [barEl, panelEl].forEach(function(el) { 385 + if (!el) return; 386 + el.innerHTML = '<span class="chat-bar-thinking-dot"></span> ' + text; 387 + }); 388 + } 389 + 355 390 // --- Form submit --- 356 391 form.onsubmit = async function(e) { 357 392 e.preventDefault(); ··· 385 420 appBar.classList.add('app-bar--glance'); 386 421 } 387 422 423 + var cleanupCortex = null; 424 + var timerInterval = null; 425 + var timerTimeout = null; 426 + var thinkingStarted = Date.now(); 427 + 388 428 try { 429 + if (window.appEvents) { 430 + cleanupCortex = window.appEvents.listen('cortex', function(msg) { 431 + var label = getProgressLabel(msg); 432 + if (label) updateThinkingLabel(label); 433 + }); 434 + } 435 + 436 + timerTimeout = setTimeout(function() { 437 + timerInterval = setInterval(function() { 438 + var elapsed = Math.round((Date.now() - thinkingStarted) / 1000); 439 + var suffix = ' <span class="thinking-elapsed">' + elapsed + 's</span>'; 440 + var barEl = document.getElementById('chatBarThinking'); 441 + var panelEl = document.getElementById('panelThinking'); 442 + [barEl, panelEl].forEach(function(el) { 443 + if (!el) return; 444 + var existing = el.querySelector('.thinking-elapsed'); 445 + if (existing) { 446 + existing.textContent = elapsed + 's'; 447 + } else { 448 + el.insertAdjacentHTML('beforeend', suffix); 449 + } 450 + }); 451 + }, 1000); 452 + }, 5000); 453 + 389 454 // Build conversation history from prior turns (exclude current message) 390 455 var history = messages.slice(0, -1).map(function(m) { 391 456 return { role: m.role, content: m.content }; ··· 456 521 } 457 522 save(); 458 523 } finally { 524 + if (cleanupCortex) { cleanupCortex(); cleanupCortex = null; } 525 + if (timerInterval) { clearInterval(timerInterval); timerInterval = null; } 526 + if (timerTimeout) { clearTimeout(timerTimeout); timerTimeout = null; } 459 527 var pt = document.getElementById('panelThinking'); 460 528 if (pt) pt.remove(); 461 529 thinking.style.display = 'none';