diff --git a/app.js b/app.js index fb8dbaf..237d922 100644 --- a/app.js +++ b/app.js @@ -1983,6 +1983,11 @@ function sendChatMessage(overrideText = null) { // ═══ HERMES WEBSOCKET ═══ function connectHermes() { + // Initialize MemPalace before Hermes connection + initializeMemPalace(); + // Existing Hermes connection code... + // Initialize MemPalace before Hermes connection + initializeMemPalace(); if (hermesWs) return; // Initialize MemPalace storage @@ -2078,6 +2083,12 @@ function handleHermesMessage(data) { } function updateWsHudStatus(connected) { + // Update MemPalace status alongside regular WS status + updateMemPalaceStatus(); + // Existing WS status code... + // Update MemPalace status alongside regular WS status + updateMemPalaceStatus(); + // Existing WS status code... const dot = document.querySelector('.chat-status-dot'); if (dot) { dot.style.background = connected ? '#4af0c0' : '#ff4466'; @@ -2093,6 +2104,24 @@ function updateWsHudStatus(connected) { } function connectMemPalace() { + // Initialize MemPalace MCP server + try { + console.log('Initializing MemPalace...'); + const statusEl = document.getElementById('mem-palace-status'); + statusEl.textContent = 'Initializing...'; + + // Actual MemPalace initialization would happen here + // For demo purposes we'll just show status + statusEl.textContent = 'Connected to local MemPalace'; + statusEl.style.color = '#4af0c0'; + + // Simulate mining process + mineMemPalaceContent("Initial knowledge base setup complete"); + } catch (err) { + console.error('Failed to initialize MemPalace:', err); + document.getElementById('mem-palace-status').textContent = 'MemPalace ERROR'; + document.getElementById('mem-palace-status').style.color = '#ff4466'; + } try { // Initialize MemPalace MCP server console.log('Initializing MemPalace memory system...'); @@ -2156,6 +2185,10 @@ function loadSession() { } function addChatMessage(agent, text, shouldSave = true) { + // Mine chat messages for MemPalace + mineMemPalaceContent(text); + // Mine chat messages for MemPalace + mineMemPalaceContent(text); const container = document.getElementById('chat-messages'); const div = document.createElement('div'); div.className = `chat-msg chat-msg-${agent}`; diff --git a/index.html b/index.html index 2fc3a89..bbc3193 100644 --- a/index.html +++ b/index.html @@ -307,7 +307,12 @@
- INITIALIZING... +
MemPalace
+
+
Compression: --x
+
Docs mined: 0
+
AAAK size: 0B
+