diff --git a/app.js b/app.js index 21c5c222..e9de42b7 100644 --- a/app.js +++ b/app.js @@ -1,3 +1,5 @@ +shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory +chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory import * as THREE from 'three'; import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js'; import { RenderPass } from 'three/addons/postprocessing/RenderPass.js'; @@ -1982,24 +1984,67 @@ function setupControls() { document.getElementById('chat-quick-actions').addEventListener('click', (e) => { const btn = e.target.closest('.quick-action-btn'); if (!btn) return; - - const action = btn.dataset.action; - - switch(action) { - case 'status': - sendChatMessage("Timmy, what is the current system status?"); - break; - case 'agents': - sendChatMessage("Timmy, check on all active agents."); - break; - case 'portals': - openPortalAtlas(); - break; - case 'help': - sendChatMessage("Timmy, I need assistance with Nexus navigation."); - break; - } + handleQuickAction(btn.dataset.action); }); + +// ═══ QUICK ACTION HANDLER ═══ +function handleQuickAction(action) { + switch(action) { + case 'status': { + const portalCount = portals.length; + const onlinePortals = portals.filter(p => p.userData && p.userData.status === 'online').length; + const agentCount = agents.length; + const wsState = wsConnected ? 'ONLINE' : 'OFFLINE'; + const wsColor = wsConnected ? '#4af0c0' : '#ff4466'; + addChatMessage('system', `[SYSTEM STATUS]`); + addChatMessage('timmy', `Nexus operational. ${portalCount} portals registered (${onlinePortals} online). ${agentCount} agent presences active. Hermes WebSocket: ${wsState}. Navigation mode: ${NAV_MODES[navModeIdx].toUpperCase()}. Performance tier: ${performanceTier.toUpperCase()}.`); + break; + } + case 'agents': { + addChatMessage('system', `[AGENT ROSTER]`); + if (agents.length === 0) { + addChatMessage('timmy', 'No active agent presences detected in the Nexus. The thought stream and harness pulse are the primary indicators of system activity.'); + } else { + const roster = agents.map(a => `- ${(a.userData && a.userData.name) || a.name || 'Unknown'}: ${(a.userData && a.userData.status) || 'active'}`).join('\n'); + addChatMessage('timmy', `Active agents:\n${roster}`); + } + break; + } + case 'portals': + openPortalAtlas(); + break; + case 'heartbeat': { + const agentLog = document.getElementById('agent-log-content'); + const recentEntries = agentLog ? agentLog.querySelectorAll('.agent-log-entry') : []; + const entryCount = recentEntries.length; + addChatMessage('system', `[HEARTBEAT INSPECTION]`); + addChatMessage('timmy', `Hermes heartbeat ${wsConnected ? 'active' : 'inactive'}. ${entryCount} recent entries in thought stream. WebSocket reconnect timer: ${wsReconnectTimer ? 'active' : 'idle'}. Harness pulse mesh: ${harnessPulseMesh ? 'rendering' : 'standby'}.`); + break; + } + case 'thoughts': { + const agentLog = document.getElementById('agent-log-content'); + const entries = agentLog ? Array.from(agentLog.querySelectorAll('.agent-log-entry')).slice(0, 5) : []; + addChatMessage('system', `[THOUGHT STREAM]`); + if (entries.length === 0) { + addChatMessage('timmy', 'The thought stream is quiet. No recent agent entries detected.'); + } else { + const summary = entries.map(e => '> ' + e.textContent.trim()).join('\n'); + addChatMessage('timmy', `Recent thoughts:\n${summary}`); + } + break; + } + case 'help': { + addChatMessage('system', `[NEXUS HELP]`); + addChatMessage('timmy', `Navigation: WASD to move, mouse to look around.\n` + + `Press V to cycle: Walk / Orbit / Fly mode.\n` + + `Enter to chat. Escape to close overlays.\n` + + `Press F near a portal to enter. Press E near a vision point to read.\n` + + `Press Tab for Portal Atlas.\n` + + `The Batcave Terminal shows system logs. The Workshop Terminal shows tool output.`); + break; + } + } +} document.getElementById('portal-close-btn').addEventListener('click', closePortalOverlay); document.getElementById('vision-close-btn').addEventListener('click', closeVisionOverlay); diff --git a/index.html b/index.html index 54ada489..eb7db81f 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,5 @@ +shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory +chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory @@ -143,10 +145,39 @@
- - - - +
STARTER PROMPTS
+
+ + + + + + +
diff --git a/style.css b/style.css index 2c3f70eb..731ed34a 100644 --- a/style.css +++ b/style.css @@ -983,7 +983,7 @@ canvas#nexus-canvas { .chat-quick-actions { display: flex; - flex-wrap: wrap; + flex-direction: column; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--color-border); @@ -991,6 +991,75 @@ canvas#nexus-canvas { pointer-events: auto; } +.chat-quick-actions.hidden { + display: none; +} + +.starter-label { + font-family: var(--font-display); + font-size: 9px; + letter-spacing: 0.15em; + color: var(--color-primary-dim); + text-transform: uppercase; + padding: 0 2px; +} + +.starter-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 4px; +} + +.starter-btn { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1px; + background: rgba(74, 240, 192, 0.06); + border: 1px solid rgba(74, 240, 192, 0.15); + color: var(--color-primary); + font-family: var(--font-body); + padding: 6px 8px; + cursor: pointer; + transition: all var(--transition-ui); + text-align: left; +} + +.starter-btn:hover { + background: rgba(74, 240, 192, 0.15); + border-color: var(--color-primary); + color: #fff; +} + +.starter-btn:hover .starter-icon { + color: #fff; +} + +.starter-btn:active { + transform: scale(0.97); +} + +.starter-icon { + font-size: 12px; + color: var(--color-primary); + line-height: 1; +} + +.starter-text { + font-size: 10px; + font-weight: 600; + white-space: nowrap; +} + +.starter-desc { + font-size: 8px; + color: rgba(74, 240, 192, 0.5); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; +} + /* Add hover effect for MemPalace mining button */ .quick-action-btn:hover { background: var(--color-primary-dim); @@ -1136,6 +1205,9 @@ canvas#nexus-canvas { .hud-location { font-size: var(--text-xs); } + .starter-grid { + grid-template-columns: repeat(2, 1fr); + } } @media (max-width: 480px) {