@artooi/ag-ui-web-component 0.45.0 → 0.46.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 (56) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/README.md +64 -9
  3. package/dist/ag-ui-web-component.bundle.js +384 -147
  4. package/dist/ag-ui-web-component.bundle.js.map +4 -4
  5. package/dist/constants.d.ts +4 -1
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/core/ag_ui_chat.d.ts +10 -5
  8. package/dist/core/ag_ui_chat.d.ts.map +1 -1
  9. package/dist/index.js +609 -33
  10. package/dist/index.js.map +4 -4
  11. package/dist/tools/tool_catalog.d.ts +5 -0
  12. package/dist/tools/tool_catalog.d.ts.map +1 -1
  13. package/dist/tools/tool_dispatch.d.ts.map +1 -1
  14. package/dist/ui/interrupts/confirmation_styles.d.ts.map +1 -1
  15. package/dist/ui/placement/surface_for.d.ts +12 -1
  16. package/dist/ui/placement/surface_for.d.ts.map +1 -1
  17. package/dist/ui/progress/thoughts_styles.d.ts.map +1 -1
  18. package/dist/ui/progress/tool_call_card.d.ts +8 -0
  19. package/dist/ui/progress/tool_call_card.d.ts.map +1 -1
  20. package/dist/ui/progress/tool_group_styles.d.ts +2 -0
  21. package/dist/ui/progress/tool_group_styles.d.ts.map +1 -0
  22. package/dist/ui/progress/tool_step_group.d.ts +47 -0
  23. package/dist/ui/progress/tool_step_group.d.ts.map +1 -0
  24. package/dist/ui/progress/tool_step_styles.d.ts.map +1 -1
  25. package/dist/ui/shell/token_styles.d.ts.map +1 -1
  26. package/dist/ui/styles.d.ts.map +1 -1
  27. package/dist/ui/themes/ledger_styles.d.ts.map +1 -1
  28. package/dist/ui/themes/soft_styles.d.ts.map +1 -1
  29. package/dist/ui/transcript/groups_tool_steps.d.ts +13 -0
  30. package/dist/ui/transcript/groups_tool_steps.d.ts.map +1 -0
  31. package/dist/ui/transcript/message_styles.d.ts.map +1 -1
  32. package/dist/ui/transcript/transcript.d.ts +16 -1
  33. package/dist/ui/transcript/transcript.d.ts.map +1 -1
  34. package/dist/ui/ui_strings.d.ts +18 -0
  35. package/dist/ui/ui_strings.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/src/constants.ts +4 -1
  38. package/src/core/ag_ui_chat.ts +14 -6
  39. package/src/tools/tool_catalog.ts +23 -10
  40. package/src/tools/tool_dispatch.ts +26 -11
  41. package/src/ui/interrupts/confirmation_styles.ts +0 -2
  42. package/src/ui/placement/surface_for.ts +12 -1
  43. package/src/ui/progress/thoughts_styles.ts +0 -2
  44. package/src/ui/progress/tool_call_card.ts +11 -0
  45. package/src/ui/progress/tool_group_styles.ts +232 -0
  46. package/src/ui/progress/tool_step_group.ts +269 -0
  47. package/src/ui/progress/tool_step_styles.ts +0 -2
  48. package/src/ui/shell/token_styles.ts +2 -0
  49. package/src/ui/styles.ts +5 -0
  50. package/src/ui/themes/ledger_styles.ts +15 -0
  51. package/src/ui/themes/soft_styles.ts +20 -0
  52. package/src/ui/transcript/groups_tool_steps.ts +16 -0
  53. package/src/ui/transcript/message_styles.ts +0 -2
  54. package/src/ui/transcript/transcript.ts +109 -3
  55. package/src/ui/ui_strings.ts +31 -0
  56. package/src/version.ts +1 -1
@@ -27,6 +27,11 @@ export interface ToolCatalogHost {
27
27
  readonly askUserRenderer: () => QuestionRenderer | null;
28
28
  /** The decision a run is suspended on, which a Stop abandons. */
29
29
  readonly decision: PendingDecision;
30
+ /**
31
+ * Mark the card of ``callId`` as asking the user, or no longer. The call id is
32
+ * absent for a handler run outside a tool call, which has no card to mark.
33
+ */
34
+ readonly setAsking: (callId: string | undefined, asking: boolean) => void;
30
35
  /** The current answer group, opening one if none is open. */
31
36
  readonly ensureGroup: () => HTMLDivElement;
32
37
  /** The resolved string table. */
@@ -1 +1 @@
1
- {"version":3,"file":"tool_catalog.d.ts","sourceRoot":"","sources":["../../src/tools/tool_catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IA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,CAAC,CAwQ/D;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,iBAAiB,CACrB,UAAU,EAAE,SAAS,SAAS,EAAE,GAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAoG5C;CAqHF"}
@@ -1 +1 @@
1
- {"version":3,"file":"confirmation_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/interrupts/confirmation_styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,EAAE,MAiHjC,CAAC"}
1
+ {"version":3,"file":"confirmation_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/interrupts/confirmation_styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,EAAE,MA+GjC,CAAC"}
@@ -2,6 +2,13 @@ import type { ResizeAxis } from "./resize_handle.js";
2
2
  /**
3
3
  * What a collapsed panel shrinks to.
4
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.
11
+ *
5
12
  * - `launcher` -- the round button in a corner.
6
13
  * - `rail` -- the slim full-height edge the sidebar docks against; the same
7
14
  * launcher element, shaped by the stylesheet.
@@ -27,7 +34,11 @@ export type CollapseTarget = "launcher" | "rail" | "header" | null;
27
34
  * under this directory); this is the part of a surface that code decides.
28
35
  */
29
36
  export interface Surface {
30
- /** What collapsing shrinks the panel to; `null` when it cannot collapse. */
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
+ */
31
42
  readonly collapseTo: CollapseTarget;
32
43
  /**
33
44
  * Whether a gesture may move the launcher. The rest have nowhere to put it:
@@ -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,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC;AA2DD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAE5D"}
1
+ {"version":3,"file":"surface_for.d.ts","sourceRoot":"","sources":["../../../src/ui/placement/surface_for.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC;AA2DD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAE5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"thoughts_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/thoughts_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,EAAE,MAiE7B,CAAC"}
1
+ {"version":3,"file":"thoughts_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/thoughts_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,EAAE,MA+D7B,CAAC"}
@@ -137,6 +137,14 @@ export declare class ToolCallCard {
137
137
  * talked back into looking live by a late event.
138
138
  */
139
139
  mark(status: UnsettledStatus): void;
140
+ /**
141
+ * Say whether a prompt is open on this call, a question it asked or a
142
+ * confirmation it needs. A flag of its own beside the status, which stays
143
+ * `pending`: the call is still running as far as the status goes, and a card
144
+ * display mode that reads the status draws it exactly as before. The step
145
+ * group reads the flag to tell a call waiting on a person from one working.
146
+ */
147
+ setAsking(asking: boolean): void;
140
148
  /**
141
149
  * Record that a human approved or declined this call, as a line in the card.
142
150
  * The prompt disappears once answered, so this is the only lasting trace that
@@ -1 +1 @@
1
- {"version":3,"file":"tool_call_card.d.ts","sourceRoot":"","sources":["../../../src/ui/progress/tool_call_card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAEtF,sCAAsC;AACtC,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE/E,iEAAiE;AACjE,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,OAAO,GAAG,OAAO,gBAAgB,CAA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AErB;IAED;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAgBhD;CAkEF"}
@@ -0,0 +1,2 @@
1
+ export declare const TOOL_GROUP_STYLES: string;
2
+ //# sourceMappingURL=tool_group_styles.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,47 @@
1
+ import type { UiStrings } from "../ui_strings.js";
2
+ /**
3
+ * Consecutive tool calls folded into one quiet row, "Worked through 5 steps",
4
+ * with the per-call cards one click down. Built by the transcript for each run
5
+ * of calls when the element's `toolDisplay` is `grouped`.
6
+ *
7
+ * The group owns no state of its own beyond its nodes and two facts: each
8
+ * step's label, and whether it has already opened itself for the current wait.
9
+ * Everything else is read back off the cards each time one changes.
10
+ *
11
+ * It opens itself while a step waits on the user, because a deferred step
12
+ * carries its approval prompt inside its card and a folded group would hide
13
+ * the very question it is asking. Once per wait, so the user can fold it
14
+ * again. A running sub-agent does not open it: the row names the sub-agent
15
+ * instead, beside the running mark.
16
+ */
17
+ export declare class ToolStepGroup {
18
+ #private;
19
+ readonly element: HTMLDivElement;
20
+ constructor(strings: UiStrings);
21
+ /**
22
+ * Add a card's element as the group's next step, under the label the card
23
+ * was built with.
24
+ *
25
+ * A step whose label an earlier step already has gets a repeat ordinal,
26
+ * "Fill field (2)", in an element of its own beside the card's name. The
27
+ * name itself is never rewritten, so a group flattened back into per-call
28
+ * cards by a card display mode shows exactly the label the card was built
29
+ * with, and the CSS hides the ordinal there.
30
+ */
31
+ add(card: HTMLElement, name: string): void;
32
+ /** Show or hide the per-step cards. */
33
+ setOpen(open: boolean): void;
34
+ /**
35
+ * Open the group now, for the wait that is about to start.
36
+ *
37
+ * The group opens itself from its mutation observer, which runs a tick after
38
+ * the card is marked deferred. The approval prompt is drawn, and takes focus,
39
+ * in the same tick as the mark, while the list is still out of the layout: the
40
+ * focus is dropped and the scroll it would cause never happens. So the caller
41
+ * that is about to draw the prompt opens the group first, and this marks the
42
+ * wait as already answered for, so the observer's later refresh does not open
43
+ * it again over a user who folded it.
44
+ */
45
+ reveal(): void;
46
+ }
47
+ //# sourceMappingURL=tool_step_group.d.ts.map
@@ -0,0 +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 +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,MAsd9B,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,MAod9B,CAAC"}
@@ -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,MAiZ1B,CAAC"}
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 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,MAAM,EAAE,MA4CX,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAuDA,eAAO,MAAM,MAAM,EAAE,MAgDX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ledger_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/themes/ledger_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,EAAE,MAuJ3B,CAAC"}
1
+ {"version":3,"file":"ledger_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/themes/ledger_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,EAAE,MAsK3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"soft_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/themes/soft_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,EAAE,MA8HzB,CAAC"}
1
+ {"version":3,"file":"soft_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/themes/soft_styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,EAAE,MAkJzB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ToolDisplayMode } from "../progress/tool_call_card.js";
2
+ /**
3
+ * Whether a new tool call folds into a step group, given the element's
4
+ * `toolDisplay`.
5
+ *
6
+ * The display mode alone decides, whatever the theme: `grouped` (the default,
7
+ * and what an unknown value reads as) folds, and the four card modes keep
8
+ * per-call cards. Asked as each card is built, so switching to `grouped`
9
+ * folds only the calls drawn afterwards; switching away flattens the groups
10
+ * already drawn, which the shadow CSS does from the host attribute.
11
+ */
12
+ export declare function groupsToolSteps(mode: ToolDisplayMode): boolean;
13
+ //# sourceMappingURL=groups_tool_steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups_tool_steps.d.ts","sourceRoot":"","sources":["../../../src/ui/transcript/groups_tool_steps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAE9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"message_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/transcript/message_styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,MAqQ5B,CAAC"}
1
+ {"version":3,"file":"message_styles.d.ts","sourceRoot":"","sources":["../../../src/ui/transcript/message_styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,MAmQ5B,CAAC"}
@@ -2,7 +2,7 @@ import type { AgUiToolCall } from "../../core/agui_client.js";
2
2
  import type { MessageRole } from "../../core/message_role.js";
3
3
  import type { ChartRenderer, ClientTool } from "../../tools/client_tool_registry.js";
4
4
  import { ThoughtsBlock } from "../progress/thoughts_block.js";
5
- import { ToolCallCard, type ToolPayload } from "../progress/tool_call_card.js";
5
+ import { ToolCallCard, type ToolDisplayMode, type ToolPayload } from "../progress/tool_call_card.js";
6
6
  import type { UiStrings } from "../ui_strings.js";
7
7
  /** What the transcript needs from the element that owns it. */
8
8
  export interface TranscriptHost {
@@ -24,6 +24,8 @@ export interface TranscriptHost {
24
24
  readonly serverSummary: (name: string) => string | undefined;
25
25
  /** The element's `formatToolPayload`, asked per region of a card. */
26
26
  readonly formatToolPayload: (payload: ToolPayload) => Node | string | null;
27
+ /** The element's `toolDisplay`, read per card: it decides whether calls fold into a step group. */
28
+ readonly toolDisplay: () => ToolDisplayMode;
27
29
  }
28
30
  /**
29
31
  * The transcript: the bubbles, the open answer group, the pending dots, the
@@ -81,6 +83,13 @@ export declare class Transcript {
81
83
  releaseTurn(): void;
82
84
  /** Forget which cards settled from the server and where each card is. */
83
85
  forgetCards(): void;
86
+ /** Remember the card of a call being run, for {@link setAsking}. */
87
+ holdRunning(callId: string, card: ToolCallCard): void;
88
+ /**
89
+ * Say whether a prompt is open on the card of a running call. A call id of
90
+ * none, or one no card was held for, has no card to say it on.
91
+ */
92
+ setAsking(callId: string | undefined, asking: boolean): void;
84
93
  /** Empty the list back to its empty-state region. The last half of wiping it. */
85
94
  empty(): void;
86
95
  /** The bubble behind `AgUiChat.appendMessage`, whose doc is the contract. */
@@ -167,5 +176,11 @@ export declare class Transcript {
167
176
  * tool's execution later retrieves the same card to settle it.
168
177
  */
169
178
  cardFor(call: AgUiToolCall): ToolCallCard;
179
+ /**
180
+ * Open the step group ``card`` sits in, at once, ahead of a prompt about to be
181
+ * drawn inside it. A no-op for a card drawn in a card display mode, which has
182
+ * no group.
183
+ */
184
+ revealStep(card: ToolCallCard): void;
170
185
  }
171
186
  //# sourceMappingURL=transcript.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/ui/transcript/transcript.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAKrF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMlD,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,oFAAoF;IACpF,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,kCAAkC;IAClC,QAAQ,CAAC,QAAQ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AAE,YAAY,GAAG,IAAI,CAGnC;CA4BF"}
@@ -176,6 +176,24 @@ export interface UiStrings {
176
176
  interruptedLabel: string;
177
177
  /** Label on the toggle that expands a tool card's body. */
178
178
  details: string;
179
+ /** The group's label while a step waits on the user. Token: `{count}` (steps). */
180
+ toolGroupSteps: string;
181
+ /** The group's label while a step runs. Token: `{count}` (steps). */
182
+ toolGroupWorking: string;
183
+ /** The group's label once every step has settled. Token: `{count}` (steps). */
184
+ toolGroupWorked: string;
185
+ /** Note on the group's row: steps waiting on the user. Token: `{count}`. */
186
+ toolGroupWaiting: string;
187
+ /** Note on the group's row: steps that failed. Token: `{count}`. */
188
+ toolGroupFailed: string;
189
+ /** Note on the group's row: steps that were declined. Token: `{count}`. */
190
+ toolGroupDeclined: string;
191
+ /**
192
+ * Set after a step's label when an earlier step in its group has the same
193
+ * one, so two "Fill field" steps read "Fill field" and "Fill field (2)".
194
+ * Grouped mode only. Token: `{n}` (which occurrence, from 2).
195
+ */
196
+ toolStepRepeat: string;
179
197
  /**
180
198
  * The delegation row's text before the server's own status line lands.
181
199
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ui_strings.d.ts","sourceRoot":"","sources":["../../src/ui/ui_strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IAExB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,8CA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rE,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IAGnB,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAGlB,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,EAAE,SAqJhC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CASvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artooi/ag-ui-web-component",
3
- "version": "0.45.0",
3
+ "version": "0.46.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
@@ -337,8 +337,10 @@ export const DEFAULT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
337
337
 
338
338
  /**
339
339
  * How much detail a tool-call card shows. Set via `data-tool-display`; the
340
- * default is `full`.
340
+ * default is `grouped`.
341
341
  *
342
+ * - `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.
342
344
  * - `inline` — one status row (icon + summary), no card chrome, result behind
343
345
  * its own toggle. Reads as a line of the answer rather than a boxed card.
344
346
  * - `minimal` — tool name + status pill only. No args, no result body.
@@ -346,6 +348,7 @@ export const DEFAULT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
346
348
  * - `full` — args inline, result behind its own toggle.
347
349
  */
348
350
  export const TOOL_DISPLAY = {
351
+ GROUPED: "grouped",
349
352
  INLINE: "inline",
350
353
  MINIMAL: "minimal",
351
354
  COMPACT: "compact",
@@ -767,6 +767,7 @@ export class AgUiChat extends HTMLElement {
767
767
  askUser: () => this.askUser,
768
768
  askUserRenderer: () => this.askUserRenderer,
769
769
  decision: this.#decision,
770
+ setAsking: (callId, asking) => this.#transcript.setAsking(callId, asking),
770
771
  ensureGroup: () => this.#transcript.ensureGroup(),
771
772
  strings: () => this.#strings,
772
773
  hidePending: () => this.#transcript.hidePending(),
@@ -820,6 +821,7 @@ export class AgUiChat extends HTMLElement {
820
821
  resolveTool: (name) => this.#tools.resolve(name),
821
822
  toolSummaries: () => this.toolSummaries,
822
823
  serverSummary: (name) => this.#tools.summary(name),
824
+ toolDisplay: () => this.toolDisplay,
823
825
  // A thunk over the live property, not the property itself: the card keeps
824
826
  // this for the life of the call, and the result region is filled when the
825
827
  // tool settles -- which can be long after a host set the hook.
@@ -1377,22 +1379,28 @@ export class AgUiChat extends HTMLElement {
1377
1379
 
1378
1380
  /**
1379
1381
  * How much detail tool-call cards show, from the `data-tool-display`
1380
- * attribute (`minimal` / `inline` / `compact` / `full`). Defaults to `full`.
1382
+ * attribute (`grouped` / `minimal` / `inline` / `compact` / `full`).
1383
+ * Defaults to `grouped`, for an absent attribute and for a value the
1384
+ * element does not know; `full` is the per-call card default before
1385
+ * `grouped` existed.
1381
1386
  *
1382
- * Applied by the shadow CSS from the attribute itself, so changing it
1383
- * restyles every card already in the transcript rather than only the ones
1384
- * built afterwards.
1387
+ * The four card modes are applied by the shadow CSS from the attribute
1388
+ * itself, so changing between them restyles every card already in the
1389
+ * transcript. Whether calls fold into a step group is decided as each card
1390
+ * is built: switching to `grouped` folds only the calls drawn afterwards,
1391
+ * and switching away flattens the existing groups, again by CSS.
1385
1392
  */
1386
1393
  get toolDisplay(): ToolDisplayMode {
1387
1394
  const attr = this.getAttribute("data-tool-display");
1388
1395
  if (
1389
1396
  attr === TOOL_DISPLAY.INLINE ||
1390
1397
  attr === TOOL_DISPLAY.MINIMAL ||
1391
- attr === TOOL_DISPLAY.COMPACT
1398
+ attr === TOOL_DISPLAY.COMPACT ||
1399
+ attr === TOOL_DISPLAY.FULL
1392
1400
  ) {
1393
1401
  return attr;
1394
1402
  }
1395
- return TOOL_DISPLAY.FULL;
1403
+ return TOOL_DISPLAY.GROUPED;
1396
1404
  }
1397
1405
 
1398
1406
  set toolDisplay(value: ToolDisplayMode) {
@@ -36,6 +36,11 @@ export interface ToolCatalogHost {
36
36
  readonly askUserRenderer: () => QuestionRenderer | null;
37
37
  /** The decision a run is suspended on, which a Stop abandons. */
38
38
  readonly decision: PendingDecision;
39
+ /**
40
+ * Mark the card of ``callId`` as asking the user, or no longer. The call id is
41
+ * absent for a handler run outside a tool call, which has no card to mark.
42
+ */
43
+ readonly setAsking: (callId: string | undefined, asking: boolean) => void;
39
44
  /** The current answer group, opening one if none is open. */
40
45
  readonly ensureGroup: () => HTMLDivElement;
41
46
  /** The resolved string table. */
@@ -293,17 +298,25 @@ export class ToolCatalog {
293
298
  // A host-supplied renderer takes full control of the UI.
294
299
  const renderer = this.#host.askUserRenderer();
295
300
  let answer: string;
296
- if (renderer === null) {
297
- answer = await builtIn();
298
- } else {
299
- // Awaited here rather than inside a helper, so an answering renderer
300
- // takes exactly as many turns to be heard as it always did.
301
- try {
302
- // Called on the element, as `this.askUserRenderer(...)` always was.
303
- answer = await renderer.call(this.#host.element, request, { signal });
304
- } catch (error) {
305
- answer = await this.#afterRendererFailed(error, signal, callId, builtIn);
301
+ // The card says it is asking for as long as a question is open on it, an
302
+ // answer, a Stop and a renderer that failed alike, so the step group's row
303
+ // does not read as running while the run waits on a person.
304
+ this.#host.setAsking(callId, true);
305
+ try {
306
+ if (renderer === null) {
307
+ answer = await builtIn();
308
+ } else {
309
+ // Awaited here rather than inside a helper, so an answering renderer
310
+ // takes exactly as many turns to be heard as it always did.
311
+ try {
312
+ // Called on the element, as `this.askUserRenderer(...)` always was.
313
+ answer = await renderer.call(this.#host.element, request, { signal });
314
+ } catch (error) {
315
+ answer = await this.#afterRendererFailed(error, signal, callId, builtIn);
316
+ }
306
317
  }
318
+ } finally {
319
+ this.#host.setAsking(callId, false);
307
320
  }
308
321
  this.#host.decision.close();
309
322
  this.#host.updateEmptyState();
@@ -166,6 +166,7 @@ export class ToolDispatch {
166
166
  // transcript places itself against its own card, and by the time it runs the
167
167
  // card is no longer reachable by id.
168
168
  this.#host.transcript.setCardElement(call.id, card.element);
169
+ this.#host.transcript.holdRunning(call.id, card);
169
170
  // Scoped out of this round's catalog ⇒ not a frontend tool of ours, for
170
171
  // this round. A host that offers `delete_record` only on the page where
171
172
  // deleting makes sense has said something about *this* run, and a call
@@ -254,17 +255,26 @@ export class ToolDispatch {
254
255
  // to the message list made it a sibling *after* the group, so anything
255
256
  // that streamed afterwards rendered above it and the prompt drifted to
256
257
  // the foot of the turn no matter when it was asked.
257
- const decision = requestConfirmation(this.#host.transcript.ensureGroup(), request, {
258
- signal,
259
- strings: this.#host.strings(),
260
- // Offered only where it can be honoured -- see `#confirmationRule`.
261
- ...(rule === "destructive"
262
- ? { onAlwaysAllow: () => this.#sessionApproved.add(call.name) }
263
- : {}),
264
- });
265
- this.#host.transcript.updateEmptyState();
266
- this.#host.transcript.follow();
267
- const accepted = await decision;
258
+ //
259
+ // The card says it is asking for as long as the prompt is open, however it
260
+ // ends, so a step group's row reads "waiting for you" rather than running.
261
+ card.setAsking(true);
262
+ let accepted: boolean;
263
+ try {
264
+ const decision = requestConfirmation(this.#host.transcript.ensureGroup(), request, {
265
+ signal,
266
+ strings: this.#host.strings(),
267
+ // Offered only where it can be honoured -- see `#confirmationRule`.
268
+ ...(rule === "destructive"
269
+ ? { onAlwaysAllow: () => this.#sessionApproved.add(call.name) }
270
+ : {}),
271
+ });
272
+ this.#host.transcript.updateEmptyState();
273
+ this.#host.transcript.follow();
274
+ accepted = await decision;
275
+ } finally {
276
+ card.setAsking(false);
277
+ }
268
278
  this.#host.decision.close();
269
279
  // A handover while the card was open declines it, as any Stop does, but
270
280
  // the transcript the decline would be drawn into is the next principal's
@@ -458,6 +468,11 @@ export class ToolDispatch {
458
468
  request.args = card.args;
459
469
  }
460
470
  card?.mark(TOOL_CALL_STATUS.DEFERRED);
471
+ // Before either renderer runs: the built-in card focuses its approve
472
+ // button as it is drawn, and a folded step group has no box to focus in.
473
+ if (card !== undefined) {
474
+ this.#host.transcript.revealStep(card);
475
+ }
461
476
  // The built-in card renders into the gated call's own card, falling back
462
477
  // to the answer group when the interrupt names no call we hold one for.
463
478
  const builtIn = (): Promise<boolean> =>
@@ -28,8 +28,6 @@ export const CONFIRMATION_STYLES: string = `
28
28
  padding: 8px 10px;
29
29
  max-height: 140px;
30
30
  overflow: auto;
31
- /* Scrolling past the end of this must not scroll the page behind it. */
32
- overscroll-behavior: contain;
33
31
  font-size: 12px;
34
32
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
35
33
  background: var(--_assistant-bg);
@@ -3,6 +3,13 @@ import type { ResizeAxis } from "./resize_handle.js";
3
3
  /**
4
4
  * What a collapsed panel shrinks to.
5
5
  *
6
+ * Only `null` versus not-`null` is read today: every caller asks whether the
7
+ * surface can collapse at all, never which target it collapses to. The three
8
+ * names below therefore describe the surface rather than drive it, and nothing
9
+ * relies on them (changing one fails only the test of this record). The
10
+ * bottom-bar collapse is expected to read or replace them, and a reader that
11
+ * does should come with a test outside this record's own.
12
+ *
6
13
  * - `launcher` -- the round button in a corner.
7
14
  * - `rail` -- the slim full-height edge the sidebar docks against; the same
8
15
  * launcher element, shaped by the stylesheet.
@@ -29,7 +36,11 @@ export type CollapseTarget = "launcher" | "rail" | "header" | null;
29
36
  * under this directory); this is the part of a surface that code decides.
30
37
  */
31
38
  export interface Surface {
32
- /** What collapsing shrinks the panel to; `null` when it cannot collapse. */
39
+ /**
40
+ * What collapsing shrinks the panel to; `null` when it cannot collapse. Only
41
+ * the `null` test is authoritative: the non-null names are descriptive (see
42
+ * {@link CollapseTarget}), and nothing branches on which one a surface has.
43
+ */
33
44
  readonly collapseTo: CollapseTarget;
34
45
  /**
35
46
  * Whether a gesture may move the launcher. The rest have nowhere to put it:
@@ -48,8 +48,6 @@ export const THOUGHTS_STYLES: string = `
48
48
  border-left: 2px solid var(--_border);
49
49
  max-height: 220px;
50
50
  overflow: auto;
51
- /* Scrolling past the end of this must not scroll the page behind it. */
52
- overscroll-behavior: contain;
53
51
  white-space: pre-wrap;
54
52
  word-break: break-word;
55
53
  font-family: inherit;
@@ -287,6 +287,17 @@ export class ToolCallCard {
287
287
  this.#status.textContent = statusLabels(this.#strings)[status];
288
288
  }
289
289
 
290
+ /**
291
+ * Say whether a prompt is open on this call, a question it asked or a
292
+ * confirmation it needs. A flag of its own beside the status, which stays
293
+ * `pending`: the call is still running as far as the status goes, and a card
294
+ * display mode that reads the status draws it exactly as before. The step
295
+ * group reads the flag to tell a call waiting on a person from one working.
296
+ */
297
+ setAsking(asking: boolean): void {
298
+ this.element.toggleAttribute("data-asking", asking);
299
+ }
300
+
290
301
  /**
291
302
  * Record that a human approved or declined this call, as a line in the card.
292
303
  * The prompt disappears once answered, so this is the only lasting trace that