agentgui 1.0.562 → 1.0.564
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
package/static/js/client.js
CHANGED
|
@@ -2565,7 +2565,7 @@ class AgentGUIClient {
|
|
|
2565
2565
|
}
|
|
2566
2566
|
|
|
2567
2567
|
if (this.ui.messageInput) {
|
|
2568
|
-
this.ui.messageInput.disabled =
|
|
2568
|
+
this.ui.messageInput.disabled = false;
|
|
2569
2569
|
}
|
|
2570
2570
|
|
|
2571
2571
|
const outputEl = document.getElementById('output');
|
|
@@ -2659,7 +2659,7 @@ class AgentGUIClient {
|
|
|
2659
2659
|
toolResultBlocks.set(chunk.id, chunk);
|
|
2660
2660
|
return;
|
|
2661
2661
|
}
|
|
2662
|
-
const element = this.renderer.
|
|
2662
|
+
const element = this.renderer.renderBlock(chunk.block, chunk);
|
|
2663
2663
|
if (!element) return;
|
|
2664
2664
|
blockFrag.appendChild(element);
|
|
2665
2665
|
});
|
|
@@ -2759,12 +2759,7 @@ class AgentGUIClient {
|
|
|
2759
2759
|
if (!conversation || conversation.id !== conversationId) return;
|
|
2760
2760
|
|
|
2761
2761
|
if (this.ui.messageInput) {
|
|
2762
|
-
|
|
2763
|
-
if (isStreaming) {
|
|
2764
|
-
this.ui.messageInput.disabled = true;
|
|
2765
|
-
} else {
|
|
2766
|
-
this.ui.messageInput.disabled = !this.wsManager.isConnected;
|
|
2767
|
-
}
|
|
2762
|
+
this.ui.messageInput.disabled = !this.wsManager.isConnected;
|
|
2768
2763
|
}
|
|
2769
2764
|
}
|
|
2770
2765
|
|
|
@@ -619,13 +619,11 @@ class StreamingRenderer {
|
|
|
619
619
|
case 'TodoWrite':
|
|
620
620
|
if (input.todos && Array.isArray(input.todos)) {
|
|
621
621
|
const statusIcons = { completed: '✅', in_progress: '⚙', pending: '☐' };
|
|
622
|
-
const hasInProgress = input.todos.some(t => t.status === 'in_progress');
|
|
623
622
|
const completedCount = input.todos.filter(t => t.status === 'completed').length;
|
|
624
623
|
const totalCount = input.todos.length;
|
|
625
624
|
const items = input.todos.map(t => `<div class="todo-item"><span class="todo-status">${statusIcons[t.status] || '☐'}</span><span class="todo-text">${this.escapeHtml(t.content || '')}</span></div>`).join('');
|
|
626
|
-
const openAttr = hasInProgress ? 'open' : '';
|
|
627
625
|
const summary = `<summary class="folded-tool-bar" style="cursor:pointer;padding:0.5rem;background:var(--color-bg-secondary);border-radius:0.25rem;user-select:none"><span style="font-weight:600;font-size:0.9rem">📋 Tasks</span><span style="margin-left:0.5rem;font-size:0.8rem;color:var(--color-text-secondary)">${completedCount}/${totalCount} complete</span></summary>`;
|
|
628
|
-
return `<details class="folded-tool"
|
|
626
|
+
return `<details class="folded-tool" open>${summary}<div class="folded-tool-body tool-param-todos" style="padding:0.75rem">${items}</div></details>`;
|
|
629
627
|
}
|
|
630
628
|
return this.renderJsonParams(input);
|
|
631
629
|
|
|
@@ -2187,9 +2185,10 @@ class StreamingRenderer {
|
|
|
2187
2185
|
summary.textContent = summaryText;
|
|
2188
2186
|
|
|
2189
2187
|
const details = document.createElement('details');
|
|
2190
|
-
details.className = `block-type-${block.type}`;
|
|
2188
|
+
details.className = `block-type-${block.type} ${this._getBlockTypeClass(block.type)}`;
|
|
2191
2189
|
details.setAttribute('data-block-type', block.type);
|
|
2192
2190
|
details.setAttribute('data-lazy-load', 'pending');
|
|
2191
|
+
details.open = block.type === 'success' || (block.type === 'tool_result' && !block.is_error);
|
|
2193
2192
|
details.appendChild(summary);
|
|
2194
2193
|
|
|
2195
2194
|
// Attach lazy loader on first open
|