@artooi/ag-ui-web-component 0.9.0 → 0.10.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 +61 -7
- package/dist/ag-ui-web-component.bundle.js +56 -56
- package/dist/ag-ui-web-component.bundle.js.map +3 -3
- package/dist/core/ag_ui_chat.d.ts +10 -1
- package/dist/core/ag_ui_chat.d.ts.map +1 -1
- package/dist/core/agui_client.d.ts.map +1 -1
- package/dist/core/attachment.d.ts +5 -0
- package/dist/core/attachment.d.ts.map +1 -1
- package/dist/core/conversation_store.d.ts +8 -0
- package/dist/core/conversation_store.d.ts.map +1 -1
- package/dist/core/remote_conversation_store.d.ts.map +1 -1
- package/dist/core/upload_attachment.d.ts +8 -2
- package/dist/core/upload_attachment.d.ts.map +1 -1
- package/dist/index.js +300 -58
- package/dist/index.js.map +2 -2
- package/dist/ui/attachment_tray.d.ts +7 -1
- package/dist/ui/attachment_tray.d.ts.map +1 -1
- package/dist/ui/relative_time.d.ts +5 -3
- package/dist/ui/relative_time.d.ts.map +1 -1
- package/dist/ui/styles.d.ts +1 -1
- package/dist/ui/styles.d.ts.map +1 -1
- package/dist/ui/thoughts_block.d.ts +2 -2
- package/dist/ui/thread_drawer.d.ts.map +1 -1
- package/dist/ui/tool_call_card.d.ts.map +1 -1
- package/dist/ui/voice_input.d.ts +9 -1
- package/dist/ui/voice_input.d.ts.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/ag_ui_chat.ts +79 -11
- package/src/core/agui_client.ts +14 -3
- package/src/core/attachment.ts +21 -1
- package/src/core/conversation_store.ts +84 -18
- package/src/core/remote_conversation_store.ts +24 -3
- package/src/core/upload_attachment.ts +8 -1
- package/src/ui/attachment_tray.ts +42 -5
- package/src/ui/relative_time.ts +8 -3
- package/src/ui/styles.ts +9 -9
- package/src/ui/thoughts_block.ts +2 -2
- package/src/ui/thread_drawer.ts +83 -9
- package/src/ui/tool_call_card.ts +6 -0
- package/src/ui/voice_input.ts +21 -1
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,25 +7,78 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.10.0] — 2026-07-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Upload cancellation.** `UploadHandler` gains an optional third argument,
|
|
15
|
+
`signal: AbortSignal`. Removing a pending chip, clearing the tray, or removing
|
|
16
|
+
the element now aborts the in-flight upload, so a cancelled transfer no longer
|
|
17
|
+
orphans a server-side file. Non-breaking: existing two-argument handlers keep
|
|
18
|
+
working; a custom handler that honours the signal should abort its own
|
|
19
|
+
transport when it fires.
|
|
20
|
+
- **Teardown on disconnect.** `<ag-ui-chat>` now cleans up when it leaves the
|
|
21
|
+
DOM (a removed node or a client-side route swap): it cancels the in-flight
|
|
22
|
+
run so the SSE stream closes, aborts in-flight uploads, and releases the
|
|
23
|
+
microphone so the browser's recording indicator clears.
|
|
24
|
+
- **Accessible history drawer.** The chat-history drawer is now a proper modal
|
|
25
|
+
dialog — Escape closes it, focus moves into the panel on open and is restored
|
|
26
|
+
to the opener on close, Tab is trapped within the panel, and an inline rename
|
|
27
|
+
commits on blur.
|
|
28
|
+
- **Per-instance storage scoping.** The collapsed / theme / active-thread state
|
|
29
|
+
and the default thread store are now namespaced by the element's `id` (else
|
|
30
|
+
its `endpoint`), so two `<ag-ui-chat>` instances — or two apps — on the same
|
|
31
|
+
origin no longer share state. Pre-existing per-tab state migrates into the
|
|
32
|
+
namespace automatically on first load.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **Submit while running.** Pressing Enter during a live run no longer starts a
|
|
37
|
+
second, concurrent SSE run (which orphaned the first and could corrupt its
|
|
38
|
+
pending tool cards). Enter now matches the Send/Stop button and is ignored
|
|
39
|
+
while a run is in flight.
|
|
40
|
+
- **Thread-switch race.** Rapidly switching threads against a slow remote store
|
|
41
|
+
can no longer interleave two replays into one transcript — a stale replay is
|
|
42
|
+
dropped once a newer switch begins.
|
|
43
|
+
- **Malformed thread responses.** A `200` from the threads endpoint whose body
|
|
44
|
+
isn't valid JSON (a proxy's HTML error page, a truncated stream) now falls
|
|
45
|
+
back to the local cache instead of silently failing to load the drawer or
|
|
46
|
+
history.
|
|
47
|
+
- **Relative timestamps.** An unparseable or missing `updated_at` now renders a
|
|
48
|
+
neutral "just now" rather than `"NaNw ago"` or `"~2950w ago"`.
|
|
49
|
+
- **Corrupt attachment refs.** Malformed entries in a message's persisted
|
|
50
|
+
attachments are dropped instead of throwing and aborting the whole history
|
|
51
|
+
replay.
|
|
52
|
+
- **Retry of a rejected upload.** Retrying a chip that was rejected client-side
|
|
53
|
+
(oversize / disallowed type) now re-applies the guard instead of uploading the
|
|
54
|
+
file in full.
|
|
55
|
+
- **Duplicate tool result.** A repeated `TOOL_CALL_RESULT` (or a replayed tool
|
|
56
|
+
message for an already-settled card) no longer appends a second result
|
|
57
|
+
section.
|
|
58
|
+
- **Run-error continuation.** A run that ends in an error is now terminal: the
|
|
59
|
+
loop no longer proceeds into frontend-tool execution or another round, so a
|
|
60
|
+
failed run can't surface a confusing second error. Pending tool cards still
|
|
61
|
+
settle.
|
|
62
|
+
|
|
10
63
|
## [0.9.0] — 2026-06-30
|
|
11
64
|
|
|
12
65
|
### Added
|
|
13
66
|
|
|
14
|
-
- **Model thoughts
|
|
67
|
+
- **Model thoughts.** When the server forwards a reasoning model's
|
|
15
68
|
chain-of-thought, the element now renders a muted, collapsible **thoughts
|
|
16
69
|
region** (part `thoughts`) at the top of the current answer group — it streams
|
|
17
70
|
while the model reasons and folds away on the answer's first token (the reader
|
|
18
71
|
can reopen it). `AgUiClientHandlers` gains `onReasoningStart` / `onReasoningDelta`
|
|
19
72
|
/ `onReasoningEnd`, wired from `@ag-ui/client`'s `REASONING_*` subscriber
|
|
20
73
|
callbacks (which also cover the deprecated `THINKING_*` family).
|
|
21
|
-
- **Voice input
|
|
74
|
+
- **Voice input.** Set `data-transcribe-url` (django-ag-ui's
|
|
22
75
|
`TranscribeView`) to reveal a 🎤 mic button in the composer (part
|
|
23
76
|
`voice-button`): it records via `MediaRecorder`, POSTs the clip, and drops the
|
|
24
77
|
returned transcript into the textarea. A pluggable `transcribeHandler` —
|
|
25
78
|
`(audio: Blob) => Promise<string>` — swaps the transport (a different STT
|
|
26
79
|
endpoint, a Web Speech adapter) and reveals the mic even without the attribute.
|
|
27
80
|
New exports: `transcribeAudio`, `TranscribeOptions`, `TranscribeHandler`.
|
|
28
|
-
- **Built-in theme toggle
|
|
81
|
+
- **Built-in theme toggle.** The boolean `data-theme-toggle` attribute
|
|
29
82
|
adds an optional light⇄dark toggle to the header (part `theme-toggle`,
|
|
30
83
|
`toggleTheme()`) that flips `theme` and persists per tab. Off by default, so a
|
|
31
84
|
host-supplied switch in `slot="header-actions"` stays unaffected.
|
|
@@ -44,7 +97,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
44
97
|
|
|
45
98
|
### Added
|
|
46
99
|
|
|
47
|
-
- **Per-turn answer group + opt-in well
|
|
100
|
+
- **Per-turn answer group + opt-in well.** Each assistant turn now
|
|
48
101
|
renders inside one `.answer` group (part `answer`) that holds its streamed
|
|
49
102
|
text, tool cards, and pending indicator — so a turn that calls tools reads as
|
|
50
103
|
a single answer instead of loose siblings. The group spans the whole
|
|
@@ -54,12 +107,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
54
107
|
`data-answer-well` attribute to box that group in a bordered, padded "well"
|
|
55
108
|
(themeable via `--ag-ui-well-bg` / `--ag-ui-well-border`); without it the
|
|
56
109
|
layout is the flat stack as before. Pure CSS, turn-scoped, no JS API.
|
|
57
|
-
- **Full-screen page placement
|
|
110
|
+
- **Full-screen page placement.** New `placement="page"`: a full-bleed
|
|
58
111
|
background with the conversation in a centred reading column (default ~820px,
|
|
59
112
|
set via `--ag-ui-content-max-width`). The assistant turn spans the column
|
|
60
113
|
while the user message stays a right-aligned pill — the layout for a dedicated
|
|
61
114
|
chat page (distinct from `full`'s edge-to-edge, left-aligned messages).
|
|
62
|
-
- **Inline tool-display mode + themeable status icons
|
|
115
|
+
- **Inline tool-display mode + themeable status icons.** New
|
|
63
116
|
`data-tool-display="inline"`: the lightest card — a one-line status row (icon
|
|
64
117
|
+ summary, no box chrome) with the result behind its own toggle. Every
|
|
65
118
|
tool-call card now leads with a CSS-drawn **status icon** (part
|
|
@@ -400,7 +453,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
400
453
|
### Notes
|
|
401
454
|
- First release — exercising the automated npm OIDC publish pipeline end-to-end.
|
|
402
455
|
|
|
403
|
-
[Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.
|
|
456
|
+
[Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.10.0...HEAD
|
|
457
|
+
[0.10.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.9.0...v0.10.0
|
|
404
458
|
[0.9.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.8.1...v0.9.0
|
|
405
459
|
[0.8.1]: https://github.com/Artui/ag-ui-web-component/compare/v0.8.0...v0.8.1
|
|
406
460
|
[0.8.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.7.0...v0.8.0
|