agentgui 1.0.558 → 1.0.560

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.558",
3
+ "version": "1.0.560",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -2515,7 +2515,8 @@ class AgentGUIClient {
2515
2515
  this.conversationCache.delete(conversationId);
2516
2516
  this.syncPromptState(conversationId);
2517
2517
  this.restoreScrollPosition(conversationId);
2518
- this.enableControls();
2518
+ // Prompt state is immutable: computed from shouldResumeStreaming via syncPromptState
2519
+ // Do not call enableControls/disableControls here - prompt state is determined by streaming status
2519
2520
  return;
2520
2521
  }
2521
2522
  }
@@ -2553,9 +2554,13 @@ class AgentGUIClient {
2553
2554
  const hasMoreChunks = totalChunks && chunks.length < totalChunks;
2554
2555
 
2555
2556
  const clientKnowsStreaming = this.state.streamingConversations.has(conversationId);
2556
- const shouldResumeStreaming = (isActivelyStreaming || clientKnowsStreaming) && latestSession &&
2557
+ const shouldResumeStreaming = latestSession &&
2557
2558
  (latestSession.status === 'active' || latestSession.status === 'pending');
2558
2559
 
2560
+ if (this.ui.messageInput) {
2561
+ this.ui.messageInput.disabled = shouldResumeStreaming;
2562
+ }
2563
+
2559
2564
  const outputEl = document.getElementById('output');
2560
2565
  if (outputEl) {
2561
2566
  const wdInfo = conversation.workingDirectory ? `${this.escapeHtml(conversation.workingDirectory)}` : '';
@@ -2743,8 +2748,11 @@ class AgentGUIClient {
2743
2748
  }
2744
2749
 
2745
2750
  syncPromptState(conversationId) {
2746
- const isStreaming = this.state.streamingConversations.has(conversationId);
2751
+ const conversation = this.state.currentConversation;
2752
+ if (!conversation || conversation.id !== conversationId) return;
2753
+
2747
2754
  if (this.ui.messageInput) {
2755
+ const isStreaming = this.state.streamingConversations.has(conversationId);
2748
2756
  if (isStreaming) {
2749
2757
  this.ui.messageInput.disabled = true;
2750
2758
  } else {