agentgui 1.0.567 → 1.0.568

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.567",
3
+ "version": "1.0.568",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -865,7 +865,7 @@ class AgentGUIClient {
865
865
  this.startChunkPolling(data.conversationId);
866
866
 
867
867
  // Show queue/steer UI when streaming starts (for busy prompt)
868
- this.fetchAndRenderQueue(data.conversationId);
868
+ this.showStreamingPromptButtons();
869
869
 
870
870
  // IMMUTABLE: Prompt area remains enabled - user can queue/steer messages
871
871
  this.emit('streaming:start', data);
@@ -2774,6 +2774,25 @@ class AgentGUIClient {
2774
2774
  if (this.ui.messageInput) {
2775
2775
  this.ui.messageInput.disabled = false;
2776
2776
  }
2777
+
2778
+ this.updateBusyPromptArea(conversationId);
2779
+ }
2780
+
2781
+ updateBusyPromptArea(conversationId) {
2782
+ const isStreaming = this.state.streamingConversations.has(conversationId);
2783
+ const isConnected = this.wsManager?.isConnected;
2784
+
2785
+ const injectBtn = document.getElementById('injectBtn');
2786
+ const steerBtn = document.getElementById('steerBtn');
2787
+ const stopBtn = document.getElementById('stopBtn');
2788
+
2789
+ if (injectBtn) injectBtn.style.display = isStreaming ? 'flex' : 'none';
2790
+ if (steerBtn) steerBtn.style.display = isStreaming ? 'flex' : 'none';
2791
+ if (stopBtn) stopBtn.style.display = isStreaming ? 'flex' : 'none';
2792
+
2793
+ if (injectBtn) injectBtn.disabled = !isConnected;
2794
+ if (steerBtn) steerBtn.disabled = !isConnected;
2795
+ if (stopBtn) stopBtn.disabled = !isConnected;
2777
2796
  }
2778
2797
 
2779
2798
  removeScrollUpDetection() {
@@ -3044,6 +3063,13 @@ class AgentGUIClient {
3044
3063
  if (this.ui.sendButton) {
3045
3064
  this.ui.sendButton.disabled = !this.wsManager.isConnected;
3046
3065
  }
3066
+ // Also disable queue/steer buttons if disconnected
3067
+ if (this.ui.injectButton && this.ui.injectButton.classList.contains('visible')) {
3068
+ this.ui.injectButton.disabled = !this.wsManager.isConnected;
3069
+ }
3070
+ if (this.ui.steerButton && this.ui.steerButton.classList.contains('visible')) {
3071
+ this.ui.steerButton.disabled = !this.wsManager.isConnected;
3072
+ }
3047
3073
  }
3048
3074
 
3049
3075
  /**
@@ -3065,6 +3091,20 @@ class AgentGUIClient {
3065
3091
  if (injectBtn) injectBtn.disabled = false;
3066
3092
  }
3067
3093
 
3094
+ /**
3095
+ * Show queue/steer buttons when streaming (busy prompt state)
3096
+ */
3097
+ showStreamingPromptButtons() {
3098
+ if (this.ui.injectButton) {
3099
+ this.ui.injectButton.classList.add('visible');
3100
+ this.ui.injectButton.disabled = !this.wsManager.isConnected;
3101
+ }
3102
+ if (this.ui.steerButton) {
3103
+ this.ui.steerButton.classList.add('visible');
3104
+ this.ui.steerButton.disabled = !this.wsManager.isConnected;
3105
+ }
3106
+ }
3107
+
3068
3108
  /**
3069
3109
  * Ensure prompt area is always enabled and shows queue/steer when agent streaming
3070
3110
  */