@artooi/ag-ui-web-component 0.19.0 → 0.20.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ag_ui_chat.d.ts","sourceRoot":"","sources":["../../src/core/ag_ui_chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAsB,IAAI,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAKL,YAAY,EASb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,kCAAkC,CAAC;AAGvF,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,wBAAwB,CAAC;AAQhC,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AASzF,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAE1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,wBAAwB,CAAC;AAG5E,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,wBAAw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;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;;;GAMG;AACH,qBAAa,UAAU;;IAoBrB,YAAY,MAAM,EAAE,gBAAgB,EAoBnC;IAED,oEAAoE;IACpE,IAAI,KAAK,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAE7C;IAED,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAEvD;IAED,4CAA4C;IAC5C,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,wEAAwE;IACxE,IAAI,QAAQ,IAAI,SAAS,OAAO,EAAE,CAEjC;IAED;;;;;;;;;;;OAWG;IACG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,SAAS,aAAa,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAWrF;IAED;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAE5B;IAED,0EAA0E;IAC1E,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAGvD;IAED;;;;;;OAMG;IACH,MAAM,IAAI,IAAI,CAGb;CAoMF"}
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ function isSkill(value) {
58
58
  return false;
59
59
  }
60
60
  const record = value;
61
- return typeof record["name"] === "string" && typeof record["title"] === "string" && typeof record["prompt"] === "string";
61
+ return typeof record["name"] === "string" && typeof record["title"] === "string" && (record["prompt"] === void 0 || typeof record["prompt"] === "string");
62
62
  }
63
63
  function parseSkills(value) {
64
64
  if (!Array.isArray(value)) {
@@ -471,7 +471,7 @@ var DEFAULT_UI_STRINGS = {
471
471
  runInterrupted: "The previous response didn\u2019t finish \u2014 the page changed before it arrived.",
472
472
  pageMoved: "The page changed since you last looked at it. Call read_page to see the current page, then retry.",
473
473
  attachmentsStillUploading: "{n} file still uploading \u2014 it was not sent with this message and is still attached.",
474
- skillNeeds: "\u201C{title}\u201D needs: {fields}",
474
+ skillNeeds: "\u201C{title}\u201D needs {fields} \u2014 fill it in below, then send.",
475
475
  message: "Message",
476
476
  inputPlaceholder: "Ask anything\u2026",
477
477
  send: "Send",
@@ -485,6 +485,7 @@ var DEFAULT_UI_STRINGS = {
485
485
  toolDone: "\u2713 done",
486
486
  toolError: "\u26A0 error",
487
487
  toolDeclined: "\u2298 declined",
488
+ resizePanel: "Resize the chat panel",
488
489
  decisionApproved: "approved by you",
489
490
  decisionDeclined: "declined by you",
490
491
  argumentsLabel: "Arguments",
@@ -4121,6 +4122,76 @@ function renderMarkdown(text2, options) {
4121
4122
  return template.innerHTML.trim();
4122
4123
  }
4123
4124
 
4125
+ // src/ui/resize_handle.ts
4126
+ var MIN_WIDTH = 280;
4127
+ var MIN_HEIGHT = 240;
4128
+ function createResizeHandle(options) {
4129
+ const handle = document.createElement("div");
4130
+ handle.className = "resize-handle";
4131
+ handle.setAttribute("part", "resize-handle");
4132
+ handle.setAttribute("role", "separator");
4133
+ handle.setAttribute("aria-label", options.label);
4134
+ handle.tabIndex = 0;
4135
+ const sizeAt = (axis, anchor, rect, x2, y2) => {
4136
+ const width = anchor.x === "right" ? rect.right - x2 : x2 - rect.left;
4137
+ const clamped = { width: Math.max(MIN_WIDTH, width) };
4138
+ if (axis !== "both") {
4139
+ return clamped;
4140
+ }
4141
+ const height = anchor.y === "bottom" ? rect.bottom - y2 : y2 - rect.top;
4142
+ return { ...clamped, height: Math.max(MIN_HEIGHT, height) };
4143
+ };
4144
+ handle.addEventListener("pointerdown", (event) => {
4145
+ const axis = options.axis();
4146
+ if (axis === "none") {
4147
+ return;
4148
+ }
4149
+ const anchor = options.anchor();
4150
+ const rect = options.rect();
4151
+ const onMove = (move) => {
4152
+ options.apply(sizeAt(axis, anchor, rect, move.clientX, move.clientY));
4153
+ };
4154
+ const onUp = (up) => {
4155
+ window.removeEventListener("pointermove", onMove);
4156
+ window.removeEventListener("pointerup", onUp);
4157
+ handle.removeAttribute("data-dragging");
4158
+ options.commit(sizeAt(axis, anchor, rect, up.clientX, up.clientY));
4159
+ };
4160
+ handle.setAttribute("data-dragging", "true");
4161
+ window.addEventListener("pointermove", onMove);
4162
+ window.addEventListener("pointerup", onUp);
4163
+ event.preventDefault();
4164
+ });
4165
+ handle.addEventListener("keydown", (event) => {
4166
+ const axis = options.axis();
4167
+ if (axis === "none") {
4168
+ return;
4169
+ }
4170
+ const anchor = options.anchor();
4171
+ const rect = options.rect();
4172
+ const step = event.shiftKey ? 64 : 16;
4173
+ const outward = anchor.x === "right" ? -1 : 1;
4174
+ const width = rect.right - rect.left;
4175
+ const height = rect.bottom - rect.top;
4176
+ let next = null;
4177
+ if (event.key === "ArrowLeft") {
4178
+ next = { width: Math.max(MIN_WIDTH, width - step * outward) };
4179
+ } else if (event.key === "ArrowRight") {
4180
+ next = { width: Math.max(MIN_WIDTH, width + step * outward) };
4181
+ } else if (axis === "both" && (event.key === "ArrowUp" || event.key === "ArrowDown")) {
4182
+ const grow = event.key === (anchor.y === "bottom" ? "ArrowUp" : "ArrowDown");
4183
+ next = { height: Math.max(MIN_HEIGHT, height + (grow ? step : -step)) };
4184
+ }
4185
+ if (next === null) {
4186
+ return;
4187
+ }
4188
+ event.preventDefault();
4189
+ options.apply(next);
4190
+ options.commit(next);
4191
+ });
4192
+ return handle;
4193
+ }
4194
+
4124
4195
  // src/ui/reveal_words.ts
4125
4196
  function collectTextNodes(root, out) {
4126
4197
  for (const child of Array.from(root.childNodes)) {
@@ -4292,6 +4363,7 @@ var SkillsMenu = class {
4292
4363
  button2.className = "skill-chip";
4293
4364
  button2.setAttribute("part", "skill-chip");
4294
4365
  button2.textContent = skill.title;
4366
+ button2.title = `/${skill.name}`;
4295
4367
  button2.addEventListener("click", () => this.#pick(skill));
4296
4368
  this.chips.appendChild(button2);
4297
4369
  }
@@ -4308,7 +4380,11 @@ var SkillsMenu = class {
4308
4380
  const title = document.createElement("span");
4309
4381
  title.className = "skill-item-title";
4310
4382
  title.setAttribute("part", "skill-item-title");
4311
- title.textContent = skill.title;
4383
+ const token = document.createElement("code");
4384
+ token.className = "skill-item-token";
4385
+ token.setAttribute("part", "skill-item-token");
4386
+ token.textContent = `/${skill.name}`;
4387
+ title.append(token, document.createTextNode(` ${skill.title}`));
4312
4388
  item.appendChild(title);
4313
4389
  if (skill.description !== void 0) {
4314
4390
  const desc = document.createElement("span");
@@ -4490,7 +4566,72 @@ var STYLES = `
4490
4566
  padding-inline: max(var(--ag-ui-pad), calc((100% - var(--ag-ui-content-max-width)) / 2));
4491
4567
  }
4492
4568
 
4493
- :host([placement="page"]) .input-row {
4569
+ :host([placement="page"]) /* Resize handle: a corner grip on a floating panel, an edge grip on a docked
4570
+ one. Absent entirely where the placement is full-bleed, since there is
4571
+ nothing to drag. */
4572
+ .resize-handle {
4573
+ position: absolute;
4574
+ z-index: 2;
4575
+ background: transparent;
4576
+ touch-action: none;
4577
+ }
4578
+
4579
+ .resize-handle:focus-visible {
4580
+ outline: 2px solid var(--ag-ui-accent);
4581
+ outline-offset: -2px;
4582
+ }
4583
+
4584
+ /* The grip sits at the corner the panel grows toward. Which corner that is
4585
+ depends on the host's layout, not on placement, so the element measures it
4586
+ and stamps data-resize-anchor with the edges that stay put.
4587
+
4588
+ Default (bottom-right pinned, the floating case) puts the grip top-left. */
4589
+ .resize-handle {
4590
+ top: 0;
4591
+ left: 0;
4592
+ width: 14px;
4593
+ height: 14px;
4594
+ cursor: nwse-resize;
4595
+ }
4596
+
4597
+ :host([data-resize-anchor~="left"]) .resize-handle {
4598
+ left: auto;
4599
+ right: 0;
4600
+ }
4601
+
4602
+ :host([data-resize-anchor~="top"]) .resize-handle {
4603
+ top: auto;
4604
+ bottom: 0;
4605
+ }
4606
+
4607
+ /* One axis flipped means the drag runs along the other diagonal. */
4608
+ :host([data-resize-anchor="top-right"]) .resize-handle,
4609
+ :host([data-resize-anchor="bottom-left"]) .resize-handle {
4610
+ cursor: nesw-resize;
4611
+ }
4612
+
4613
+ /* Docked: the placement owns the height, so only the inner edge is the user's. */
4614
+ :host([placement="sidebar"]) .resize-handle,
4615
+ :host([placement="side"]) .resize-handle {
4616
+ top: 0;
4617
+ bottom: auto;
4618
+ width: 8px;
4619
+ height: 100%;
4620
+ cursor: ew-resize;
4621
+ }
4622
+
4623
+ /* Full-bleed: nothing to drag. */
4624
+ :host([placement="full"]) .resize-handle,
4625
+ :host([placement="page"]) .resize-handle {
4626
+ display: none;
4627
+ }
4628
+
4629
+ .resize-handle[data-dragging] {
4630
+ background: var(--ag-ui-accent);
4631
+ opacity: 0.35;
4632
+ }
4633
+
4634
+ .input-row {
4494
4635
  padding-inline: max(12px, calc((100% - var(--ag-ui-content-max-width)) / 2));
4495
4636
  }
4496
4637
 
@@ -5150,6 +5291,13 @@ var STYLES = `
5150
5291
 
5151
5292
  /* The record of a human decision on a gated call. An approved call used to
5152
5293
  look exactly like one that was never gated. */
5294
+ .skill-item-token {
5295
+ font-family: ui-monospace, "SF Mono", Menlo, monospace;
5296
+ font-size: 0.92em;
5297
+ color: var(--ag-ui-accent);
5298
+ margin-right: 6px;
5299
+ }
5300
+
5153
5301
  .tool-call-decision {
5154
5302
  flex: none;
5155
5303
  font-size: 11px;
@@ -5227,6 +5375,75 @@ var STYLES = `
5227
5375
  content: "\u25BE ";
5228
5376
  }
5229
5377
 
5378
+ /* Resize handle: a corner grip on a floating panel, an edge grip on a docked
5379
+ one. Absent entirely where the placement is full-bleed, since there is
5380
+ nothing to drag. */
5381
+ .resize-handle {
5382
+ position: absolute;
5383
+ z-index: 2;
5384
+ background: transparent;
5385
+ touch-action: none;
5386
+ }
5387
+
5388
+ .resize-handle:focus-visible {
5389
+ outline: 2px solid var(--ag-ui-accent);
5390
+ outline-offset: -2px;
5391
+ }
5392
+
5393
+ /* The grip sits on the corner opposite the panel's anchor, because a resize
5394
+ measures from whichever edge is not moving. Selected from the host attribute,
5395
+ so switching placement moves the grip immediately.
5396
+
5397
+ Default is floating: pinned bottom-right, so the grip is top-left. */
5398
+ .resize-handle {
5399
+ top: 0;
5400
+ left: 0;
5401
+ width: 14px;
5402
+ height: 14px;
5403
+ cursor: nwse-resize;
5404
+ }
5405
+
5406
+ /* Embedded sits in normal flow, pinned top-left, so it grows bottom-right. */
5407
+ :host([placement="embedded"]) .resize-handle {
5408
+ top: auto;
5409
+ left: auto;
5410
+ right: 0;
5411
+ bottom: 0;
5412
+ cursor: nwse-resize;
5413
+ }
5414
+
5415
+ /* Pinned bottom-left, so the free corner is top-right. */
5416
+ :host([placement="bottom-left"]) .resize-handle {
5417
+ left: auto;
5418
+ right: 0;
5419
+ cursor: nesw-resize;
5420
+ }
5421
+
5422
+ /* Docked: the placement owns the height, so only the inner edge is the user's. */
5423
+ :host([placement="sidebar"]) .resize-handle,
5424
+ :host([placement="side"]) .resize-handle {
5425
+ width: 8px;
5426
+ height: 100%;
5427
+ cursor: ew-resize;
5428
+ }
5429
+
5430
+ /* Docked to the left, so the inner edge is the right-hand one. */
5431
+ :host([placement="sidebar"][data-side="left"]) .resize-handle {
5432
+ left: auto;
5433
+ right: 0;
5434
+ }
5435
+
5436
+ /* Full-bleed: nothing to drag. */
5437
+ :host([placement="full"]) .resize-handle,
5438
+ :host([placement="page"]) .resize-handle {
5439
+ display: none;
5440
+ }
5441
+
5442
+ .resize-handle[data-dragging] {
5443
+ background: var(--ag-ui-accent);
5444
+ opacity: 0.35;
5445
+ }
5446
+
5230
5447
  .input-row {
5231
5448
  display: flex;
5232
5449
  gap: 8px;
@@ -5704,9 +5921,12 @@ var STYLES = `
5704
5921
  color: var(--ag-ui-muted);
5705
5922
  }
5706
5923
 
5924
+ /* The hint sits directly above the composer's top border, so a zero bottom
5925
+ margin left the text touching the divider. */
5707
5926
  .skill-hint {
5708
- margin: 8px 12px 0;
5927
+ margin: 8px 12px;
5709
5928
  font-size: 0.85em;
5929
+ line-height: 1.4;
5710
5930
  color: var(--ag-ui-danger);
5711
5931
  }
5712
5932
 
@@ -6570,6 +6790,13 @@ var AgUiClient = class {
6570
6790
  #executeTool;
6571
6791
  #resolveInterrupts;
6572
6792
  #onPersist;
6793
+ /**
6794
+ * Message ids the server has already closed, so a reuse can be reported.
6795
+ *
6796
+ * Per client rather than per run: the merge happens across runs, which is the
6797
+ * case a per-run set would miss entirely.
6798
+ */
6799
+ #closedMessageIds = /* @__PURE__ */ new Set();
6573
6800
  #connectionLostMessage;
6574
6801
  // Set by cancel(); reset at the top of each #run(). Checked by the loop so
6575
6802
  // a cancel between frontend-tool rounds doesn't start another round.
@@ -6741,14 +6968,23 @@ var AgUiClient = class {
6741
6968
  }
6742
6969
  #buildSubscriber(pending, runState) {
6743
6970
  const h = this.#handlers;
6971
+ const closed = this.#closedMessageIds;
6744
6972
  return {
6745
6973
  onRunInitialized() {
6746
6974
  h.onRunStart();
6747
6975
  },
6976
+ onTextMessageStartEvent({ event }) {
6977
+ if (closed.has(event.messageId)) {
6978
+ console.warn(
6979
+ `<ag-ui-chat>: the server reused message id "${event.messageId}", which was already closed. Its content will be appended to that earlier message rather than starting a new one, and the merged result is what gets persisted. Issue a fresh id per message.`
6980
+ );
6981
+ }
6982
+ },
6748
6983
  onTextMessageContentEvent({ textMessageBuffer }) {
6749
6984
  h.onTextDelta(textMessageBuffer);
6750
6985
  },
6751
- onTextMessageEndEvent({ textMessageBuffer }) {
6986
+ onTextMessageEndEvent({ event, textMessageBuffer }) {
6987
+ closed.add(event.messageId);
6752
6988
  h.onTextEnd(textMessageBuffer);
6753
6989
  },
6754
6990
  onToolCallEndEvent({ event, toolCallName, toolCallArgs }) {
@@ -7296,6 +7532,7 @@ var CONNECT_TIME_ATTRIBUTES = [
7296
7532
  "data-icon-url"
7297
7533
  ];
7298
7534
  var COLLAPSED_KEY = "ag-ui-chat:collapsed";
7535
+ var SIZE_KEY = "ag-ui-chat:size";
7299
7536
  var THEME_KEY = "ag-ui-chat:theme";
7300
7537
  var AgUiChat = class extends HTMLElement {
7301
7538
  /** Agent factory; override to inject a custom or fake agent (tests). */
@@ -7644,9 +7881,13 @@ var AgUiChat = class extends HTMLElement {
7644
7881
  }
7645
7882
  /** Attributes the element reacts to after it has been connected. */
7646
7883
  static get observedAttributes() {
7647
- return ["title-text", ...CONNECT_TIME_ATTRIBUTES];
7884
+ return ["title-text", "placement", ...CONNECT_TIME_ATTRIBUTES];
7648
7885
  }
7649
7886
  attributeChangedCallback(name, previous, value) {
7887
+ if (name === "placement") {
7888
+ requestAnimationFrame(() => this.#syncResizeAnchor());
7889
+ return;
7890
+ }
7650
7891
  if (name === "title-text") {
7651
7892
  this.#title.textContent = value ?? this.#strings.title;
7652
7893
  return;
@@ -7852,6 +8093,8 @@ var AgUiChat = class extends HTMLElement {
7852
8093
  }
7853
8094
  connectedCallback() {
7854
8095
  this.#storageNs = this.id !== "" ? this.id : this.endpoint;
8096
+ this.#applySize(this.#readSize());
8097
+ requestAnimationFrame(() => this.#syncResizeAnchor());
7855
8098
  this.#strings = mergeUiStrings({ ...this.#readStringOverrides(), ...this.strings });
7856
8099
  if (this.getAttribute("data-theme-toggle") !== null) {
7857
8100
  const saved = this.#readScopedItem(THEME_KEY);
@@ -8127,21 +8370,57 @@ Use the read_attachment tool with an id to read a file's contents.`
8127
8370
  }
8128
8371
  this.#skillsMenu.setSkills([...merged.values()]);
8129
8372
  }
8130
- /** Pre-fill (or send) a picked skill's prompt, filling its placeholders. */
8373
+ /**
8374
+ * Act on a picked skill.
8375
+ *
8376
+ * A skill that ships no `prompt` is **server-resolved**: the catalog carries
8377
+ * only its name and label, and picking it sends the bare `/name` token for
8378
+ * the agent to expand — from the harness `Skills` capability, or from the
8379
+ * server's own instructions. That is the shape to prefer, because the prompt
8380
+ * then never reaches the browser at all: a skill is often where a project's
8381
+ * internal workflow is written down most plainly, and a catalog endpoint is a
8382
+ * plain GET.
8383
+ *
8384
+ * A skill that does carry a `prompt` keeps the older behaviour — the client
8385
+ * fills its `{placeholder}`s from the page and sends (or pre-fills) the text.
8386
+ * Right for a user-facing convenience, and for placeholders only the page can
8387
+ * supply.
8388
+ *
8389
+ * Either way a pick now **sends**, rather than parking text in the composer
8390
+ * for a second click; `sendImmediately: false` opts back into pre-filling.
8391
+ */
8131
8392
  #applySkill(skill) {
8393
+ if (skill.prompt === void 0) {
8394
+ this.#skillHint.hidden = true;
8395
+ void this.sendMessage(`/${skill.name}`);
8396
+ return;
8397
+ }
8132
8398
  const { text: text2, missing } = fillTemplate(skill.prompt, this.skillContext());
8133
8399
  if (missing.length > 0) {
8134
8400
  this.#skillHint.textContent = this.#strings.skillNeeds.replace("{title}", skill.title).replace("{fields}", missing.join(", "));
8135
8401
  this.#skillHint.hidden = false;
8402
+ this.#input.value = text2;
8403
+ this.#input.focus();
8404
+ this.#selectFirstPlaceholder(text2);
8136
8405
  return;
8137
8406
  }
8138
8407
  this.#skillHint.hidden = true;
8139
8408
  this.#input.value = text2;
8140
- if (skill.sendImmediately === true) {
8141
- void this.#submit();
8142
- } else {
8409
+ if (skill.sendImmediately === false) {
8143
8410
  this.#input.focus();
8411
+ return;
8144
8412
  }
8413
+ void this.#submit();
8414
+ }
8415
+ /**
8416
+ * Put the caret on the first unresolved placeholder, selected.
8417
+ *
8418
+ * Typing then replaces it, which is the shortest path from "this skill needs
8419
+ * a topic" to a sendable prompt.
8420
+ */
8421
+ #selectFirstPlaceholder(text2) {
8422
+ const start = text2.indexOf("{");
8423
+ this.#input.setSelectionRange(start, text2.indexOf("}", start) + 1);
8145
8424
  }
8146
8425
  /** Whether the widget is collapsed (reflected as the `collapsed` attribute). */
8147
8426
  get collapsed() {
@@ -8189,6 +8468,102 @@ Use the read_attachment tool with an id to read a file's contents.`
8189
8468
  sessionStorage.setItem(this.#storageKey(THEME_KEY), next);
8190
8469
  this.#syncThemeGlyph();
8191
8470
  }
8471
+ /**
8472
+ * Which axes the current placement allows.
8473
+ *
8474
+ * A full-bleed layout is `100vw`/`100vh` by definition and cannot be resized
8475
+ * at all; a docked panel owns its height, leaving only its inner edge. Read
8476
+ * per interaction, because `placement` is a live attribute.
8477
+ */
8478
+ #resizeAxis() {
8479
+ switch (this.getAttribute("placement")) {
8480
+ case "full":
8481
+ case "page":
8482
+ return "none";
8483
+ case "sidebar":
8484
+ case "side":
8485
+ return "width";
8486
+ default:
8487
+ return "both";
8488
+ }
8489
+ }
8490
+ /**
8491
+ * Which edges the layout is holding still, by measuring rather than guessing.
8492
+ *
8493
+ * A resize has to be computed from the edge that does not move, and which
8494
+ * edge that is belongs to the **host's layout**, not to `placement`: a
8495
+ * floating panel is pinned bottom-right, while an embedded one goes wherever
8496
+ * the page's own CSS puts it — flex-start, flex-end, a grid cell. Mapping
8497
+ * placement to a corner got this wrong for any host that right-aligns the
8498
+ * element, and the symptom is bad enough to read as a broken control: the
8499
+ * panel shrinks when dragged outward, travelling by its opposite corner.
8500
+ *
8501
+ * So: nudge the size by a pixel, see which edges stayed put, and undo. One
8502
+ * forced reflow per drag, which is cheap next to being wrong.
8503
+ */
8504
+ #measureAnchor() {
8505
+ const before = this.getBoundingClientRect();
8506
+ const width = this.style.getPropertyValue("--ag-ui-width");
8507
+ const height = this.style.getPropertyValue("--ag-ui-height");
8508
+ this.#applySize({ width: before.width + 1, height: before.height + 1 });
8509
+ const after = this.getBoundingClientRect();
8510
+ this.#restoreProperty("--ag-ui-width", width);
8511
+ this.#restoreProperty("--ag-ui-height", height);
8512
+ return {
8513
+ x: Math.abs(after.left - before.left) < 0.5 ? "left" : "right",
8514
+ y: Math.abs(after.top - before.top) < 0.5 ? "top" : "bottom"
8515
+ };
8516
+ }
8517
+ /** Stamp the measured anchor so the shadow CSS can place the grip. */
8518
+ #syncResizeAnchor() {
8519
+ if (!this.#connected) {
8520
+ return;
8521
+ }
8522
+ const anchor = this.#measureAnchor();
8523
+ this.setAttribute("data-resize-anchor", `${anchor.y}-${anchor.x}`);
8524
+ }
8525
+ /** Put a custom property back to a previous value, or remove it if there was none. */
8526
+ #restoreProperty(name, value) {
8527
+ if (value === "") {
8528
+ this.style.removeProperty(name);
8529
+ return;
8530
+ }
8531
+ this.style.setProperty(name, value);
8532
+ }
8533
+ /**
8534
+ * Write a dragged size onto the host as custom properties.
8535
+ *
8536
+ * Properties rather than inline `width` / `height`: the placement rules set
8537
+ * those same properties, so an inline dimension would outrank them and a
8538
+ * panel dragged while floating would keep that width after switching to
8539
+ * fullscreen.
8540
+ */
8541
+ #applySize(size) {
8542
+ if (size.width !== void 0) {
8543
+ this.style.setProperty("--ag-ui-width", `${size.width}px`);
8544
+ }
8545
+ if (size.height !== void 0) {
8546
+ this.style.setProperty("--ag-ui-height", `${size.height}px`);
8547
+ }
8548
+ }
8549
+ /** Persist a dragged size per tab, alongside the collapsed/theme preferences. */
8550
+ #persistSize(size) {
8551
+ const stored = { ...this.#readSize(), ...size };
8552
+ sessionStorage.setItem(this.#storageKey(SIZE_KEY), JSON.stringify(stored));
8553
+ }
8554
+ /** The persisted size for this instance, or an empty record. */
8555
+ #readSize() {
8556
+ const raw = this.#readScopedItem(SIZE_KEY);
8557
+ if (raw === null) {
8558
+ return {};
8559
+ }
8560
+ try {
8561
+ const parsed = JSON.parse(raw);
8562
+ return typeof parsed === "object" && parsed !== null ? parsed : {};
8563
+ } catch {
8564
+ return {};
8565
+ }
8566
+ }
8192
8567
  /** This instance's namespaced form of an origin-scoped storage key. */
8193
8568
  #storageKey(base) {
8194
8569
  return this.#storageNs === "" ? base : `${base}:${this.#storageNs}`;
@@ -8583,6 +8958,19 @@ Use the read_attachment tool with an id to read a file's contents.`
8583
8958
  this.#rail.setAttribute("aria-label", this.#strings.expand);
8584
8959
  this.#rail.append(this.#iconElement("launcher", "launcher-icon", "\u{1F4AC}"));
8585
8960
  this.#rail.addEventListener("click", () => this.setCollapsed(false));
8961
+ this.#chat.append(
8962
+ createResizeHandle({
8963
+ axis: () => this.#resizeAxis(),
8964
+ anchor: () => this.#measureAnchor(),
8965
+ rect: () => this.getBoundingClientRect(),
8966
+ apply: (size) => this.#applySize(size),
8967
+ commit: (size) => {
8968
+ this.#persistSize(size);
8969
+ this.#syncResizeAnchor();
8970
+ },
8971
+ label: this.#strings.resizePanel
8972
+ })
8973
+ );
8586
8974
  this.#root.append(style, this.#chat, this.#rail);
8587
8975
  }
8588
8976
  /**
@@ -8915,6 +9303,7 @@ Use the read_attachment tool with an id to read a file's contents.`
8915
9303
  const approved = this.approvalRenderer !== null ? await this.approvalRenderer(request, { signal }) : await requestApproval(this.#ensureGroup(), request, { signal, strings: this.#strings });
8916
9304
  this.#updateEmptyState();
8917
9305
  this.#messages.scrollTop = this.#messages.scrollHeight;
9306
+ card?.recordDecision(approved ? "approved" : "declined");
8918
9307
  if (approved) {
8919
9308
  responses[interrupt.id] = { status: "resolved", payload: { approved: true } };
8920
9309
  } else {
@@ -9180,7 +9569,7 @@ function setControlValue(el, value) {
9180
9569
  }
9181
9570
 
9182
9571
  // src/version.ts
9183
- var VERSION = "0.19.0";
9572
+ var VERSION = "0.20.0";
9184
9573
  export {
9185
9574
  ATTACHMENT_EVENT,
9186
9575
  AgUiChat,