@artooi/ag-ui-web-component 0.7.0 → 0.8.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,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.0] — 2026-06-30
11
+
12
+ ### Added
13
+
14
+ - **Per-turn answer group + opt-in well (WELL-1).** Each assistant turn now
15
+ renders inside one `.answer` group (part `answer`) that holds its streamed
16
+ text, tool cards, and pending indicator — so a turn that calls tools reads as
17
+ a single answer instead of loose siblings. The group spans the whole
18
+ multi-round frontend-tool loop (several AG-UI runs), opening on the turn's
19
+ first run and closing at settle; user bubbles stay outside it, and history
20
+ replay reconstructs one group per assistant turn. Add the boolean
21
+ `data-answer-well` attribute to box that group in a bordered, padded "well"
22
+ (themeable via `--ag-ui-well-bg` / `--ag-ui-well-border`); without it the
23
+ layout is the flat stack as before. Pure CSS, turn-scoped, no JS API.
24
+ - **Full-screen page placement (PAGE-1).** New `placement="page"`: a full-bleed
25
+ background with the conversation in a centred reading column (default ~820px,
26
+ set via `--ag-ui-content-max-width`). The assistant turn spans the column
27
+ while the user message stays a right-aligned pill — the layout for a dedicated
28
+ chat page (distinct from `full`'s edge-to-edge, left-aligned messages).
29
+ - **Inline tool-display mode + themeable status icons (CARD-1).** New
30
+ `data-tool-display="inline"`: the lightest card — a one-line status row (icon
31
+ + summary, no box chrome) with the result behind its own toggle. Every
32
+ tool-call card now leads with a CSS-drawn **status icon** (part
33
+ `tool-card-icon`): a spinning ring while running, then a check / cross / slash
34
+ on success / error / decline, replacing the hardcoded `🔧` glyph. Re-theme via
35
+ `--ag-ui-tool-icon-done` / `--ag-ui-tool-icon-error` / `--ag-ui-tool-icon-declined`
36
+ and `--ag-ui-tool-spin-duration`; the spin respects `prefers-reduced-motion`.
37
+
10
38
  ## [0.7.0] — 2026-06-26
11
39
 
12
40
  ### Added
@@ -339,7 +367,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
339
367
  ### Notes
340
368
  - First release — exercising the automated npm OIDC publish pipeline end-to-end.
341
369
 
342
- [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.7.0...HEAD
370
+ [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.8.0...HEAD
371
+ [0.8.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.7.0...v0.8.0
343
372
  [0.7.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.6.0...v0.7.0
344
373
  [0.6.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.5.0...v0.6.0
345
374
  [0.5.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.4.0...v0.5.0
package/README.md CHANGED
@@ -147,7 +147,7 @@ That's the whole integration: an `endpoint` attribute pointing at your AG-UI ser
147
147
  | --- | --- | --- |
148
148
  | `endpoint` | `endpoint` | The AG-UI endpoint URL. Required to send. Reflecting getter + setter. |
149
149
  | `title-text` | — | Header label; defaults to `"Assistant"`. The only **observed** attribute (live-updates the header). |
150
- | `data-tool-display` | `toolDisplay` | Tool-call card detail: `minimal` / `compact` / `full` (default `full`). |
150
+ | `data-tool-display` | `toolDisplay` | Tool-call card detail: `inline` / `minimal` / `compact` / `full` (default `full`). |
151
151
  | `data-text-animation` | — | Incoming-text reveal: `none` (default) / `fade` / `word`. |
152
152
  | `data-prompt-chips` | — | `"true"` to surface skills as chips. |
153
153
  | `data-slash-commands` | — | `"true"` to enable the `/`-command palette. |
@@ -162,10 +162,11 @@ That's the whole integration: an `endpoint` attribute pointing at your AG-UI ser
162
162
  | `data-icon-url` | — | Header (and sidebar-rail) icon image URL. A slotted `slot="icon"` wins; see [Header & launcher icon](#header-and-launcher-icon). |
163
163
  | `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). |
164
164
  | `data-side` | — | CSS-only, for `placement="sidebar"`: which edge it docks to — `right` (default) / `left`. |
165
+ | `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). |
165
166
  | `collapsed` | `collapsed` | Reflected boolean; collapses the widget (to a rail under `placement="sidebar"`). Persisted per-tab in `sessionStorage`. |
166
167
  | `theme` | — | CSS-only: `light` (default) / `dark` / `auto` / `code`. |
167
168
  | `density` | — | CSS-only: `comfortable` (default) / `compact`. |
168
- | `placement` | — | CSS-only: `floating` (default) / `bottom-left` / `side` / `sidebar` / `full` / `embedded`. |
169
+ | `placement` | — | CSS-only: `floating` (default) / `bottom-left` / `side` / `sidebar` / `full` / `page` / `embedded`. |
169
170
 
170
171
  **Properties** (JS only, not attributes): `headers`, `allowImages`, `autoConfirm`,
171
172
  `confirmPredicate`, `agentFactory`, `getTools`, `getContext`, `routeMap`, `navigate`,
@@ -394,8 +395,11 @@ chat.addEventListener("ag-ui-toggle", (e) => console.log(e.detail.collapsed));
394
395
  ## Tool-call display modes
395
396
 
396
397
  How much a tool-call card shows is set via the `data-tool-display` attribute (or `toolDisplay`
397
- property), one of `minimal` / `compact` / `full` (default `full`):
398
+ property), one of `inline` / `minimal` / `compact` / `full` (default `full`):
398
399
 
400
+ - `inline` — the lightest mode: a single status row (icon + summary, no card chrome) with the
401
+ result behind its own toggle. Reads as one line of the answer — pairs with [the answer
402
+ well](#the-answer-well).
399
403
  - `minimal` — tool name + status pill only.
400
404
  - `compact` — name + status, with args *and* result behind a single collapsed "Details" toggle.
401
405
  - `full` — args inline, result behind its own toggle (the original behaviour).
@@ -403,6 +407,12 @@ property), one of `minimal` / `compact` / `full` (default `full`):
403
407
  If a tool's schema carries an `x-summary` string (use `X_SUMMARY_KEY`), the card shows it on the
404
408
  label instead of the raw tool name.
405
409
 
410
+ Every card leads with a **status icon** drawn entirely in CSS — a spinning ring while the call
411
+ runs, then a check / cross / slash on success / error / decline. Re-theme it via custom
412
+ properties (or the `tool-card-icon` part): `--ag-ui-tool-icon-done`, `--ag-ui-tool-icon-error`,
413
+ `--ag-ui-tool-icon-declined` (quoted-string glyphs) and `--ag-ui-tool-spin-duration` (spinner
414
+ speed; the spin respects `prefers-reduced-motion`).
415
+
406
416
  ```html
407
417
  <ag-ui-chat endpoint="/agent/" data-tool-display="compact"></ag-ui-chat>
408
418
  ```
@@ -752,8 +762,9 @@ have to hand-tune the variables:
752
762
 
753
763
  - `theme` — `light` (default) / `dark` / `auto` (follow the OS) / `code`.
754
764
  - `density` — `comfortable` (default) / `compact`.
755
- - `placement` — `floating` (default) / `bottom-left` / `side` / `sidebar` / `full` / `embedded`.
756
- `embedded` drops the fixed positioning and z-index so the widget sits in normal document flow.
765
+ - `placement` — `floating` (default) / `bottom-left` / `side` / `sidebar` / `full` / `page` /
766
+ `embedded`. `embedded` drops the fixed positioning and z-index so the widget sits in normal
767
+ document flow; `page` is a full-screen [centred reading column](#page-placement).
757
768
 
758
769
  ```html
759
770
  <ag-ui-chat endpoint="/agent/" theme="dark" density="compact" placement="side"></ag-ui-chat>
@@ -761,7 +772,7 @@ have to hand-tune the variables:
761
772
 
762
773
  See [`src/ui/styles.ts`](src/ui/styles.ts) for the full variable + preset list. The
763
774
  [`demo/`](demo/) live playground (`node demo/mock-server.mjs`) flips theme, density, placement,
764
- text-animation, and tool-display live from a single page.
775
+ text-animation, tool-display, and the answer well live from a single page.
765
776
 
766
777
  ### Parts and slots
767
778
 
@@ -777,9 +788,10 @@ ag-ui-chat::part(tool-card) { font-family: var(--my-mono); }
777
788
  ```
778
789
 
779
790
  Available parts: `panel`, `header`, `title`, `icon`, `header-controls`, `header-button`
780
- (plus `history-button` / `new-button` / `collapse-button`), `messages`, `message` (plus
781
- `message-user` / `message-assistant`), `empty`, `pending`, `tool-card` (plus `tool-card-head` /
782
- `-name` / `-status` / `-args` / `-toggle` / `-result`), `confirm` (plus `confirm-body` /
791
+ (plus `history-button` / `new-button` / `collapse-button`), `messages`, `answer` (the per-turn
792
+ group), `message` (plus `message-user` / `message-assistant`), `empty`, `pending`, `tool-card`
793
+ (plus `tool-card-head` / `-icon` / `-name` / `-status` / `-args` / `-toggle` / `-result`),
794
+ `confirm` (plus `confirm-body` /
783
795
  `-args` / `-actions` / `-button` / `-cancel` / `-confirm`), `composer`, `input`, `send`,
784
796
  `attach-button`, `attachment-tray`, `launcher`, `launcher-icon`, and the drawer parts
785
797
  (`drawer`, `drawer-backdrop`, `drawer-panel`, `drawer-header`, `drawer-title`, `drawer-new`,
@@ -828,6 +840,31 @@ carries `aria-expanded`. The slide honours `prefers-reduced-motion`.
828
840
  It overlays the page by default (no host-layout coupling). To make the host content reflow around
829
841
  it instead, set `--ag-ui-position: static` and place the element in your own grid/flex layout.
830
842
 
843
+ ### Page placement
844
+
845
+ `placement="page"` turns the widget into a full-screen chat **page**: a full-bleed background with
846
+ the conversation in a centred reading column (default ~820px, set via `--ag-ui-content-max-width`).
847
+ The assistant turn spans the column width while the user message stays a right-aligned pill. Unlike
848
+ `full` (edge-to-edge, left-aligned), it's the layout you want for a dedicated `/chat` route. Pairs
849
+ naturally with the [answer well](#the-answer-well).
850
+
851
+ ```html
852
+ <ag-ui-chat endpoint="/agent/" placement="page" data-answer-well></ag-ui-chat>
853
+ ```
854
+
855
+ ### The answer well
856
+
857
+ Each assistant turn renders inside one `.answer` group (part `answer`) that holds its streamed
858
+ text, tool cards, and pending indicator — so a turn that calls tools reads as a single answer
859
+ rather than a string of loose siblings. Add the boolean `data-answer-well` attribute to box that
860
+ group in a bordered, padded "well"; without it the layout is the flat stack as before. The well is
861
+ pure CSS and turn-scoped — no JS API — and themeable via `--ag-ui-well-bg` / `--ag-ui-well-border`
862
+ (and `::part(answer)`).
863
+
864
+ ```html
865
+ <ag-ui-chat endpoint="/agent/" data-answer-well></ag-ui-chat>
866
+ ```
867
+
831
868
  ---
832
869
 
833
870
  ## Internationalization (i18n)