[groq] [RESEARCH] MemPalace — Local AI Memory System Assessment & Leverage Plan (#1047) #1053
23
app.js
23
app.js
@@ -2124,6 +2124,18 @@ function saveSession() {
|
||||
html: el.innerHTML,
|
||||
className: el.className
|
||||
}));
|
||||
|
||||
// Store in MemPalace
|
||||
if (window.mempalace) {
|
||||
mempalace.add_drawer('chat_history', {
|
||||
content: JSON.stringify(msgs),
|
||||
metadata: {
|
||||
type: 'chat',
|
||||
timestamp: Date.now()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
localStorage.setItem('nexus_chat_history', JSON.stringify(msgs));
|
||||
}
|
||||
|
||||
@@ -2148,6 +2160,17 @@ function addChatMessage(agent, text, shouldSave = true) {
|
||||
const div = document.createElement('div');
|
||||
div.className = `chat-msg chat-msg-${agent}`;
|
||||
|
||||
// Store in MemPalace
|
||||
if (window.mempalace) {
|
||||
mempalace.add_drawer('chat_history', {
|
||||
content: text,
|
||||
metadata: {
|
||||
agent,
|
||||
timestamp: Date.now()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Store in MemPalace
|
||||
if (agent !== 'system') {
|
||||
// In a real implementation, we'd use mempalace.add_drawer()
|
||||
|
||||
@@ -309,6 +309,11 @@
|
||||
<div id="mem-palace-status" style="position:fixed; right:24px; top:24px; background:rgba(74,240,192,0.1); color:#4af0c0; padding:4px 8px; font-family:'Orbitron',sans-serif; font-size:12px; letter-spacing:0.1em;">
|
||||
INITIALIZING...
|
||||
</div>
|
||||
<div id="mem-palace-controls" style="position:fixed; right:24px; top:54px; background:rgba(74,240,192,0.05); padding:4px 8px; font-family:'JetBrains Mono',monospace; font-size:11px; border-left:2px solid #4af0c0;">
|
||||
<button onclick="mineMemPalace()">Mine Chat</button>
|
||||
<button onclick="searchMemPalace()">Search</button>
|
||||
</div>
|
||||
<div id="mempalace-results" style="position:fixed; right:24px; top:84px; max-height:200px; overflow-y:auto; background:rgba(0,0,0,0.3); padding:8px; font-family:'JetBrains Mono',monospace; font-size:11px; color:#e0f0ff; border-left:2px solid #4af0c0;"></div>
|
||||
<div id="mem-palace-controls" style="position:fixed; right:24px; top:54px; background:rgba(74,240,192,0.05); padding:4px 8px; font-family:'JetBrains Mono',monospace; font-size:10px; border-left:2px solid #4af0c0;">
|
||||
<button onclick="mineMemPalace()">Mine Chat</button>
|
||||
<button onclick="searchMemPalace()">Search</button>
|
||||
|
||||
@@ -441,7 +441,9 @@ canvas#nexus-canvas {
|
||||
font-variant-numeric: tabular-nums lining-nums;
|
||||
}
|
||||
|
||||
#mem-palace-status {
|
||||
#mem-palace-status,
|
||||
#mem-palace-controls {
|
||||
transition: all 0.3s ease;
|
||||
position: absolute;
|
||||
top: var(--space-4);
|
||||
right: var(--space-4);
|
||||
@@ -829,6 +831,7 @@ canvas#nexus-canvas {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.chat-messages {
|
||||
max-height: 280px;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
|
||||
Reference in New Issue
Block a user