agentgui 1.0.547 → 1.0.548
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 +1 -1
- package/static/js/client.js +30 -12
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -166,6 +166,7 @@ class AgentGUIClient {
|
|
|
166
166
|
this._subscribeToConversationUpdates();
|
|
167
167
|
this._recoverMissedChunks();
|
|
168
168
|
this.updateSendButtonState();
|
|
169
|
+
this.enablePromptArea();
|
|
169
170
|
this.emit('ws:connected');
|
|
170
171
|
});
|
|
171
172
|
|
|
@@ -173,6 +174,7 @@ class AgentGUIClient {
|
|
|
173
174
|
console.log('WebSocket disconnected');
|
|
174
175
|
this.updateConnectionStatus('disconnected');
|
|
175
176
|
this.updateSendButtonState();
|
|
177
|
+
this.disablePromptArea();
|
|
176
178
|
this.emit('ws:disconnected');
|
|
177
179
|
});
|
|
178
180
|
|
|
@@ -2326,29 +2328,23 @@ class AgentGUIClient {
|
|
|
2326
2328
|
|
|
2327
2329
|
/**
|
|
2328
2330
|
* Disable UI controls during streaming
|
|
2331
|
+
* NOTE: Only disables stop button visibility. Prompt, input, and inject remain enabled.
|
|
2329
2332
|
*/
|
|
2330
2333
|
disableControls() {
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
}
|
|
2334
|
-
// Send button state managed by WebSocket connection, not streaming state
|
|
2335
|
-
const injectBtn = document.getElementById('injectBtn');
|
|
2334
|
+
// Prompt area and inject button are NEVER disabled during streaming
|
|
2335
|
+
// Only stop button behavior changes
|
|
2336
2336
|
const stopBtn = document.getElementById('stopBtn');
|
|
2337
|
-
if (injectBtn) injectBtn.disabled = true;
|
|
2338
2337
|
if (stopBtn) stopBtn.disabled = false;
|
|
2339
2338
|
}
|
|
2340
2339
|
|
|
2341
2340
|
/**
|
|
2342
2341
|
* Enable UI controls
|
|
2342
|
+
* NOTE: Restores stop button visibility. Prompt area always stays enabled.
|
|
2343
2343
|
*/
|
|
2344
2344
|
enableControls() {
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
}
|
|
2348
|
-
// Send button state managed by WebSocket connection, not streaming state
|
|
2349
|
-
const injectBtn = document.getElementById('injectBtn');
|
|
2345
|
+
// Prompt area and inject button are always enabled unless disconnected
|
|
2346
|
+
// Only stop button behavior changes
|
|
2350
2347
|
const stopBtn = document.getElementById('stopBtn');
|
|
2351
|
-
if (injectBtn) injectBtn.disabled = false;
|
|
2352
2348
|
if (stopBtn) stopBtn.disabled = true;
|
|
2353
2349
|
}
|
|
2354
2350
|
|
|
@@ -2958,6 +2954,28 @@ class AgentGUIClient {
|
|
|
2958
2954
|
}
|
|
2959
2955
|
}
|
|
2960
2956
|
|
|
2957
|
+
/**
|
|
2958
|
+
* Disable prompt area (input and inject button) only on disconnect
|
|
2959
|
+
*/
|
|
2960
|
+
disablePromptArea() {
|
|
2961
|
+
if (this.ui.messageInput) {
|
|
2962
|
+
this.ui.messageInput.disabled = true;
|
|
2963
|
+
}
|
|
2964
|
+
const injectBtn = document.getElementById('injectBtn');
|
|
2965
|
+
if (injectBtn) injectBtn.disabled = true;
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
/**
|
|
2969
|
+
* Enable prompt area (input and inject button) on connect
|
|
2970
|
+
*/
|
|
2971
|
+
enablePromptArea() {
|
|
2972
|
+
if (this.ui.messageInput) {
|
|
2973
|
+
this.ui.messageInput.disabled = false;
|
|
2974
|
+
}
|
|
2975
|
+
const injectBtn = document.getElementById('injectBtn');
|
|
2976
|
+
if (injectBtn) injectBtn.disabled = false;
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2961
2979
|
/**
|
|
2962
2980
|
* Cleanup resources
|
|
2963
2981
|
*/
|