@kingsoftcloud/agentkit-harness-ui 0.0.2 → 0.0.3

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": "@kingsoftcloud/agentkit-harness-ui",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Reusable React task-process UI for AgentKit Native: an explicitly versioned event protocol, a pure state reducer, and an accessible timeline. No Studio/DSH/Python imports; React is a peer dependency.",
package/src/renderers.mjs CHANGED
@@ -94,7 +94,9 @@ function toolShell(item, opts, { icon, summary, body, canToggle = true, defaultO
94
94
  const streaming = toolIsLive(item);
95
95
  if (provisional) { canToggle = false; summaryAction = undefined; actions = []; }
96
96
  const error = status === ToolStatus.Failed && item.error ? redactError(item.error) : null;
97
- if (error && !canToggle) { canToggle = true; defaultOpen = false; }
97
+ // Plain static read failures are already fully visible inline. Structured
98
+ // failures retain a disclosure for the original bounded diagnostic evidence.
99
+ if (error && !canToggle && toolErrorSummary(item.error, opts) !== error) { canToggle = true; defaultOpen = false; }
98
100
  const open = resolveOpen(item, opts, defaultOpen == null ? streaming : defaultOpen, canToggle);
99
101
  const summaryKids = [];
100
102
  if (icon && opts.showToolIcon !== false) summaryKids.push(icon);