CaroFernando commented on code in PR #8753:
URL: https://github.com/apache/texera/pull/8753#discussion_r4343787607
##########
agent-service/src/server.ts:
##########
@@ -493,6 +493,15 @@ export function buildApp() {
wsLog.info({ agentId, preview: msg.content.substring(0, 50) },
"received command");
+ // Reject a prompt that arrives while a run is already in flight
+ // instead of re-pointing that run's warehouse mid-execution
(#8711).
+ // Checked before setDelegateWarehouse so a busy agent's delegate
+ // config is left untouched.
+ if (agent.getState() !== AgentState.AVAILABLE) {
+ sendEventToClient(ws, new WsServerErrorEvent("Agent is busy
processing another message"));
Review Comment:
Fixed in c15d5a2. canSend() now also requires the selected agent to be
AVAILABLE, same as the chat panel. It reads the state through a new
AgentService.getAgentStateSnapshot(), which doesn’t create tracking for an
unknown id. sendFeedbackToAgent() checks the same thing, since Ctrl+Enter
bypasses the disabled button. When the agent is busy it shows a warning and
returns, so there’s no success toast and the textarea keeps its text. Added
specs for both. I also checked it on a live stack: Send was disabled mid-run,
and Ctrl+Enter showed only the busy warning with the input kept.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]