From f81bc144859d1d5ff03f9cee04e1b9c7adae0263 Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Fri, 5 Jun 2026 14:17:35 +0200 Subject: [PATCH] feat(dashboard): show real agent activity instead of always "Idle" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The agent panel showed "Idle" whenever no action was executing — which also covers bots that are chatting, deciding their next move, or whose self-prompter has stopped. getFullState() now derives a real status from the conversation manager and self-prompter state, exposed as action.kind, and the dashboard color-codes it. States: Acting (action label) / Chatting with / Thinking / Stopped (self-prompter off, won't act on its own) / Idle. --- src/agent/library/full_state.js | 21 ++++++++++++++++++++- src/mindcraft/public/index.html | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/agent/library/full_state.js b/src/agent/library/full_state.js index 45a1fbe22..6066c7de9 100644 --- a/src/agent/library/full_state.js +++ b/src/agent/library/full_state.js @@ -40,6 +40,24 @@ export function getFullState(agent) { const leggings = bot.inventory.slots[7]; const boots = bot.inventory.slots[8]; + // Richer activity than a bare "Idle": a bot counts as idle (no action executing) even while + // chatting, deciding its next move, or stopped. Surface those so the dashboard is meaningful. + let activity; + if (!agent.isIdle()) { + activity = { current: agent.actions.currentActionLabel || 'Acting', kind: 'acting' }; + } else if (convoManager.inConversation()) { + const who = convoManager.activeConversation?.name; + activity = { current: who ? `Chatting with ${who}` : 'Chatting', kind: 'chatting' }; + } else if (agent.self_prompter.isStopped()) { + activity = { current: 'Stopped', kind: 'stopped' }; // self-prompter OFF: won't act on its own + } else if (agent.self_prompter.isPaused()) { + activity = { current: 'Chatting', kind: 'chatting' }; + } else if (agent.self_prompter.isActive()) { + activity = { current: 'Thinking', kind: 'thinking' }; // self-prompting between actions + } else { + activity = { current: 'Idle', kind: 'idle' }; + } + const state = { name: agent.name, gameplay: { @@ -54,7 +72,8 @@ export function getFullState(agent) { timeLabel }, action: { - current: agent.isIdle() ? 'Idle' : agent.actions.currentActionLabel, + current: activity.current, + kind: activity.kind, isIdle: agent.isIdle() }, surroundings: { diff --git a/src/mindcraft/public/index.html b/src/mindcraft/public/index.html index 1c8f0f1be..d46146aea 100644 --- a/src/mindcraft/public/index.html +++ b/src/mindcraft/public/index.html @@ -713,6 +713,8 @@

Agent Settings

} if (actionEl && st.action) { actionEl.textContent = `${st.action.current || 'Idle'}`; + const _statusColors = { acting: '#4CAF50', chatting: '#42a5f5', thinking: '#9e9e9e', stopped: '#f44336', idle: '#888' }; + actionEl.style.color = _statusColors[st.action.kind] || ''; } if (invGrid && st.inventory?.counts) { const counts = st.inventory.counts;