@199-bio/engram 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/web/static/app.js +8 -2
- package/src/web/static/index.html +3 -1
- package/src/web/static/style.css +8 -0
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/web/static/app.js
CHANGED
|
@@ -376,17 +376,21 @@ async function checkChatStatus() {
|
|
|
376
376
|
const data = await api('/api/chat/status');
|
|
377
377
|
chatConfigured = data.configured;
|
|
378
378
|
if (!chatConfigured) {
|
|
379
|
-
chatStatus.textContent =
|
|
379
|
+
chatStatus.textContent = 'Set ANTHROPIC_API_KEY env var to enable chat';
|
|
380
380
|
chatStatus.classList.add('error');
|
|
381
381
|
chatInput.disabled = true;
|
|
382
|
+
chatInput.placeholder = 'Chat disabled - API key not configured';
|
|
382
383
|
} else {
|
|
383
384
|
chatStatus.textContent = '';
|
|
384
385
|
chatStatus.classList.remove('error');
|
|
385
386
|
chatInput.disabled = false;
|
|
387
|
+
chatInput.placeholder = 'Ask me to manage entities...';
|
|
386
388
|
}
|
|
387
389
|
} catch (e) {
|
|
388
390
|
chatStatus.textContent = 'Failed to connect to chat service';
|
|
389
391
|
chatStatus.classList.add('error');
|
|
392
|
+
chatInput.disabled = true;
|
|
393
|
+
chatInput.placeholder = 'Chat unavailable';
|
|
390
394
|
}
|
|
391
395
|
}
|
|
392
396
|
|
|
@@ -470,13 +474,15 @@ async function clearChatHistory() {
|
|
|
470
474
|
// Keep only the initial welcome message
|
|
471
475
|
chatMessages.innerHTML = `
|
|
472
476
|
<div class="chat-message assistant">
|
|
473
|
-
<p>Hi! I can help you manage your memories and entities
|
|
477
|
+
<p>Hi! I can help you manage your memories and entities.</p>
|
|
478
|
+
<p><strong>Examples:</strong></p>
|
|
474
479
|
<ul>
|
|
475
480
|
<li>"Show me all entities"</li>
|
|
476
481
|
<li>"Find duplicates"</li>
|
|
477
482
|
<li>"Merge Boris into Boris Djordjevic"</li>
|
|
478
483
|
<li>"Delete the entity 'crashed'"</li>
|
|
479
484
|
</ul>
|
|
485
|
+
<p style="font-size: 0.8em; color: var(--text-muted); margin-top: 0.5rem;">Requires ANTHROPIC_API_KEY environment variable.</p>
|
|
480
486
|
</div>
|
|
481
487
|
`;
|
|
482
488
|
} catch (e) {
|
|
@@ -102,13 +102,15 @@
|
|
|
102
102
|
</div>
|
|
103
103
|
<div id="chat-messages" class="chat-messages">
|
|
104
104
|
<div class="chat-message assistant">
|
|
105
|
-
<p>Hi! I can help you manage your memories and entities
|
|
105
|
+
<p>Hi! I can help you manage your memories and entities.</p>
|
|
106
|
+
<p><strong>Examples:</strong></p>
|
|
106
107
|
<ul>
|
|
107
108
|
<li>"Show me all entities"</li>
|
|
108
109
|
<li>"Find duplicates"</li>
|
|
109
110
|
<li>"Merge Boris into Boris Djordjevic"</li>
|
|
110
111
|
<li>"Delete the entity 'crashed'"</li>
|
|
111
112
|
</ul>
|
|
113
|
+
<p style="font-size: 0.8em; color: var(--text-muted); margin-top: 0.5rem;">Requires ANTHROPIC_API_KEY environment variable.</p>
|
|
112
114
|
</div>
|
|
113
115
|
</div>
|
|
114
116
|
<div id="chat-status" class="chat-status"></div>
|
package/src/web/static/style.css
CHANGED
|
@@ -463,6 +463,8 @@ button:disabled {
|
|
|
463
463
|
|
|
464
464
|
.chat-panel.hidden {
|
|
465
465
|
transform: translateX(100%);
|
|
466
|
+
visibility: hidden;
|
|
467
|
+
pointer-events: none;
|
|
466
468
|
}
|
|
467
469
|
|
|
468
470
|
.chat-header {
|
|
@@ -609,6 +611,12 @@ button:disabled {
|
|
|
609
611
|
border-color: var(--accent);
|
|
610
612
|
}
|
|
611
613
|
|
|
614
|
+
.chat-input-form input:disabled {
|
|
615
|
+
background: var(--bg-tertiary);
|
|
616
|
+
color: var(--text-muted);
|
|
617
|
+
cursor: not-allowed;
|
|
618
|
+
}
|
|
619
|
+
|
|
612
620
|
.chat-input-form input::placeholder {
|
|
613
621
|
color: var(--text-muted);
|
|
614
622
|
}
|