@artooi/ag-ui-web-component 0.18.0 → 0.19.0

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/CHANGELOG.md CHANGED
@@ -7,6 +7,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.19.0] — 2026-08-11
11
+
12
+ ### Changed
13
+
14
+ - **A tool card's arguments and its result are now two labelled regions, not one
15
+ block.** Compact mode emitted `args: {...}` and the result into a single
16
+ `<pre>` separated by a blank line, with nothing marking where the call ended
17
+ and the answer began. Both payloads now have their own heading, their own
18
+ `part` (`tool-card-args` / `tool-card-result`, headings via
19
+ `tool-card-section-label`, body via `tool-card-body`), and are pretty-printed.
20
+
21
+ ⚠ Breaking for anyone styling `tool-card-result` as a single combined block.
22
+ A call with no arguments no longer renders an empty `{}` in a box of its own.
23
+
24
+ - ⭐ **`data-tool-display` is now live.** Changing it restyles every card already
25
+ in the transcript, the way `data-answer-well` always has. The modes are pure
26
+ visibility over **one DOM shape**, selected by the shadow CSS from the host
27
+ attribute; previously each card baked its structure at construction from the
28
+ value read at that moment, so a change reached only cards created afterwards
29
+ and the setting appeared not to work until the next conversation.
30
+
31
+ `ToolCallCard`'s constructor consequently no longer takes a mode argument.
32
+
33
+ - **The confirmation card leaves once it is answered.** It stayed in the
34
+ transcript as a spent form with its buttons disabled, which read as an
35
+ outstanding question rather than a settled one. A prompt and a record are
36
+ different objects: the record is the tool card it gates, which settles to the
37
+ outcome and scrolls with the rest of the transcript.
38
+
39
+ - ⛔ **The confirmation card was appended to the wrong parent**, and it is the
40
+ reason it drifted to the foot of a turn. Every other inline card — tool,
41
+ approval, `ask_user`, run notices — goes into the turn's answer group; this
42
+ one went into the message list, so it became a sibling *after* the group and
43
+ anything that streamed afterwards rendered above it. It now joins the group
44
+ like its siblings.
45
+
46
+ ### Added
47
+
48
+ - **A gated call records the decision.** The tool card carries `approved by you`
49
+ / `declined by you` (part `tool-card-decision`, attribute `data-decision`).
50
+ Previously only a *refusal* left a trace — an approved call simply ran, making
51
+ a gated call's transcript identical to one that was never gated.
52
+
53
+ - **Each header control takes its own icon slot** — `icon-history`,
54
+ `icon-checkpoints`, `icon-new`, `icon-collapse` — with the built-in glyph as
55
+ the fallback, so existing embeds are unchanged. The glyph used to be the
56
+ button's own `textContent`: a host could restyle a control through its `part`,
57
+ or swap one character for another with a CSS `content` override, but could
58
+ never supply a brand `<img>` or `<svg>`.
59
+
60
+ - **`argumentsLabel`, `decisionApproved` and `decisionDeclined`** in `UiStrings`.
61
+ `resultLabel` / `errorLabel` / `declinedLabel` are now the result region's
62
+ heading rather than a toggle label, and `details` labels the toggle in every
63
+ mode.
64
+
65
+ ### Fixed
66
+
67
+ - **The demo harness reused message ids**, which produced three symptoms that
68
+ all read as component bugs and were none of them. It streamed every follow-up
69
+ answer under a hardcoded id, and `@ag-ui/client` appends to a message id
70
+ already in its history rather than starting a new one — so repeating a prompt
71
+ grew a single entry, that entry replayed out of order after a reload (sitting
72
+ where it was first created, with the later prompts after it), and the
73
+ unfinished-run notice then fired correctly over the corrupted history. Fresh
74
+ ids per message, as a real server issues.
75
+
10
76
  ## [0.18.0] — 2026-08-10
11
77
 
12
78
  ### Added
@@ -877,7 +943,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
877
943
  ### Notes
878
944
  - First release — exercising the automated npm OIDC publish pipeline end-to-end.
879
945
 
880
- [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.18.0...HEAD
946
+ [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.19.0...HEAD
947
+ [0.19.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.18.0...v0.19.0
881
948
  [0.18.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.17.0...v0.18.0
882
949
  [0.17.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.16.0...v0.17.0
883
950
  [0.16.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.15.0...v0.16.0
package/README.md CHANGED
@@ -164,6 +164,16 @@ That's the whole integration: an `endpoint` attribute pointing at your AG-UI ser
164
164
  | `data-theme-toggle` | — | Boolean: show a built-in header light⇄dark toggle (persists per tab). Off by default. See [Theme toggle](#theme-toggle). |
165
165
  | `data-strings` | `strings` | Partial JSON override of the UI string table (localization). The property wins key-by-key over the attribute; see [Internationalization](#internationalization-i18n). |
166
166
  | `data-icon-url` | — | Header (and sidebar-rail) icon image URL. A slotted `slot="icon"` wins; see [Header & launcher icon](#header-and-launcher-icon). |
167
+
168
+ Each header control also takes its own icon slot — `icon-history`, `icon-checkpoints`,
169
+ `icon-new`, `icon-collapse` — with the built-in glyph as the fallback, so a host can project a
170
+ brand `<img>` or `<svg>` rather than only restyling the character:
171
+
172
+ ```html
173
+ <ag-ui-chat endpoint="/agent/">
174
+ <svg slot="icon-new" width="16" height="16"><!-- ... --></svg>
175
+ </ag-ui-chat>
176
+ ```
167
177
  | `data-page-actions` | — | Opt-in built-in page-action tools: a comma list of `scroll` / `drag` (e.g. `"scroll,drag"`). See [Page-action tools](#page-action-tools). |
168
178
  | `data-side` | — | CSS-only, for `placement="sidebar"`: which edge it docks to — `right` (default) / `left`. |
169
179
  | `data-answer-well` | — | CSS-only boolean: box each assistant turn (its text, tool cards, and thinking) in one bordered "well". Off by default. See [The answer well](#the-answer-well). |
@@ -506,8 +516,23 @@ property), one of `inline` / `minimal` / `compact` / `full` (default `full`):
506
516
  result behind its own toggle. Reads as one line of the answer — pairs with [the answer
507
517
  well](#the-answer-well).
508
518
  - `minimal` — tool name + status pill only.
509
- - `compact` — name + status, with args *and* result behind a single collapsed "Details" toggle.
510
- - `full` — args inline, result behind its own toggle (the original behaviour).
519
+ - `compact` — name + status, with arguments *and* result behind a single collapsed toggle.
520
+ - `full` — arguments visible, result behind the toggle (the default).
521
+
522
+ Whichever mode is on, a settled card's body holds **two labelled regions** — `Arguments` and
523
+ `Result` (or `Error` / `Declined`) — each with its own part and each pretty-printed. They are
524
+ never run together into one block, so where the call ends and the answer begins is always
525
+ visible. Style them via the `tool-card-args` / `tool-card-result` parts, their headings via
526
+ `tool-card-section-label`, and the whole body via `tool-card-body`.
527
+
528
+ **The attribute is live.** Changing `data-tool-display` restyles every card already in the
529
+ transcript, the way `data-answer-well` does — the modes are pure visibility over one DOM shape,
530
+ selected by the shadow CSS from the host attribute.
531
+
532
+ A call gated behind the confirmation card also carries the decision (`approved by you` /
533
+ `declined by you`, part `tool-card-decision`, attribute `data-decision`). The prompt itself
534
+ disappears once answered: a prompt and a record are different objects, and the record is the
535
+ card.
511
536
 
512
537
  If a tool's schema carries an `x-summary` string (use `X_SUMMARY_KEY`), the card shows it on the
513
538
  label instead of the raw tool name.