@kingsoftcloud/agentkit-harness-ui 0.0.21 → 0.0.22

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.21",
3
+ "version": "0.0.22",
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.",
@@ -98,6 +98,6 @@
98
98
  "registry": "https://registry.npmjs.org"
99
99
  },
100
100
  "dependencies": {
101
- "@kingsoftcloud/agentkit-harness-core": "0.0.21"
101
+ "@kingsoftcloud/agentkit-harness-core": "0.0.22"
102
102
  }
103
103
  }
@@ -587,7 +587,9 @@ function ScrollEnd({ reducedMotion, renderChildren, type, props }) {
587
587
  return createElement('article', { ...containerProps, className: 'harness-turn', 'data-testid': 'harness-turn' },
588
588
  createElement(HarnessTimeline, { state, onCopy, locale, ...timeline }),
589
589
  state.taskState === 'failed' && state.taskError
590
- ? createElement('p', { className: 'harness-turn-error', role: 'alert' }, state.taskError)
590
+ ? createElement('details', { className: 'harness-turn-error' },
591
+ createElement('summary', null, zh ? '本轮未完成,查看原因' : 'This turn did not complete. View reason'),
592
+ createElement('p', null, state.taskError))
591
593
  : state.taskState === 'paused' && state.taskReason === 'provider_unavailable' && state.taskMessage
592
594
  ? createElement('p', { className: 'harness-turn-model-pause', role: 'status' }, state.taskMessage) : null,
593
595
  answer?.kind === 'text' && !answer.streaming && (resolveWebDelivery || loadDeliveryEvidence)
package/src/styles.mjs CHANGED
@@ -268,7 +268,9 @@ button.harness-tool-summary { border: 0; background: none; color: inherit; font:
268
268
  .harness-work-history { margin: 0; }
269
269
  .harness-turn { width: 100%; min-width: 0; }
270
270
  .harness-turn + .harness-turn { margin-top: 24px; }
271
- .harness-turn-error { color: #cf222e; color: light-dark(#cf222e, #ff7b72); margin: 8px 0 0; }
271
+ .harness-turn-error { color: color-mix(in srgb, currentColor 60%, transparent); margin: 8px 0 0; }
272
+ .harness-turn-error > summary { cursor: pointer; }
273
+ .harness-turn-error > p { white-space: pre-wrap; overflow-wrap: anywhere; }
272
274
  .harness-delivery { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-top: 12px; border-radius: 10px;
273
275
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent); background: color-mix(in srgb, currentColor 6%, transparent);
274
276
  font-size: var(--ui-font-size, 14px); }