From f9e7c07af88fac656b92ac3214f2e7c8531d54e4 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Mon, 20 Jul 2026 11:22:14 +0800 Subject: [PATCH] fix(steer): keep steer button clickable during active task and log injected instruction --- bridge/agent_bridge.py | 1 + channel/web/static/js/console.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bridge/agent_bridge.py b/bridge/agent_bridge.py index 927e2028..4a54d00c 100644 --- a/bridge/agent_bridge.py +++ b/bridge/agent_bridge.py @@ -368,6 +368,7 @@ class AgentBridge: def steer_session(self, session_id: str, instruction: str): """Inject an explicit instruction into one active session.""" + logger.info(f"[AgentBridge] steer new instruction: session={session_id}, content={instruction}") return get_steer_registry().submit(session_id, instruction) def get_agent(self, session_id: str = None) -> Optional[Agent]: diff --git a/channel/web/static/js/console.js b/channel/web/static/js/console.js index 87ecc14f..01355627 100644 --- a/channel/web/static/js/console.js +++ b/channel/web/static/js/console.js @@ -1775,10 +1775,13 @@ function resetSendBtnSendMode() { } function updateSteerBtnState() { + // Keep the steer button enabled whenever a task is running so users can + // fire successive guidance. Empty-input is guarded in steerActiveTask, + // avoiding a jarring disabled/not-allowed state right after each steer. const active = sendBtnMode === 'cancel' && !!activeRequestId; steerBtn.classList.toggle('hidden', !active); steerBtn.classList.toggle('flex', active); - steerBtn.disabled = !active || uploadingCount > 0 || !chatInput.value.trim(); + steerBtn.disabled = !active || uploadingCount > 0; } function steerActiveTask() {