agentgui 1.0.602 → 1.0.603
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
|
@@ -751,6 +751,8 @@ class StreamingRenderer {
|
|
|
751
751
|
if (block.id) details.dataset.toolUseId = block.id;
|
|
752
752
|
details.classList.add(this._getBlockTypeClass('tool_use'));
|
|
753
753
|
details.classList.add(this._getToolColorClass(toolName));
|
|
754
|
+
const normalizedForOpen = toolName.replace(/^mcp__.*?__/, '');
|
|
755
|
+
if (normalizedForOpen === 'TodoWrite') details.open = true;
|
|
754
756
|
const summary = document.createElement('summary');
|
|
755
757
|
summary.className = 'folded-tool-bar';
|
|
756
758
|
const displayName = this.getToolUseDisplayName(toolName);
|
|
@@ -1228,17 +1230,8 @@ class StreamingRenderer {
|
|
|
1228
1230
|
const content = block.content || '';
|
|
1229
1231
|
const toolName = block.tool_name || block.name || '';
|
|
1230
1232
|
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
if ((toolName.includes('TodoWrite') || (typeof content === 'object' && Array.isArray(content?.todos))) && typeof content === 'object' && content.todos && Array.isArray(content.todos)) {
|
|
1234
|
-
const statusIcons = { completed: '✅', in_progress: '⚙', pending: '☐' };
|
|
1235
|
-
const completedCount = content.todos.filter(t => t.status === 'completed').length;
|
|
1236
|
-
const totalCount = content.todos.length;
|
|
1237
|
-
const items = content.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('');
|
|
1238
|
-
const div = document.createElement('div');
|
|
1239
|
-
div.className = 'block-tool-result';
|
|
1240
|
-
div.innerHTML = `<details class="folded-tool" open><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><div class="folded-tool-body tool-param-todos" style="padding:0.75rem">${items}</div></details>`;
|
|
1241
|
-
return div;
|
|
1233
|
+
if (toolName.includes('TodoWrite') || (typeof content === 'object' && Array.isArray(content?.todos))) {
|
|
1234
|
+
return null;
|
|
1242
1235
|
}
|
|
1243
1236
|
|
|
1244
1237
|
const contentStr = typeof content === 'string' ? content : JSON.stringify(content, null, 2);
|