[groq] [RESEARCH] MemPalace — Local AI Memory System Assessment & Leverage Plan (#1047) #1089
21
app.js
21
app.js
@@ -1931,7 +1931,7 @@ function setupControls() {
|
||||
|
||||
// Add MemPalace mining button
|
||||
document.querySelector('.chat-quick-actions').innerHTML += `
|
||||
<button class="quick-action-btn" onclick="mineChatToMemPalace()">Mine Chat</button>
|
||||
<button class="quick-action-btn" onclick="mineMemPalaceContent()">Mine Chat</button>
|
||||
<div id="mem-palace-stats" class="mem-palace-stats">
|
||||
<div>Compression: <span id="compression-ratio">--</span>x</div>
|
||||
<div>Docs: <span id="docs-mined">0</span></div>
|
||||
@@ -2249,15 +2249,20 @@ function saveSession() {
|
||||
|
||||
// Store in MemPalace
|
||||
if (window.mempalace) {
|
||||
mempalace.add_drawer('chat_history', {
|
||||
content: JSON.stringify(msgs),
|
||||
metadata: {
|
||||
type: 'chat',
|
||||
timestamp: Date.now()
|
||||
}
|
||||
});
|
||||
try {
|
||||
mempalace.add_drawer('chat_history', {
|
||||
content: JSON.stringify(msgs),
|
||||
metadata: {
|
||||
type: 'chat',
|
||||
timestamp: Date.now()
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('MemPalace save failed:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to localStorage
|
||||
localStorage.setItem('nexus_chat_history', JSON.stringify(msgs));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user