@artooi/ag-ui-web-component 0.46.0 → 0.48.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +221 -1
  2. package/README.md +298 -31
  3. package/dist/ag-ui-web-component.bundle.js +597 -177
  4. package/dist/ag-ui-web-component.bundle.js.map +4 -4
  5. package/dist/constants.d.ts +37 -2
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/core/ag_ui_chat.d.ts +73 -2
  8. package/dist/core/ag_ui_chat.d.ts.map +1 -1
  9. package/dist/core/chat_registry.d.ts +23 -0
  10. package/dist/core/chat_registry.d.ts.map +1 -0
  11. package/dist/core/events/bar_height_detail.d.ts +6 -0
  12. package/dist/core/events/bar_height_detail.d.ts.map +1 -0
  13. package/dist/core/events/run_finished_detail.d.ts +6 -0
  14. package/dist/core/events/run_finished_detail.d.ts.map +1 -1
  15. package/dist/core/events/thread_detail.d.ts +27 -0
  16. package/dist/core/events/thread_detail.d.ts.map +1 -0
  17. package/dist/core/run_handlers.d.ts +6 -1
  18. package/dist/core/run_handlers.d.ts.map +1 -1
  19. package/dist/dom/animations.d.ts +21 -6
  20. package/dist/dom/animations.d.ts.map +1 -1
  21. package/dist/dom/highlight_overlay.d.ts +8 -1
  22. package/dist/dom/highlight_overlay.d.ts.map +1 -1
  23. package/dist/dom/ring_color.d.ts +22 -0
  24. package/dist/dom/ring_color.d.ts.map +1 -0
  25. package/dist/index.d.ts +4 -2
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1164 -95
  28. package/dist/index.js.map +4 -4
  29. package/dist/tools/chat_surface_tools.d.ts +8 -1
  30. package/dist/tools/chat_surface_tools.d.ts.map +1 -1
  31. package/dist/ui/history/conversation_history.d.ts +24 -2
  32. package/dist/ui/history/conversation_history.d.ts.map +1 -1
  33. package/dist/ui/placement/collapse_styles.d.ts.map +1 -1
  34. package/dist/ui/placement/dock_styles.d.ts +2 -0
  35. package/dist/ui/placement/dock_styles.d.ts.map +1 -0
  36. package/dist/ui/placement/panel_placement.d.ts +17 -0
  37. package/dist/ui/placement/panel_placement.d.ts.map +1 -1
  38. package/dist/ui/placement/small_viewport_styles.d.ts.map +1 -1
  39. package/dist/ui/placement/surface_for.d.ts +21 -17
  40. package/dist/ui/placement/surface_for.d.ts.map +1 -1
  41. package/dist/ui/progress/tool_call_card.d.ts.map +1 -1
  42. package/dist/ui/progress/tool_group_styles.d.ts.map +1 -1
  43. package/dist/ui/progress/tool_step_group.d.ts.map +1 -1
  44. package/dist/ui/progress/tool_step_styles.d.ts.map +1 -1
  45. package/dist/ui/shell/build_launcher.d.ts +15 -4
  46. package/dist/ui/shell/build_launcher.d.ts.map +1 -1
  47. package/dist/ui/shell/token_styles.d.ts.map +1 -1
  48. package/dist/ui/styles.d.ts.map +1 -1
  49. package/dist/ui/themes/scheme_styles.d.ts.map +1 -1
  50. package/package.json +1 -1
  51. package/src/constants.ts +41 -2
  52. package/src/core/ag_ui_chat.ts +430 -27
  53. package/src/core/chat_registry.ts +53 -0
  54. package/src/core/events/bar_height_detail.ts +5 -0
  55. package/src/core/events/run_finished_detail.ts +6 -0
  56. package/src/core/events/thread_detail.ts +26 -0
  57. package/src/core/run_handlers.ts +9 -4
  58. package/src/dom/animations.ts +30 -31
  59. package/src/dom/highlight_overlay.ts +10 -5
  60. package/src/dom/ring_color.ts +222 -0
  61. package/src/index.ts +7 -0
  62. package/src/tools/chat_surface_tools.ts +18 -8
  63. package/src/ui/history/conversation_history.ts +75 -7
  64. package/src/ui/placement/collapse_styles.ts +248 -2
  65. package/src/ui/placement/dock_styles.ts +91 -0
  66. package/src/ui/placement/embedded_styles.ts +2 -2
  67. package/src/ui/placement/panel_placement.ts +105 -12
  68. package/src/ui/placement/preset_styles.ts +1 -1
  69. package/src/ui/placement/sidebar_styles.ts +1 -1
  70. package/src/ui/placement/small_viewport_styles.ts +14 -0
  71. package/src/ui/placement/surface_for.ts +29 -18
  72. package/src/ui/progress/tool_call_card.ts +18 -8
  73. package/src/ui/progress/tool_group_styles.ts +49 -0
  74. package/src/ui/progress/tool_step_group.ts +3 -0
  75. package/src/ui/progress/tool_step_styles.ts +5 -3
  76. package/src/ui/shell/build_launcher.ts +32 -5
  77. package/src/ui/shell/token_styles.ts +30 -3
  78. package/src/ui/styles.ts +4 -0
  79. package/src/ui/themes/scheme_styles.ts +10 -1
  80. package/src/version.ts +1 -1
@@ -1,3 +1,4 @@
1
+ import type { CollapseTarget } from "../ui/placement/surface_for.js";
1
2
  import type { ClientTool } from "./client_tool_registry.js";
2
3
  /** Every corner the panel can be sent to, in the order the schema states them. */
3
4
  export declare const CHAT_CORNERS: readonly ["top-left", "top-right", "bottom-left", "bottom-right"];
@@ -7,7 +8,13 @@ export type ChatCorner = (typeof CHAT_CORNERS)[number];
7
8
  export interface ChatSurfaceReport {
8
9
  /** The placement in force, or `null` when the host set none. */
9
10
  readonly placement: string | null;
10
- /** Whether the panel is currently at its launcher. */
11
+ /**
12
+ * What the panel collapses to: `launcher`, `rail`, `header`, `bar` (the
13
+ * bottom bar it rises from), `none` (hidden, brought back by the host's own
14
+ * control), or `null` when it cannot collapse.
15
+ */
16
+ readonly collapseTo: CollapseTarget;
17
+ /** Whether the panel is currently collapsed. */
11
18
  readonly collapsed: boolean;
12
19
  /** Whether this placement has a collapsed state at all. */
13
20
  readonly collapsible: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"chat_surface_tools.d.ts","sourceRoot":"","sources":["../../src/tools/chat_surface_tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,kFAAkF;AAClF,eAAO,MAAM,YAAY,YAAI,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAU,CAAC;AAE9F,yCAAyC;AACzC,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,oEAAoE;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AM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,CAAC;IACF;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE;QACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,sDAAsD;AACtD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAE/D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,eAAe,IAAI,iBAAiB,CAAC;IACrC;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;IAC/E,YAAY,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACnF;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,EAAE,CA8GzE"}
@@ -3,6 +3,7 @@ import type { ActivityRegistry } from "../../core/activity_registry.js";
3
3
  import type { AgUiClient } from "../../core/agui_client.js";
4
4
  import type { ClientSeed } from "../../core/client_seed.js";
5
5
  import type { ClientConversationStore, NavigationCheckpoint } from "../../core/conversation_store.js";
6
+ import type { ThreadDetail } from "../../core/events/thread_detail.js";
6
7
  import type { MessageRole } from "../../core/message_role.js";
7
8
  import { RunIndex } from "../../core/run_index.js";
8
9
  import type { ToolCatalog } from "../../tools/tool_catalog.js";
@@ -109,6 +110,11 @@ export interface ConversationHistoryHost {
109
110
  readonly resetState: () => void;
110
111
  /** Swap the composer between Send and Stop, which the composer owns. */
111
112
  readonly setRunning: (running: boolean) => void;
113
+ /**
114
+ * Say the conversation on screen changed, once its transcript is replaced.
115
+ * The element fills in the thread it replaced, which it last reported.
116
+ */
117
+ readonly threadChanged: (threadId: string, reason: ThreadDetail["reason"]) => void;
112
118
  }
113
119
  /**
114
120
  * A hold {@link ConversationHistoryHost.holdRun} took.
@@ -174,7 +180,19 @@ export declare class ConversationHistory {
174
180
  openThreads(): void;
175
181
  /** Open the checkpoint panel, dismissing the conversation list. */
176
182
  openCheckpoints(): void;
177
- /** Switch the active conversation to an existing thread and replay it. */
183
+ /**
184
+ * Switch the active conversation to an existing thread and replay it.
185
+ *
186
+ * A call for the thread a switch is already loading is handed that switch's
187
+ * own promise, so it settles when the thread is drawn rather than at once,
188
+ * before the replay.
189
+ *
190
+ * A store that rejects the load leaves the element on the thread it was on:
191
+ * the switch has already cleared the transcript, so it points back at the
192
+ * old thread and draws it again, saying nothing, and then rejects with the
193
+ * store's error. Left as it was, the element named a thread it was not
194
+ * showing and never reported it.
195
+ */
178
196
  switchThread(threadId: string): Promise<void>;
179
197
  /** Rename a thread, then reload the list that shows its title. */
180
198
  renameThread(threadId: string, title: string): void;
@@ -277,8 +295,12 @@ export declare class ConversationHistory {
277
295
  * for the run it would have resumed -- unless what replaced it is a restore
278
296
  * of the same conversation, still current, which answers for that run
279
297
  * instead; see `#forgetStopped`.
298
+ *
299
+ * `reason` is what the thread event this restore ends with reports as why
300
+ * the conversation changed. A restore that is stopped reports nothing, and
301
+ * neither does one given `null`, which draws the thread already reported.
280
302
  */
281
- rehydrate(): Promise<void>;
303
+ rehydrate(reason: ThreadDetail["reason"] | null): Promise<void>;
282
304
  /**
283
305
  * Replay a restored message: text bubbles *and* tool activity. An assistant
284
306
  * turn may carry `toolCalls` (rendered as cards) and/or text; a `tool` turn
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_history.d.ts","sourceRoot":"","sources":["../../../src/ui/history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Q,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAa5C;IA0BD,kEAAkE;IAClE,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAGlD;IAED,4EAA4E;IAC5E,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAcnC;IAED,kEAAkE;IAC5D,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAMnC;IAWD;;;;;;;;;;;;;;;;;;OAkBG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiJpE;IAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+EG;IACG,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA6IpE;IAsID;;;;;OAKG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsG7B;CA2DF"}
@@ -1 +1 @@
1
- {"version":3,"file":"collapse_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/collapse_styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAE,MAsI7B,CAAC"}
1
+ {"version":3,"file":"collapse_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/collapse_styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,EAAE,MA2X7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const DOCK_STYLES: string;
2
+ //# sourceMappingURL=dock_styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dock_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/dock_styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,EAAE,MAsFzB,CAAC"}
@@ -58,6 +58,12 @@ export declare class PanelPlacement {
58
58
  mountResizeGrips(chat: HTMLElement): void;
59
59
  /** Restore a dragged size before the panel paints. */
60
60
  restoreSize(): void;
61
+ /**
62
+ * Drop the dragged size and its stored copy, so the placement's own size and
63
+ * the host's tokens apply again. For a host entering a sized state of its
64
+ * own, which a user's drag would otherwise outrank.
65
+ */
66
+ resetSize(): void;
61
67
  /**
62
68
  * A zero-sized box carrying the host's viewport insets as padding, so they
63
69
  * can be read back as used pixel lengths. See the `.viewport-probe` rule for
@@ -88,6 +94,17 @@ export declare class PanelPlacement {
88
94
  * while docked, and reads as a component that cannot do full height.
89
95
  */
90
96
  releaseOwnedAxes(): void;
97
+ /**
98
+ * Write where a docked panel stands, and return the bar's height.
99
+ *
100
+ * Under the bar it is the strip's border box, which is 0 whenever the strip
101
+ * is not drawn (a phone with the panel open, where the panel is the screen).
102
+ * Under a host anchor it is the anchor's top and right, measured against the
103
+ * layout viewport a fixed element is placed in; an anchor of null leaves the
104
+ * panel in its placement's own corner. Every other surface carries neither
105
+ * property, so nothing stale is left behind by a live switch.
106
+ */
107
+ syncDock(bar: HTMLElement, anchor: Element | null): number;
91
108
  /**
92
109
  * Publish the measured viewport height so the stylesheet can size a
93
110
  * full-bleed panel to what the user can see.
@@ -1 +1 @@
1
- {"version":3,"file":"panel_placement.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/panel_placement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAmFlD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,8CAA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IACH,uBAAuB,IAAI,IAAI,CAU9B;CAuHF"}
@@ -1 +1 @@
1
- {"version":3,"file":"small_viewport_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/small_viewport_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,EAAE,MAsDnC,CAAC"}
1
+ {"version":3,"file":"small_viewport_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/small_viewport_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,EAAE,MAoEnC,CAAC"}
@@ -1,19 +1,18 @@
1
1
  import type { ResizeAxis } from "./resize_handle.js";
2
2
  /**
3
- * What a collapsed panel shrinks to.
4
- *
5
- * Only `null` versus not-`null` is read today: every caller asks whether the
6
- * surface can collapse at all, never which target it collapses to. The three
7
- * names below therefore describe the surface rather than drive it, and nothing
8
- * relies on them (changing one fails only the test of this record). The
9
- * bottom-bar collapse is expected to read or replace them, and a reader that
10
- * does should come with a test outside this record's own.
3
+ * What a collapsed panel shrinks to, stamped on the element as
4
+ * data-collapsed-to so the stylesheet draws it.
11
5
  *
12
6
  * - `launcher` -- the round button in a corner.
13
7
  * - `rail` -- the slim full-height edge the sidebar docks against; the same
14
8
  * launcher element, shaped by the stylesheet.
15
9
  * - `header` -- the in-flow collapse: the body hides and the header bar stays
16
10
  * in the host's layout, so there is no launcher at all.
11
+ * - `bar` -- `collapse-to="bar"` over a placement that would otherwise
12
+ * collapse to `launcher`: a strip along the bottom edge, the panel rising
13
+ * from its right end.
14
+ * - `none` -- `collapse-to="none"` over any collapsible placement: collapsed
15
+ * is hidden, and the host's own control brings the panel back.
17
16
  * - `null` -- no collapsed state. `page` is a dedicated route rather than a
18
17
  * panel on someone else's page, so there is no "away" for it to go to:
19
18
  * collapsing it left a strip of application chrome fixed over a route with
@@ -24,7 +23,7 @@ import type { ResizeAxis } from "./resize_handle.js";
24
23
  * those paths asks this record; the stylesheet covers the one path that
25
24
  * never does, an attribute written straight onto the element.
26
25
  */
27
- export type CollapseTarget = "launcher" | "rail" | "header" | null;
26
+ export type CollapseTarget = "launcher" | "rail" | "header" | "bar" | "none" | null;
28
27
  /**
29
28
  * Everything the script needs to know about one display surface, in one
30
29
  * record, so a placement's behaviour is read in one place rather than
@@ -34,11 +33,7 @@ export type CollapseTarget = "launcher" | "rail" | "header" | null;
34
33
  * under this directory); this is the part of a surface that code decides.
35
34
  */
36
35
  export interface Surface {
37
- /**
38
- * What collapsing shrinks the panel to; `null` when it cannot collapse. Only
39
- * the `null` test is authoritative: the non-null names are descriptive (see
40
- * {@link CollapseTarget}), and nothing branches on which one a surface has.
41
- */
36
+ /** What collapsing shrinks the panel to; `null` when it cannot collapse. */
42
37
  readonly collapseTo: CollapseTarget;
43
38
  /**
44
39
  * Whether a gesture may move the launcher. The rest have nowhere to put it:
@@ -67,8 +62,17 @@ export interface Surface {
67
62
  readonly startsCollapsed: boolean;
68
63
  }
69
64
  /**
70
- * The surface `placement` describes. Read per interaction by every caller,
71
- * because `placement` is a live attribute.
65
+ * The surface `placement` and `collapse-to` describe together. Read per
66
+ * interaction by every caller, because both are live attributes.
67
+ *
68
+ * `collapse-to` only ever replaces the round launcher or the whole collapsed
69
+ * state, never a placement's own shape: `bar` applies where the placement
70
+ * collapses to `launcher`, so the sidebar keeps its rail and an embedded chat
71
+ * its header bar, and `none` applies to every collapsible placement. Absent,
72
+ * `auto` and any other value leave the placement as it was. A docked surface
73
+ * cannot be moved -- the panel rises from the bar or the host's anchor, and a
74
+ * position the user dragged would take it away from either -- so both turn
75
+ * the launcher drag off, and with it the header drag and `moveTo`.
72
76
  */
73
- export declare function surfaceFor(placement: string | null): Surface;
77
+ export declare function surfaceFor(placement: string | null, collapseTo?: string | null): Surface;
74
78
  //# sourceMappingURL=surface_for.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"surface_for.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/surface_for.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MA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AAc,CAAC;IAEtC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC;IAStC;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAMvC,YACE,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,GAAE,SAA8B,EACvC,OAAO,GAAE,mBAAwB,EA+ElC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAKlC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAE/B;IAED;;;;OAIG;IACH,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAKlD;IAED,gFAAgF;IAChF,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAehD;CAiFF"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool_group_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/tool_group_styles.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,iBAAiB,EAAE,MAgN/B,CAAC"}
1
+ {"version":3,"file":"tool_group_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/tool_group_styles.ts"],"names":[],"mappings":"AAmCA,eAAO,MAAM,iBAAiB,EAAE,MAqP/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool_step_group.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/tool_step_group.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA6ClD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAa;;IACxB,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAWjC,YAAY,OAAO,EAAE,SAAS,EAgD7B;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAczC;IAED,uCAAuC;IACvC,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAG3B;IAED;;;;;;;;;;OAUG;IACH,MAAM,IAAI,IAAI,CAGb;CAkGF"}
1
+ {"version":3,"file":"tool_step_group.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/tool_step_group.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA6ClD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAa;;IACxB,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAWjC,YAAY,OAAO,EAAE,SAAS,EAgD7B;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAczC;IAED,uCAAuC;IACvC,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAG3B;IAED;;;;;;;;;;OAUG;IACH,MAAM,IAAI,IAAI,CAGb;CAqGF"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool_step_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/tool_step_styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,EAAE,MAod9B,CAAC"}
1
+ {"version":3,"file":"tool_step_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/tool_step_styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,EAAE,MAsd9B,CAAC"}
@@ -4,17 +4,28 @@ export interface LauncherOptions {
4
4
  readonly launcher: HTMLButtonElement;
5
5
  readonly badge: HTMLElement;
6
6
  readonly railLabel: HTMLElement;
7
+ /** The bottom bar's wrapper, which holds the launcher and the history button. */
8
+ readonly bar: HTMLElement;
9
+ /** The bottom bar's history button, a sibling of the launcher in the bar. */
10
+ readonly barHistory: HTMLButtonElement;
7
11
  readonly titleText: string;
8
12
  readonly iconUrl: string | null;
9
13
  readonly strings: UiStrings;
10
14
  readonly signal: AbortSignal;
11
15
  readonly onOpen: () => void;
16
+ readonly onHistory: () => void;
12
17
  }
13
18
  /**
14
- * Build what a collapsed widget shrinks to: a round floating button, or the
15
- * slim edge rail under `placement="sidebar"` -- one element, shaped by the
16
- * stylesheet. The element mounts it as a sibling of the panel, so it survives
17
- * the panel being hidden.
19
+ * Build what a collapsed widget shrinks to: a round floating button, the slim
20
+ * edge rail under `placement="sidebar"`, or the strip along the bottom edge
21
+ * under `collapse-to="bar"` -- one element, shaped by the stylesheet. The
22
+ * element mounts the bar wrapper as a sibling of the panel, so it survives the
23
+ * panel being hidden.
24
+ *
25
+ * The wrapper is there for the bar's history button: a button cannot nest in
26
+ * a button, so the strip is the launcher and the history button side by side.
27
+ * Outside the bar the wrapper draws no box and the history button is not
28
+ * drawn, so the launcher lays out against the host exactly as it did alone.
18
29
  */
19
30
  export declare function buildLauncher(options: LauncherOptions): void;
20
31
  //# sourceMappingURL=build_launcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build_launcher.d.ts","sourceRoot":"","sources":["../../../src/ui/shell/build_launcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CA2B5D"}
1
+ {"version":3,"file":"build_launcher.d.ts","sourceRoot":"","sources":["../../../src/ui/shell/build_launcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,iFAAiF;IACjF,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CA2C5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"token_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/shell/token_styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,EAAE,MAmZ1B,CAAC"}
1
+ {"version":3,"file":"token_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/shell/token_styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,EAAE,MA8a1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAuDA,eAAO,MAAM,MAAM,EAAE,MAgDX,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAwDA,eAAO,MAAM,MAAM,EAAE,MAmDX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"scheme_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/themes/scheme_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,EAAE,MAe3B,CAAC"}
1
+ {"version":3,"file":"scheme_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/themes/scheme_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,EAAE,MAwB3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artooi/ag-ui-web-component",
3
- "version": "0.46.0",
3
+ "version": "0.48.0",
4
4
  "description": "Framework-free <ag-ui-chat> Web Component over the AG-UI protocol. Drop-in chat sidebar with a pluggable client-side tool registry, DOM driver primitives, animations, and destructive-action confirmation modal.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/constants.ts CHANGED
@@ -15,11 +15,18 @@ export const ELEMENT_TAG = "ag-ui-chat";
15
15
  export const SUBMIT_EVENT = "ag-ui-submit";
16
16
 
17
17
  /**
18
- * Collapsed state changed, via the built-in toggle or `setCollapsed`.
18
+ * Collapsed state changed, via the built-in toggle or `setCollapsed`; and,
19
+ * under `collapse-to="none"`, once at connect with the state it mounted in.
19
20
  * `detail` is {@link ToggleDetail}.
20
21
  */
21
22
  export const TOGGLE_EVENT = "ag-ui-toggle";
22
23
 
24
+ /**
25
+ * The bottom bar's height changed (`collapse-to="bar"`): the host pads its
26
+ * page by it. `detail` is {@link BarHeightDetail}; 0 when no bar is drawn.
27
+ */
28
+ export const BAR_HEIGHT_EVENT = "ag-ui-bar-height";
29
+
23
30
  /**
24
31
  * The count of answers that arrived while collapsed changed. `detail` is
25
32
  * {@link UnreadDetail}. The built-in launcher badge renders exactly this; a
@@ -61,6 +68,17 @@ export const ATTACHMENT_EVENT = "ag-ui-attachments";
61
68
  */
62
69
  export const RUN_FINISHED_EVENT = "ag-ui-run-finished";
63
70
 
71
+ /**
72
+ * The conversation on screen changed: a new chat, a thread switched to, the
73
+ * active thread deleted, the stored thread restored, or a `user-key` change
74
+ * handing the element to another principal. `detail` is {@link ThreadDetail}.
75
+ *
76
+ * Fires once per change, after the transcript has been replaced, so a listener
77
+ * reads the conversation it is told about. A host listing conversations in its
78
+ * own chrome marks the active one from here rather than watching attributes.
79
+ */
80
+ export const THREAD_EVENT = "ag-ui-thread";
81
+
64
82
  /**
65
83
  * The agent sent an AG-UI `CUSTOM` event. `detail` is {@link CustomAgentDetail}.
66
84
  *
@@ -340,7 +358,8 @@ export const DEFAULT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
340
358
  * default is `grouped`.
341
359
  *
342
360
  * - `grouped` — a run's consecutive calls fold into one quiet row ("Worked
343
- * through 5 steps"), with the calls one click down as `full` cards.
361
+ * through 5 steps"), with the calls one click down as `full` cards, or as
362
+ * {@link TOOL_GROUP_DISPLAY} names.
344
363
  * - `inline` — one status row (icon + summary), no card chrome, result behind
345
364
  * its own toggle. Reads as a line of the answer rather than a boxed card.
346
365
  * - `minimal` — tool name + status pill only. No args, no result body.
@@ -355,6 +374,26 @@ export const TOOL_DISPLAY = {
355
374
  FULL: "full",
356
375
  } as const;
357
376
 
377
+ /**
378
+ * How an opened step group draws its calls. Set via `data-tool-group-display`
379
+ * and read only while `data-tool-display` is `grouped`; an outer card mode
380
+ * flattens the groups into its own cards and this value is ignored there.
381
+ *
382
+ * The same four card modes as {@link TOOL_DISPLAY}, applied to the calls inside
383
+ * the group: `full` (the default, and what an absent or unknown value reads
384
+ * as), `compact`, `minimal` and `inline`. A call waiting on an approval shows
385
+ * its arguments in every one of them.
386
+ */
387
+ export const TOOL_GROUP_DISPLAY = {
388
+ INLINE: "inline",
389
+ MINIMAL: "minimal",
390
+ COMPACT: "compact",
391
+ FULL: "full",
392
+ } as const;
393
+
394
+ /** One of the {@link TOOL_GROUP_DISPLAY} values. */
395
+ export type ToolGroupDisplayMode = (typeof TOOL_GROUP_DISPLAY)[keyof typeof TOOL_GROUP_DISPLAY];
396
+
358
397
  /**
359
398
  * `activityType` of the `ACTIVITY_SNAPSHOT` event django-ag-ui emits when a
360
399
  * compaction capability trimmed the history. `content` carries