@codex-app-sdk/vue 0.16.5 → 0.16.7

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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Comment as e, Fragment as t, Teleport as n, Text as r, Transition as i, TransitionGroup as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createStaticVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, getCurrentScope as g, guardReactiveProps as _, h as v, hasInjectionContext as y, inject as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as E, onMounted as D, onScopeDispose as O, openBlock as k, provide as ee, reactive as A, readonly as j, ref as M, render as N, renderList as P, renderSlot as F, resolveComponent as I, resolveDynamicComponent as L, shallowReactive as te, shallowRef as R, toDisplayString as z, toValue as B, unref as V, useSlots as H, vModelText as U, vShow as ne, watch as W, withCtx as G, withDirectives as re, withKeys as K, withModifiers as q } from "vue";
2
- import { IconArrowDown as J, IconArrowFork as Y, IconBolt as ie, IconBrain as ae, IconCheck as oe, IconCheck as se, IconChevronDown as ce, IconChevronRight as le, IconChevronUp as ue, IconCircleX as de, IconCode as fe, IconCopy as pe, IconDownload as me, IconExternalLink as he, IconEye as ge, IconFileText as _e, IconFolder as ve, IconHandStop as ye, IconInfoCircle as be, IconLayoutDashboard as xe, IconListDetails as Se, IconLoader2 as Ce, IconMaximize as we, IconMessageQuestion as Te, IconMicrophone as Ee, IconPaperclip as De, IconPencil as Oe, IconPhoto as ke, IconPlayerPlayFilled as Ae, IconPlugConnected as je, IconPlus as Me, IconQuote as Ne, IconRotateClockwise as Pe, IconSearch as Fe, IconShieldCheck as Ie, IconSparkleHighlight as Le, IconSparkles as Re, IconSquareCheck as ze, IconSquareDashed as Be, IconSquareX as Ve, IconSteeringWheel as He, IconTargetArrow as Ue, IconTerminal as We, IconTerminal2 as Ge, IconTool as Ke, IconTrash as qe, IconWorldSearch as Je, IconX as Ye } from "@tabler/icons-vue";
1
+ import { Comment as e, Fragment as t, Teleport as n, Text as r, Transition as i, TransitionGroup as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createStaticVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, getCurrentScope as g, guardReactiveProps as _, h as v, hasInjectionContext as y, inject as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as E, onMounted as D, onScopeDispose as O, openBlock as k, provide as ee, reactive as A, readonly as j, ref as M, render as N, renderList as P, renderSlot as F, resolveComponent as te, resolveDynamicComponent as I, shallowReactive as ne, shallowRef as L, toDisplayString as R, toValue as z, unref as B, useSlots as V, vModelText as H, vShow as re, watch as U, withCtx as W, withDirectives as ie, withKeys as G, withModifiers as K } from "vue";
2
+ import { IconArrowDown as ae, IconArrowFork as oe, IconBolt as q, IconBrain as se, IconCheck as ce, IconCheck as le, IconChevronDown as ue, IconChevronRight as de, IconChevronUp as fe, IconCircleX as pe, IconCode as me, IconCopy as he, IconDownload as ge, IconExternalLink as _e, IconEye as ve, IconFileText as ye, IconFolder as be, IconHandStop as xe, IconInfoCircle as J, IconLayoutDashboard as Se, IconListDetails as Ce, IconLoader2 as we, IconMaximize as Te, IconMessageQuestion as Ee, IconMicrophone as De, IconPaperclip as Oe, IconPencil as Y, IconPhoto as ke, IconPlayerPlayFilled as Ae, IconPlugConnected as je, IconPlus as Me, IconQuote as Ne, IconRotateClockwise as Pe, IconSearch as Fe, IconShieldCheck as Ie, IconSparkleHighlight as Le, IconSparkles as Re, IconSquareCheck as ze, IconSquareDashed as Be, IconSquareX as Ve, IconSteeringWheel as He, IconTargetArrow as Ue, IconTerminal as We, IconTerminal2 as Ge, IconTool as Ke, IconTrash as qe, IconWorldSearch as Je, IconX as Ye } from "@tabler/icons-vue";
3
3
  import Xe from "fix-webm-duration";
4
4
  import { renderMermaidSVG as Ze } from "beautiful-mermaid";
5
5
  import { Marked as Qe, Renderer as $e } from "marked";
@@ -230,7 +230,7 @@ var jt = [
230
230
  onMouseleave: n[1] ||= (e) => i.value = !1,
231
231
  onClick: d
232
232
  }, [
233
- !e.busy && !e.interruptArmed ? (k(), s(V(Ae), {
233
+ !e.busy && !e.interruptArmed ? (k(), s(B(Ae), {
234
234
  key: 0,
235
235
  "aria-hidden": "true",
236
236
  size: 16
@@ -279,8 +279,8 @@ var jt = [
279
279
  setup(e, { emit: t }) {
280
280
  let n = t;
281
281
  return (t, r) => e.planMode || e.command ? (k(), l("div", It, [e.planMode ? (k(), l("span", Lt, [
282
- m(V(Se), { class: "chat-composer__mode__icon" }),
283
- m(V(de), {
282
+ m(B(Ce), { class: "chat-composer__mode__icon" }),
283
+ m(B(pe), {
284
284
  class: "chat-composer__mode__remove",
285
285
  "aria-label": "Disable plan mode",
286
286
  role: "button",
@@ -288,14 +288,14 @@ var jt = [
288
288
  }),
289
289
  r[2] ||= p(" Plan ", -1)
290
290
  ])) : c("", !0), e.command ? (k(), l("span", Rt, [
291
- m(V(Ue), { class: "chat-composer__mode__icon" }),
292
- m(V(de), {
291
+ m(B(Ue), { class: "chat-composer__mode__icon" }),
292
+ m(B(pe), {
293
293
  class: "chat-composer__mode__remove",
294
294
  "aria-label": `Remove ${e.command.composerMode?.label ?? e.command.displayName ?? e.command.name} command`,
295
295
  role: "button",
296
296
  onClick: r[1] ||= (e) => n("removeCommand")
297
297
  }, null, 8, ["aria-label"]),
298
- p(" " + z(e.command.composerMode?.label ?? e.command.displayName ?? e.command.name), 1)
298
+ p(" " + R(e.command.composerMode?.label ?? e.command.displayName ?? e.command.name), 1)
299
299
  ])) : c("", !0)])) : c("", !0);
300
300
  }
301
301
  }), [["__scopeId", "data-v-64a83e97"]]), Bt = "ask-for-approval", Vt = [
@@ -408,7 +408,7 @@ function Gt(e, t, n, r, i) {
408
408
  Jt(e, qt(e)[0]);
409
409
  });
410
410
  }
411
- }, [...Yt(e, t).nodes, v(le, {
411
+ }, [...Yt(e, t).nodes, v(de, {
412
412
  class: "codex-composer-menu-list__chevron",
413
413
  "aria-hidden": "true"
414
414
  })]), a ? Wt(e.items, e.label, t, (t) => {
@@ -488,7 +488,7 @@ function Yt(e, t) {
488
488
  leadingRadioCheck: !1
489
489
  };
490
490
  let r = t.icon?.({ item: e }), i = e.type === "radio" && e.checked && !r?.length, a;
491
- return a = r?.length ? r : i ? [v(se, {
491
+ return a = r?.length ? r : i ? [v(le, {
492
492
  class: "codex-composer-menu-list__icon codex-composer-menu-list__radio-check",
493
493
  "aria-hidden": "true"
494
494
  })] : "leadingColor" in e && e.leadingColor ? [v("span", {
@@ -535,17 +535,17 @@ var Qt = /* @__PURE__ */ h({
535
535
  function r(e) {
536
536
  n("select", e);
537
537
  }
538
- return (t, n) => (k(), s(V(Ut), {
538
+ return (t, n) => (k(), s(B(Ut), {
539
539
  "aria-label": e.ariaLabel,
540
540
  items: e.items,
541
541
  onSelect: r
542
542
  }, d({ _: 2 }, [t.$slots.icon ? {
543
543
  name: "icon",
544
- fn: G((e) => [F(t.$slots, "icon", w(_(e)))]),
544
+ fn: W((e) => [F(t.$slots, "icon", w(_(e)))]),
545
545
  key: "0"
546
546
  } : void 0, t.$slots.item ? {
547
547
  name: "item",
548
- fn: G((e) => [F(t.$slots, "item", w(_(e)))]),
548
+ fn: W((e) => [F(t.$slots, "item", w(_(e)))]),
549
549
  key: "1"
550
550
  } : void 0]), 1032, ["aria-label", "items"]));
551
551
  }
@@ -572,7 +572,7 @@ var Qt = /* @__PURE__ */ h({
572
572
  emits: ["select", "update:open"],
573
573
  setup(e, { expose: t, emit: n }) {
574
574
  let r = e, i = n, a = M(null), f = M(null), p = M(!1), m = o(() => r.open ?? p.value);
575
- D(() => document.addEventListener("click", y)), E(() => document.removeEventListener("click", y)), W(m, async (e) => {
575
+ D(() => document.addEventListener("click", y)), E(() => document.removeEventListener("click", y)), U(m, async (e) => {
576
576
  if (!e) return;
577
577
  await S();
578
578
  let t = a.value?.querySelector(".codex-composer-menu__list > button[role^=\"menuitem\"], .codex-composer-menu__list > div > button[role^=\"menuitem\"]");
@@ -601,7 +601,7 @@ var Qt = /* @__PURE__ */ h({
601
601
  ref_key: "root",
602
602
  ref: a,
603
603
  class: "codex-chat-theme codex-composer-menu",
604
- onKeydown: n[0] ||= K(q((e) => v(!0), ["prevent", "stop"]), ["escape"])
604
+ onKeydown: n[0] ||= G(K((e) => v(!0), ["prevent", "stop"]), ["escape"])
605
605
  }, [F(t.$slots, "trigger", {
606
606
  open: m.value,
607
607
  toggle: g
@@ -632,11 +632,11 @@ var Qt = /* @__PURE__ */ h({
632
632
  onSelect: b
633
633
  }, d({ _: 2 }, [t.$slots.icon ? {
634
634
  name: "icon",
635
- fn: G((e) => [F(t.$slots, "icon", w(_(e)), void 0, !0)]),
635
+ fn: W((e) => [F(t.$slots, "icon", w(_(e)), void 0, !0)]),
636
636
  key: "0"
637
637
  } : void 0, t.$slots.item ? {
638
638
  name: "item",
639
- fn: G((e) => [F(t.$slots, "item", w(_(e)), void 0, !0)]),
639
+ fn: W((e) => [F(t.$slots, "item", w(_(e)), void 0, !0)]),
640
640
  key: "1"
641
641
  } : void 0]), 1032, [
642
642
  "class",
@@ -725,7 +725,7 @@ var Qt = /* @__PURE__ */ h({
725
725
  label: "Plan mode",
726
726
  accessory: "switch",
727
727
  checked: n.planMode,
728
- icon: Se
728
+ icon: Ce
729
729
  }), e.push(...n.items), n.attachEnabled && (e.length > 0 && e.at(-1)?.type !== "separator" && e.push({
730
730
  id: "group-attach",
731
731
  type: "separator"
@@ -733,11 +733,11 @@ var Qt = /* @__PURE__ */ h({
733
733
  id: "attach",
734
734
  type: "action",
735
735
  label: "Add Files & Photos",
736
- icon: De
736
+ icon: Oe
737
737
  })), e;
738
738
  });
739
739
  function l(e) {
740
- return e === "ask-for-approval" ? ye : e === "approve-for-me" ? Re : Ie;
740
+ return e === "ask-for-approval" ? xe : e === "approve-for-me" ? Re : Ie;
741
741
  }
742
742
  function f(e) {
743
743
  let t = e.payload;
@@ -772,7 +772,7 @@ var Qt = /* @__PURE__ */ h({
772
772
  items: a.value,
773
773
  onSelect: f
774
774
  }, d({
775
- trigger: G(({ open: t, toggle: n }) => [u("button", {
775
+ trigger: W(({ open: t, toggle: n }) => [u("button", {
776
776
  class: "chat-composer-action-menu__button",
777
777
  type: "button",
778
778
  "aria-label": "Composer actions",
@@ -780,15 +780,15 @@ var Qt = /* @__PURE__ */ h({
780
780
  "aria-expanded": t,
781
781
  disabled: e.disabled,
782
782
  onClick: n
783
- }, [m(V(Me))], 8, tn)]),
783
+ }, [m(B(Me))], 8, tn)]),
784
784
  _: 2
785
785
  }, [t.$slots.icon ? {
786
786
  name: "icon",
787
- fn: G((e) => [F(t.$slots, "icon", w(_(e)), void 0, !0)]),
787
+ fn: W((e) => [F(t.$slots, "icon", w(_(e)), void 0, !0)]),
788
788
  key: "0"
789
789
  } : void 0, t.$slots.item ? {
790
790
  name: "item",
791
- fn: G((e) => [F(t.$slots, "item", w(_(e)), void 0, !0)]),
791
+ fn: W((e) => [F(t.$slots, "item", w(_(e)), void 0, !0)]),
792
792
  key: "1"
793
793
  } : void 0]), 1032, ["disabled", "items"])) : c("", !0);
794
794
  }
@@ -816,7 +816,7 @@ var Qt = /* @__PURE__ */ h({
816
816
  "aria-label": e.label,
817
817
  title: e.title,
818
818
  onClick: r[0] ||= (e) => n("toggle")
819
- }, [m(V(Ee), { "aria-hidden": "true" })], 10, rn));
819
+ }, [m(B(De), { "aria-hidden": "true" })], 10, rn));
820
820
  }
821
821
  }), [["__scopeId", "data-v-77a2a099"]]), on = { class: "codex-chat-theme chat-composer__audio-field" }, sn = { class: "chat-composer__audio-text" }, cn = { class: "chat-composer__audio-partial" }, ln = {
822
822
  key: 0,
@@ -840,15 +840,15 @@ var Qt = /* @__PURE__ */ h({
840
840
  setup(e) {
841
841
  let t = e, n = o(() => t.before || t.after || t.transcript?.finalText || t.transcript?.partialText);
842
842
  return (t, r) => (k(), l("div", on, [u("div", sn, [
843
- p(z(e.before), 1),
844
- u("span", null, z(e.transcript?.finalText), 1),
845
- u("span", cn, z(e.transcript?.partialText), 1),
846
- p(z(e.after), 1),
843
+ p(R(e.before), 1),
844
+ u("span", null, R(e.transcript?.finalText), 1),
845
+ u("span", cn, R(e.transcript?.partialText), 1),
846
+ p(R(e.after), 1),
847
847
  e.recording ? (k(), l("span", ln, [u("span", {
848
848
  class: "chat-composer__listening-dot",
849
849
  style: T({ "--audio-level": e.audioLevel ?? 0 }),
850
850
  "aria-hidden": "true"
851
- }, null, 4)])) : n.value ? c("", !0) : (k(), l("span", un, z(e.starting ? "Starting microphone..." : "Transcribing..."), 1))
851
+ }, null, 4)])) : n.value ? c("", !0) : (k(), l("span", un, R(e.starting ? "Starting microphone..." : "Transcribing..."), 1))
852
852
  ])]));
853
853
  }
854
854
  }), [["__scopeId", "data-v-f93d37c1"]]);
@@ -1180,12 +1180,19 @@ var Vn = Symbol("codex-app-sdk-chat-translate"), Hn = {
1180
1180
  "chat.files.title": "Files",
1181
1181
  "chat.message.emptyResponse": "Empty response",
1182
1182
  "chat.work.doneHideDetails": "Done · Hide details",
1183
+ "chat.work.doneHideDetailsFor": "Done · {duration} · Hide details",
1183
1184
  "chat.work.doneViewDetails": "Done · View details",
1185
+ "chat.work.doneViewDetailsFor": "Done · {duration} · View details",
1184
1186
  "chat.work.failedHideDetails": "Failed · Hide details",
1187
+ "chat.work.failedHideDetailsFor": "Failed · {duration} · Hide details",
1185
1188
  "chat.work.failedViewDetails": "Failed · View details",
1189
+ "chat.work.failedViewDetailsFor": "Failed · {duration} · View details",
1186
1190
  "chat.work.stoppedHideDetails": "Stopped · Hide details",
1191
+ "chat.work.stoppedHideDetailsFor": "Stopped · {duration} · Hide details",
1187
1192
  "chat.work.stoppedViewDetails": "Stopped · View details",
1193
+ "chat.work.stoppedViewDetailsFor": "Stopped · {duration} · View details",
1188
1194
  "chat.work.working": "Working",
1195
+ "chat.work.workingFor": "Working · {duration}",
1189
1196
  "chat.skills.empty": "No matching skills",
1190
1197
  "chat.skills.title": "Skills"
1191
1198
  };
@@ -1228,15 +1235,15 @@ var Kn = ["aria-label"], qn = {
1228
1235
  key: 0,
1229
1236
  class: "codex-chat-theme chat-context-usage",
1230
1237
  style: T({ "--chat-context-usage-percent": `${r.value}%` }),
1231
- "aria-label": V(n)("chat.contextUsage.ariaLabel"),
1238
+ "aria-label": B(n)("chat.contextUsage.ariaLabel"),
1232
1239
  tabindex: "0"
1233
1240
  }, [t[0] ||= u("span", { class: "chat-context-usage__dot" }, null, -1), u("span", qn, [
1234
- u("span", Jn, z(V(n)("chat.contextUsage.title")), 1),
1235
- u("strong", null, z(V(n)("chat.contextUsage.usedAndLeft", {
1241
+ u("span", Jn, R(B(n)("chat.contextUsage.title")), 1),
1242
+ u("strong", null, R(B(n)("chat.contextUsage.usedAndLeft", {
1236
1243
  used: r.value,
1237
1244
  left: i.value.leftPercent
1238
1245
  })), 1),
1239
- u("span", null, z(V(n)("chat.contextUsage.tokensUsed", {
1246
+ u("span", null, R(B(n)("chat.contextUsage.tokensUsed", {
1240
1247
  used: i.value.usedTokens,
1241
1248
  window: i.value.windowTokens
1242
1249
  })), 1)
@@ -1426,12 +1433,12 @@ var Kn = ["aria-label"], qn = {
1426
1433
  title: y.value,
1427
1434
  disabled: ""
1428
1435
  }, [
1429
- m(V(ae), {
1436
+ m(B(se), {
1430
1437
  class: "chat-model-selector__compact-icon",
1431
1438
  "aria-hidden": "true"
1432
1439
  }),
1433
- u("span", Qn, z(y.value), 1),
1434
- m(V(ce), {
1440
+ u("span", Qn, R(y.value), 1),
1441
+ m(B(ue), {
1435
1442
  class: "chat-model-selector__chevron",
1436
1443
  "aria-hidden": "true"
1437
1444
  })
@@ -1444,7 +1451,7 @@ var Kn = ["aria-label"], qn = {
1444
1451
  "menu-class": "chat-model-selector__menu",
1445
1452
  onSelect: w
1446
1453
  }, {
1447
- trigger: G(({ open: e, toggle: t }) => [u("button", {
1454
+ trigger: W(({ open: e, toggle: t }) => [u("button", {
1448
1455
  class: "chat-model-selector__button",
1449
1456
  type: "button",
1450
1457
  "aria-label": "Model and reasoning",
@@ -1454,17 +1461,17 @@ var Kn = ["aria-label"], qn = {
1454
1461
  disabled: _.value,
1455
1462
  onClick: t
1456
1463
  }, [
1457
- m(V(ae), {
1464
+ m(B(se), {
1458
1465
  class: "chat-model-selector__compact-icon",
1459
1466
  "aria-hidden": "true"
1460
1467
  }),
1461
- i.value && g.value && n.serviceTier === g.value.id ? (k(), s(V(ie), {
1468
+ i.value && g.value && n.serviceTier === g.value.id ? (k(), s(B(q), {
1462
1469
  key: 0,
1463
1470
  class: "chat-model-selector__leading-icon",
1464
1471
  "aria-hidden": "true"
1465
1472
  })) : c("", !0),
1466
- u("span", er, z(y.value), 1),
1467
- m(V(ce), {
1473
+ u("span", er, R(y.value), 1),
1474
+ m(B(ue), {
1468
1475
  class: "chat-model-selector__chevron",
1469
1476
  "aria-hidden": "true"
1470
1477
  })
@@ -1570,54 +1577,54 @@ var dr = {
1570
1577
  return -1;
1571
1578
  }
1572
1579
  return (n, o) => (k(), l("div", dr, [
1573
- (k(!0), l(t, null, P(r.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", fr, z(r.label), 1), (k(!0), l(t, null, P(r.items, (t) => (k(), l("button", {
1580
+ (k(!0), l(t, null, P(r.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", fr, R(r.label), 1), (k(!0), l(t, null, P(r.items, (t) => (k(), l("button", {
1574
1581
  key: `custom:${r.id}:${t.id}`,
1575
1582
  class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": s(r.id, t.id) === e.activeIndex }]),
1576
1583
  role: "option",
1577
1584
  type: "button",
1578
- onMousedown: q((e) => n.$emit("select-mention", t, r), ["prevent"])
1585
+ onMousedown: K((e) => n.$emit("select-mention", t, r), ["prevent"])
1579
1586
  }, [F(n.$slots, "mention", {
1580
1587
  group: r,
1581
1588
  item: t,
1582
1589
  active: s(r.id, t.id) === e.activeIndex
1583
- }, () => [m(V(Le), {
1590
+ }, () => [m(B(Le), {
1584
1591
  class: "chat-composer-at-menu__icon",
1585
1592
  "aria-hidden": "true"
1586
- }), u("span", null, [u("strong", null, z(t.label), 1), t.description ? (k(), l("small", mr, z(t.description), 1)) : c("", !0)])], !0)], 42, pr))), 128))], 64))), 128)),
1593
+ }), u("span", null, [u("strong", null, R(t.label), 1), t.description ? (k(), l("small", mr, R(t.description), 1)) : c("", !0)])], !0)], 42, pr))), 128))], 64))), 128)),
1587
1594
  e.visiblePlugins.length ? (k(), l(t, { key: 0 }, [o[0] ||= u("div", { class: "chat-composer-at-menu__section" }, "Plugins", -1), (k(!0), l(t, null, P(e.visiblePlugins, (t, r) => (k(), l("button", {
1588
1595
  key: `plugin:${t.id}`,
1589
1596
  class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": a.value + r === e.activeIndex }]),
1590
1597
  role: "option",
1591
1598
  type: "button",
1592
- onMousedown: q((e) => n.$emit("select-plugin", t), ["prevent"])
1593
- }, [m(V(je), {
1599
+ onMousedown: K((e) => n.$emit("select-plugin", t), ["prevent"])
1600
+ }, [m(B(je), {
1594
1601
  class: "chat-composer-at-menu__icon",
1595
1602
  "aria-hidden": "true"
1596
- }), u("span", null, [u("strong", null, z(V(sr)(t)), 1), u("small", null, z(V(cr)(t)), 1)])], 42, hr))), 128))], 64)) : c("", !0),
1603
+ }), u("span", null, [u("strong", null, R(B(sr)(t)), 1), u("small", null, R(B(cr)(t)), 1)])], 42, hr))), 128))], 64)) : c("", !0),
1597
1604
  e.visibleFiles.length ? (k(), l(t, { key: 1 }, [o[1] ||= u("div", { class: "chat-composer-at-menu__section" }, "Files", -1), (k(!0), l(t, null, P(e.visibleFiles, (t, r) => (k(), l("button", {
1598
1605
  key: `file:${t.path}`,
1599
1606
  class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": a.value + e.visiblePlugins.length + r === e.activeIndex }]),
1600
1607
  role: "option",
1601
1608
  type: "button",
1602
- onMousedown: q((e) => n.$emit("select-file", t), ["prevent"])
1603
- }, [m(V(_e), {
1609
+ onMousedown: K((e) => n.$emit("select-file", t), ["prevent"])
1610
+ }, [m(B(ye), {
1604
1611
  class: "chat-composer-at-menu__icon",
1605
1612
  "aria-hidden": "true"
1606
- }), u("span", null, [u("strong", null, z(t.name), 1), u("small", null, z(t.path), 1)])], 42, gr))), 128))], 64)) : c("", !0),
1607
- (k(!0), l(t, null, P(i.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", _r, z(r.label), 1), (k(!0), l(t, null, P(r.items, (t) => (k(), l("button", {
1613
+ }), u("span", null, [u("strong", null, R(t.name), 1), u("small", null, R(t.path), 1)])], 42, gr))), 128))], 64)) : c("", !0),
1614
+ (k(!0), l(t, null, P(i.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", _r, R(r.label), 1), (k(!0), l(t, null, P(r.items, (t) => (k(), l("button", {
1608
1615
  key: `custom:${r.id}:${t.id}`,
1609
1616
  class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": s(r.id, t.id) === e.activeIndex }]),
1610
1617
  role: "option",
1611
1618
  type: "button",
1612
- onMousedown: q((e) => n.$emit("select-mention", t, r), ["prevent"])
1619
+ onMousedown: K((e) => n.$emit("select-mention", t, r), ["prevent"])
1613
1620
  }, [F(n.$slots, "mention", {
1614
1621
  group: r,
1615
1622
  item: t,
1616
1623
  active: s(r.id, t.id) === e.activeIndex
1617
- }, () => [m(V(Le), {
1624
+ }, () => [m(B(Le), {
1618
1625
  class: "chat-composer-at-menu__icon",
1619
1626
  "aria-hidden": "true"
1620
- }), u("span", null, [u("strong", null, z(t.label), 1), t.description ? (k(), l("small", yr, z(t.description), 1)) : c("", !0)])], !0)], 42, vr))), 128))], 64))), 128)),
1627
+ }), u("span", null, [u("strong", null, R(t.label), 1), t.description ? (k(), l("small", yr, R(t.description), 1)) : c("", !0)])], !0)], 42, vr))), 128))], 64))), 128)),
1621
1628
  e.showFileHint && !e.visibleFiles.length ? (k(), l("div", br, "Type to search files")) : c("", !0)
1622
1629
  ]));
1623
1630
  }
@@ -1695,7 +1702,7 @@ var kr = { class: "chat-composer-skill-menu__section" }, Ar = ["onMousedown"], j
1695
1702
  emits: ["select"],
1696
1703
  setup(e) {
1697
1704
  let n = e, r = Wn(), i = M(null);
1698
- return W(() => [n.activeIndex, n.visibleSkills], async () => {
1705
+ return U(() => [n.activeIndex, n.visibleSkills], async () => {
1699
1706
  await S();
1700
1707
  let e = i.value?.querySelectorAll(".chat-composer-skill-menu__item").item(n.activeIndex);
1701
1708
  typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
@@ -1706,15 +1713,15 @@ var kr = { class: "chat-composer-skill-menu__section" }, Ar = ["onMousedown"], j
1706
1713
  role: "listbox",
1707
1714
  "aria-label": "Skills"
1708
1715
  }, [
1709
- u("div", kr, z(V(r)("chat.skills.title")), 1),
1716
+ u("div", kr, R(B(r)("chat.skills.title")), 1),
1710
1717
  (k(!0), l(t, null, P(e.visibleSkills, (t, r) => (k(), l("button", {
1711
1718
  key: t.path,
1712
1719
  class: C(["chat-composer-skill-menu__item", { "chat-composer-skill-menu__item--active": r === e.activeIndex }]),
1713
1720
  role: "option",
1714
1721
  type: "button",
1715
- onMousedown: q((e) => n.$emit("select", t), ["prevent"])
1716
- }, [u("span", jr, [m(V(Le))]), u("span", Mr, [u("span", Nr, z(V(wr)(t, e.plugins ?? [])), 1), u("span", Pr, z(V(Tr)(t)), 1)])], 42, Ar))), 128)),
1717
- e.visibleSkills.length === 0 ? (k(), l("div", Fr, z(V(r)("chat.skills.empty")), 1)) : c("", !0)
1722
+ onMousedown: K((e) => n.$emit("select", t), ["prevent"])
1723
+ }, [u("span", jr, [m(B(Le))]), u("span", Mr, [u("span", Nr, R(B(wr)(t, e.plugins ?? [])), 1), u("span", Pr, R(B(Tr)(t)), 1)])], 42, Ar))), 128)),
1724
+ e.visibleSkills.length === 0 ? (k(), l("div", Fr, R(B(r)("chat.skills.empty")), 1)) : c("", !0)
1718
1725
  ], 512));
1719
1726
  }
1720
1727
  }), [["__scopeId", "data-v-03636565"]]);
@@ -1762,7 +1769,7 @@ var Br = { class: "chat-composer-slash-menu__section" }, Vr = ["onMousedown"], H
1762
1769
  emits: ["selectCommand", "selectSkill"],
1763
1770
  setup(e) {
1764
1771
  let n = e, r = Wn(), i = M(null);
1765
- return W(() => [
1772
+ return U(() => [
1766
1773
  n.activeIndex,
1767
1774
  n.visibleCommands,
1768
1775
  n.visibleSkills
@@ -1776,19 +1783,19 @@ var Br = { class: "chat-composer-slash-menu__section" }, Vr = ["onMousedown"], H
1776
1783
  class: "codex-chat-theme chat-composer-slash-menu",
1777
1784
  role: "listbox",
1778
1785
  "aria-label": "Commands and skills"
1779
- }, [e.visibleCommands.length > 0 ? (k(), l(t, { key: 0 }, [u("div", Br, z(V(r)("chat.commands.title")), 1), (k(!0), l(t, null, P(e.visibleCommands, (t, r) => (k(), l("button", {
1786
+ }, [e.visibleCommands.length > 0 ? (k(), l(t, { key: 0 }, [u("div", Br, R(B(r)("chat.commands.title")), 1), (k(!0), l(t, null, P(e.visibleCommands, (t, r) => (k(), l("button", {
1780
1787
  key: t.id,
1781
1788
  class: C(["chat-composer-slash-menu__item", { "chat-composer-slash-menu__item--active": r === e.activeIndex }]),
1782
1789
  role: "option",
1783
1790
  type: "button",
1784
- onMousedown: q((e) => n.$emit("selectCommand", t), ["prevent"])
1785
- }, [u("span", Hr, [m(V(We))]), u("span", Ur, [u("span", Wr, z(t.name), 1), u("span", Gr, z(V(zr)(t)), 1)])], 42, Vr))), 128))], 64)) : c("", !0), e.visibleSkills.length > 0 ? (k(), l(t, { key: 1 }, [u("div", Kr, z(V(r)("chat.skills.title")), 1), (k(!0), l(t, null, P(e.visibleSkills, (t, r) => (k(), l("button", {
1791
+ onMousedown: K((e) => n.$emit("selectCommand", t), ["prevent"])
1792
+ }, [u("span", Hr, [m(B(We))]), u("span", Ur, [u("span", Wr, R(t.name), 1), u("span", Gr, R(B(zr)(t)), 1)])], 42, Vr))), 128))], 64)) : c("", !0), e.visibleSkills.length > 0 ? (k(), l(t, { key: 1 }, [u("div", Kr, R(B(r)("chat.skills.title")), 1), (k(!0), l(t, null, P(e.visibleSkills, (t, r) => (k(), l("button", {
1786
1793
  key: t.path,
1787
1794
  class: C(["chat-composer-slash-menu__item", { "chat-composer-slash-menu__item--active": e.visibleCommands.length + r === e.activeIndex }]),
1788
1795
  role: "option",
1789
1796
  type: "button",
1790
- onMousedown: q((e) => n.$emit("selectSkill", t), ["prevent"])
1791
- }, [u("span", Jr, [m(V(Le))]), u("span", Yr, [u("span", Xr, z(t.name), 1), u("span", Zr, z(V(Tr)(t)), 1)])], 42, qr))), 128))], 64)) : c("", !0)], 512));
1797
+ onMousedown: K((e) => n.$emit("selectSkill", t), ["prevent"])
1798
+ }, [u("span", Jr, [m(B(Le))]), u("span", Yr, [u("span", Xr, R(t.name), 1), u("span", Zr, R(B(Tr)(t)), 1)])], 42, qr))), 128))], 64)) : c("", !0)], 512));
1792
1799
  }
1793
1800
  }), [["__scopeId", "data-v-7ac08005"]]), $r = { class: "chat-mention-chip" }, ei = ["src"], ti = { class: "chat-mention-chip__label" }, ni = /*#__PURE__*/ X(/* @__PURE__ */ h({
1794
1801
  __name: "ChatMentionChip",
@@ -1803,19 +1810,19 @@ var Br = { class: "chat-composer-slash-menu__section" }, Vr = ["onMousedown"], H
1803
1810
  class: "chat-mention-chip__icon",
1804
1811
  src: e.iconUrl,
1805
1812
  alt: ""
1806
- }, null, 8, ei)) : e.kind === "file" ? (k(), s(V(_e), {
1813
+ }, null, 8, ei)) : e.kind === "file" ? (k(), s(B(ye), {
1807
1814
  key: 1,
1808
1815
  class: "chat-mention-chip__icon",
1809
1816
  "aria-hidden": "true"
1810
- })) : e.kind === "skill" ? (k(), s(V(Le), {
1817
+ })) : e.kind === "skill" ? (k(), s(B(Le), {
1811
1818
  key: 2,
1812
1819
  class: "chat-mention-chip__icon",
1813
1820
  "aria-hidden": "true"
1814
- })) : (k(), s(V(je), {
1821
+ })) : (k(), s(B(je), {
1815
1822
  key: 3,
1816
1823
  class: "chat-mention-chip__icon",
1817
1824
  "aria-hidden": "true"
1818
- })), u("span", ti, z(e.name), 1)]));
1825
+ })), u("span", ti, R(e.name), 1)]));
1819
1826
  }
1820
1827
  }), [["__scopeId", "data-v-77c8c796"]]);
1821
1828
  //#endregion
@@ -1872,8 +1879,8 @@ var ai = [
1872
1879
  "update:modelValue"
1873
1880
  ],
1874
1881
  setup(e, { expose: n, emit: r }) {
1875
- let i = e, a = H(), o = r, s = M(null), c = M(0), u = M(0), d = /(`[^`]+`)|(^|[^\w.%+-])([@$/])([^\s@$]+)/g;
1876
- W(() => [
1882
+ let i = e, a = V(), o = r, s = M(null), c = M(0), u = M(0), d = /(`[^`]+`)|(^|[^\w.%+-])([@$/])([^\s@$]+)/g;
1883
+ U(() => [
1877
1884
  i.files,
1878
1885
  i.mentionGroups,
1879
1886
  i.plugins,
@@ -1883,12 +1890,12 @@ var ai = [
1883
1890
  }, {
1884
1891
  deep: !0,
1885
1892
  flush: "sync"
1886
- }), W(() => [i.modelValue, u.value], ([e, t], n) => {
1893
+ }), U(() => [i.modelValue, u.value], ([e, t], n) => {
1887
1894
  !s.value || t === n[1] && _() === e || F(e, Math.min(c.value, e.length));
1888
1895
  }), D(() => {
1889
1896
  F(i.modelValue, i.modelValue.length, { focus: !1 }), document.addEventListener("selectionchange", f);
1890
1897
  }), E(() => {
1891
- document.removeEventListener("selectionchange", f), re();
1898
+ document.removeEventListener("selectionchange", f), ie();
1892
1899
  });
1893
1900
  function f() {
1894
1901
  let e = x();
@@ -2050,7 +2057,7 @@ var ai = [
2050
2057
  if (typeof document.execCommand == "function") {
2051
2058
  ee(t.start, t.end);
2052
2059
  let n = document.createElement("span");
2053
- if (I(n, e), e.endsWith("\n") && t.end === _().length) {
2060
+ if (te(n, e), e.endsWith("\n") && t.end === _().length) {
2054
2061
  let e = document.createElement("br");
2055
2062
  e.dataset.trailingLineBreak = "", n.append(e);
2056
2063
  }
@@ -2071,43 +2078,43 @@ var ai = [
2071
2078
  let i = n.focus ?? document.activeElement === r, a = document.createDocumentFragment(), o = 0, l;
2072
2079
  for (d.lastIndex = 0; (l = d.exec(e)) !== null;) {
2073
2080
  if (l[1]) continue;
2074
- let t = l[2], n = l[3], r = l[4], i = l.index + t.length, s = i + r.length + 1, c = n === "$" ? z(r) : n === "@" ? te(r) : void 0;
2081
+ let t = l[2], n = l[3], r = l[4], i = l.index + t.length, s = i + r.length + 1, c = n === "$" ? R(r) : n === "@" ? ne(r) : void 0;
2075
2082
  if (c) {
2076
- if (I(a, e.slice(o, i)), n === "$") a.append(ne(r, c));
2083
+ if (te(a, e.slice(o, i)), n === "$") a.append(re(r, c));
2077
2084
  else {
2078
2085
  let e = c;
2079
- a.append(e.kind === "plugin" ? V(r, e.value) : e.kind === "file" ? U(r, e.value) : G(r, e.group, e.item));
2086
+ a.append(e.kind === "plugin" ? B(r, e.value) : e.kind === "file" ? H(r, e.value) : W(r, e.group, e.item));
2080
2087
  }
2081
2088
  o = s;
2082
2089
  }
2083
2090
  }
2084
- if (I(a, e.slice(o)), e.endsWith("\n")) {
2091
+ if (te(a, e.slice(o)), e.endsWith("\n")) {
2085
2092
  let e = document.createElement("br");
2086
2093
  e.dataset.trailingLineBreak = "", a.append(e);
2087
2094
  }
2088
- re(), r.replaceChildren(a), O(Math.min(t, e.length), { focus: i }), h(), g(r);
2095
+ ie(), r.replaceChildren(a), O(Math.min(t, e.length), { focus: i }), h(), g(r);
2089
2096
  }
2090
- function I(e, t) {
2097
+ function te(e, t) {
2091
2098
  let n = t.split("\n");
2092
2099
  n.forEach((t, r) => {
2093
2100
  t && e.appendChild(document.createTextNode(t)), r < n.length - 1 && e.appendChild(document.createElement("br"));
2094
2101
  });
2095
2102
  }
2096
- function L(e) {
2103
+ function I(e) {
2097
2104
  return i.plugins.find((t) => ur(t, e));
2098
2105
  }
2099
- function te(e) {
2106
+ function ne(e) {
2100
2107
  let t = ii(i.mentionGroups.filter((e) => e.placement !== "after"), e);
2101
2108
  if (t) return {
2102
2109
  kind: "custom",
2103
2110
  ...t
2104
2111
  };
2105
- let n = L(e);
2112
+ let n = I(e);
2106
2113
  if (n) return {
2107
2114
  kind: "plugin",
2108
2115
  value: n
2109
2116
  };
2110
- let r = R(e);
2117
+ let r = L(e);
2111
2118
  if (r) return {
2112
2119
  kind: "file",
2113
2120
  value: r
@@ -2118,31 +2125,31 @@ var ai = [
2118
2125
  ...a
2119
2126
  } : void 0;
2120
2127
  }
2121
- function R(e) {
2128
+ function L(e) {
2122
2129
  return i.files.find((t) => t.path === e || t.name === e);
2123
2130
  }
2124
- function z(e) {
2131
+ function R(e) {
2125
2132
  return i.skills.find((t) => Dr(t, e));
2126
2133
  }
2127
- function B(e, t) {
2134
+ function z(e, t) {
2128
2135
  let n = document.createElement("span");
2129
2136
  return n.className = "chat-rich-text-editor__chip-token-host", n.contentEditable = "false", Object.assign(n.dataset, e), n.setAttribute("aria-label", t.name), N(v(ni, t), n), n;
2130
2137
  }
2131
- function V(e, t) {
2132
- return B({ pluginName: e }, {
2138
+ function B(e, t) {
2139
+ return z({ pluginName: e }, {
2133
2140
  iconUrl: t.iconUrl,
2134
2141
  kind: "plugin",
2135
2142
  name: t.displayName || t.name
2136
2143
  });
2137
2144
  }
2138
- function U(e, t) {
2139
- return B({ fileMention: e }, {
2145
+ function H(e, t) {
2146
+ return z({ fileMention: e }, {
2140
2147
  kind: "file",
2141
2148
  name: t.name
2142
2149
  });
2143
2150
  }
2144
- function ne(e, t) {
2145
- return B({
2151
+ function re(e, t) {
2152
+ return z({
2146
2153
  skillName: e,
2147
2154
  skillTrigger: "$"
2148
2155
  }, {
@@ -2151,7 +2158,7 @@ var ai = [
2151
2158
  name: t.displayName || t.name
2152
2159
  });
2153
2160
  }
2154
- function G(e, n, r) {
2161
+ function W(e, n, r) {
2155
2162
  let i = document.createElement("span");
2156
2163
  return i.className = "chat-rich-text-editor__chip-token-host", i.contentEditable = "false", i.dataset.mentionGroup = n.id, i.dataset.mentionValue = e, i.setAttribute("aria-label", r.label), N(a.mention ? v(t, null, a.mention({
2157
2164
  group: n,
@@ -2162,7 +2169,7 @@ var ai = [
2162
2169
  name: r.label
2163
2170
  }), i), i;
2164
2171
  }
2165
- function re() {
2172
+ function ie() {
2166
2173
  if (s.value) for (let e of s.value.querySelectorAll(".chat-rich-text-editor__chip-token-host")) N(null, e);
2167
2174
  }
2168
2175
  return n({
@@ -2233,26 +2240,26 @@ function di(e) {
2233
2240
  let t = M(null), n = M(0), r = M(0), i = M(0), a = M(0), s = M(0), c = null, l = !1, u = o(() => ci(e.prompt.value, e.caretPosition.value)), d = o(() => {
2234
2241
  let t = u.value;
2235
2242
  return t?.query ? li([...e.files()], t.query, 5) : [];
2236
- }), f = o(() => u.value !== null && !u.value.query && e.files().length > 0), p = o(() => t.value === "at" && u.value !== null && e.files().length > 0 && !K()), m = o(() => Sr(e.prompt.value, e.caretPosition.value, "$")), h = o(() => si(e.prompt.value, e.caretPosition.value)), g = o(() => Cr([...e.skills()], m.value?.query ?? "", -1, e.plugins?.() ?? [])), _ = o(() => t.value === "skill" && e.skillsEnabled() && m.value !== null && e.skills().length > 0 && !K()), v = o(() => or([...e.plugins?.() ?? []], h.value?.query ?? "")), y = o(() => ri(e.mentionGroups?.() ?? [], u.value?.query ?? "")), b = o(() => y.value.filter((e) => e.placement !== "after").flatMap((e) => e.items.map((t) => ({
2243
+ }), f = o(() => u.value !== null && !u.value.query && e.files().length > 0), p = o(() => t.value === "at" && u.value !== null && e.files().length > 0 && !G()), m = o(() => Sr(e.prompt.value, e.caretPosition.value, "$")), h = o(() => si(e.prompt.value, e.caretPosition.value)), g = o(() => Cr([...e.skills()], m.value?.query ?? "", -1, e.plugins?.() ?? [])), _ = o(() => t.value === "skill" && e.skillsEnabled() && m.value !== null && e.skills().length > 0 && !G()), v = o(() => or([...e.plugins?.() ?? []], h.value?.query ?? "")), y = o(() => ri(e.mentionGroups?.() ?? [], u.value?.query ?? "")), b = o(() => y.value.filter((e) => e.placement !== "after").flatMap((e) => e.items.map((t) => ({
2237
2244
  group: e,
2238
2245
  item: t
2239
2246
  })))), x = o(() => y.value.filter((e) => e.placement === "after").flatMap((e) => e.items.map((t) => ({
2240
2247
  group: e,
2241
2248
  item: t
2242
- })))), S = o(() => !1), C = o(() => b.value.length + v.value.length + d.value.length + x.value.length), w = o(() => t.value === "at" && u.value !== null && (C.value > 0 || f.value) && !K()), T = o(() => Lr(e.prompt.value, e.caretPosition.value)), E = o(() => Rr([...e.commands()], T.value?.query ?? "")), D = o(() => (e.skillsEnabled(), [])), O = o(() => E.value.length + D.value.length), k = o(() => t.value === "slash" && T.value !== null && O.value > 0 && !K());
2243
- W([g, m], () => {
2249
+ })))), S = o(() => !1), C = o(() => b.value.length + v.value.length + d.value.length + x.value.length), w = o(() => t.value === "at" && u.value !== null && (C.value > 0 || f.value) && !G()), T = o(() => Lr(e.prompt.value, e.caretPosition.value)), E = o(() => Rr([...e.commands()], T.value?.query ?? "")), D = o(() => (e.skillsEnabled(), [])), O = o(() => E.value.length + D.value.length), k = o(() => t.value === "slash" && T.value !== null && O.value > 0 && !G());
2250
+ U([g, m], () => {
2244
2251
  r.value = 0;
2245
- }), W([v, h], () => {
2252
+ }), U([v, h], () => {
2246
2253
  i.value = 0, a.value = 0;
2247
- }), W(y, () => {
2254
+ }), U(y, () => {
2248
2255
  a.value = 0;
2249
- }), W([
2256
+ }), U([
2250
2257
  E,
2251
2258
  D,
2252
2259
  T
2253
2260
  ], () => {
2254
2261
  s.value = 0;
2255
- }), W([d, u], () => {
2262
+ }), U([d, u], () => {
2256
2263
  n.value = 0;
2257
2264
  });
2258
2265
  function ee(e) {
@@ -2276,89 +2283,89 @@ function di(e) {
2276
2283
  }) || A(e, _.value, g.value.length, r, () => {
2277
2284
  let e = g.value[r.value];
2278
2285
  e && N(e);
2279
- }) ? !0 : k.value && O.value > 0 && e.key === "Tab" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey ? (e.preventDefault(), R("complete"), !0) : !!A(e, k.value, O.value, s, () => R("execute"));
2286
+ }) ? !0 : k.value && O.value > 0 && e.key === "Tab" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey ? (e.preventDefault(), L("complete"), !0) : !!A(e, k.value, O.value, s, () => L("execute"));
2280
2287
  }
2281
2288
  function A(e, t, n, r, i) {
2282
- return t ? e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), n > 0 && (r.value = (r.value + (e.key === "ArrowDown" ? 1 : -1) + n) % n), !0) : e.key === "Escape" ? (e.preventDefault(), c = re(), H(), !0) : e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && n > 0 ? (e.preventDefault(), i(), !0) : !1 : !1;
2289
+ return t ? e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), n > 0 && (r.value = (r.value + (e.key === "ArrowDown" ? 1 : -1) + n) % n), !0) : e.key === "Escape" ? (e.preventDefault(), c = ie(), V(), !0) : e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && n > 0 ? (e.preventDefault(), i(), !0) : !1 : !1;
2283
2290
  }
2284
2291
  function j(t) {
2285
2292
  let n = u.value;
2286
- !n || !e.editor.value || z(`@${t.path} `, n.start, n.end);
2293
+ !n || !e.editor.value || R(`@${t.path} `, n.start, n.end);
2287
2294
  }
2288
2295
  function N(e) {
2289
2296
  let t = m.value;
2290
- t && z(`$${Er(e)} `, t.start, t.end);
2297
+ t && R(`$${Er(e)} `, t.start, t.end);
2291
2298
  }
2292
2299
  function P(e) {
2293
2300
  let t = h.value;
2294
- t && z(`@${e.name || e.id} `, t.start, t.end);
2301
+ t && R(`@${e.name || e.id} `, t.start, t.end);
2295
2302
  }
2296
2303
  function F(t, n) {
2297
2304
  let r = u.value;
2298
2305
  if (!r) return;
2299
- z(`@${t.value} `, r.start, r.end);
2306
+ R(`@${t.value} `, r.start, r.end);
2300
2307
  let i = e.mentionGroups?.().find((e) => e.id === n.id) ?? n;
2301
2308
  e.onMentionSelected?.(t, i);
2302
2309
  }
2303
- function I(e) {
2310
+ function te(e) {
2304
2311
  let t = T.value;
2305
- t && z(`/${Er(e)} `, t.start, t.end);
2312
+ t && R(`/${Er(e)} `, t.start, t.end);
2306
2313
  }
2307
- function L(e) {
2308
- te(e, "default");
2314
+ function I(e) {
2315
+ ne(e, "default");
2309
2316
  }
2310
- function te(t, n) {
2317
+ function ne(t, n) {
2311
2318
  let r = T.value;
2312
2319
  if (!r || !e.editor.value) return;
2313
2320
  let i = `/${t.slashName ?? t.name}`;
2314
2321
  if (t.composerMode) {
2315
- e.prompt.value = `${e.prompt.value.slice(0, r.start)}${e.prompt.value.slice(r.end)}`, e.caretPosition.value = r.start, H(), e.onCommandActivated?.(t), e.onTextInserted(r.start);
2322
+ e.prompt.value = `${e.prompt.value.slice(0, r.start)}${e.prompt.value.slice(r.end)}`, e.caretPosition.value = r.start, V(), e.onCommandActivated?.(t), e.onTextInserted(r.start);
2316
2323
  return;
2317
2324
  }
2318
2325
  if (n === "execute" || n === "default" && t.submitOnSelect) {
2319
- e.prompt.value = "", e.caretPosition.value = 0, H(), e.onCommandSubmitted(i);
2326
+ e.prompt.value = "", e.caretPosition.value = 0, V(), e.onCommandSubmitted(i);
2320
2327
  return;
2321
2328
  }
2322
- z(`${i} `, r.start, r.end);
2329
+ R(`${i} `, r.start, r.end);
2323
2330
  }
2324
- function R(e) {
2331
+ function L(e) {
2325
2332
  let t = E.value[s.value];
2326
2333
  if (t) {
2327
- te(t, e);
2334
+ ne(t, e);
2328
2335
  return;
2329
2336
  }
2330
2337
  let n = D.value[s.value - E.value.length];
2331
- n && I(n);
2338
+ n && te(n);
2332
2339
  }
2333
- function z(t, n, r) {
2340
+ function R(t, n, r) {
2334
2341
  e.prompt.value = `${e.prompt.value.slice(0, n)}${t}${e.prompt.value.slice(r)}`;
2335
2342
  let i = n + t.length;
2336
- e.caretPosition.value = i, H(), e.onTextInserted(i);
2343
+ e.caretPosition.value = i, V(), e.onTextInserted(i);
2337
2344
  }
2338
- function B(t) {
2339
- e.caretPosition.value = t?.end ?? e.editor.value?.getSelectionRange().end ?? e.prompt.value.length, G();
2345
+ function z(t) {
2346
+ e.caretPosition.value = t?.end ?? e.editor.value?.getSelectionRange().end ?? e.prompt.value.length, W();
2340
2347
  }
2341
- function V() {
2342
- window.setTimeout(H, 120);
2348
+ function B() {
2349
+ window.setTimeout(V, 120);
2343
2350
  }
2344
- function H() {
2351
+ function V() {
2345
2352
  t.value = null;
2346
2353
  }
2347
- function U() {
2348
- l = !0, H();
2354
+ function H() {
2355
+ l = !0, V();
2349
2356
  }
2350
- function ne() {
2357
+ function re() {
2351
2358
  l = !1;
2352
2359
  }
2353
- function G() {
2360
+ function W() {
2354
2361
  if (l) {
2355
- H();
2362
+ V();
2356
2363
  return;
2357
2364
  }
2358
- let e = re();
2365
+ let e = ie();
2359
2366
  if (c !== null) {
2360
2367
  if (e === c) {
2361
- H();
2368
+ V();
2362
2369
  return;
2363
2370
  }
2364
2371
  c = null;
@@ -2375,12 +2382,12 @@ function di(e) {
2375
2382
  t.value = "slash";
2376
2383
  return;
2377
2384
  }
2378
- H();
2385
+ V();
2379
2386
  }
2380
- function re() {
2387
+ function ie() {
2381
2388
  return `${e.prompt.value}\u0000${e.caretPosition.value}`;
2382
2389
  }
2383
- function K() {
2390
+ function G() {
2384
2391
  return e.disabled() && !e.isSending();
2385
2392
  }
2386
2393
  return {
@@ -2390,24 +2397,24 @@ function di(e) {
2390
2397
  activePluginIndex: i,
2391
2398
  activeSlashIndex: s,
2392
2399
  atMenuVisible: w,
2393
- close: H,
2394
- closeSoon: V,
2395
- resume: ne,
2400
+ close: V,
2401
+ closeSoon: B,
2402
+ resume: re,
2396
2403
  fileMenuShowsHint: f,
2397
2404
  fileMenuVisible: p,
2398
2405
  handleKeydown: ee,
2399
- selectCommand: L,
2406
+ selectCommand: I,
2400
2407
  selectFile: j,
2401
2408
  selectSkill: N,
2402
2409
  selectPlugin: P,
2403
2410
  selectMention: F,
2404
- selectSlashSkill: I,
2411
+ selectSlashSkill: te,
2405
2412
  skillMenuVisible: _,
2406
2413
  pluginMenuVisible: S,
2407
2414
  slashMenuVisible: k,
2408
- suspend: U,
2409
- sync: G,
2410
- updateCaretPosition: B,
2415
+ suspend: H,
2416
+ sync: W,
2417
+ updateCaretPosition: z,
2411
2418
  visibleFiles: d,
2412
2419
  visibleSkills: g,
2413
2420
  visiblePlugins: v,
@@ -2822,42 +2829,42 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2822
2829
  let r = e, i = n, a = Ti(), f = M(""), p = M(null), h = M(!1), g = M(null), v = M(0), y = M(0), b = M(0), { exit: T, recall: E, remember: O, seed: ee } = At({
2823
2830
  apply: mt,
2824
2831
  currentPrompt: () => f.value
2825
- }), A = !1, j = null, N = 0, P = o(() => r.capabilities ?? Ot), I = o(() => Dt(r.presentation)), L = o(() => (r.commands ?? kt).find((e) => e.id === p.value) ?? null), te = o(() => (r.commands ?? kt).find((e) => e.id === "codex.goal" && e.composerMode) ?? null), R = o(() => !!(te.value && p.value === te.value.id)), z = o(() => !!(P.value.planMode && r.planMode && !R.value)), B = o(() => L.value?.composerMode?.placeholder ?? r.placeholder ?? "Ask Codex…"), H = o(() => I.value.composer.voice && !!(r.transcribeAudio || a?.capabilities.transcription)), U = o(() => !!f.value.trim()), ne = o(() => r.emptySendPrompt?.trim() ?? ""), re = o(() => !!((L.value ? U.value : U.value || r.hasAttachments || r.hasExternalContent) && !r.disabled)), J = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !U.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), Y = o(() => !!(ne.value && !r.isSending && !r.disabled && !U.value && !r.hasAttachments && !r.hasExternalContent && !L.value && !J.value)), ie = null, ae = o(() => !!(r.isSending && !U.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !he.value && !_e.value)), oe = o(() => ae.value), se = o(() => r.followUpBehavior === "steer" && P.value.steerPrompt), ce = o(() => r.interruptArmed ? !1 : ge.value || _e.value ? !0 : he.value && !r.disabled ? !1 : !re.value && !ae.value && !J.value), le = o(() => J.value ? "Continue" : Y.value ? "Send default prompt" : r.isSending ? se.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), ue = o(() => {
2832
+ }), A = !1, j = null, N = 0, P = o(() => r.capabilities ?? Ot), te = o(() => Dt(r.presentation)), I = o(() => (r.commands ?? kt).find((e) => e.id === p.value) ?? null), ne = o(() => (r.commands ?? kt).find((e) => e.id === "codex.goal" && e.composerMode) ?? null), L = o(() => !!(ne.value && p.value === ne.value.id)), R = o(() => !!(P.value.planMode && r.planMode && !L.value)), z = o(() => I.value?.composerMode?.placeholder ?? r.placeholder ?? "Ask Codex…"), V = o(() => te.value.composer.voice && !!(r.transcribeAudio || a?.capabilities.transcription)), H = o(() => !!f.value.trim()), re = o(() => r.emptySendPrompt?.trim() ?? ""), ie = o(() => !!((I.value ? H.value : H.value || r.hasAttachments || r.hasExternalContent) && !r.disabled)), ae = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), oe = o(() => !!(re.value && !r.isSending && !r.disabled && !H.value && !r.hasAttachments && !r.hasExternalContent && !I.value && !ae.value)), q = null, se = o(() => !!(r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !_e.value && !ye.value)), ce = o(() => se.value), le = o(() => r.followUpBehavior === "steer" && P.value.steerPrompt), ue = o(() => r.interruptArmed ? !1 : ve.value || ye.value ? !0 : _e.value && !r.disabled ? !1 : !ie.value && !se.value && !ae.value), de = o(() => ae.value ? "Continue" : oe.value ? "Send default prompt" : r.isSending ? le.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), fe = o(() => {
2826
2833
  if (r.interruptArmed) return "Press Escape again or click to stop generation";
2827
- if (ae.value) return "Interrupt";
2828
- let e = `${le.value} (Enter)`;
2829
- return !r.isSending || !P.value.steerPrompt ? e : `${e}. ${se.value ? "Queue" : "Steer"} prompt (Cmd/Ctrl+Enter)`;
2830
- }), { buttonDisabled: de, buttonLabel: fe, buttonTitle: pe, error: me, isRecording: he, isStarting: ge, isTranscribing: _e, transcript: ve, audioLevel: ye, cancel: be, stop: xe, toggle: Se } = Ni({
2834
+ if (se.value) return "Interrupt";
2835
+ let e = `${de.value} (Enter)`;
2836
+ return !r.isSending || !P.value.steerPrompt ? e : `${e}. ${le.value ? "Queue" : "Steer"} prompt (Cmd/Ctrl+Enter)`;
2837
+ }), { buttonDisabled: pe, buttonLabel: me, buttonTitle: he, error: ge, isRecording: _e, isStarting: ve, isTranscribing: ye, transcript: be, audioLevel: xe, cancel: J, stop: Se, toggle: Ce } = Ni({
2831
2838
  isDisabled: () => r.disabled,
2832
2839
  isSending: () => r.isSending,
2833
2840
  onTranscript: nt,
2834
2841
  transcribeAudio: r.transcribeAudio
2835
- }), Ce = o(() => {
2842
+ }), we = o(() => {
2836
2843
  let e = f.value.slice(0, y.value);
2837
2844
  return e && !/\s$/.test(e) ? `${e} ` : e;
2838
- }), we = o(() => {
2845
+ }), Te = o(() => {
2839
2846
  let e = f.value.slice(b.value);
2840
2847
  return e && !/^\s/.test(e) ? ` ${e}` : e;
2841
2848
  });
2842
- W(me, (e) => i("error", e));
2843
- function Te(e) {
2844
- !ge.value && !he.value && !_e.value || (e.preventDefault(), e.stopPropagation(), be());
2845
- }
2846
- W(_e, (e) => {
2847
- if (e || ie === null) return;
2848
- let t = ie;
2849
- ie = null, S(() => {
2849
+ U(ge, (e) => i("error", e));
2850
+ function Ee(e) {
2851
+ !ve.value && !_e.value && !ye.value || (e.preventDefault(), e.stopPropagation(), J());
2852
+ }
2853
+ U(ye, (e) => {
2854
+ if (e || q === null) return;
2855
+ let t = q;
2856
+ q = null, S(() => {
2850
2857
  g.value?.setCaret(t);
2851
2858
  });
2852
2859
  });
2853
- let Ee = 0;
2854
- W(() => [r.promptHistory, r.promptHistoryLoading], ([e, t]) => {
2855
- if (ee(e ?? []), t || Ee === 0) return;
2856
- let n = Ee;
2857
- Ee = 0;
2860
+ let De = 0;
2861
+ U(() => [r.promptHistory, r.promptHistoryLoading], ([e, t]) => {
2862
+ if (ee(e ?? []), t || De === 0) return;
2863
+ let n = De;
2864
+ De = 0;
2858
2865
  for (let e = 0; e < n; e += 1) E("ArrowUp");
2859
2866
  }, { immediate: !0 });
2860
- let { activeAtIndex: De, activeSkillIndex: Oe, activeSlashIndex: ke, close: Ae, closeSoon: je, resume: Me, fileMenuShowsHint: Ne, atMenuVisible: Pe, handleKeydown: Fe, selectCommand: Ie, selectFile: Le, selectPlugin: Re, selectMention: ze, selectSkill: Be, selectSlashSkill: Ve, skillMenuVisible: He, slashMenuVisible: Ue, suspend: We, updateCaretPosition: Ge, visibleFiles: Ke, visiblePlugins: qe, visibleMentionGroups: Je, visibleSkills: Ye, visibleSlashCommands: Xe, visibleSlashSkills: Ze } = di({
2867
+ let { activeAtIndex: Oe, activeSkillIndex: Y, activeSlashIndex: ke, close: Ae, closeSoon: je, resume: Me, fileMenuShowsHint: Ne, atMenuVisible: Pe, handleKeydown: Fe, selectCommand: Ie, selectFile: Le, selectPlugin: Re, selectMention: ze, selectSkill: Be, selectSlashSkill: Ve, skillMenuVisible: He, slashMenuVisible: Ue, suspend: We, updateCaretPosition: Ge, visibleFiles: Ke, visiblePlugins: qe, visibleMentionGroups: Je, visibleSkills: Ye, visibleSlashCommands: Xe, visibleSlashSkills: Ze } = di({
2861
2868
  caretPosition: v,
2862
2869
  commands: () => r.commands ?? kt,
2863
2870
  disabled: () => r.disabled,
@@ -2869,7 +2876,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2869
2876
  ot(e);
2870
2877
  },
2871
2878
  onCommandSubmitted: (e) => {
2872
- e === "/plan" && R.value && at(), O(e), i("send", e);
2879
+ e === "/plan" && L.value && at(), O(e), i("send", e);
2873
2880
  },
2874
2881
  onTextInserted: vt,
2875
2882
  onMentionSelected: (e, t) => i("mentionSelect", e, t),
@@ -2878,27 +2885,27 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2878
2885
  skillsEnabled: () => P.value.skills,
2879
2886
  editor: g
2880
2887
  });
2881
- W(() => r.composerState, (e) => {
2888
+ U(() => r.composerState, (e) => {
2882
2889
  e && lt(e);
2883
2890
  }, {
2884
2891
  deep: !0,
2885
2892
  immediate: !0
2886
- }), W(() => r.draftRevision, () => {
2893
+ }), U(() => r.draftRevision, () => {
2887
2894
  r.composerState || rt(r.draft ?? "");
2888
- }, { immediate: r.draftRevision !== void 0 }), W(f, () => gt()), D(() => {
2895
+ }, { immediate: r.draftRevision !== void 0 }), U(f, () => gt()), D(() => {
2889
2896
  r.autofocus && g.value?.focusEnd();
2890
2897
  });
2891
2898
  function Qe() {
2892
- if (!(ge.value || he.value || _e.value)) {
2893
- if (J.value) {
2899
+ if (!(ve.value || _e.value || ye.value)) {
2900
+ if (ae.value) {
2894
2901
  i("continueInterruptedTurn");
2895
2902
  return;
2896
2903
  }
2897
- if (Y.value) {
2898
- i("send", ne.value);
2904
+ if (oe.value) {
2905
+ i("send", re.value);
2899
2906
  return;
2900
2907
  }
2901
- r.isSending && se.value ? et() : tt("send");
2908
+ r.isSending && le.value ? et() : tt("send");
2902
2909
  }
2903
2910
  }
2904
2911
  async function $e() {
@@ -2906,18 +2913,18 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2906
2913
  i("interrupt");
2907
2914
  return;
2908
2915
  }
2909
- if (he.value) {
2910
- await xe() && Qe();
2916
+ if (_e.value) {
2917
+ await Se() && Qe();
2911
2918
  return;
2912
2919
  }
2913
- if (ae.value) {
2920
+ if (se.value) {
2914
2921
  i("interrupt");
2915
2922
  return;
2916
2923
  }
2917
2924
  Qe();
2918
2925
  }
2919
2926
  function et() {
2920
- if (!(ge.value || he.value || _e.value)) {
2927
+ if (!(ve.value || _e.value || ye.value)) {
2921
2928
  if (!P.value.steerPrompt) {
2922
2929
  tt("send");
2923
2930
  return;
@@ -2931,15 +2938,15 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2931
2938
  }
2932
2939
  function tt(e) {
2933
2940
  let t = f.value.trim();
2934
- if (!re.value || e === "steer" && !t && !r.hasAttachments) return;
2935
- let n = L.value ? `/${L.value.slashName ?? L.value.name}` : null, a = n && t ? `${n} ${t}` : t || (r.hasAttachments ? "(no user instructions)" : ""), o = h.value ? { inputMethod: "dictated" } : void 0;
2941
+ if (!ie.value || e === "steer" && !t && !r.hasAttachments) return;
2942
+ let n = I.value ? `/${I.value.slashName ?? I.value.name}` : null, a = n && t ? `${n} ${t}` : t || (r.hasAttachments ? "(no user instructions)" : ""), o = h.value ? { inputMethod: "dictated" } : void 0;
2936
2943
  t && O(a), f.value = "", p.value = null, h.value = !1, y.value = 0, b.value = 0, v.value = 0, Ae(), e === "send" ? o ? i("send", a, o) : i("send", a) : o ? i("steer", a, o) : i("steer", a);
2937
2944
  }
2938
2945
  async function nt(e) {
2939
2946
  let t = e.trim();
2940
2947
  if (!t) return;
2941
2948
  let n = g.value?.getSelectionRange(), r = n?.start ?? y.value, i = n?.end ?? b.value, a = f.value.slice(0, r), o = f.value.slice(i), s = `${a && !/\s$/.test(a) ? " " : ""}${t}${o && !/^\s/.test(o) ? " " : ""}`, c = a.length + s.length;
2942
- f.value = `${a}${s}${o}`, h.value = !0, v.value = c, y.value = c, b.value = c, ie = c, Ae();
2949
+ f.value = `${a}${s}${o}`, h.value = !0, v.value = c, y.value = c, b.value = c, q = c, Ae();
2943
2950
  }
2944
2951
  function rt(e) {
2945
2952
  T(), lt({
@@ -2955,16 +2962,16 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2955
2962
  p.value = null, gt();
2956
2963
  }
2957
2964
  function ot(e) {
2958
- e.id === te.value?.id && r.planMode && i("update:planMode", !1), p.value = e.id, gt();
2965
+ e.id === ne.value?.id && r.planMode && i("update:planMode", !1), p.value = e.id, gt();
2959
2966
  }
2960
2967
  function st(e) {
2961
2968
  if (e) {
2962
- if (!te.value) return;
2963
- ot(te.value);
2964
- } else R.value && at();
2969
+ if (!ne.value) return;
2970
+ ot(ne.value);
2971
+ } else L.value && at();
2965
2972
  }
2966
2973
  function ct(e) {
2967
- e && R.value && at(), i("update:planMode", e);
2974
+ e && L.value && at(), i("update:planMode", e);
2968
2975
  }
2969
2976
  function lt(e) {
2970
2977
  let t = Ii(e);
@@ -2989,7 +2996,11 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2989
2996
  }
2990
2997
  function dt(e) {
2991
2998
  if (!Fe(e)) {
2992
- if (e.key === "Tab" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && !e.isComposing && !r.disabled && !L.value && r.placeholder?.trim() && (g.value?.readText() ?? f.value) === "") {
2999
+ if ([
3000
+ "Tab",
3001
+ "ArrowRight",
3002
+ " "
3003
+ ].includes(e.key) && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && !e.isComposing && !r.disabled && !I.value && r.placeholder?.trim() && (g.value?.readText() ?? f.value) === "") {
2993
3004
  e.preventDefault(), g.value?.insertTextAtSelection(r.placeholder);
2994
3005
  return;
2995
3006
  }
@@ -2999,12 +3010,12 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
2999
3010
  return;
3000
3011
  }
3001
3012
  if (e.key === "ArrowUp" && r.promptHistoryLoading && f.value === "") {
3002
- Ee += 1, e.preventDefault();
3013
+ De += 1, e.preventDefault();
3003
3014
  return;
3004
3015
  }
3005
3016
  }
3006
3017
  if (e.key === "Tab" && e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey) {
3007
- e.preventDefault(), P.value.planMode && ct(!z.value);
3018
+ e.preventDefault(), P.value.planMode && ct(!R.value);
3008
3019
  return;
3009
3020
  }
3010
3021
  if (e.key === "Enter") {
@@ -3013,7 +3024,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3013
3024
  return;
3014
3025
  }
3015
3026
  if (e.preventDefault(), e.metaKey !== e.ctrlKey && !e.altKey) {
3016
- r.isSending ? se.value ? tt("send") : et() : Qe();
3027
+ r.isSending ? le.value ? tt("send") : et() : Qe();
3017
3028
  return;
3018
3029
  }
3019
3030
  !e.metaKey && !e.ctrlKey && !e.altKey && Qe();
@@ -3025,7 +3036,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3025
3036
  return e?.valid ? e.start === e.end && e.end === f.value.length : y.value === b.value && b.value === f.value.length;
3026
3037
  }
3027
3038
  function pt() {
3028
- Ee = 0, T(), Me(), Ge(), yt();
3039
+ De = 0, T(), Me(), Ge(), yt();
3029
3040
  }
3030
3041
  function mt(e) {
3031
3042
  let t = e.length;
@@ -3066,23 +3077,23 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3066
3077
  return t({ focus: bt }), (t, n) => (k(), l("form", {
3067
3078
  class: C(["codex-chat-theme chat-composer", { "chat-composer--disabled": e.disabled && !e.isSending }]),
3068
3079
  "aria-label": "Prompt composer",
3069
- onSubmit: q(Qe, ["prevent"]),
3070
- onKeydown: K(Te, ["esc"])
3080
+ onSubmit: K(Qe, ["prevent"]),
3081
+ onKeydown: G(Ee, ["esc"])
3071
3082
  }, [
3072
3083
  F(t.$slots, "before", {}, void 0, !0),
3073
- V(Pe) ? (k(), s(xr, {
3084
+ B(Pe) ? (k(), s(xr, {
3074
3085
  key: 0,
3075
- "active-index": V(De),
3076
- "show-file-hint": V(Ne),
3077
- "mention-groups": V(Je),
3078
- "visible-files": V(Ke),
3079
- "visible-plugins": V(qe),
3080
- onSelectFile: V(Le),
3081
- onSelectPlugin: V(Re),
3082
- onSelectMention: V(ze)
3086
+ "active-index": B(Oe),
3087
+ "show-file-hint": B(Ne),
3088
+ "mention-groups": B(Je),
3089
+ "visible-files": B(Ke),
3090
+ "visible-plugins": B(qe),
3091
+ onSelectFile: B(Le),
3092
+ onSelectPlugin: B(Re),
3093
+ onSelectMention: B(ze)
3083
3094
  }, d({ _: 2 }, [t.$slots["suggestion-item"] ? {
3084
3095
  name: "mention",
3085
- fn: G((e) => [F(t.$slots, "suggestion-item", x(e, { surface: "menu" }), void 0, !0)]),
3096
+ fn: W((e) => [F(t.$slots, "suggestion-item", x(e, { surface: "menu" }), void 0, !0)]),
3086
3097
  key: "0"
3087
3098
  } : void 0]), 1032, [
3088
3099
  "active-index",
@@ -3094,25 +3105,25 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3094
3105
  "onSelectPlugin",
3095
3106
  "onSelectMention"
3096
3107
  ])) : c("", !0),
3097
- V(He) ? (k(), s(Ir, {
3108
+ B(He) ? (k(), s(Ir, {
3098
3109
  key: 1,
3099
- "active-index": V(Oe),
3110
+ "active-index": B(Y),
3100
3111
  plugins: e.plugins,
3101
- "visible-skills": V(Ye),
3102
- onSelect: V(Be)
3112
+ "visible-skills": B(Ye),
3113
+ onSelect: B(Be)
3103
3114
  }, null, 8, [
3104
3115
  "active-index",
3105
3116
  "plugins",
3106
3117
  "visible-skills",
3107
3118
  "onSelect"
3108
3119
  ])) : c("", !0),
3109
- V(Ue) ? (k(), s(Qr, {
3120
+ B(Ue) ? (k(), s(Qr, {
3110
3121
  key: 2,
3111
- "active-index": V(ke),
3112
- "visible-commands": V(Xe),
3113
- "visible-skills": V(Ze),
3114
- onSelectCommand: V(Ie),
3115
- onSelectSkill: V(Ve)
3122
+ "active-index": B(ke),
3123
+ "visible-commands": B(Xe),
3124
+ "visible-skills": B(Ze),
3125
+ onSelectCommand: B(Ie),
3126
+ onSelectSkill: B(Ve)
3116
3127
  }, null, 8, [
3117
3128
  "active-index",
3118
3129
  "visible-commands",
@@ -3120,15 +3131,15 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3120
3131
  "onSelectCommand",
3121
3132
  "onSelectSkill"
3122
3133
  ])) : c("", !0),
3123
- u("div", Li, [H.value && (V(ge) || V(he) || V(_e)) ? (k(), s(dn, {
3134
+ u("div", Li, [V.value && (B(ve) || B(_e) || B(ye)) ? (k(), s(dn, {
3124
3135
  key: 0,
3125
3136
  class: "chat-composer__input",
3126
- recording: V(he),
3127
- starting: V(ge),
3128
- transcript: V(ve),
3129
- "audio-level": V(ye),
3130
- before: Ce.value,
3131
- after: we.value
3137
+ recording: B(_e),
3138
+ starting: B(ve),
3139
+ transcript: B(be),
3140
+ "audio-level": B(xe),
3141
+ before: we.value,
3142
+ after: Te.value
3132
3143
  }, null, 8, [
3133
3144
  "recording",
3134
3145
  "starting",
@@ -3143,22 +3154,22 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3143
3154
  modelValue: f.value,
3144
3155
  "onUpdate:modelValue": n[0] ||= (e) => f.value = e,
3145
3156
  class: "chat-composer__input",
3146
- placeholder: B.value,
3157
+ placeholder: z.value,
3147
3158
  disabled: e.disabled && !e.isSending,
3148
3159
  files: e.files,
3149
3160
  "mention-groups": e.mentionGroups,
3150
3161
  plugins: e.plugins,
3151
3162
  skills: e.skills,
3152
- onBlur: V(je),
3153
- onClick: V(Ge),
3163
+ onBlur: B(je),
3164
+ onClick: B(Ge),
3154
3165
  onCaretChange: ht,
3155
3166
  onInput: pt,
3156
3167
  onKeydown: dt,
3157
- onKeyup: V(Ge),
3168
+ onKeyup: B(Ge),
3158
3169
  onPaste: _t
3159
3170
  }, d({ _: 2 }, [t.$slots.mention ? {
3160
3171
  name: "mention",
3161
- fn: G((e) => [F(t.$slots, "mention", x(e, { surface: "composer" }), void 0, !0)]),
3172
+ fn: W((e) => [F(t.$slots, "mention", x(e, { surface: "composer" }), void 0, !0)]),
3162
3173
  key: "0"
3163
3174
  } : void 0]), 1032, [
3164
3175
  "modelValue",
@@ -3173,7 +3184,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3173
3184
  "onKeyup"
3174
3185
  ])), F(t.$slots, "after-input", {}, void 0, !0)]),
3175
3186
  u("div", Ri, [u("div", zi, [
3176
- I.value.composer.actionMenu ? (k(), s(nn, {
3187
+ te.value.composer.actionMenu ? (k(), s(nn, {
3177
3188
  key: 0,
3178
3189
  "attach-enabled": e.attachEnabled,
3179
3190
  disabled: e.disabled,
@@ -3181,10 +3192,10 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3181
3192
  items: e.menuItems,
3182
3193
  "approval-preset": e.approvalPreset,
3183
3194
  "approval-presets": P.value.approvalPresets ?? [],
3184
- "goal-mode": R.value,
3185
- "plan-mode": z.value,
3195
+ "goal-mode": L.value,
3196
+ "plan-mode": R.value,
3186
3197
  "show-approval-menu": P.value.approvals && !!e.approvalPreset && (P.value.approvalPresets?.length ?? 0) > 0,
3187
- "show-goal-mode": P.value.goals && !!te.value,
3198
+ "show-goal-mode": P.value.goals && !!ne.value,
3188
3199
  "show-plan-mode": P.value.planMode,
3189
3200
  onAttach: n[1] ||= (e) => t.$emit("attach"),
3190
3201
  onSelect: n[2] ||= (e) => t.$emit("menuSelect", e),
@@ -3193,11 +3204,11 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3193
3204
  "onUpdate:planMode": ct
3194
3205
  }, d({ _: 2 }, [t.$slots["menu-icon"] ? {
3195
3206
  name: "icon",
3196
- fn: G((e) => [F(t.$slots, "menu-icon", w(_(e)), void 0, !0)]),
3207
+ fn: W((e) => [F(t.$slots, "menu-icon", w(_(e)), void 0, !0)]),
3197
3208
  key: "0"
3198
3209
  } : void 0, t.$slots["menu-item"] ? {
3199
3210
  name: "item",
3200
- fn: G((e) => [F(t.$slots, "menu-item", w(_(e)), void 0, !0)]),
3211
+ fn: W((e) => [F(t.$slots, "menu-item", w(_(e)), void 0, !0)]),
3201
3212
  key: "1"
3202
3213
  } : void 0]), 1032, [
3203
3214
  "attach-enabled",
@@ -3214,13 +3225,13 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3214
3225
  ])) : c("", !0),
3215
3226
  F(t.$slots, "before-meta", {}, void 0, !0),
3216
3227
  m(zt, {
3217
- "plan-mode": z.value,
3218
- command: L.value,
3228
+ "plan-mode": R.value,
3229
+ command: I.value,
3219
3230
  onDisablePlanMode: n[4] ||= (e) => ct(!1),
3220
3231
  onRemoveCommand: it
3221
3232
  }, null, 8, ["plan-mode", "command"])
3222
3233
  ]), u("div", Bi, [
3223
- I.value.composer.contextUsage ? (k(), s(Yn, {
3234
+ te.value.composer.contextUsage ? (k(), s(Yn, {
3224
3235
  key: 0,
3225
3236
  "context-usage": e.contextUsage
3226
3237
  }, null, 8, ["context-usage"])) : c("", !0),
@@ -3250,13 +3261,13 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3250
3261
  "show-service-tier",
3251
3262
  "show-reasoning"
3252
3263
  ])) : c("", !0),
3253
- H.value ? (k(), s(an, {
3264
+ V.value ? (k(), s(an, {
3254
3265
  key: 2,
3255
- disabled: V(de),
3256
- label: V(fe),
3257
- recording: V(he),
3258
- title: V(pe),
3259
- onToggle: V(Se)
3266
+ disabled: B(pe),
3267
+ label: B(me),
3268
+ recording: B(_e),
3269
+ title: B(he),
3270
+ onToggle: B(Ce)
3260
3271
  }, null, 8, [
3261
3272
  "disabled",
3262
3273
  "label",
@@ -3266,12 +3277,12 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3266
3277
  ])) : c("", !0),
3267
3278
  m(Ft, {
3268
3279
  class: "chat-composer__send",
3269
- disabled: ce.value,
3270
- "hover-to-enable": Y.value,
3271
- busy: oe.value,
3280
+ disabled: ue.value,
3281
+ "hover-to-enable": oe.value,
3282
+ busy: ce.value,
3272
3283
  "interrupt-armed": e.interruptArmed,
3273
- "submit-label": le.value,
3274
- title: ue.value,
3284
+ "submit-label": de.value,
3285
+ title: fe.value,
3275
3286
  "interrupt-label": "Codex is working",
3276
3287
  onClick: $e
3277
3288
  }, null, 8, [
@@ -3286,7 +3297,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3286
3297
  ])])
3287
3298
  ], 34));
3288
3299
  }
3289
- }), [["__scopeId", "data-v-cfef7eed"]]), Hi = { class: "codex-chat-theme codex-request-card chat-tool-confirmation" }, Ui = { class: "codex-request-header chat-tool-confirmation__header" }, Wi = { class: "codex-request-eyebrow chat-tool-confirmation__tag" }, Gi = { class: "codex-request-title chat-tool-confirmation__question" }, Ki = {
3300
+ }), [["__scopeId", "data-v-adfbea17"]]), Hi = { class: "codex-chat-theme codex-request-card chat-tool-confirmation" }, Ui = { class: "codex-request-header chat-tool-confirmation__header" }, Wi = { class: "codex-request-eyebrow chat-tool-confirmation__tag" }, Gi = { class: "codex-request-title chat-tool-confirmation__question" }, Ki = {
3290
3301
  key: 0,
3291
3302
  class: "codex-request-description chat-tool-confirmation__description"
3292
3303
  }, qi = {
@@ -3304,13 +3315,13 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3304
3315
  emits: ["decide"],
3305
3316
  setup(e) {
3306
3317
  return (n, r) => (k(), l("section", Hi, [
3307
- u("header", Ui, [u("span", Wi, [m(V(Ie), {
3318
+ u("header", Ui, [u("span", Wi, [m(B(Ie), {
3308
3319
  size: 16,
3309
3320
  "aria-hidden": "true"
3310
3321
  }), r[0] ||= p(" Approve tool call ", -1)])]),
3311
- u("span", Gi, z(e.summary), 1),
3312
- e.description ? (k(), l("p", Ki, z(e.description), 1)) : c("", !0),
3313
- e.details || n.$slots.details ? (k(), l("details", qi, [r[1] ||= u("summary", { class: "chat-tool-confirmation__details-summary" }, "Details", -1), u("div", Ji, [F(n.$slots, "details", {}, () => [u("pre", null, z(e.details), 1)], !0)])])) : c("", !0),
3322
+ u("span", Gi, R(e.summary), 1),
3323
+ e.description ? (k(), l("p", Ki, R(e.description), 1)) : c("", !0),
3324
+ e.details || n.$slots.details ? (k(), l("details", qi, [r[1] ||= u("summary", { class: "chat-tool-confirmation__details-summary" }, "Details", -1), u("div", Ji, [F(n.$slots, "details", {}, () => [u("pre", null, R(e.details), 1)], !0)])])) : c("", !0),
3314
3325
  u("footer", Yi, [(k(!0), l(t, null, P(e.actions, (t) => (k(), l("button", {
3315
3326
  key: t.id,
3316
3327
  class: C(["codex-request-button chat-tool-confirmation__button", {
@@ -3320,7 +3331,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3320
3331
  type: "button",
3321
3332
  disabled: e.disabled,
3322
3333
  onClick: (e) => n.$emit("decide", t.id)
3323
- }, z(t.label), 11, Xi))), 128))])
3334
+ }, R(t.label), 11, Xi))), 128))])
3324
3335
  ]));
3325
3336
  }
3326
3337
  }), [["__scopeId", "data-v-d39db1b1"]]), Qi = { class: "codex-approval-prompt__details" }, $i = { key: 0 }, ea = { key: 1 }, ta = {
@@ -3368,10 +3379,10 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
3368
3379
  onDecide: m
3369
3380
  }, d({ _: 2 }, [e.approval.command || e.approval.cwd || e.approval.requestedPermissions?.length ? {
3370
3381
  name: "details",
3371
- fn: G(() => [u("div", Qi, [
3372
- e.approval.command ? (k(), l("code", $i, z(e.approval.command), 1)) : c("", !0),
3373
- e.approval.cwd ? (k(), l("small", ea, z(e.approval.cwd), 1)) : c("", !0),
3374
- e.approval.requestedPermissions?.length ? (k(), l("ul", ta, [(k(!0), l(t, null, P(e.approval.requestedPermissions, (e, t) => (k(), l("li", { key: t }, z(h(e)), 1))), 128))])) : c("", !0)
3382
+ fn: W(() => [u("div", Qi, [
3383
+ e.approval.command ? (k(), l("code", $i, R(e.approval.command), 1)) : c("", !0),
3384
+ e.approval.cwd ? (k(), l("small", ea, R(e.approval.cwd), 1)) : c("", !0),
3385
+ e.approval.requestedPermissions?.length ? (k(), l("ul", ta, [(k(!0), l(t, null, P(e.approval.requestedPermissions, (e, t) => (k(), l("li", { key: t }, R(h(e)), 1))), 128))])) : c("", !0)
3375
3386
  ])]),
3376
3387
  key: "0"
3377
3388
  } : void 0]), 1032, [
@@ -3943,7 +3954,7 @@ function eo(e) {
3943
3954
  //#region src/chat/use-conversation-escape-interrupt.ts
3944
3955
  function to(e) {
3945
3956
  let t = M(!1), n = null, r = !1;
3946
- W([e.busy, e.enabled], () => {
3957
+ U([e.busy, e.enabled], () => {
3947
3958
  c(), i();
3948
3959
  }), D(i), E(() => {
3949
3960
  c(), a();
@@ -3999,14 +4010,14 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
3999
4010
  return (n, a) => (k(), l("span", {
4000
4011
  class: C(["codex-chat-theme chat-animated-diff-stat", `chat-animated-diff-stat--${e.kind}`]),
4001
4012
  "aria-label": c.value
4002
- }, [u("span", oo, z(r.value), 1), u("span", so, [(k(!0), l(t, null, P(s.value, (e) => (k(), l("span", {
4013
+ }, [u("span", oo, R(r.value), 1), u("span", so, [(k(!0), l(t, null, P(s.value, (e) => (k(), l("span", {
4003
4014
  key: e.place,
4004
4015
  class: "chat-animated-diff-stat__digit-column"
4005
4016
  }, [m(i, { name: "chat-animated-diff-stat__digit" }, {
4006
- default: G(() => [(k(), l("span", {
4017
+ default: W(() => [(k(), l("span", {
4007
4018
  key: `${e.place}-${e.digit}`,
4008
4019
  class: "chat-animated-diff-stat__digit"
4009
- }, z(e.digit), 1))]),
4020
+ }, R(e.digit), 1))]),
4010
4021
  _: 2
4011
4022
  }, 1024)]))), 128))])], 10, ao));
4012
4023
  }
@@ -4024,13 +4035,13 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4024
4035
  if (t.toolCall.kind === "webSearch") return Je;
4025
4036
  let e = Q(t.toolCall.status);
4026
4037
  if (e) switch (e.action) {
4027
- case "create": return Oe;
4038
+ case "create": return Y;
4028
4039
  case "delete": return qe;
4029
- case "edit": return Oe;
4040
+ case "edit": return Y;
4030
4041
  case "explore":
4031
- case "list": return ve;
4032
- case "plan": return Se;
4033
- case "read": return _e;
4042
+ case "list": return be;
4043
+ case "plan": return Ce;
4044
+ case "read": return ye;
4034
4045
  case "run": return Ge;
4035
4046
  case "search": return Fe;
4036
4047
  }
@@ -4042,7 +4053,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4042
4053
  function i(e) {
4043
4054
  return typeof e == "object" && !!e;
4044
4055
  }
4045
- return (e, t) => n.value ? (k(), s(L(n.value), {
4056
+ return (e, t) => n.value ? (k(), s(I(n.value), {
4046
4057
  key: 0,
4047
4058
  class: "chat-tool-icon",
4048
4059
  "aria-hidden": "true"
@@ -4094,31 +4105,31 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4094
4105
  "codex-text-shimmer": e.running
4095
4106
  }]),
4096
4107
  "data-label": e.title
4097
- }, [e.icon ? (k(), s(L(e.icon), { key: 0 })) : e.toolCall ? (k(), s(lo, {
4108
+ }, [e.icon ? (k(), s(I(e.icon), { key: 0 })) : e.toolCall ? (k(), s(lo, {
4098
4109
  key: 1,
4099
4110
  presentation: e.toolPresentation,
4100
4111
  "tool-call": e.toolCall
4101
4112
  }, null, 8, ["presentation", "tool-call"])) : c("", !0), e.titlePrefix && e.titleTarget ? (k(), l("span", fo, [
4102
- u("span", null, z(e.titlePrefix), 1),
4103
- i[3] ||= p(z(" "), -1),
4113
+ u("span", null, R(e.titlePrefix), 1),
4114
+ i[3] ||= p(R(" "), -1),
4104
4115
  u("span", po, [e.titleTargetParts?.length ? (k(!0), l(t, { key: 0 }, P(e.titleTargetParts, (e, n) => (k(), l(t, { key: `${e.label}-${n}` }, [
4105
- e.separator ? (k(), l("span", mo, z(e.separator), 1)) : c("", !0),
4116
+ e.separator ? (k(), l("span", mo, R(e.separator), 1)) : c("", !0),
4106
4117
  e.link ? (k(), l("a", {
4107
4118
  key: 1,
4108
4119
  class: "chat-tool-call__title-target chat-tool-call__title-target--link",
4109
4120
  href: e.link.href,
4110
- onClick: q((t) => r("open-link", e.link), ["stop", "prevent"]),
4111
- onKeydown: [K(q((t) => r("open-link", e.link), ["stop", "prevent"]), ["enter"]), K(q((t) => r("open-link", e.link), ["stop", "prevent"]), ["space"])]
4112
- }, z(e.label), 41, ho)) : (k(), l("span", go, z(e.label), 1)),
4113
- e.suffix ? (k(), l("span", _o, z(e.suffix), 1)) : c("", !0)
4121
+ onClick: K((t) => r("open-link", e.link), ["stop", "prevent"]),
4122
+ onKeydown: [G(K((t) => r("open-link", e.link), ["stop", "prevent"]), ["enter"]), G(K((t) => r("open-link", e.link), ["stop", "prevent"]), ["space"])]
4123
+ }, R(e.label), 41, ho)) : (k(), l("span", go, R(e.label), 1)),
4124
+ e.suffix ? (k(), l("span", _o, R(e.suffix), 1)) : c("", !0)
4114
4125
  ], 64))), 128)) : e.titleTargetLink ? (k(), l("a", {
4115
4126
  key: 1,
4116
4127
  class: "chat-tool-call__title-target chat-tool-call__title-target--link",
4117
4128
  href: e.titleTargetLink.href,
4118
- onClick: i[0] ||= q((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]),
4119
- onKeydown: [i[1] ||= K(q((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["enter"]), i[2] ||= K(q((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["space"])]
4120
- }, z(e.titleTarget), 41, vo)) : (k(), l("span", yo, z(e.titleTarget), 1))])
4121
- ])) : (k(), l("span", bo, z(e.title), 1))], 10, uo), e.lineDiff ? (k(), l("span", xo, [e.lineDiff.addedLines ? (k(), s(co, {
4129
+ onClick: i[0] ||= K((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]),
4130
+ onKeydown: [i[1] ||= G(K((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["enter"]), i[2] ||= G(K((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["space"])]
4131
+ }, R(e.titleTarget), 41, vo)) : (k(), l("span", yo, R(e.titleTarget), 1))])
4132
+ ])) : (k(), l("span", bo, R(e.title), 1))], 10, uo), e.lineDiff ? (k(), l("span", xo, [e.lineDiff.addedLines ? (k(), s(co, {
4122
4133
  key: 0,
4123
4134
  kind: "added",
4124
4135
  label: "Added lines",
@@ -4176,47 +4187,47 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4176
4187
  let r = e, i = n, a = M(0), d = M(!1), f = M(!1), h = A({}), g = M(), _ = M(), v = A({}), y = o(() => Q(r.toolCall.status)), b = o(() => y.value?.params && typeof y.value.params == "object" ? y.value.params : {}), x = o(() => {
4177
4188
  let e = b.value.requestId;
4178
4189
  return typeof e == "string" ? e : void 0;
4179
- }), w = o(() => ge(b.value.questions)), T = o(() => w.value[a.value]), E = o(() => a.value === w.value.length - 1), O = o(() => {
4190
+ }), w = o(() => ve(b.value.questions)), T = o(() => w.value[a.value]), E = o(() => a.value === w.value.length - 1), O = o(() => {
4180
4191
  let e = r.toolCall.result;
4181
4192
  return e?.answers && typeof e.answers == "object" ? e.answers : {};
4182
4193
  }), ee = o(() => x.value ? r.answeredClientRequestIds?.has(x.value) === !0 : !1), j = o(() => d.value || Object.keys(O.value).length > 0 || ee.value && !f.value), N = o(() => f.value || r.toolCall.state === "canceled"), F = o(() => {
4183
4194
  let e = {};
4184
- for (let t of w.value) e[t.id] = he(O.value[t.id] ?? me(t));
4195
+ for (let t of w.value) e[t.id] = _e(O.value[t.id] ?? ge(t));
4185
4196
  return e;
4186
- }), I = o(() => !N.value && !j.value && !r.historical && !!T.value), te = o(() => T.value?.options ?? []), R = o(() => {
4197
+ }), te = o(() => !N.value && !j.value && !r.historical && !!T.value), ne = o(() => T.value?.options ?? []), L = o(() => {
4187
4198
  let e = T.value;
4188
- return !!e && (G(e) || e.isOther === !0);
4189
- }), B = o(() => {
4199
+ return !!e && (W(e) || e.isOther === !0);
4200
+ }), z = o(() => {
4190
4201
  let e = T.value;
4191
4202
  return e && e.header.trim() !== e.question.trim() ? e.header : "Question";
4192
- }), H = o(() => {
4203
+ }), V = o(() => {
4193
4204
  let e = T.value;
4194
- return e?.isSecret ? "Enter private answer" : e && G(e) ? "Type your answer..." : "Or write your own answer...";
4195
- }), U = o(() => {
4205
+ return e?.isSecret ? "Enter private answer" : e && W(e) ? "Type your answer..." : "Or write your own answer...";
4206
+ }), H = o(() => {
4196
4207
  let e = T.value;
4197
- return !e || !ae(e) ? !1 : !E.value || w.value.every((e) => ae(e));
4208
+ return !e || !se(e) ? !1 : !E.value || w.value.every((e) => se(e));
4198
4209
  });
4199
- function ne() {
4210
+ function re() {
4200
4211
  S(() => window.setTimeout(() => {
4201
4212
  let e = T.value;
4202
- !I.value || !e || (G(e) ? _.value?.focus() : (!document.activeElement || document.activeElement === document.body) && g.value?.focus());
4213
+ !te.value || !e || (W(e) ? _.value?.focus() : (!document.activeElement || document.activeElement === document.body) && g.value?.focus());
4203
4214
  }, 0));
4204
4215
  }
4205
- D(ne), W(a, ne);
4206
- function G(e) {
4216
+ D(re), U(a, re);
4217
+ function W(e) {
4207
4218
  return e.options === null;
4208
4219
  }
4209
- let re = /\s*\(recommended\)\s*$/i;
4210
- function K(e) {
4211
- return e.replace(re, "").trim() || e;
4220
+ let ie = /\s*\(recommended\)\s*$/i;
4221
+ function G(e) {
4222
+ return e.replace(ie, "").trim() || e;
4212
4223
  }
4213
- function q(e) {
4214
- return re.test(e);
4224
+ function K(e) {
4225
+ return ie.test(e);
4215
4226
  }
4216
- function J(e, t) {
4227
+ function ae(e, t) {
4217
4228
  return h[e]?.includes(t) ?? !1;
4218
4229
  }
4219
- function Y(e, t) {
4230
+ function oe(e, t) {
4220
4231
  if (j.value || N.value) return;
4221
4232
  let n = e.id;
4222
4233
  if (h[n] ??= [], e.multiSelect) {
@@ -4224,47 +4235,47 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4224
4235
  e >= 0 ? h[n].splice(e, 1) : h[n].push(t);
4225
4236
  return;
4226
4237
  }
4227
- h[n] = [t], v[n] = "", le();
4238
+ h[n] = [t], v[n] = "", de();
4228
4239
  }
4229
- function ie(e, t) {
4240
+ function q(e, t) {
4230
4241
  if (j.value || N.value) return;
4231
4242
  let n = t.target.value;
4232
4243
  v[e.id] = n, !e.multiSelect && n.trim() && (h[e.id] = []);
4233
4244
  }
4234
- function ae(e) {
4245
+ function se(e) {
4235
4246
  return (h[e.id]?.length ?? 0) > 0 || !!v[e.id]?.trim();
4236
4247
  }
4237
- function se(e) {
4238
- if (e.isComposing || e.metaKey || e.ctrlKey || e.altKey || !I.value) return;
4248
+ function le(e) {
4249
+ if (e.isComposing || e.metaKey || e.ctrlKey || e.altKey || !te.value) return;
4239
4250
  let t = T.value;
4240
4251
  if (t && /^[1-9]$/.test(e.key)) {
4241
4252
  let n = t.options?.[Number(e.key) - 1];
4242
- n && (e.preventDefault(), Y(t, n.label));
4253
+ n && (e.preventDefault(), oe(t, n.label));
4243
4254
  return;
4244
4255
  }
4245
- e.key === "Enter" && e.target === g.value && U.value && (e.preventDefault(), le());
4256
+ e.key === "Enter" && e.target === g.value && H.value && (e.preventDefault(), de());
4246
4257
  }
4247
- function ce(e) {
4248
- e.stopPropagation(), !(e.key !== "Enter" || e.isComposing || e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && (e.preventDefault(), U.value && le());
4258
+ function ue(e) {
4259
+ e.stopPropagation(), !(e.key !== "Enter" || e.isComposing || e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && (e.preventDefault(), H.value && de());
4249
4260
  }
4250
- function le() {
4251
- E.value ? fe() : ue();
4261
+ function de() {
4262
+ E.value ? me() : fe();
4252
4263
  }
4253
- function ue() {
4254
- U.value && (a.value += 1);
4264
+ function fe() {
4265
+ H.value && (a.value += 1);
4255
4266
  }
4256
- function de() {
4267
+ function pe() {
4257
4268
  a.value > 0 && --a.value;
4258
4269
  }
4259
- function fe() {
4260
- if (!x.value || j.value || N.value || !U.value) return;
4261
- let e = w.value.reduce((e, t) => (e[t.id] = me(t), e), {});
4270
+ function me() {
4271
+ if (!x.value || j.value || N.value || !H.value) return;
4272
+ let e = w.value.reduce((e, t) => (e[t.id] = ge(t), e), {});
4262
4273
  d.value = !0, i("client-response", {
4263
4274
  id: x.value,
4264
4275
  payload: { answers: e }
4265
4276
  });
4266
4277
  }
4267
- function pe() {
4278
+ function he() {
4268
4279
  !x.value || j.value || N.value || (f.value = !0, i("client-response", {
4269
4280
  id: x.value,
4270
4281
  payload: {
@@ -4273,14 +4284,14 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4273
4284
  }
4274
4285
  }));
4275
4286
  }
4276
- function me(e) {
4287
+ function ge(e) {
4277
4288
  let t = [...h[e.id] ?? []], n = v[e.id]?.trim();
4278
- return (G(e) || e.isOther) && n && t.push(n), { answers: t };
4289
+ return (W(e) || e.isOther) && n && t.push(n), { answers: t };
4279
4290
  }
4280
- function he(e) {
4291
+ function _e(e) {
4281
4292
  return e.answers.filter(Boolean).join(", ") || "-";
4282
4293
  }
4283
- function ge(e) {
4294
+ function ve(e) {
4284
4295
  return Array.isArray(e) ? e.filter((e) => !!(e && typeof e == "object" && "id" in e && typeof e.id == "string" && "question" in e && typeof e.question == "string")).map((e) => ({
4285
4296
  ...e,
4286
4297
  header: e.header || e.question,
@@ -4289,72 +4300,72 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4289
4300
  options: Array.isArray(e.options) ? e.options : null
4290
4301
  })) : [];
4291
4302
  }
4292
- return (n, r) => w.value.length === 0 ? (k(), l("span", Co, [m(V(Be), { size: 15 }), r[1] ||= p(" Preparing question... ", -1)])) : (k(), l("section", {
4303
+ return (n, r) => w.value.length === 0 ? (k(), l("span", Co, [m(B(Be), { size: 15 }), r[1] ||= p(" Preparing question... ", -1)])) : (k(), l("section", {
4293
4304
  key: 1,
4294
4305
  ref_key: "root",
4295
4306
  ref: g,
4296
4307
  class: C(["codex-chat-theme codex-request-card chat-tool-user-input", { "chat-tool-user-input--resolved": N.value || j.value || e.historical }]),
4297
- tabindex: I.value ? -1 : void 0,
4298
- onKeydown: se
4308
+ tabindex: te.value ? -1 : void 0,
4309
+ onKeydown: le
4299
4310
  }, [N.value ? (k(), l("div", To, [m(So, {
4300
4311
  title: "Cancelled user question",
4301
- icon: V(Ve)
4312
+ icon: B(Ve)
4302
4313
  }, null, 8, ["icon"])])) : j.value ? (k(), l("div", Eo, [m(So, {
4303
4314
  title: "Answered user question",
4304
- icon: V(ze)
4315
+ icon: B(ze)
4305
4316
  }, null, 8, ["icon"]), (k(!0), l(t, null, P(w.value, (e) => (k(), l("div", {
4306
4317
  key: e.id,
4307
4318
  class: "chat-tool-user-input__answer"
4308
- }, [u("span", Do, z(e.header), 1), u("span", Oo, z(F.value[e.id]), 1)]))), 128))])) : e.historical ? (k(!0), l(t, { key: 2 }, P(w.value, (e) => (k(), l("p", {
4319
+ }, [u("span", Do, R(e.header), 1), u("span", Oo, R(F.value[e.id]), 1)]))), 128))])) : e.historical ? (k(!0), l(t, { key: 2 }, P(w.value, (e) => (k(), l("p", {
4309
4320
  key: e.id,
4310
4321
  class: "chat-tool-user-input__historical-question"
4311
- }, z(e.question), 1))), 128)) : T.value ? (k(), l(t, { key: 3 }, [
4312
- u("header", ko, [u("span", Ao, [m(V(Te), {
4322
+ }, R(e.question), 1))), 128)) : T.value ? (k(), l(t, { key: 3 }, [
4323
+ u("header", ko, [u("span", Ao, [m(B(Ee), {
4313
4324
  size: 16,
4314
4325
  "aria-hidden": "true"
4315
- }), u("span", jo, z(B.value), 1)]), u("div", Mo, [w.value.length > 1 ? (k(), l("span", No, z(a.value + 1) + " / " + z(w.value.length), 1)) : c("", !0), u("button", {
4326
+ }), u("span", jo, R(z.value), 1)]), u("div", Mo, [w.value.length > 1 ? (k(), l("span", No, R(a.value + 1) + " / " + R(w.value.length), 1)) : c("", !0), u("button", {
4316
4327
  class: "chat-tool-user-input__dismiss",
4317
4328
  type: "button",
4318
4329
  "aria-label": "Cancel question",
4319
4330
  title: "Cancel question",
4320
- onClick: pe
4321
- }, [m(V(Ye), { size: 17 })])])]),
4322
- u("p", Po, z(T.value.question), 1),
4323
- T.value.multiSelect && te.value.length > 0 ? (k(), l("p", Fo, " Select all that apply ")) : c("", !0),
4324
- te.value.length > 0 ? (k(), l("div", {
4331
+ onClick: he
4332
+ }, [m(B(Ye), { size: 17 })])])]),
4333
+ u("p", Po, R(T.value.question), 1),
4334
+ T.value.multiSelect && ne.value.length > 0 ? (k(), l("p", Fo, " Select all that apply ")) : c("", !0),
4335
+ ne.value.length > 0 ? (k(), l("div", {
4325
4336
  key: 1,
4326
4337
  class: "chat-tool-user-input__options",
4327
4338
  role: "group",
4328
4339
  "aria-label": T.value.question
4329
- }, [(k(!0), l(t, null, P(te.value, (e, n) => (k(), l("button", {
4340
+ }, [(k(!0), l(t, null, P(ne.value, (e, n) => (k(), l("button", {
4330
4341
  key: e.label,
4331
4342
  "aria-keyshortcuts": n < 9 ? String(n + 1) : void 0,
4332
4343
  "aria-label": e.label,
4333
- "aria-pressed": J(T.value.id, e.label),
4334
- class: C(["chat-tool-user-input__option", { "chat-tool-user-input__option--selected": J(T.value.id, e.label) }]),
4344
+ "aria-pressed": ae(T.value.id, e.label),
4345
+ class: C(["chat-tool-user-input__option", { "chat-tool-user-input__option--selected": ae(T.value.id, e.label) }]),
4335
4346
  type: "button",
4336
- onClick: (t) => Y(T.value, e.label)
4337
- }, [u("span", Ro, [J(T.value.id, e.label) ? (k(), s(V(oe), {
4347
+ onClick: (t) => oe(T.value, e.label)
4348
+ }, [u("span", Ro, [ae(T.value.id, e.label) ? (k(), s(B(ce), {
4338
4349
  key: 0,
4339
4350
  size: 14,
4340
4351
  "stroke-width": "3"
4341
- })) : (k(), l(t, { key: 1 }, [p(z(n + 1), 1)], 64))]), u("span", zo, [u("span", Bo, [u("span", Vo, z(K(e.label)), 1), q(e.label) ? (k(), l("span", Ho, "Recommended")) : c("", !0)]), e.description ? (k(), l("span", Uo, z(e.description), 1)) : c("", !0)])], 10, Lo))), 128))], 8, Io)) : c("", !0),
4342
- u("footer", { class: C(["chat-tool-user-input__footer", { "chat-tool-user-input__footer--divided": te.value.length > 0 }]) }, [R.value ? (k(), l("div", Wo, [m(V(Oe), {
4352
+ })) : (k(), l(t, { key: 1 }, [p(R(n + 1), 1)], 64))]), u("span", zo, [u("span", Bo, [u("span", Vo, R(G(e.label)), 1), K(e.label) ? (k(), l("span", Ho, "Recommended")) : c("", !0)]), e.description ? (k(), l("span", Uo, R(e.description), 1)) : c("", !0)])], 10, Lo))), 128))], 8, Io)) : c("", !0),
4353
+ u("footer", { class: C(["chat-tool-user-input__footer", { "chat-tool-user-input__footer--divided": ne.value.length > 0 }]) }, [L.value ? (k(), l("div", Wo, [m(B(Y), {
4343
4354
  class: "chat-tool-user-input__write-icon",
4344
4355
  size: 16,
4345
4356
  "aria-hidden": "true"
4346
- }), (k(), s(L(T.value.isSecret ? "input" : "textarea"), {
4357
+ }), (k(), s(I(T.value.isSecret ? "input" : "textarea"), {
4347
4358
  ref_key: "answerField",
4348
4359
  ref: _,
4349
- class: C(["chat-tool-user-input__other-input", { "chat-tool-user-input__other-input--direct": G(T.value) }]),
4350
- "aria-label": G(T.value) ? T.value.question : "Other answer",
4360
+ class: C(["chat-tool-user-input__other-input", { "chat-tool-user-input__other-input--direct": W(T.value) }]),
4361
+ "aria-label": W(T.value) ? T.value.question : "Other answer",
4351
4362
  autocomplete: T.value.isSecret ? "off" : void 0,
4352
- placeholder: H.value,
4363
+ placeholder: V.value,
4353
4364
  rows: T.value.isSecret ? void 0 : 1,
4354
4365
  type: T.value.isSecret ? "password" : void 0,
4355
4366
  value: v[T.value.id] ?? "",
4356
- onInput: r[0] ||= (e) => ie(T.value, e),
4357
- onKeydown: ce
4367
+ onInput: r[0] ||= (e) => q(T.value, e),
4368
+ onKeydown: ue
4358
4369
  }, null, 40, [
4359
4370
  "class",
4360
4371
  "aria-label",
@@ -4367,13 +4378,13 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4367
4378
  key: 0,
4368
4379
  class: "codex-request-button chat-tool-user-input__button",
4369
4380
  type: "button",
4370
- onClick: de
4381
+ onClick: pe
4371
4382
  }, " Back ")) : c("", !0), u("button", {
4372
4383
  class: "codex-request-button codex-request-button--primary chat-tool-user-input__button chat-tool-user-input__button--primary",
4373
- disabled: !U.value,
4384
+ disabled: !H.value,
4374
4385
  type: "button",
4375
- onClick: le
4376
- }, z(E.value ? "Send" : "Next"), 9, Ko)])], 2)
4386
+ onClick: de
4387
+ }, R(E.value ? "Send" : "Next"), 9, Ko)])], 2)
4377
4388
  ], 64)) : c("", !0)], 42, wo));
4378
4389
  }
4379
4390
  }), [["__scopeId", "data-v-d031e6da"]]), Jo = /* @__PURE__ */ h({
@@ -4523,24 +4534,24 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4523
4534
  setup(e, { emit: t }) {
4524
4535
  let n = t;
4525
4536
  return (t, r) => e.goal ? (k(), l("div", Qo, [
4526
- m(V(Ue), {
4537
+ m(B(Ue), {
4527
4538
  class: "chat-goal__icon",
4528
4539
  "aria-hidden": "true"
4529
4540
  }),
4530
- u("div", $o, [r[2] ||= u("span", { class: "chat-goal__label" }, "Goal", -1), u("span", es, z(e.goal.objective), 1)]),
4541
+ u("div", $o, [r[2] ||= u("span", { class: "chat-goal__label" }, "Goal", -1), u("span", es, R(e.goal.objective), 1)]),
4531
4542
  u("div", ts, [u("button", {
4532
4543
  class: "chat-goal__action",
4533
4544
  type: "button",
4534
4545
  "aria-label": "Edit goal",
4535
4546
  title: "Edit goal",
4536
4547
  onClick: r[0] ||= (e) => n("edit")
4537
- }, [m(V(Oe), { "aria-hidden": "true" }), r[3] ||= u("span", null, "Edit", -1)]), u("button", {
4548
+ }, [m(B(Y), { "aria-hidden": "true" }), r[3] ||= u("span", null, "Edit", -1)]), u("button", {
4538
4549
  class: "chat-goal__action",
4539
4550
  type: "button",
4540
4551
  "aria-label": "Clear goal",
4541
4552
  title: "Clear goal",
4542
4553
  onClick: r[1] ||= (e) => n("clear")
4543
- }, [m(V(qe), { "aria-hidden": "true" })])])
4554
+ }, [m(B(qe), { "aria-hidden": "true" })])])
4544
4555
  ])) : c("", !0);
4545
4556
  }
4546
4557
  }), [["__scopeId", "data-v-1318cd28"]]), rs = {
@@ -4561,11 +4572,11 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4561
4572
  setup(e, { emit: t }) {
4562
4573
  let n = t;
4563
4574
  return (t, r) => (k(), l("div", rs, [
4564
- m(V(We), {
4575
+ m(B(We), {
4565
4576
  class: "chat-queued-prompt__icon",
4566
4577
  "aria-hidden": "true"
4567
4578
  }),
4568
- u("span", is, z(e.prompt.text), 1),
4579
+ u("span", is, R(e.prompt.text), 1),
4569
4580
  u("div", as, [
4570
4581
  u("button", {
4571
4582
  class: "chat-queued-prompt__action",
@@ -4574,7 +4585,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4574
4585
  title: "Steer now",
4575
4586
  disabled: e.steerDisabled,
4576
4587
  onClick: r[0] ||= (t) => n("steer", e.prompt.id)
4577
- }, [m(V(He), { "aria-hidden": "true" }), r[3] ||= u("span", null, "Steer", -1)], 8, os),
4588
+ }, [m(B(He), { "aria-hidden": "true" }), r[3] ||= u("span", null, "Steer", -1)], 8, os),
4578
4589
  u("button", {
4579
4590
  class: "chat-queued-prompt__action",
4580
4591
  type: "button",
@@ -4582,14 +4593,14 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4582
4593
  title: "Edit",
4583
4594
  disabled: e.editDisabled,
4584
4595
  onClick: r[1] ||= (t) => n("edit", e.prompt.id)
4585
- }, [m(V(Oe), { "aria-hidden": "true" })], 8, ss),
4596
+ }, [m(B(Y), { "aria-hidden": "true" })], 8, ss),
4586
4597
  u("button", {
4587
4598
  class: "chat-queued-prompt__action",
4588
4599
  type: "button",
4589
4600
  "aria-label": "Delete queued prompt",
4590
4601
  title: "Delete",
4591
4602
  onClick: r[2] ||= (t) => n("delete", e.prompt.id)
4592
- }, [m(V(qe), { "aria-hidden": "true" })])
4603
+ }, [m(B(qe), { "aria-hidden": "true" })])
4593
4604
  ])
4594
4605
  ]));
4595
4606
  }
@@ -4667,7 +4678,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
4667
4678
  "steerQueuedPrompt"
4668
4679
  ],
4669
4680
  setup(n) {
4670
- let i = n, a = H(), u = o(() => i.presentation?.goal !== !1 && !!i.goal && i.goal?.status !== "complete"), d = o(() => i.presentation?.queuedPrompts !== !1 && i.queuedPrompts.length > 0), f = o(() => i.presentation?.turnGitDiff === !1 ? null : i.turnGitDiff ?? null), p = o(() => i.disabled ?? !1), m = o(() => g(a.actions?.({ disabled: p.value }))), h = o(() => u.value || d.value || !!f.value || m.value);
4681
+ let i = n, a = V(), u = o(() => i.presentation?.goal !== !1 && !!i.goal && i.goal?.status !== "complete"), d = o(() => i.presentation?.queuedPrompts !== !1 && i.queuedPrompts.length > 0), f = o(() => i.presentation?.turnGitDiff === !1 ? null : i.turnGitDiff ?? null), p = o(() => i.disabled ?? !1), m = o(() => g(a.actions?.({ disabled: p.value }))), h = o(() => u.value || d.value || !!f.value || m.value);
4671
4682
  function g(n) {
4672
4683
  return (Array.isArray(n) ? n : [n]).some((n) => {
4673
4684
  if (n == null || typeof n == "boolean") return !1;
@@ -4743,7 +4754,7 @@ var Ss = /*#__PURE__*/ X(/* @__PURE__ */ h({
4743
4754
  title: {}
4744
4755
  },
4745
4756
  setup(e) {
4746
- return (t, n) => (k(), s(L(e.href ? "a" : "button"), {
4757
+ return (t, n) => (k(), s(I(e.href ? "a" : "button"), {
4747
4758
  class: C(["codex-chat-theme chat-icon-button", {
4748
4759
  "chat-icon-button--bordered": e.bordered,
4749
4760
  "chat-icon-button--danger": e.danger,
@@ -4759,7 +4770,7 @@ var Ss = /*#__PURE__*/ X(/* @__PURE__ */ h({
4759
4770
  "aria-label": e.label,
4760
4771
  title: e.title || e.label
4761
4772
  }, {
4762
- default: G(() => [F(t.$slots, "default", {}, void 0, !0)]),
4773
+ default: W(() => [F(t.$slots, "default", {}, void 0, !0)]),
4763
4774
  _: 3
4764
4775
  }, 8, [
4765
4776
  "class",
@@ -4808,7 +4819,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
4808
4819
  mode: "light",
4809
4820
  style: {}
4810
4821
  });
4811
- W(() => r.open, (e) => {
4822
+ U(() => r.open, (e) => {
4812
4823
  e ? (a.value = ws(r.themeSource), window.addEventListener("keydown", o)) : window.removeEventListener("keydown", o);
4813
4824
  }, { immediate: !0 }), E(() => {
4814
4825
  window.removeEventListener("keydown", o);
@@ -4824,14 +4835,14 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
4824
4835
  role: "dialog",
4825
4836
  "aria-modal": "true",
4826
4837
  "aria-label": e.label,
4827
- onClick: r[1] ||= q((e) => i("close"), ["self"])
4838
+ onClick: r[1] ||= K((e) => i("close"), ["self"])
4828
4839
  }, [m(Ss, {
4829
4840
  bordered: "",
4830
4841
  class: "chat-image-lightbox__close chat-media-block__fullscreen-close",
4831
4842
  label: e.closeLabel,
4832
4843
  onClick: r[0] ||= (e) => i("close")
4833
4844
  }, {
4834
- default: G(() => [m(V(Ye))]),
4845
+ default: W(() => [m(B(Ye))]),
4835
4846
  _: 1
4836
4847
  }, 8, ["label"]), u("img", {
4837
4848
  class: "chat-image-lightbox__image chat-media-block__fullscreen-image",
@@ -4847,11 +4858,11 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
4847
4858
  },
4848
4859
  setup(e) {
4849
4860
  let t = e, n = Ti(), r = M(!1), i = M(), a = M(!1), c = M(null), d = o(() => t.attachment.kind === "image" && g(t.attachment.url) ? t.attachment.url : i.value), f = o(() => v(t.attachment.path) || _(t.attachment.url));
4850
- W(d, () => {
4861
+ U(d, () => {
4851
4862
  r.value = !1;
4852
4863
  });
4853
4864
  let p = 0;
4854
- W([
4865
+ U([
4855
4866
  () => t.attachment.kind,
4856
4867
  () => t.attachment.path,
4857
4868
  () => t.attachment.url
@@ -4920,19 +4931,19 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
4920
4931
  "open",
4921
4932
  "src",
4922
4933
  "theme-source"
4923
- ])], 8, Os)) : (k(), s(L(f.value ? "a" : "span"), {
4934
+ ])], 8, Os)) : (k(), s(I(f.value ? "a" : "span"), {
4924
4935
  key: 1,
4925
4936
  class: "codex-chat-theme chat-attachment-block chat-attachment-block--chip",
4926
4937
  href: f.value,
4927
4938
  title: e.attachment.path || e.attachment.url || e.attachment.name
4928
4939
  }, {
4929
- default: G(() => [e.attachment.kind === "image" ? (k(), s(V(ke), {
4940
+ default: W(() => [e.attachment.kind === "image" ? (k(), s(B(ke), {
4930
4941
  key: 0,
4931
4942
  "aria-hidden": "true"
4932
- })) : (k(), s(V(De), {
4943
+ })) : (k(), s(B(Oe), {
4933
4944
  key: 1,
4934
4945
  "aria-hidden": "true"
4935
- })), u("span", js, z(e.attachment.name), 1)]),
4946
+ })), u("span", js, R(e.attachment.name), 1)]),
4936
4947
  _: 1
4937
4948
  }, 8, ["href", "title"]));
4938
4949
  }
@@ -4951,7 +4962,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
4951
4962
  disabled: e.disabled,
4952
4963
  type: "button",
4953
4964
  onClick: (e) => r("send-follow-up", t)
4954
- }, z(t), 9, Ps))), 128))]));
4965
+ }, R(t), 9, Ps))), 128))]));
4955
4966
  }
4956
4967
  }), [["__scopeId", "data-v-97d3281c"]]), Is = /* @__PURE__ */ h({
4957
4968
  __name: "ChatCopyButton",
@@ -4975,7 +4986,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
4975
4986
  label: n.value ? e.copiedLabel : e.label,
4976
4987
  onClick: i
4977
4988
  }, {
4978
- default: G(() => [n.value ? (k(), s(V(se), { key: 0 })) : (k(), s(V(pe), { key: 1 }))]),
4989
+ default: W(() => [n.value ? (k(), s(B(le), { key: 0 })) : (k(), s(B(he), { key: 1 }))]),
4979
4990
  _: 1
4980
4991
  }, 8, ["disabled", "label"]));
4981
4992
  }
@@ -4995,8 +5006,8 @@ function Bs(e) {
4995
5006
  return /^(?:https?:|blob:|data:image\/(?:avif|bmp|gif|heic|heif|jpe?g|png|webp);base64,)/i.test(e);
4996
5007
  }
4997
5008
  function Vs(e) {
4998
- let t = Ti(), n = R();
4999
- return W(e, async (e, r, i) => {
5009
+ let t = Ti(), n = L();
5010
+ return U(e, async (e, r, i) => {
5000
5011
  let a = !0;
5001
5012
  if (i(() => {
5002
5013
  a = !1;
@@ -5066,14 +5077,14 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
5066
5077
  }, [u("img", {
5067
5078
  class: "chat-media-block__image",
5068
5079
  alt: e.media.alt || $s,
5069
- src: V(r)
5080
+ src: B(r)
5070
5081
  }, null, 8, Us)], 8, Hs),
5071
- u("figcaption", Ws, [u("span", Gs, z(e.media.title || ec), 1), u("span", Ks, [
5082
+ u("figcaption", Ws, [u("span", Gs, R(e.media.title || ec), 1), u("span", Ks, [
5072
5083
  m(Ss, {
5073
5084
  label: Qs,
5074
5085
  onClick: o[1] ||= (e) => p("fullscreen")
5075
5086
  }, {
5076
- default: G(() => [m(V(we))]),
5087
+ default: W(() => [m(B(Te))]),
5077
5088
  _: 1
5078
5089
  }),
5079
5090
  m(Is, {
@@ -5083,11 +5094,11 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
5083
5094
  }),
5084
5095
  m(Ss, {
5085
5096
  download: f.value,
5086
- href: V(r),
5097
+ href: B(r),
5087
5098
  label: Ys,
5088
- onClick: o[2] ||= q(() => {}, ["stop"])
5099
+ onClick: o[2] ||= K(() => {}, ["stop"])
5089
5100
  }, {
5090
- default: G(() => [m(V(me))]),
5101
+ default: W(() => [m(B(ge))]),
5091
5102
  _: 1
5092
5103
  }, 8, ["download", "href"]),
5093
5104
  e.media.prompt ? (k(), s(Ss, {
@@ -5095,7 +5106,7 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
5095
5106
  label: tc,
5096
5107
  onClick: _
5097
5108
  }, {
5098
- default: G(() => [m(V(be))]),
5109
+ default: W(() => [m(B(J))]),
5099
5110
  _: 1
5100
5111
  })) : c("", !0)
5101
5112
  ])]),
@@ -5103,14 +5114,14 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
5103
5114
  key: 0,
5104
5115
  open: i.value
5105
5116
  }, {
5106
- default: G(() => [u("div", qs, [u("div", { class: "chat-media-block__details-title" }, z(tc)), u("p", Js, z(e.media.prompt), 1)])]),
5117
+ default: W(() => [u("div", qs, [u("div", { class: "chat-media-block__details-title" }, R(tc)), u("p", Js, R(e.media.prompt), 1)])]),
5107
5118
  _: 1
5108
5119
  }, 8, ["open"])) : c("", !0),
5109
5120
  m(Ds, {
5110
5121
  alt: e.media.alt || $s,
5111
5122
  label: e.media.title || ec,
5112
5123
  open: a.value,
5113
- src: V(r) || e.media.url,
5124
+ src: B(r) || e.media.url,
5114
5125
  "theme-source": d.value,
5115
5126
  onClose: h
5116
5127
  }, null, 8, [
@@ -5175,7 +5186,7 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
5175
5186
  function b(e) {
5176
5187
  e.key === "Escape" && y();
5177
5188
  }
5178
- return W(r, (e) => {
5189
+ return U(r, (e) => {
5179
5190
  e ? window.addEventListener("keydown", b) : window.removeEventListener("keydown", b);
5180
5191
  }), E(() => {
5181
5192
  window.removeEventListener("keydown", b);
@@ -5189,21 +5200,21 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
5189
5200
  label: h.value,
5190
5201
  onClick: _
5191
5202
  }, {
5192
- default: G(() => [i.value ? (k(), s(V(ge), { key: 0 })) : (k(), s(V(fe), { key: 1 }))]),
5203
+ default: W(() => [i.value ? (k(), s(B(ve), { key: 0 })) : (k(), s(B(me), { key: 1 }))]),
5193
5204
  _: 1
5194
5205
  }, 8, ["label"]), m(Ss, {
5195
5206
  bordered: "",
5196
5207
  label: mc,
5197
5208
  onClick: v
5198
5209
  }, {
5199
- default: G(() => [m(V(we))]),
5210
+ default: W(() => [m(B(Te))]),
5200
5211
  _: 1
5201
5212
  })]),
5202
- i.value ? (k(), l("pre", ic, [u("code", null, z(t.code), 1)])) : g.value.svg ? (k(), l("div", {
5213
+ i.value ? (k(), l("pre", ic, [u("code", null, R(t.code), 1)])) : g.value.svg ? (k(), l("div", {
5203
5214
  key: 1,
5204
5215
  class: "chat-mermaid-block__diagram",
5205
5216
  innerHTML: g.value.svg
5206
- }, null, 8, ac)) : (k(), l("pre", oc, [u("code", null, z(g.value.error), 1)])),
5217
+ }, null, 8, ac)) : (k(), l("pre", oc, [u("code", null, R(g.value.error), 1)])),
5207
5218
  (k(), s(n, { to: "body" }, [r.value ? (k(), l("div", {
5208
5219
  key: 0,
5209
5220
  class: "codex-chat-theme chat-mermaid-block__fullscreen",
@@ -5212,26 +5223,26 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
5212
5223
  role: "dialog",
5213
5224
  "aria-modal": "true",
5214
5225
  "aria-label": mc,
5215
- onClick: q(y, ["self"])
5226
+ onClick: K(y, ["self"])
5216
5227
  }, [u("div", cc, [u("div", lc, [m(Ss, {
5217
5228
  bordered: "",
5218
5229
  label: h.value,
5219
5230
  onClick: _
5220
5231
  }, {
5221
- default: G(() => [i.value ? (k(), s(V(ge), { key: 0 })) : (k(), s(V(fe), { key: 1 }))]),
5232
+ default: W(() => [i.value ? (k(), s(B(ve), { key: 0 })) : (k(), s(B(me), { key: 1 }))]),
5222
5233
  _: 1
5223
5234
  }, 8, ["label"]), m(Ss, {
5224
5235
  bordered: "",
5225
5236
  label: pc,
5226
5237
  onClick: y
5227
5238
  }, {
5228
- default: G(() => [m(V(Ye))]),
5239
+ default: W(() => [m(B(Ye))]),
5229
5240
  _: 1
5230
- })]), i.value ? (k(), l("pre", uc, [u("code", null, z(t.code), 1)])) : g.value.svg ? (k(), l("div", {
5241
+ })]), i.value ? (k(), l("pre", uc, [u("code", null, R(t.code), 1)])) : g.value.svg ? (k(), l("div", {
5231
5242
  key: 1,
5232
5243
  class: "chat-mermaid-block__diagram chat-mermaid-block__diagram--fullscreen",
5233
5244
  innerHTML: g.value.svg
5234
- }, null, 8, dc)) : (k(), l("pre", fc, [u("code", null, z(g.value.error), 1)]))])], 12, sc)) : c("", !0)]))
5245
+ }, null, 8, dc)) : (k(), l("pre", fc, [u("code", null, R(g.value.error), 1)]))])], 12, sc)) : c("", !0)]))
5235
5246
  ], 512));
5236
5247
  }
5237
5248
  }), [["__scopeId", "data-v-2356f49d"]]);
@@ -5583,42 +5594,42 @@ var Qc = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
5583
5594
  URL.revokeObjectURL(e), g.delete(e);
5584
5595
  }, 1e3));
5585
5596
  }
5586
- return W(() => [t.source, t.complete], v), D(() => window.addEventListener("message", y)), E(() => {
5597
+ return U(() => [t.source, t.complete], v), D(() => window.addEventListener("message", y)), E(() => {
5587
5598
  window.removeEventListener("message", y), _();
5588
5599
  for (let [e, t] of g) clearTimeout(t), URL.revokeObjectURL(e);
5589
5600
  }), (t, r) => (k(), l("section", $c, [u("header", el, [
5590
- u("span", tl, z(e.title || V(n)("chat.html.title")), 1),
5591
- e.complete ? c("", !0) : (k(), l("span", nl, z(V(n)("chat.html.streaming")), 1)),
5601
+ u("span", tl, R(e.title || B(n)("chat.html.title")), 1),
5602
+ e.complete ? c("", !0) : (k(), l("span", nl, R(B(n)("chat.html.streaming")), 1)),
5592
5603
  u("div", rl, [
5593
5604
  m(Ss, {
5594
- label: V(n)(a.value ? "chat.html.preview" : "chat.html.source"),
5605
+ label: B(n)(a.value ? "chat.html.preview" : "chat.html.source"),
5595
5606
  onClick: r[0] ||= (e) => a.value = !a.value
5596
5607
  }, {
5597
- default: G(() => [a.value ? (k(), s(V(ge), { key: 0 })) : (k(), s(V(fe), { key: 1 }))]),
5608
+ default: W(() => [a.value ? (k(), s(B(ve), { key: 0 })) : (k(), s(B(me), { key: 1 }))]),
5598
5609
  _: 1
5599
5610
  }, 8, ["label"]),
5600
5611
  m(Is, {
5601
5612
  action: b,
5602
- label: V(n)("chat.code.copy"),
5603
- "copied-label": V(n)("chat.code.copied")
5613
+ label: B(n)("chat.code.copy"),
5614
+ "copied-label": B(n)("chat.code.copied")
5604
5615
  }, null, 8, ["label", "copied-label"]),
5605
5616
  m(Ss, {
5606
- label: V(n)("chat.html.download"),
5617
+ label: B(n)("chat.html.download"),
5607
5618
  onClick: x
5608
5619
  }, {
5609
- default: G(() => [m(V(me))]),
5620
+ default: W(() => [m(B(ge))]),
5610
5621
  _: 1
5611
5622
  }, 8, ["label"])
5612
5623
  ])
5613
- ]), u("div", il, [re((k(), l("iframe", {
5624
+ ]), u("div", il, [ie((k(), l("iframe", {
5614
5625
  key: o.value,
5615
5626
  ref_key: "frame",
5616
5627
  ref: i,
5617
- srcdoc: V(Qc),
5618
- title: e.title || V(n)("chat.html.title"),
5628
+ srcdoc: B(Qc),
5629
+ title: e.title || B(n)("chat.html.title"),
5619
5630
  sandbox: "allow-scripts",
5620
5631
  referrerpolicy: "no-referrer"
5621
- }, null, 8, al)), [[ne, !a.value]]), a.value ? (k(), l("pre", ol, [u("code", null, z(e.source), 1)])) : c("", !0)])]));
5632
+ }, null, 8, al)), [[re, !a.value]]), a.value ? (k(), l("pre", ol, [u("code", null, R(e.source), 1)])) : c("", !0)])]));
5622
5633
  }
5623
5634
  }), [["__scopeId", "data-v-f327ab9d"]]), cl = () => void 0, ll = Symbol("codex-app-sdk-tool-presentation");
5624
5635
  function ul(e) {
@@ -5635,7 +5646,7 @@ function pl(e) {
5635
5646
  }
5636
5647
  function ml() {
5637
5648
  let e = b(fl, !1);
5638
- return o(() => !!B(e));
5649
+ return o(() => !!z(e));
5639
5650
  }
5640
5651
  //#endregion
5641
5652
  //#region src/chat/ChatToolCall.vue?vue&type=script&setup=true&lang.ts
@@ -5736,7 +5747,7 @@ var hl = {
5736
5747
  "title-target-parts",
5737
5748
  "tool-call",
5738
5749
  "tool-presentation"
5739
- ]), e.expandable === !1 ? c("", !0) : (k(), s(L(d.value ? V(ue) : V(ce)), {
5750
+ ]), e.expandable === !1 ? c("", !0) : (k(), s(I(d.value ? B(fe) : B(ue)), {
5740
5751
  key: 0,
5741
5752
  class: "chat-tool-group__chevron",
5742
5753
  size: 15
@@ -5764,7 +5775,7 @@ var hl = {
5764
5775
  "title-target-parts",
5765
5776
  "tool-call",
5766
5777
  "tool-presentation"
5767
- ]), (k(), s(L(d.value ? V(ue) : V(ce)), {
5778
+ ]), (k(), s(I(d.value ? B(fe) : B(ue)), {
5768
5779
  class: "chat-tool-call__chevron",
5769
5780
  size: 15
5770
5781
  }))])) : (k(), l("div", gl, [m(So, {
@@ -5786,11 +5797,11 @@ var hl = {
5786
5797
  "title-target-parts",
5787
5798
  "tool-call",
5788
5799
  "tool-presentation"
5789
- ])])), e.headerless && D.value ? (k(), l("div", _l, [T.value ? (k(), l("div", vl, [n[5] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", yl, z(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", bl, [n[6] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", xl, z(A(e.toolCall.result)), 1)])) : c("", !0)])) : O.value ? (k(), s(Rs, {
5800
+ ])])), e.headerless && D.value ? (k(), l("div", _l, [T.value ? (k(), l("div", vl, [n[5] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", yl, R(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", bl, [n[6] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", xl, R(A(e.toolCall.result)), 1)])) : c("", !0)])) : O.value ? (k(), s(Rs, {
5790
5801
  key: 4,
5791
5802
  open: d.value
5792
5803
  }, {
5793
- default: G(() => [u("div", Sl, [T.value ? (k(), l("div", Cl, [n[7] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", wl, z(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", Tl, [n[8] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", El, z(A(e.toolCall.result)), 1)])) : c("", !0)])]),
5804
+ default: W(() => [u("div", Sl, [T.value ? (k(), l("div", Cl, [n[7] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", wl, R(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", Tl, [n[8] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", El, R(A(e.toolCall.result)), 1)])) : c("", !0)])]),
5794
5805
  _: 1
5795
5806
  }, 8, ["open"])) : c("", !0)], 2));
5796
5807
  }
@@ -5818,25 +5829,25 @@ var hl = {
5818
5829
  "open-link"
5819
5830
  ],
5820
5831
  setup(e, { emit: n }) {
5821
- let r = e, i = n, d = M(!1), f = M(/* @__PURE__ */ new Set()), p = /* @__PURE__ */ new Map(), h = new Set(r.toolCalls.filter(I).map((e) => e.id)), g = ml(), _ = o(() => r.showToolDetails ?? g.value), v = o(() => r.toolCalls.length === 1), y = o(() => {
5822
- if (!(!v.value || !r.toolCalls[0] || !te(r.toolCalls[0]))) return r.toolCalls[0];
5823
- }), b = o(() => r.toolCalls.filter((e) => !I(e))), x = o(() => !r.activityTitle && v.value && b.value.length === 1 ? r.toolCalls[0] : void 0), S = o(() => r.toolCalls.filter((e) => I(e) || !d.value && f.value.has(e.id) && x.value?.id !== e.id)), w = M(S.value.length > 0), T = o(() => Sn(r.toolCalls)), D = o(() => !!r.activityTitle || r.toolCalls.length > 1 || _.value && r.toolCalls.some(R)), O = o(() => {
5832
+ let r = e, i = n, d = M(!1), f = M(/* @__PURE__ */ new Set()), p = /* @__PURE__ */ new Map(), h = new Set(r.toolCalls.filter(te).map((e) => e.id)), g = ml(), _ = o(() => r.showToolDetails ?? g.value), v = o(() => r.toolCalls.length === 1), y = o(() => {
5833
+ if (!(!v.value || !r.toolCalls[0] || !ne(r.toolCalls[0]))) return r.toolCalls[0];
5834
+ }), b = o(() => r.toolCalls.filter((e) => !te(e))), x = o(() => !r.activityTitle && v.value && b.value.length === 1 ? r.toolCalls[0] : void 0), S = o(() => r.toolCalls.filter((e) => te(e) || !d.value && f.value.has(e.id) && x.value?.id !== e.id)), w = M(S.value.length > 0), T = o(() => Sn(r.toolCalls)), D = o(() => !!r.activityTitle || r.toolCalls.length > 1 || _.value && r.toolCalls.some(L)), O = o(() => {
5824
5835
  if (b.value.length > 0) {
5825
5836
  let e = `${A(b.value.length)} done`;
5826
5837
  return r.activityTitle ? `${r.activityTitle} · ${e}` : e;
5827
5838
  }
5828
5839
  return r.activityTitle ?? "No actions";
5829
5840
  });
5830
- W(() => r.toolCalls.map((e) => ({
5841
+ U(() => r.toolCalls.map((e) => ({
5831
5842
  id: e.id,
5832
- active: I(e)
5843
+ active: te(e)
5833
5844
  })), (e) => {
5834
5845
  let t = new Set(e.map((e) => e.id)), n = new Set(e.filter((e) => e.active).map((e) => e.id));
5835
5846
  for (let e of h) !n.has(e) && t.has(e) && j(e);
5836
5847
  for (let e of n) N(e);
5837
5848
  for (let e of f.value) t.has(e) || N(e);
5838
5849
  h = n;
5839
- }, { flush: "sync" }), W([
5850
+ }, { flush: "sync" }), U([
5840
5851
  () => S.value.length,
5841
5852
  d,
5842
5853
  () => x.value?.id
@@ -5864,14 +5875,14 @@ var hl = {
5864
5875
  function F() {
5865
5876
  S.value.length === 0 && (w.value = !1);
5866
5877
  }
5867
- function I(e) {
5878
+ function te(e) {
5868
5879
  return !e.done && e.state !== "completed";
5869
5880
  }
5870
- function te(e) {
5881
+ function ne(e) {
5871
5882
  let t = Q(e.status);
5872
5883
  return (t?.source === "mcp" || t?.source === "home") && typeof t.params?.requestId == "string" && e.state === "running";
5873
5884
  }
5874
- function R(e) {
5885
+ function L(e) {
5875
5886
  return yn(e) !== void 0 || e.result !== void 0 && e.result !== null;
5876
5887
  }
5877
5888
  return (n, o) => y.value ? (k(), s(Dl, {
@@ -5882,13 +5893,13 @@ var hl = {
5882
5893
  onClientResponse: o[1] ||= (e) => i("client-response", e),
5883
5894
  onOpenLink: o[2] ||= (e) => i("open-link", e)
5884
5895
  }, null, 8, ["answered-client-request-ids", "tool-call"])) : (k(), l("section", Ol, [
5885
- r.toolCalls.length === 0 || x.value || b.value.length > 0 ? (k(), s(L(D.value ? "button" : "div"), {
5896
+ r.toolCalls.length === 0 || x.value || b.value.length > 0 ? (k(), s(I(D.value ? "button" : "div"), {
5886
5897
  key: 0,
5887
5898
  class: C(["chat-tool-group__header", { "chat-tool-group__header--static": !D.value }]),
5888
5899
  type: D.value ? "button" : void 0,
5889
5900
  onClick: ee
5890
5901
  }, {
5891
- default: G(() => [x.value ? (k(), s(Dl, {
5902
+ default: W(() => [x.value ? (k(), s(Dl, {
5892
5903
  key: 0,
5893
5904
  class: "chat-tool-group__active",
5894
5905
  "summary-only": "",
@@ -5908,7 +5919,7 @@ var hl = {
5908
5919
  u("span", {
5909
5920
  class: "chat-tool-group__title",
5910
5921
  "data-label": O.value
5911
- }, z(O.value), 9, kl),
5922
+ }, R(O.value), 9, kl),
5912
5923
  T.value ? (k(), l("span", Al, [T.value.addedLines ? (k(), s(co, {
5913
5924
  key: 0,
5914
5925
  kind: "added",
@@ -5920,7 +5931,7 @@ var hl = {
5920
5931
  label: "Total removed lines",
5921
5932
  value: T.value.removedLines
5922
5933
  }, null, 8, ["value"])) : c("", !0)])) : c("", !0),
5923
- D.value ? (k(), s(L(d.value ? V(ue) : V(ce)), {
5934
+ D.value ? (k(), s(I(d.value ? B(fe) : B(ue)), {
5924
5935
  key: 1,
5925
5936
  class: "chat-tool-group__chevron",
5926
5937
  size: 15
@@ -5929,7 +5940,7 @@ var hl = {
5929
5940
  _: 1
5930
5941
  }, 8, ["class", "type"])) : c("", !0),
5931
5942
  m(Rs, { open: d.value }, {
5932
- default: G(() => [u("div", jl, [(k(!0), l(t, null, P(b.value, (t) => (k(), s(Dl, {
5943
+ default: W(() => [u("div", jl, [(k(!0), l(t, null, P(b.value, (t) => (k(), s(Dl, {
5933
5944
  key: t.id,
5934
5945
  "answered-client-request-ids": e.answeredClientRequestIds,
5935
5946
  headerless: v.value,
@@ -5954,7 +5965,7 @@ var hl = {
5954
5965
  "aria-live": "polite",
5955
5966
  onAfterLeave: F
5956
5967
  }, {
5957
- default: G(() => [(k(!0), l(t, null, P(S.value, (t) => (k(), l("div", {
5968
+ default: W(() => [(k(!0), l(t, null, P(S.value, (t) => (k(), l("div", {
5958
5969
  key: t.id,
5959
5970
  class: "chat-tool-group__running-item"
5960
5971
  }, [u("div", Ml, [m(Dl, {
@@ -6133,7 +6144,7 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6133
6144
  function h(e) {
6134
6145
  return !!(e && /^#[\da-f]{3,8}$/i.test(e));
6135
6146
  }
6136
- return (e, n) => (k(), l("div", Wl, [u("p", null, [(k(!0), l(t, null, P(i.value, (i, o) => (k(), l(t, { key: `${i.type}-${o}` }, [i.type === "text" ? (k(), l("span", Gl, z(i.text), 1)) : i.type === "code" ? (k(), l("code", Kl, z(i.text), 1)) : i.type === "line-break" ? (k(), l("br", ql)) : i.type === "custom-mention" ? F(e.$slots, "mention", {
6147
+ return (e, n) => (k(), l("div", Wl, [u("p", null, [(k(!0), l(t, null, P(i.value, (i, o) => (k(), l(t, { key: `${i.type}-${o}` }, [i.type === "text" ? (k(), l("span", Gl, R(i.text), 1)) : i.type === "code" ? (k(), l("code", Kl, R(i.text), 1)) : i.type === "line-break" ? (k(), l("br", ql)) : i.type === "custom-mention" ? F(e.$slots, "mention", {
6137
6148
  group: i.group,
6138
6149
  item: i.item,
6139
6150
  token: i,
@@ -6141,10 +6152,10 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6141
6152
  }, () => [u("span", {
6142
6153
  class: "chat-user-text__mention chat-user-text__mention--custom",
6143
6154
  title: i.item.description || i.displayName
6144
- }, [m(V(Le), {
6155
+ }, [m(B(Le), {
6145
6156
  class: "chat-user-text__mention-icon",
6146
6157
  "aria-hidden": "true"
6147
- }), u("span", Yl, z(i.displayName), 1)], 8, Jl)], !0, 3) : (k(), l("span", {
6158
+ }), u("span", Yl, R(i.displayName), 1)], 8, Jl)], !0, 3) : (k(), l("span", {
6148
6159
  key: 4,
6149
6160
  class: C(["chat-user-text__mention", `chat-user-text__mention--${i.type === "plugin-mention" ? "plugin" : "skill"}`]),
6150
6161
  style: T(d(i)),
@@ -6175,12 +6186,12 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6175
6186
  referrerpolicy: "no-referrer",
6176
6187
  onError: (e) => r.add(a(i, "dark"))
6177
6188
  }, null, 40, Ql)) : c("", !0),
6178
- i.type === "plugin-mention" ? (k(), l("svg", $l, [...n[0] ||= [f("<path d=\"M8 3v4\" data-v-cd57e1c4></path><path d=\"M16 3v4\" data-v-cd57e1c4></path><path d=\"M6 7h12v3a6 6 0 0 1-12 0V7\" data-v-cd57e1c4></path><path d=\"M12 16v5\" data-v-cd57e1c4></path><path d=\"M9 21h6\" data-v-cd57e1c4></path>", 5)]])) : (k(), s(V(Le), {
6189
+ i.type === "plugin-mention" ? (k(), l("svg", $l, [...n[0] ||= [f("<path d=\"M8 3v4\" data-v-cd57e1c4></path><path d=\"M16 3v4\" data-v-cd57e1c4></path><path d=\"M6 7h12v3a6 6 0 0 1-12 0V7\" data-v-cd57e1c4></path><path d=\"M12 16v5\" data-v-cd57e1c4></path><path d=\"M9 21h6\" data-v-cd57e1c4></path>", 5)]])) : (k(), s(B(Le), {
6179
6190
  key: 3,
6180
6191
  class: "chat-user-text__mention-icon",
6181
6192
  "aria-hidden": "true"
6182
6193
  }))
6183
- ], 2), u("span", eu, z(i.displayName), 1)], 14, Xl))], 64))), 128))])]));
6194
+ ], 2), u("span", eu, R(i.displayName), 1)], 14, Xl))], 64))), 128))])]));
6184
6195
  }
6185
6196
  }), [["__scopeId", "data-v-cd57e1c4"]]), nu = {
6186
6197
  key: 1,
@@ -6206,15 +6217,25 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6206
6217
  type: "button",
6207
6218
  onClick: i
6208
6219
  }, [
6209
- m(V(xe), { class: "chat-visualization-block__icon" }),
6210
- u("span", null, z(e.title), 1),
6211
- m(V(he), { class: "chat-visualization-block__open" })
6212
- ])) : (k(), l("div", nu, [m(V(xe), { class: "chat-visualization-block__icon" }), u("span", null, z(e.title), 1)]));
6220
+ m(B(Se), { class: "chat-visualization-block__icon" }),
6221
+ u("span", null, R(e.title), 1),
6222
+ m(B(_e), { class: "chat-visualization-block__open" })
6223
+ ])) : (k(), l("div", nu, [m(B(Se), { class: "chat-visualization-block__icon" }), u("span", null, R(e.title), 1)]));
6213
6224
  }
6214
- }), [["__scopeId", "data-v-6aa2f6f0"]]), iu = ["aria-expanded", "disabled"], au = ["data-label"], ou = { class: "chat-work-group__body" }, su = {
6225
+ }), [["__scopeId", "data-v-6aa2f6f0"]]);
6226
+ //#endregion
6227
+ //#region src/chat/work-duration.ts
6228
+ function iu(e) {
6229
+ if (e == null || !Number.isFinite(e) || e < 1e3) return "";
6230
+ let t = Math.floor(e / 1e3), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
6231
+ return n > 0 ? r > 0 ? `${n}h ${r}m` : `${n}h` : r > 0 ? i > 0 ? `${r}m ${i}s` : `${r}m` : `${i}s`;
6232
+ }
6233
+ //#endregion
6234
+ //#region src/chat/ChatWorkGroup.vue?vue&type=script&setup=true&lang.ts
6235
+ var au = ["aria-expanded", "disabled"], ou = ["data-label"], su = { class: "chat-work-group__body" }, cu = {
6215
6236
  key: 2,
6216
6237
  class: "chat-work-group__body chat-work-group__body--continuation"
6217
- }, cu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6238
+ }, lu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6218
6239
  __name: "ChatWorkGroup",
6219
6240
  props: {
6220
6241
  active: { type: Boolean },
@@ -6222,13 +6243,29 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6222
6243
  finalStarted: { type: Boolean }
6223
6244
  },
6224
6245
  setup(e) {
6225
- let t = e, n = Wn(), r = b(ro, void 0), i = b(io, void 0), a = o(() => r?.enabled.value === !0 && i !== void 0), d = o(() => a.value ? r.completedWithoutFinal.value : !t.active && !t.finalStarted), f = M(t.active && !t.finalStarted), p = M(!1), m = o(() => a.value ? r.active.value : t.active && !t.finalStarted), h = o(() => m.value || d.value ? !0 : a.value ? r.expanded.value : f.value), g = o(() => !t.continuation && !d.value && (!a.value || r.headerMessageIndex.value === i.value)), _ = o(() => m.value ? n("chat.work.working") : r?.status.value === "interrupted" ? n(h.value ? "chat.work.stoppedHideDetails" : "chat.work.stoppedViewDetails") : r?.status.value === "failed" ? n(h.value ? "chat.work.failedHideDetails" : "chat.work.failedViewDetails") : n(h.value ? "chat.work.doneHideDetails" : "chat.work.doneViewDetails"));
6226
- W(() => t.finalStarted, (e, t) => {
6246
+ let t = e, n = Wn(), r = b(ro, void 0), i = b(io, void 0), a = o(() => r?.enabled.value === !0 && i !== void 0), d = o(() => a.value ? r.completedWithoutFinal.value : !t.active && !t.finalStarted), f = M(t.active && !t.finalStarted), p = M(!1), m = o(() => a.value ? r.active.value : t.active && !t.finalStarted), h = o(() => m.value || d.value ? !0 : a.value ? r.expanded.value : f.value), g = o(() => !t.continuation && !d.value && (!a.value || r.headerMessageIndex.value === i.value)), _ = M(Date.now()), v;
6247
+ U(m, (e) => {
6248
+ clearInterval(v), v = void 0, e && (_.value = Date.now(), v = setInterval(() => {
6249
+ _.value = Date.now();
6250
+ }, 1e3));
6251
+ }, { immediate: !0 }), O(() => clearInterval(v));
6252
+ let y = o(() => {
6253
+ if (!a.value) return "";
6254
+ if (!m.value) return iu(r.durationMs?.value);
6255
+ let e = r.startedAt?.value;
6256
+ return e ? iu(_.value - Date.parse(e)) : "";
6257
+ }), x = o(() => {
6258
+ let e = { duration: y.value }, t = y.value !== "", i = m.value ? "working" : r?.status.value === "interrupted" ? "stopped" : r?.status.value === "failed" ? "failed" : "done";
6259
+ if (i === "working") return n(t ? "chat.work.workingFor" : "chat.work.working", e);
6260
+ let a = h.value ? "HideDetails" : "ViewDetails";
6261
+ return n(`chat.work.${i}${a}${t ? "For" : ""}`, e);
6262
+ });
6263
+ U(() => t.finalStarted, (e, t) => {
6227
6264
  !a.value && e && !t && (f.value = !1);
6228
- }), W(() => t.active, (e) => {
6265
+ }), U(() => t.active, (e) => {
6229
6266
  !a.value && !p.value && (f.value = e && !t.finalStarted);
6230
6267
  });
6231
- function v() {
6268
+ function S() {
6232
6269
  if (!m.value) {
6233
6270
  if (a.value) {
6234
6271
  r.toggle();
@@ -6246,22 +6283,22 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6246
6283
  class: "chat-work-group__header",
6247
6284
  "aria-expanded": h.value,
6248
6285
  disabled: m.value,
6249
- onClick: v
6286
+ onClick: S
6250
6287
  }, [u("span", {
6251
6288
  class: C(["chat-work-group__title", { "codex-text-shimmer": m.value }]),
6252
- "data-label": _.value
6253
- }, z(_.value), 11, au), m.value ? c("", !0) : (k(), s(L(h.value ? V(ce) : V(le)), {
6289
+ "data-label": x.value
6290
+ }, R(x.value), 11, ou), m.value ? c("", !0) : (k(), s(I(h.value ? B(ue) : B(de)), {
6254
6291
  key: 0,
6255
6292
  size: 15
6256
- }))], 8, iu)) : c("", !0), g.value ? (k(), s(Rs, {
6293
+ }))], 8, au)) : c("", !0), g.value ? (k(), s(Rs, {
6257
6294
  key: 1,
6258
6295
  open: h.value
6259
6296
  }, {
6260
- default: G(() => [u("div", ou, [F(e.$slots, "default", {}, void 0, !0)])]),
6297
+ default: W(() => [u("div", su, [F(e.$slots, "default", {}, void 0, !0)])]),
6261
6298
  _: 3
6262
- }, 8, ["open"])) : (k(), l("div", su, [F(e.$slots, "default", {}, void 0, !0)]))], 2)) : c("", !0);
6299
+ }, 8, ["open"])) : (k(), l("div", cu, [F(e.$slots, "default", {}, void 0, !0)]))], 2)) : c("", !0);
6263
6300
  }
6264
- }), [["__scopeId", "data-v-a9b546fe"]]), lu = ["innerHTML"], uu = ["innerHTML"], du = /*#__PURE__*/ X(/* @__PURE__ */ h({
6301
+ }), [["__scopeId", "data-v-0c35c769"]]), uu = ["innerHTML"], du = ["innerHTML"], fu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6265
6302
  __name: "ChatMessageBlock",
6266
6303
  props: {
6267
6304
  block: {},
@@ -6300,7 +6337,7 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6300
6337
  for (let e of h.values()) clearTimeout(e);
6301
6338
  h.clear();
6302
6339
  }), (n, r) => {
6303
- let a = I("ChatMessageBlock", !0);
6340
+ let a = te("ChatMessageBlock", !0);
6304
6341
  return e.block.type === "user-text" ? F(n.$slots, "text", {
6305
6342
  block: e.block,
6306
6343
  content: e.block.content
@@ -6312,7 +6349,7 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6312
6349
  skills: e.skills
6313
6350
  }, d({ _: 2 }, [n.$slots.mention ? {
6314
6351
  name: "mention",
6315
- fn: G((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
6352
+ fn: W((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
6316
6353
  key: "0"
6317
6354
  } : void 0]), 1032, [
6318
6355
  "content",
@@ -6327,12 +6364,12 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6327
6364
  class: "codex-chat-theme chat-message-block chat-message-block--text codex-markdown",
6328
6365
  innerHTML: p.value,
6329
6366
  onClick: g
6330
- }, null, 8, lu)], !0, 1) : e.block.type === "reasoning" ? (k(), l("div", {
6367
+ }, null, 8, uu)], !0, 1) : e.block.type === "reasoning" ? (k(), l("div", {
6331
6368
  key: 2,
6332
6369
  class: "codex-chat-theme chat-message-block chat-message-block--reasoning codex-markdown",
6333
6370
  innerHTML: p.value,
6334
6371
  onClick: g
6335
- }, null, 8, uu)) : e.block.type === "html" ? (k(), s(sl, {
6372
+ }, null, 8, du)) : e.block.type === "html" ? (k(), s(sl, {
6336
6373
  key: 3,
6337
6374
  source: e.block.source,
6338
6375
  title: e.block.title,
@@ -6400,13 +6437,13 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6400
6437
  "answered-client-request-ids",
6401
6438
  "show-tool-details",
6402
6439
  "tool-calls"
6403
- ])], !0, 10) : e.block.type === "work-group" ? (k(), s(cu, {
6440
+ ])], !0, 10) : e.block.type === "work-group" ? (k(), s(lu, {
6404
6441
  key: 11,
6405
6442
  active: e.block.active,
6406
6443
  continuation: e.block.continuation,
6407
6444
  "final-started": e.block.finalStarted
6408
6445
  }, {
6409
- default: G(() => [(k(!0), l(t, null, P(e.block.blocks, (t, o) => F(n.$slots, "block", {
6446
+ default: W(() => [(k(!0), l(t, null, P(e.block.blocks, (t, o) => F(n.$slots, "block", {
6410
6447
  block: t,
6411
6448
  blockIndex: o
6412
6449
  }, () => [m(a, {
@@ -6426,17 +6463,17 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6426
6463
  }, d({ _: 2 }, [
6427
6464
  n.$slots.block ? {
6428
6465
  name: "block",
6429
- fn: G((e) => [F(n.$slots, "block", x({ ref_for: !0 }, e), void 0, !0)]),
6466
+ fn: W((e) => [F(n.$slots, "block", x({ ref_for: !0 }, e), void 0, !0)]),
6430
6467
  key: "0"
6431
6468
  } : void 0,
6432
6469
  n.$slots.text ? {
6433
6470
  name: "text",
6434
- fn: G((e) => [F(n.$slots, "text", x({ ref_for: !0 }, e), void 0, !0)]),
6471
+ fn: W((e) => [F(n.$slots, "text", x({ ref_for: !0 }, e), void 0, !0)]),
6435
6472
  key: "1"
6436
6473
  } : void 0,
6437
6474
  n.$slots.tool ? {
6438
6475
  name: "tool",
6439
- fn: G((e) => [F(n.$slots, "tool", x({ ref_for: !0 }, e), void 0, !0)]),
6476
+ fn: W((e) => [F(n.$slots, "tool", x({ ref_for: !0 }, e), void 0, !0)]),
6440
6477
  key: "2"
6441
6478
  } : void 0
6442
6479
  ]), 1032, [
@@ -6462,15 +6499,15 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
6462
6499
  }, null, 8, ["disabled", "prompts"])) : c("", !0);
6463
6500
  };
6464
6501
  }
6465
- }), [["__scopeId", "data-v-9351ce41"]]), fu = 1440 * 60 * 1e3;
6466
- function pu(e, t = /* @__PURE__ */ new Date()) {
6502
+ }), [["__scopeId", "data-v-9351ce41"]]), pu = 1440 * 60 * 1e3;
6503
+ function mu(e, t = /* @__PURE__ */ new Date()) {
6467
6504
  let n = new Date(e);
6468
6505
  if (Number.isNaN(n.getTime())) return "";
6469
6506
  let r = {
6470
6507
  hour: "numeric",
6471
6508
  minute: "2-digit"
6472
6509
  };
6473
- return hu(n, t) ? new Intl.DateTimeFormat(void 0, r).format(n) : n.getTime() < t.getTime() && t.getTime() - n.getTime() < 7 * fu ? new Intl.DateTimeFormat(void 0, {
6510
+ return gu(n, t) ? new Intl.DateTimeFormat(void 0, r).format(n) : n.getTime() < t.getTime() && t.getTime() - n.getTime() < 7 * pu ? new Intl.DateTimeFormat(void 0, {
6474
6511
  weekday: "short",
6475
6512
  ...r
6476
6513
  }).format(n) : new Intl.DateTimeFormat(void 0, {
@@ -6478,19 +6515,19 @@ function pu(e, t = /* @__PURE__ */ new Date()) {
6478
6515
  timeStyle: "short"
6479
6516
  }).format(n);
6480
6517
  }
6481
- function mu(e) {
6518
+ function hu(e) {
6482
6519
  let t = new Date(e);
6483
6520
  return Number.isNaN(t.getTime()) ? "" : new Intl.DateTimeFormat(void 0, {
6484
6521
  dateStyle: "full",
6485
6522
  timeStyle: "short"
6486
6523
  }).format(t);
6487
6524
  }
6488
- function hu(e, t) {
6525
+ function gu(e, t) {
6489
6526
  return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
6490
6527
  }
6491
6528
  //#endregion
6492
6529
  //#region src/chat/ChatMessageActions.vue?vue&type=script&setup=true&lang.ts
6493
- var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6530
+ var _u = ["aria-busy", "aria-label"], vu = ["title"], yu = ["title"], bu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6494
6531
  __name: "ChatMessageActions",
6495
6532
  props: {
6496
6533
  canDelete: {
@@ -6524,26 +6561,26 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6524
6561
  "retry"
6525
6562
  ],
6526
6563
  setup(e, { emit: t }) {
6527
- let n = e, r = t, i = Wn(), a = o(() => n.presentation?.copy !== !1), u = o(() => n.presentation?.delete !== !1), d = o(() => n.presentation?.edit !== !1), f = o(() => n.presentation?.fork !== !1), p = o(() => n.presentation?.quote !== !1), h = o(() => n.presentation?.retry !== !1), g = o(() => n.message.createdAt ? pu(n.message.createdAt) : ""), _ = o(() => n.message.createdAt ? mu(n.message.createdAt) : void 0);
6564
+ let n = e, r = t, i = Wn(), a = o(() => n.presentation?.copy !== !1), u = o(() => n.presentation?.delete !== !1), d = o(() => n.presentation?.edit !== !1), f = o(() => n.presentation?.fork !== !1), p = o(() => n.presentation?.quote !== !1), h = o(() => n.presentation?.retry !== !1), g = o(() => n.message.createdAt ? mu(n.message.createdAt) : ""), _ = o(() => n.message.createdAt ? hu(n.message.createdAt) : void 0);
6528
6565
  async function v() {
6529
6566
  await n.copyAction?.(), r("copy");
6530
6567
  }
6531
6568
  return (t, n) => (k(), l("div", {
6532
6569
  class: C(["codex-chat-theme chat-message-actions", `chat-message-actions--${e.message.role}`]),
6533
6570
  "aria-busy": e.deleting ? "true" : void 0,
6534
- "aria-label": V(i)("chat.actions.label")
6571
+ "aria-label": B(i)("chat.actions.label")
6535
6572
  }, [
6536
6573
  g.value && e.message.role === "user" ? (k(), l("span", {
6537
6574
  key: 0,
6538
6575
  class: "chat-message-actions__sent-at",
6539
6576
  title: _.value
6540
- }, z(g.value), 9, _u)) : c("", !0),
6577
+ }, R(g.value), 9, vu)) : c("", !0),
6541
6578
  a.value ? (k(), s(Is, {
6542
6579
  key: 1,
6543
6580
  action: v,
6544
- "copied-label": V(i)("chat.actions.copied"),
6581
+ "copied-label": B(i)("chat.actions.copied"),
6545
6582
  disabled: e.deleting,
6546
- label: V(i)("chat.actions.copy")
6583
+ label: B(i)("chat.actions.copy")
6547
6584
  }, null, 8, [
6548
6585
  "copied-label",
6549
6586
  "disabled",
@@ -6552,60 +6589,60 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6552
6589
  e.message.role === "user" && e.canEdit && d.value ? (k(), s(Ss, {
6553
6590
  key: 2,
6554
6591
  disabled: e.deleting,
6555
- label: V(i)("chat.actions.edit"),
6592
+ label: B(i)("chat.actions.edit"),
6556
6593
  onClick: n[0] ||= (e) => r("edit")
6557
6594
  }, {
6558
- default: G(() => [m(V(Oe))]),
6595
+ default: W(() => [m(B(Y))]),
6559
6596
  _: 1
6560
6597
  }, 8, ["disabled", "label"])) : c("", !0),
6561
6598
  e.message.role === "user" && p.value ? (k(), s(Ss, {
6562
6599
  key: 3,
6563
6600
  disabled: e.deleting,
6564
- label: V(i)("chat.actions.quote"),
6601
+ label: B(i)("chat.actions.quote"),
6565
6602
  onClick: n[1] ||= (e) => r("quote")
6566
6603
  }, {
6567
- default: G(() => [m(V(Ne))]),
6604
+ default: W(() => [m(B(Ne))]),
6568
6605
  _: 1
6569
6606
  }, 8, ["disabled", "label"])) : c("", !0),
6570
6607
  e.message.role === "assistant" && e.canRetry && h.value ? (k(), s(Ss, {
6571
6608
  key: 4,
6572
6609
  disabled: e.mutationDisabled || e.deleting,
6573
- label: V(i)("chat.actions.retry"),
6610
+ label: B(i)("chat.actions.retry"),
6574
6611
  onClick: n[2] ||= (e) => r("retry")
6575
6612
  }, {
6576
- default: G(() => [m(V(Pe))]),
6613
+ default: W(() => [m(B(Pe))]),
6577
6614
  _: 1
6578
6615
  }, 8, ["disabled", "label"])) : c("", !0),
6579
6616
  e.canFork && f.value ? (k(), s(Ss, {
6580
6617
  key: 5,
6581
6618
  disabled: e.mutationDisabled || e.deleting,
6582
- label: V(i)("chat.actions.fork"),
6619
+ label: B(i)("chat.actions.fork"),
6583
6620
  onClick: n[3] ||= (e) => r("fork")
6584
6621
  }, {
6585
- default: G(() => [m(V(Y), { class: "chat-message-actions__fork-icon" })]),
6622
+ default: W(() => [m(B(oe), { class: "chat-message-actions__fork-icon" })]),
6586
6623
  _: 1
6587
6624
  }, 8, ["disabled", "label"])) : c("", !0),
6588
6625
  e.canDelete && u.value ? (k(), s(Ss, {
6589
6626
  key: 6,
6590
6627
  danger: "",
6591
6628
  disabled: e.mutationDisabled || e.deleting,
6592
- label: e.deleting ? V(i)("chat.actions.deleting") : V(i)("chat.actions.delete"),
6629
+ label: e.deleting ? B(i)("chat.actions.deleting") : B(i)("chat.actions.delete"),
6593
6630
  onClick: n[4] ||= (e) => r("delete")
6594
6631
  }, {
6595
- default: G(() => [e.deleting ? (k(), s(V(Ce), {
6632
+ default: W(() => [e.deleting ? (k(), s(B(we), {
6596
6633
  key: 0,
6597
6634
  class: "chat-message-actions__spinner"
6598
- })) : (k(), s(V(qe), { key: 1 }))]),
6635
+ })) : (k(), s(B(qe), { key: 1 }))]),
6599
6636
  _: 1
6600
6637
  }, 8, ["disabled", "label"])) : c("", !0),
6601
6638
  g.value && e.message.role === "assistant" ? (k(), l("span", {
6602
6639
  key: 7,
6603
6640
  class: "chat-message-actions__sent-at",
6604
6641
  title: _.value
6605
- }, z(g.value), 9, vu)) : c("", !0)
6606
- ], 10, gu));
6642
+ }, R(g.value), 9, yu)) : c("", !0)
6643
+ ], 10, _u));
6607
6644
  }
6608
- }), [["__scopeId", "data-v-704b28cf"]]), bu = ["data-label"], xu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6645
+ }), [["__scopeId", "data-v-704b28cf"]]), xu = ["data-label"], Su = /*#__PURE__*/ X(/* @__PURE__ */ h({
6609
6646
  __name: "ChatCompactionMessage",
6610
6647
  props: {
6611
6648
  completedTitle: {},
@@ -6617,9 +6654,9 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6617
6654
  return (e, t) => (k(), l("div", { class: C(["codex-chat-theme chat-message chat-message--compaction", { "chat-message--compaction-running": n.value }]) }, [t[0] ||= u("div", { class: "chat-message__compaction-line" }, null, -1), u("span", {
6618
6655
  class: "chat-message__compaction-title",
6619
6656
  "data-label": r.value
6620
- }, [u("span", { class: C(["chat-message__compaction-label", { "codex-text-shimmer": n.value }]) }, z(r.value), 3)], 8, bu)], 2));
6657
+ }, [u("span", { class: C(["chat-message__compaction-label", { "codex-text-shimmer": n.value }]) }, R(r.value), 3)], 8, xu)], 2));
6621
6658
  }
6622
- }), [["__scopeId", "data-v-49449489"]]), Su = { class: "codex-chat-theme chat-message__edit-card" }, Cu = ["aria-label", "onKeydown"], wu = { class: "chat-message__edit-actions" }, Tu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6659
+ }), [["__scopeId", "data-v-49449489"]]), Cu = { class: "codex-chat-theme chat-message__edit-card" }, wu = ["aria-label", "onKeydown"], Tu = { class: "chat-message__edit-actions" }, Eu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6623
6660
  __name: "ChatMessageEditor",
6624
6661
  props: {
6625
6662
  cancelLabel: {},
@@ -6630,7 +6667,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6630
6667
  emits: ["cancel", "save"],
6631
6668
  setup(e, { emit: t }) {
6632
6669
  let n = e, r = t, i = M(n.content), a = M(null), o = null;
6633
- W(() => n.content, (e) => {
6670
+ U(() => n.content, (e) => {
6634
6671
  i.value = e;
6635
6672
  }), D(() => {
6636
6673
  o = requestAnimationFrame(() => {
@@ -6647,44 +6684,44 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6647
6684
  let e = i.value.trim();
6648
6685
  e && r("save", e);
6649
6686
  }
6650
- return (t, n) => (k(), l("div", Su, [re(u("textarea", {
6687
+ return (t, n) => (k(), l("div", Cu, [ie(u("textarea", {
6651
6688
  ref_key: "input",
6652
6689
  ref: a,
6653
6690
  "onUpdate:modelValue": n[0] ||= (e) => i.value = e,
6654
6691
  class: "chat-message__edit-input",
6655
6692
  "aria-label": e.inputLabel,
6656
6693
  onKeydown: [
6657
- K(q(s, ["prevent"]), ["escape"]),
6658
- K(q(c, ["meta", "prevent"]), ["enter"]),
6659
- K(q(c, ["ctrl", "prevent"]), ["enter"])
6694
+ G(K(s, ["prevent"]), ["escape"]),
6695
+ G(K(c, ["meta", "prevent"]), ["enter"]),
6696
+ G(K(c, ["ctrl", "prevent"]), ["enter"])
6660
6697
  ]
6661
- }, null, 40, Cu), [[U, i.value]]), u("div", wu, [u("button", {
6698
+ }, null, 40, wu), [[H, i.value]]), u("div", Tu, [u("button", {
6662
6699
  type: "button",
6663
6700
  class: "chat-message__edit-button",
6664
6701
  onClick: s
6665
- }, z(e.cancelLabel), 1), u("button", {
6702
+ }, R(e.cancelLabel), 1), u("button", {
6666
6703
  type: "button",
6667
6704
  class: "chat-message__edit-button chat-message__edit-button--primary",
6668
6705
  onClick: c
6669
- }, z(e.saveLabel), 1)])]));
6706
+ }, R(e.saveLabel), 1)])]));
6670
6707
  }
6671
- }), [["__scopeId", "data-v-181e3239"]]), Eu = { class: "chat-message__body" }, Du = {
6708
+ }), [["__scopeId", "data-v-181e3239"]]), Du = { class: "chat-message__body" }, Ou = {
6672
6709
  key: 0,
6673
6710
  class: "chat-message--steer chat-message--steer-above"
6674
- }, Ou = {
6711
+ }, ku = {
6675
6712
  key: 1,
6676
6713
  class: "chat-message__attachments",
6677
6714
  "aria-label": "Message attachments"
6678
- }, ku = {
6715
+ }, Au = {
6679
6716
  key: 2,
6680
6717
  class: "chat-message__stack"
6681
- }, Au = {
6718
+ }, ju = {
6682
6719
  key: 0,
6683
6720
  class: "chat-message__empty-response"
6684
- }, ju = ["data-label"], Mu = {
6721
+ }, Mu = ["data-label"], Nu = {
6685
6722
  key: 4,
6686
6723
  class: "chat-message--steer chat-message--steer-below"
6687
- }, Nu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6724
+ }, Pu = /*#__PURE__*/ X(/* @__PURE__ */ h({
6688
6725
  __name: "CodexMessage",
6689
6726
  props: {
6690
6727
  activityState: {},
@@ -6740,7 +6777,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6740
6777
  let r = e, i = n, a = Ti(), f = Wn(), p = o(() => r.activityState === "working" ? f("chat.work.working") : "Thinking"), h = o(() => $(r.message)), g = b(ro, void 0);
6741
6778
  ee(io, o(() => r.index));
6742
6779
  let _ = o(() => h.value.turnId === g?.turnId.value ? g : void 0), v = o(() => _.value?.enabled.value ? _.value : void 0), y = o(() => v.value?.active.value), S = o(() => Dt(r.presentation));
6743
- ee(no, b(no, void 0) ?? te(/* @__PURE__ */ new Map()));
6780
+ ee(no, b(no, void 0) ?? ne(/* @__PURE__ */ new Map()));
6744
6781
  let w = o(() => ga(h.value)), T = o(() => w.value.filter((e) => (e.type !== "question" || !r.hiddenClientRequestIds?.has(e.request.id)) && (S.value.messages.toolBlocks || e.type !== "tool" && e.type !== "tool-group"))), E = o(() => {
6745
6782
  let e = v.value;
6746
6783
  if (!e) return;
@@ -6756,53 +6793,53 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6756
6793
  }))), N = o(() => w.value.map((e, t) => ({
6757
6794
  block: e,
6758
6795
  blockIndex: t
6759
- }))), I = o(() => h.value.role === "user" ? N.value.filter(({ block: e }) => e.type === "attachment") : []), L = o(() => h.value.role === "user" ? N.value.filter(({ block: e }) => e.type !== "attachment") : j.value), R = o(() => Ca(h.value.content)), B = M(!1), H = o(() => h.value.type !== "compaction" && h.value.type !== "steer" && !O.value && !B.value), U = o(() => r.actionsDisabled || h.value.role === "assistant" && h.value.streaming === !0), ne = o(() => H.value), W = o(() => !!h.value.turnId && r.canDeleteTurn && S.value.messages.actions.delete), re = o(() => !!h.value.turnId && r.canEditTurn && S.value.messages.actions.edit), K = o(() => !!h.value.turnId && r.canForkTurn && S.value.messages.actions.fork), q = o(() => !!h.value.turnId && r.canRetryTurn && S.value.messages.actions.retry), J = o(() => D.value.some(he)), Y = o(() => _.value?.latestStreamingAssistantIndex.value === void 0 || _.value.latestStreamingAssistantIndex.value === r.index), ie = o(() => h.value.role === "assistant" && h.value.streaming !== !0 && w.value.length === 0), ae = o(() => h.value.role === "assistant" && h.value.streaming === !0 && Y.value && !J.value), oe = o(() => h.value.role === "assistant" && h.value.streaming === !0 && Y.value && J.value);
6760
- function se() {
6761
- h.value.role !== "user" || !re.value || (B.value = !0);
6796
+ }))), te = o(() => h.value.role === "user" ? N.value.filter(({ block: e }) => e.type === "attachment") : []), I = o(() => h.value.role === "user" ? N.value.filter(({ block: e }) => e.type !== "attachment") : j.value), L = o(() => Ca(h.value.content)), z = M(!1), V = o(() => h.value.type !== "compaction" && h.value.type !== "steer" && !O.value && !z.value), H = o(() => r.actionsDisabled || h.value.role === "assistant" && h.value.streaming === !0), re = o(() => V.value), U = o(() => !!h.value.turnId && r.canDeleteTurn && S.value.messages.actions.delete), ie = o(() => !!h.value.turnId && r.canEditTurn && S.value.messages.actions.edit), G = o(() => !!h.value.turnId && r.canForkTurn && S.value.messages.actions.fork), K = o(() => !!h.value.turnId && r.canRetryTurn && S.value.messages.actions.retry), ae = o(() => D.value.some(_e)), oe = o(() => _.value?.latestStreamingAssistantIndex.value === void 0 || _.value.latestStreamingAssistantIndex.value === r.index), q = o(() => h.value.role === "assistant" && h.value.streaming !== !0 && w.value.length === 0), se = o(() => h.value.role === "assistant" && h.value.streaming === !0 && oe.value && !ae.value), ce = o(() => h.value.role === "assistant" && h.value.streaming === !0 && oe.value && ae.value);
6797
+ function le() {
6798
+ h.value.role !== "user" || !ie.value || (z.value = !0);
6762
6799
  }
6763
- function ce() {
6764
- B.value = !1;
6800
+ function ue() {
6801
+ z.value = !1;
6765
6802
  }
6766
- function le(e) {
6803
+ function de(e) {
6767
6804
  let t = h.value.turnId;
6768
6805
  t && (i("edit-turn", {
6769
6806
  content: e,
6770
6807
  turnId: t
6771
- }), ce());
6808
+ }), ue());
6772
6809
  }
6773
- function ue() {
6774
- if (!W.value || r.threadActionsDisabled) return;
6810
+ function fe() {
6811
+ if (!U.value || r.threadActionsDisabled) return;
6775
6812
  let e = h.value.turnId;
6776
6813
  e && i("delete-turn", e);
6777
6814
  }
6778
- function de() {
6779
- if (!K.value || r.threadActionsDisabled) return;
6815
+ function pe() {
6816
+ if (!G.value || r.threadActionsDisabled) return;
6780
6817
  let e = h.value.turnId;
6781
6818
  e && i("fork-turn", e);
6782
6819
  }
6783
- function fe() {
6784
- if (!q.value || r.threadActionsDisabled) return;
6820
+ function me() {
6821
+ if (!K.value || r.threadActionsDisabled) return;
6785
6822
  let e = h.value.turnId;
6786
6823
  e && i("retry-turn", e);
6787
6824
  }
6788
- function pe(e, t) {
6825
+ function he(e, t) {
6789
6826
  return r.openImage?.(e, {
6790
6827
  index: r.index,
6791
6828
  intent: t?.intent ?? "open",
6792
6829
  message: h.value
6793
6830
  });
6794
6831
  }
6795
- async function me() {
6832
+ async function ge() {
6796
6833
  await Kc(h.value.content, a);
6797
6834
  }
6798
- function he(e) {
6835
+ function _e(e) {
6799
6836
  return e.type === "text" ? e.content.trim().length > 0 : e.type === "attachment" || e.type === "media" || e.type === "mermaid" || e.type === "html" || e.type === "reasoning" || e.type === "tool" || e.type === "tool-group" || e.type === "visualization" || e.type === "work-group";
6800
6837
  }
6801
- return (n, r) => h.value.type === "compaction" ? (k(), s(xu, {
6838
+ return (n, r) => h.value.type === "compaction" ? (k(), s(Su, {
6802
6839
  key: 0,
6803
6840
  class: "codex-chat-theme",
6804
- "completed-title": V(f)("chat.compaction.completed"),
6805
- "running-title": V(f)("chat.compaction.running"),
6841
+ "completed-title": B(f)("chat.compaction.completed"),
6842
+ "running-title": B(f)("chat.compaction.running"),
6806
6843
  status: h.value.compactionStatus
6807
6844
  }, null, 8, [
6808
6845
  "completed-title",
@@ -6811,52 +6848,52 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6811
6848
  ])) : A.value ? c("", !0) : (k(), l("div", {
6812
6849
  key: 1,
6813
6850
  class: C(["codex-chat-theme chat-message", [`chat-message--${h.value.role}`, {
6814
- "chat-message--actions-visible": e.actionsAlwaysVisible && !U.value,
6815
- "chat-message--editing": B.value
6851
+ "chat-message--actions-visible": e.actionsAlwaysVisible && !H.value,
6852
+ "chat-message--editing": z.value
6816
6853
  }]])
6817
- }, [u("div", Eu, [
6818
- n.$slots.header ? (k(), l("div", Du, [F(n.$slots, "header", {
6854
+ }, [u("div", Du, [
6855
+ n.$slots.header ? (k(), l("div", Ou, [F(n.$slots, "header", {
6819
6856
  index: e.index,
6820
6857
  message: h.value
6821
6858
  }, void 0, !0)])) : c("", !0),
6822
- I.value.length > 0 ? (k(), l("div", Ou, [(k(!0), l(t, null, P(I.value, ({ block: t, blockIndex: r }) => F(n.$slots, "block", {
6859
+ te.value.length > 0 ? (k(), l("div", ku, [(k(!0), l(t, null, P(te.value, ({ block: t, blockIndex: r }) => F(n.$slots, "block", {
6823
6860
  block: t,
6824
6861
  blockIndex: r,
6825
6862
  index: e.index,
6826
6863
  message: h.value
6827
- }, () => [m(du, {
6864
+ }, () => [m(fu, {
6828
6865
  block: t,
6829
- "open-image": pe
6866
+ "open-image": he
6830
6867
  }, d({ _: 2 }, [n.$slots.attachment ? {
6831
6868
  name: "attachment",
6832
- fn: G((t) => [F(n.$slots, "attachment", x({ ref_for: !0 }, t, {
6869
+ fn: W((t) => [F(n.$slots, "attachment", x({ ref_for: !0 }, t, {
6833
6870
  index: e.index,
6834
6871
  message: h.value
6835
6872
  }), void 0, !0)]),
6836
6873
  key: "0"
6837
6874
  } : void 0]), 1032, ["block"])], !0, `attachment-${r}`)), 128))])) : c("", !0),
6838
- B.value || L.value.length > 0 || ie.value || ae.value || oe.value ? (k(), l("div", ku, [B.value ? (k(), s(Tu, {
6875
+ z.value || I.value.length > 0 || q.value || se.value || ce.value ? (k(), l("div", Au, [z.value ? (k(), s(Eu, {
6839
6876
  key: 0,
6840
- "cancel-label": V(f)("chat.actions.cancel"),
6841
- content: R.value,
6842
- "input-label": V(f)("chat.actions.editPrompt"),
6843
- "save-label": V(f)("chat.actions.resubmit"),
6844
- onCancel: ce,
6845
- onSave: le
6877
+ "cancel-label": B(f)("chat.actions.cancel"),
6878
+ content: L.value,
6879
+ "input-label": B(f)("chat.actions.editPrompt"),
6880
+ "save-label": B(f)("chat.actions.resubmit"),
6881
+ onCancel: ue,
6882
+ onSave: de
6846
6883
  }, null, 8, [
6847
6884
  "cancel-label",
6848
6885
  "content",
6849
6886
  "input-label",
6850
6887
  "save-label"
6851
6888
  ])) : (k(), l(t, { key: 1 }, [
6852
- (k(!0), l(t, null, P(L.value, ({ block: a, blockIndex: o }) => (k(), l(t, { key: a.type === "tool" ? a.toolCall.id : `${a.type}-${o}` }, [a.type === "work-group" ? (k(), s(du, {
6889
+ (k(!0), l(t, null, P(I.value, ({ block: a, blockIndex: o }) => (k(), l(t, { key: a.type === "tool" ? a.toolCall.id : `${a.type}-${o}` }, [a.type === "work-group" ? (k(), s(fu, {
6853
6890
  key: 0,
6854
6891
  "answered-client-request-ids": e.answeredClientRequestIds,
6855
6892
  block: a,
6856
6893
  "follow-ups-disabled": e.followUpsDisabled,
6857
6894
  "mention-groups": e.mentionGroups,
6858
6895
  plugins: e.plugins,
6859
- "open-image": pe,
6896
+ "open-image": he,
6860
6897
  "show-tool-details": e.showToolDetails,
6861
6898
  skills: e.skills,
6862
6899
  onCancel: r[0] ||= (e) => i("cancel"),
@@ -6867,7 +6904,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6867
6904
  }, d({ _: 2 }, [
6868
6905
  n.$slots.block ? {
6869
6906
  name: "block",
6870
- fn: G((t) => [F(n.$slots, "block", x({ ref_for: !0 }, t, {
6907
+ fn: W((t) => [F(n.$slots, "block", x({ ref_for: !0 }, t, {
6871
6908
  index: e.index,
6872
6909
  message: h.value
6873
6910
  }), void 0, !0)]),
@@ -6875,7 +6912,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6875
6912
  } : void 0,
6876
6913
  n.$slots.text ? {
6877
6914
  name: "text",
6878
- fn: G((t) => [F(n.$slots, "text", x({ ref_for: !0 }, t, {
6915
+ fn: W((t) => [F(n.$slots, "text", x({ ref_for: !0 }, t, {
6879
6916
  index: e.index,
6880
6917
  message: h.value
6881
6918
  }), void 0, !0)]),
@@ -6883,7 +6920,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6883
6920
  } : void 0,
6884
6921
  n.$slots.tool ? {
6885
6922
  name: "tool",
6886
- fn: G((t) => [F(n.$slots, "tool", x({ ref_for: !0 }, t, {
6923
+ fn: W((t) => [F(n.$slots, "tool", x({ ref_for: !0 }, t, {
6887
6924
  index: e.index,
6888
6925
  message: h.value
6889
6926
  }), void 0, !0)]),
@@ -6902,13 +6939,13 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6902
6939
  blockIndex: o,
6903
6940
  index: e.index,
6904
6941
  message: h.value
6905
- }, () => [m(du, {
6942
+ }, () => [m(fu, {
6906
6943
  "answered-client-request-ids": e.answeredClientRequestIds,
6907
6944
  block: a,
6908
6945
  "follow-ups-disabled": e.followUpsDisabled,
6909
6946
  "mention-groups": e.mentionGroups,
6910
6947
  plugins: e.plugins,
6911
- "open-image": pe,
6948
+ "open-image": he,
6912
6949
  "show-tool-details": e.showToolDetails,
6913
6950
  skills: e.skills,
6914
6951
  onCancel: r[5] ||= (e) => i("cancel"),
@@ -6919,7 +6956,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6919
6956
  }, d({ _: 2 }, [
6920
6957
  n.$slots.attachment ? {
6921
6958
  name: "attachment",
6922
- fn: G((t) => [F(n.$slots, "attachment", x({ ref_for: !0 }, t, {
6959
+ fn: W((t) => [F(n.$slots, "attachment", x({ ref_for: !0 }, t, {
6923
6960
  index: e.index,
6924
6961
  message: h.value
6925
6962
  }), void 0, !0)]),
@@ -6927,7 +6964,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6927
6964
  } : void 0,
6928
6965
  n.$slots.text ? {
6929
6966
  name: "text",
6930
- fn: G((t) => [F(n.$slots, "text", x({ ref_for: !0 }, t, {
6967
+ fn: W((t) => [F(n.$slots, "text", x({ ref_for: !0 }, t, {
6931
6968
  index: e.index,
6932
6969
  message: h.value
6933
6970
  }), void 0, !0)]),
@@ -6935,7 +6972,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6935
6972
  } : void 0,
6936
6973
  n.$slots.mention ? {
6937
6974
  name: "mention",
6938
- fn: G((t) => [F(n.$slots, "mention", x({ ref_for: !0 }, t, {
6975
+ fn: W((t) => [F(n.$slots, "mention", x({ ref_for: !0 }, t, {
6939
6976
  index: e.index,
6940
6977
  message: h.value
6941
6978
  }), void 0, !0)]),
@@ -6943,7 +6980,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6943
6980
  } : void 0,
6944
6981
  n.$slots.tool ? {
6945
6982
  name: "tool",
6946
- fn: G((t) => [F(n.$slots, "tool", x({ ref_for: !0 }, t, {
6983
+ fn: W((t) => [F(n.$slots, "tool", x({ ref_for: !0 }, t, {
6947
6984
  index: e.index,
6948
6985
  message: h.value
6949
6986
  }), void 0, !0)]),
@@ -6958,14 +6995,14 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6958
6995
  "show-tool-details",
6959
6996
  "skills"
6960
6997
  ])], !0, 1)], 64))), 128)),
6961
- ie.value ? (k(), l("span", Au, z(V(f)("chat.message.emptyResponse")), 1)) : c("", !0),
6962
- ae.value ? F(n.$slots, "thinking", {
6998
+ q.value ? (k(), l("span", ju, R(B(f)("chat.message.emptyResponse")), 1)) : c("", !0),
6999
+ se.value ? F(n.$slots, "thinking", {
6963
7000
  index: e.index,
6964
7001
  message: h.value
6965
7002
  }, () => [u("span", {
6966
7003
  class: "chat-message__thinking codex-text-shimmer",
6967
7004
  "data-label": p.value
6968
- }, z(p.value), 9, ju)], !0, 1) : oe.value ? F(n.$slots, "status", {
7005
+ }, R(p.value), 9, Mu)], !0, 1) : ce.value ? F(n.$slots, "status", {
6969
7006
  index: e.index,
6970
7007
  message: h.value,
6971
7008
  status: "streaming"
@@ -6974,29 +7011,29 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
6974
7011
  "aria-label": "Streaming"
6975
7012
  }, null, -1)], !0, 2) : c("", !0)
6976
7013
  ], 64))])) : c("", !0),
6977
- ne.value ? F(n.$slots, "actions", {
6978
- disabled: U.value,
7014
+ re.value ? F(n.$slots, "actions", {
7015
+ disabled: H.value,
6979
7016
  index: e.index,
6980
7017
  message: h.value
6981
- }, () => [m(yu, {
6982
- class: C(["chat-message__actions", { "chat-message__actions--reserved": U.value }]),
6983
- "aria-hidden": U.value ? "true" : void 0,
6984
- inert: U.value ? "" : void 0,
6985
- "can-delete": W.value,
6986
- "can-edit": re.value,
6987
- "can-fork": K.value,
6988
- "can-retry": q.value,
6989
- "copy-action": me,
7018
+ }, () => [m(bu, {
7019
+ class: C(["chat-message__actions", { "chat-message__actions--reserved": H.value }]),
7020
+ "aria-hidden": H.value ? "true" : void 0,
7021
+ inert: H.value ? "" : void 0,
7022
+ "can-delete": U.value,
7023
+ "can-edit": ie.value,
7024
+ "can-fork": G.value,
7025
+ "can-retry": K.value,
7026
+ "copy-action": ge,
6990
7027
  deleting: e.deletingTurn,
6991
7028
  message: h.value,
6992
7029
  "mutation-disabled": e.threadActionsDisabled,
6993
7030
  presentation: S.value.messages.actions,
6994
7031
  onCopy: r[10] ||= (t) => i("copy-message", e.index),
6995
- onDelete: ue,
6996
- onEdit: se,
6997
- onFork: de,
7032
+ onDelete: fe,
7033
+ onEdit: le,
7034
+ onFork: pe,
6998
7035
  onQuote: r[11] ||= (t) => i("quote-message", e.index),
6999
- onRetry: fe
7036
+ onRetry: me
7000
7037
  }, null, 8, [
7001
7038
  "class",
7002
7039
  "aria-hidden",
@@ -7010,51 +7047,55 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7010
7047
  "mutation-disabled",
7011
7048
  "presentation"
7012
7049
  ])], !0, 3) : c("", !0),
7013
- h.value.type === "steer" ? (k(), l("div", Mu, " Steered conversation ")) : c("", !0)
7050
+ h.value.type === "steer" ? (k(), l("div", Nu, " Steered conversation ")) : c("", !0)
7014
7051
  ])], 2));
7015
7052
  }
7016
- }), [["__scopeId", "data-v-ba9ff3ff"]]), Pu = { class: "codex-message-turn" }, Fu = /*#__PURE__*/ X(/* @__PURE__ */ h({
7053
+ }), [["__scopeId", "data-v-ba9ff3ff"]]), Fu = { class: "codex-message-turn" }, Iu = /*#__PURE__*/ X(/* @__PURE__ */ h({
7017
7054
  __name: "CodexMessageTurn",
7018
7055
  props: {
7019
7056
  active: { type: Boolean },
7020
7057
  answeredClientRequestIds: {},
7058
+ durationMs: {},
7021
7059
  entries: {},
7022
7060
  showToolBlocks: { type: Boolean },
7061
+ startedAt: {},
7023
7062
  status: {},
7024
7063
  turnId: {}
7025
7064
  },
7026
7065
  setup(e) {
7027
- ee(no, b(no, void 0) ?? te(/* @__PURE__ */ new Map()));
7066
+ ee(no, b(no, void 0) ?? ne(/* @__PURE__ */ new Map()));
7028
7067
  let t = e, n = o(() => t.entries.map((e) => ({
7029
7068
  entry: e,
7030
7069
  message: $(e.message)
7031
- }))), r = o(() => t.turnId), i = o(() => n.value.some(({ message: e }) => e.role === "assistant" && ka(e))), a = o(() => [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0)?.entry.index), s = o(() => t.active === !1 ? void 0 : [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0 && (e.parts?.length ?? 0) > 0)?.entry.index), c = o(() => n.value.some(({ entry: e, message: t }) => t.role === "assistant" && (s.value === void 0 || e.index >= s.value) && (t.parts?.some((e) => e.type === "text" && e.phase === "final_answer" && e.content.trim().length > 0) ?? !1))), u = o(() => !c.value && (t.active ?? n.value.some(({ message: e }) => e.role === "assistant" && e.streaming === !0))), d = o(() => t.status), f = o(() => !u.value && !c.value && (d.value === "interrupted" || d.value === "failed")), p = o(() => i.value && !u.value && !c.value && (d.value === void 0 || d.value === "completed")), m = o(() => n.value.find(({ message: e }) => e.role === "assistant" && v(e))?.entry.index), h = o(() => !!(r.value && m.value !== void 0)), g = M(u.value && !c.value || f.value), _ = M(!1);
7032
- W(c, (e, t) => {
7033
- e && !t && (g.value = !1);
7034
- }), W([u, f], ([e, t]) => {
7035
- _.value || (g.value = e && !c.value || t);
7070
+ }))), r = o(() => t.turnId), i = o(() => n.value.some(({ message: e }) => e.role === "assistant" && ka(e))), a = o(() => [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0)?.entry.index), s = o(() => t.active === !1 ? void 0 : [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0 && (e.parts?.length ?? 0) > 0)?.entry.index), c = o(() => n.value.some(({ entry: e, message: t }) => t.role === "assistant" && (s.value === void 0 || e.index >= s.value) && (t.parts?.some((e) => e.type === "text" && e.phase === "final_answer" && e.content.trim().length > 0) ?? !1))), u = o(() => !c.value && (t.active ?? n.value.some(({ message: e }) => e.role === "assistant" && e.streaming === !0))), d = o(() => t.status), f = o(() => t.startedAt), p = o(() => t.durationMs), m = o(() => !u.value && !c.value && (d.value === "interrupted" || d.value === "failed")), h = o(() => i.value && !u.value && !c.value && (d.value === void 0 || d.value === "completed")), g = o(() => n.value.find(({ message: e }) => e.role === "assistant" && x(e))?.entry.index), _ = o(() => !!(r.value && g.value !== void 0)), v = M(u.value && !c.value || m.value), y = M(!1);
7071
+ U(c, (e, t) => {
7072
+ e && !t && (v.value = !1);
7073
+ }), U([u, m], ([e, t]) => {
7074
+ y.value || (v.value = e && !c.value || t);
7036
7075
  }), ee(ro, {
7037
7076
  active: u,
7038
- completedWithoutFinal: p,
7039
- enabled: h,
7040
- expanded: g,
7077
+ completedWithoutFinal: h,
7078
+ enabled: _,
7079
+ expanded: v,
7041
7080
  finalStarted: c,
7042
- headerMessageIndex: m,
7081
+ headerMessageIndex: g,
7043
7082
  latestStreamingAssistantIndex: a,
7044
7083
  phased: i,
7084
+ startedAt: f,
7085
+ durationMs: p,
7045
7086
  status: d,
7046
7087
  turnId: r,
7047
7088
  toggle() {
7048
- _.value = !0, g.value = !g.value;
7089
+ y.value = !0, v.value = !v.value;
7049
7090
  }
7050
7091
  });
7051
- function v(e) {
7092
+ function x(e) {
7052
7093
  let n = ga(e).filter((e) => t.showToolBlocks || e.type !== "tool" && e.type !== "tool-group");
7053
7094
  return n.length === 0 ? !1 : i.value ? n.some((e) => Aa(e, t.answeredClientRequestIds)) : u.value && n.every((e) => e.type === "tool" || e.type === "tool-group");
7054
7095
  }
7055
- return (e, t) => (k(), l("div", Pu, [F(e.$slots, "default", {}, void 0, !0)]));
7096
+ return (e, t) => (k(), l("div", Fu, [F(e.$slots, "default", {}, void 0, !0)]));
7056
7097
  }
7057
- }), [["__scopeId", "data-v-0b8c9fec"]]), Iu = ["aria-label", "title"], Lu = /*#__PURE__*/ X(/* @__PURE__ */ h({
7098
+ }), [["__scopeId", "data-v-140530d7"]]), Lu = ["aria-label", "title"], Ru = /*#__PURE__*/ X(/* @__PURE__ */ h({
7058
7099
  __name: "CodexScrollToBottom",
7059
7100
  props: { label: { default: "Scroll to bottom" } },
7060
7101
  emits: ["click"],
@@ -7066,13 +7107,13 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7066
7107
  "aria-label": e.label,
7067
7108
  title: e.label,
7068
7109
  onClick: r[0] ||= (e) => n("click")
7069
- }, [m(V(J), {
7110
+ }, [m(B(ae), {
7070
7111
  "aria-hidden": "true",
7071
7112
  size: 24,
7072
7113
  "stroke-width": 1.75
7073
- })], 8, Iu));
7114
+ })], 8, Lu));
7074
7115
  }
7075
- }), [["__scopeId", "data-v-5a75ce89"]]), Ru = ["aria-label"], zu = { class: "codex-message-list__content" }, Bu = { class: "codex-message-list__empty" }, Vu = ["data-codex-message-index"], Hu = /*#__PURE__*/ X(/* @__PURE__ */ h({
7116
+ }), [["__scopeId", "data-v-5a75ce89"]]), zu = ["aria-label"], Bu = { class: "codex-message-list__content" }, Vu = { class: "codex-message-list__empty" }, Hu = ["data-codex-message-index"], Uu = /*#__PURE__*/ X(/* @__PURE__ */ h({
7076
7117
  __name: "CodexMessageList",
7077
7118
  props: {
7078
7119
  actionsDisabled: { type: Boolean },
@@ -7158,8 +7199,8 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7158
7199
  role: "assistant",
7159
7200
  status: "streaming",
7160
7201
  parts: []
7161
- }, p = b(no, void 0) ?? te(/* @__PURE__ */ new Map());
7162
- ee(no, p), W(() => i.messages, (e) => {
7202
+ }, p = b(no, void 0) ?? ne(/* @__PURE__ */ new Map());
7203
+ ee(no, p), U(() => i.messages, (e) => {
7163
7204
  let t = {}, n = /* @__PURE__ */ new Set();
7164
7205
  for (let n of e) {
7165
7206
  if (!("metadata" in n)) continue;
@@ -7174,7 +7215,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7174
7215
  }
7175
7216
  for (let e of p.keys()) n.has(e) || p.delete(e);
7176
7217
  }, { immediate: !0 });
7177
- let m = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), h = o(() => i.initialMessageBatchSize ?? i.messageBatchSize ?? 50), g = o(() => i.messageBatchSize ?? 25), _ = M(Ae(i.messages, h.value)), v = /* @__PURE__ */ new Map(), y = Ee(i.messages, _.value), C = i.messages.length, w = Ee(i.messages, 0), T = Ee(i.messages, i.messages.length - 1), O = M(!1), A = !1, j = o(() => m.value === "lazy" ? i.messages.slice(_.value) : i.messages), N = o(() => {
7218
+ let m = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), h = o(() => i.initialMessageBatchSize ?? i.messageBatchSize ?? 50), g = o(() => i.messageBatchSize ?? 25), _ = M(Me(i.messages, h.value)), v = /* @__PURE__ */ new Map(), y = Y(i.messages, _.value), C = i.messages.length, w = Y(i.messages, 0), T = Y(i.messages, i.messages.length - 1), O = M(!1), A = !1, j = o(() => m.value === "lazy" ? i.messages.slice(_.value) : i.messages), N = o(() => {
7178
7219
  let e = -1;
7179
7220
  for (let t = i.messages.length - 1; t >= 0; t--) if (i.messages[t]?.role === "user") {
7180
7221
  e = t;
@@ -7201,7 +7242,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7201
7242
  });
7202
7243
  }
7203
7244
  return n;
7204
- }), I = o(() => Dt(i.presentation)), L = o(() => {
7245
+ }), te = o(() => Dt(i.presentation)), I = o(() => {
7205
7246
  let e = [];
7206
7247
  for (let t of N.value) {
7207
7248
  let n = $(t.message).turnId?.trim() || void 0, r = e.at(-1);
@@ -7217,7 +7258,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7217
7258
  }
7218
7259
  let t = new Set(j.value.filter((e) => e.role === "assistant").map((e) => $(e).turnId?.trim()));
7219
7260
  for (let [n, r] of e.entries()) {
7220
- if (!r.turnId || r.turnId === B.value || H.value.get(r.turnId) !== "completed" || t.has(r.turnId) || !r.entries.some((e) => e.message.role === "user")) continue;
7261
+ if (!r.turnId || r.turnId === z.value || V.value.get(r.turnId) !== "completed" || t.has(r.turnId) || !r.entries.some((e) => e.message.role === "user")) continue;
7221
7262
  let e = `codex-empty-response:${r.turnId}`;
7222
7263
  r.entries.push({
7223
7264
  index: i.messages.length + n + 1,
@@ -7233,17 +7274,25 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7233
7274
  }
7234
7275
  return e;
7235
7276
  });
7236
- function R(e) {
7277
+ function L(e) {
7237
7278
  if (i.busy && e.entries.some(({ index: e, message: t }) => e < i.messages.length && t.role === "assistant" && $(t).streaming === !0)) return !0;
7238
7279
  if (i.activeTurnId !== void 0) return e.turnId !== void 0 && e.turnId === i.activeTurnId;
7239
7280
  }
7240
- let B = o(() => i.activeTurnId !== void 0 && i.activeTurnId !== null ? i.activeTurnId : (i.busy ? [...i.messages].reverse().map($).find((e) => e.role === "assistant" && e.streaming)?.turnId?.trim() : void 0) || null), H = o(() => new Map(i.turns?.map((e) => [e.id, e.status]) ?? []));
7241
- function U(e) {
7242
- return !e || e === B.value ? !1 : H.value.get(e) !== "inProgress";
7243
- }
7244
- function ne(e, t) {
7245
- let n = t ? H.value.get(t) : void 0;
7246
- return !n || n === "inProgress" || t === B.value ? e : "content" in e ? e.streaming ? {
7281
+ let z = o(() => i.activeTurnId !== void 0 && i.activeTurnId !== null ? i.activeTurnId : (i.busy ? [...i.messages].reverse().map($).find((e) => e.role === "assistant" && e.streaming)?.turnId?.trim() : void 0) || null), V = o(() => new Map(i.turns?.map((e) => [e.id, e.status]) ?? [])), H = o(() => new Map(i.turns?.map((e) => [e.id, {
7282
+ startedAt: e.startedAt,
7283
+ durationMs: e.durationMs ?? re(e.startedAt, e.completedAt)
7284
+ }]) ?? []));
7285
+ function re(e, t) {
7286
+ if (!e || !t) return null;
7287
+ let n = Date.parse(t) - Date.parse(e);
7288
+ return Number.isFinite(n) && n >= 0 ? n : null;
7289
+ }
7290
+ function ie(e) {
7291
+ return !e || e === z.value ? !1 : V.value.get(e) !== "inProgress";
7292
+ }
7293
+ function G(e, t) {
7294
+ let n = t ? V.value.get(t) : void 0;
7295
+ return !n || n === "inProgress" || t === z.value ? e : "content" in e ? e.streaming ? {
7247
7296
  ...e,
7248
7297
  streaming: !1
7249
7298
  } : e : e.status === "streaming" ? {
@@ -7251,95 +7300,95 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7251
7300
  status: "complete"
7252
7301
  } : e;
7253
7302
  }
7254
- function re(e) {
7255
- if (!U(e)) return !1;
7256
- let t = H.value.get(e);
7303
+ function K(e) {
7304
+ if (!ie(e)) return !1;
7305
+ let t = V.value.get(e);
7257
7306
  return t === void 0 || t === "completed";
7258
7307
  }
7259
- let K = o(() => [...N.value].reverse().find((e) => e.message.role === "assistant")?.index);
7260
- function q(e) {
7261
- return e === K.value;
7308
+ let ae = o(() => [...N.value].reverse().find((e) => e.message.role === "assistant")?.index);
7309
+ function oe(e) {
7310
+ return e === ae.value;
7262
7311
  }
7263
- let J = M(null), Y = M(!0), ie = M(!1), ae = null, oe = null, se = 0, ce = !1, le = null;
7312
+ let q = M(null), se = M(!0), ce = M(!1), le = null, ue = null, de = 0, fe = !1, pe = null;
7264
7313
  D(async () => {
7265
- document.addEventListener("pointerup", me), document.addEventListener("selectionchange", he), await S(), Ie();
7266
- let e = J.value?.querySelector(".codex-message-list__content");
7267
- e && typeof ResizeObserver < "u" && (ae = new ResizeObserver(() => {
7268
- Y.value ? Le() : Pe();
7269
- }), ae.observe(e)), Le();
7270
- }), W(() => i.messages.length, async (e) => {
7271
- let t = C, n = J.value, r = n.scrollHeight, i = n.scrollTop;
7314
+ document.addEventListener("pointerup", ve), document.addEventListener("selectionchange", ye), await S(), Re();
7315
+ let e = q.value?.querySelector(".codex-message-list__content");
7316
+ e && typeof ResizeObserver < "u" && (le = new ResizeObserver(() => {
7317
+ se.value ? ze() : Ie();
7318
+ }), le.observe(e)), ze();
7319
+ }), U(() => i.messages.length, async (e) => {
7320
+ let t = C, n = q.value, r = n.scrollHeight, i = n.scrollTop;
7272
7321
  C = e;
7273
- let a = m.value === "lazy" && Ce(e, t);
7274
- Te();
7275
- let o = !a && Y.value && Fe();
7276
- await S(), a && n ? n.scrollTop = i + n.scrollHeight - r : o && Ie();
7277
- }), W([
7322
+ let a = m.value === "lazy" && Ee(e, t);
7323
+ Oe();
7324
+ let o = !a && se.value && Le();
7325
+ await S(), a && n ? n.scrollTop = i + n.scrollHeight - r : o && Re();
7326
+ }), U([
7278
7327
  () => i.resetKey,
7279
7328
  () => i.messages.length,
7280
7329
  () => i.messages.at(-1)
7281
7330
  ], ([e, t, n], [r, i, a]) => {
7282
- e !== r || t !== i || !n || !a || n.id && a.id && n.id !== a.id || de();
7283
- }), W(() => i.messageTextSelection, (e) => {
7284
- e || ve();
7285
- }), W(() => i.resetKey, async (e, t) => {
7286
- ve();
7287
- let n = J.value;
7331
+ e !== r || t !== i || !n || !a || n.id && a.id && n.id !== a.id || he();
7332
+ }), U(() => i.messageTextSelection, (e) => {
7333
+ e || J();
7334
+ }), U(() => i.resetKey, async (e, t) => {
7335
+ J();
7336
+ let n = q.value;
7288
7337
  n && t != null && v.set(t, {
7289
7338
  renderedAnchor: y,
7290
7339
  scrollTop: n.scrollTop,
7291
- stickToBottom: Fe()
7340
+ stickToBottom: Le()
7292
7341
  });
7293
- let r = e == null ? void 0 : v.get(e), a = r ? Oe(i.messages, r.renderedAnchor) : -1;
7294
- we(a >= 0 ? a : Ae(i.messages, h.value)), O.value = !1, A = !1, Ne(r?.stickToBottom ?? !0), Te(), await S(), r && n ? (n.scrollTop = r.stickToBottom ? n.scrollHeight : r.scrollTop, Pe()) : Ie();
7295
- }), W(() => [i.loadingOlderMessages, i.hasOlderMessages], () => {
7342
+ let r = e == null ? void 0 : v.get(e), a = r ? Ae(i.messages, r.renderedAnchor) : -1;
7343
+ De(a >= 0 ? a : Me(i.messages, h.value)), O.value = !1, A = !1, Fe(r?.stickToBottom ?? !0), Oe(), await S(), r && n ? (n.scrollTop = r.stickToBottom ? n.scrollHeight : r.scrollTop, Ie()) : Re();
7344
+ }), U(() => [i.loadingOlderMessages, i.hasOlderMessages], () => {
7296
7345
  A = !1;
7297
- }), W(() => [
7346
+ }), U(() => [
7298
7347
  m.value,
7299
7348
  h.value,
7300
7349
  g.value
7301
7350
  ], async () => {
7302
- m.value === "lazy" && (we(Ae(i.messages, h.value)), Te(), await S(), Y.value && Ie());
7351
+ m.value === "lazy" && (De(Me(i.messages, h.value)), Oe(), await S(), se.value && Re());
7303
7352
  });
7304
- function ue() {
7305
- ve();
7306
- let e = J.value, t = e !== null && e.scrollTop < se;
7307
- e && (se = e.scrollTop), Pe(), ie.value ? t && Ne(!1) : Ne(!0), m.value === "lazy" && xe() && _.value <= 0 && i.hasOlderMessages && !i.loadingOlderMessages ? be() : m.value === "lazy" && xe() && Se();
7353
+ function me() {
7354
+ J();
7355
+ let e = q.value, t = e !== null && e.scrollTop < de;
7356
+ e && (de = e.scrollTop), Ie(), ce.value ? t && Fe(!1) : Fe(!0), m.value === "lazy" && we() && _.value <= 0 && i.hasOlderMessages && !i.loadingOlderMessages ? Ce() : m.value === "lazy" && we() && Te();
7308
7357
  }
7309
- function de() {
7310
- Y.value ? Le() : S(Pe);
7358
+ function he() {
7359
+ se.value ? ze() : S(Ie);
7311
7360
  }
7312
- function fe(e) {
7361
+ function ge(e) {
7313
7362
  let t = e.target;
7314
- !(t instanceof Element) || !t.closest(".chat-work-group__header") || Ne(!1);
7363
+ !(t instanceof Element) || !t.closest(".chat-work-group__header") || Fe(!1);
7315
7364
  }
7316
- function pe() {
7317
- i.messageTextSelection && (ce = !0);
7365
+ function _e() {
7366
+ i.messageTextSelection && (fe = !0);
7318
7367
  }
7319
- function me() {
7320
- ce && (ce = !1, ge());
7368
+ function ve() {
7369
+ fe && (fe = !1, be());
7321
7370
  }
7322
- function he() {
7323
- !i.messageTextSelection || ce || ge();
7371
+ function ye() {
7372
+ !i.messageTextSelection || fe || be();
7324
7373
  }
7325
- function ge() {
7374
+ function be() {
7326
7375
  if (!i.messageTextSelection) {
7327
- ve();
7376
+ J();
7328
7377
  return;
7329
7378
  }
7330
7379
  let e = window.getSelection();
7331
7380
  if (!e || e.isCollapsed || e.rangeCount === 0) {
7332
- ve();
7381
+ J();
7333
7382
  return;
7334
7383
  }
7335
- let t = e.toString().trim(), n = e.getRangeAt(0), r = _e(n.startContainer), o = _e(n.endContainer);
7384
+ let t = e.toString().trim(), n = e.getRangeAt(0), r = xe(n.startContainer), o = xe(n.endContainer);
7336
7385
  if (!t || !r || r !== o) {
7337
- ve();
7386
+ J();
7338
7387
  return;
7339
7388
  }
7340
7389
  let s = Number.parseInt(r.dataset.codexMessageIndex ?? "", 10), c = N.value.find((e) => e.index === s);
7341
7390
  if (!c) {
7342
- ve();
7391
+ J();
7343
7392
  return;
7344
7393
  }
7345
7394
  let l = n.getBoundingClientRect(), u = $(c.message), d = {
@@ -7355,67 +7404,67 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7355
7404
  ...u.id ? { messageId: u.id } : {},
7356
7405
  ...u.turnId ? { turnId: u.turnId } : {}
7357
7406
  };
7358
- ye(le, d) || (le = d, a("message-text-selection-change", d));
7407
+ Se(pe, d) || (pe = d, a("message-text-selection-change", d));
7359
7408
  }
7360
- function _e(e) {
7409
+ function xe(e) {
7361
7410
  let t = (e instanceof Element ? e : e.parentElement)?.closest("[data-codex-message-index]") ?? null;
7362
- return t && J.value?.contains(t) ? t : null;
7411
+ return t && q.value?.contains(t) ? t : null;
7363
7412
  }
7364
- function ve() {
7365
- ce = !1, le && (le = null, a("message-text-selection-change", null));
7413
+ function J() {
7414
+ fe = !1, pe && (pe = null, a("message-text-selection-change", null));
7366
7415
  }
7367
- function ye(e, t) {
7416
+ function Se(e, t) {
7368
7417
  return !!(e && e.text === t.text && e.messageIndex === t.messageIndex && e.anchor.x === t.anchor.x && e.anchor.y === t.anchor.y && e.anchor.width === t.anchor.width && e.anchor.height === t.anchor.height);
7369
7418
  }
7370
- function be() {
7419
+ function Ce() {
7371
7420
  !i.hasOlderMessages || i.loadingOlderMessages || A || (A = !0, a("load-older-messages"));
7372
7421
  }
7373
- function xe() {
7374
- let e = J.value;
7422
+ function we() {
7423
+ let e = q.value;
7375
7424
  return e !== null && e.scrollTop <= e.clientHeight;
7376
7425
  }
7377
- async function Se() {
7426
+ async function Te() {
7378
7427
  if (O.value || _.value <= 0) return;
7379
- let e = J.value, t = e.scrollHeight, n = e.scrollTop;
7380
- O.value = !0, we(Math.max(0, _.value - ke(g.value))), await S(), e.scrollTop = n + e.scrollHeight - t, O.value = !1, _.value <= 0 && be();
7381
- }
7382
- function Ce(e, t) {
7383
- let n = ke(h.value), r = Me(i.messages.slice(0, t), Math.max(0, t - n)), a = _.value === r;
7384
- if (e < t) return we(Ae(i.messages, h.value)), !1;
7385
- let o = Oe(i.messages, y);
7386
- if (o >= 0 && !De(Ee(i.messages, 0), w)) {
7387
- let t = _.value <= 0 && xe();
7388
- return we(t ? Math.max(0, o - ke(g.value)) : Fe() ? Math.max(0, e - n) : o), t;
7428
+ let e = q.value, t = e.scrollHeight, n = e.scrollTop;
7429
+ O.value = !0, De(Math.max(0, _.value - je(g.value))), await S(), e.scrollTop = n + e.scrollHeight - t, O.value = !1, _.value <= 0 && Ce();
7430
+ }
7431
+ function Ee(e, t) {
7432
+ let n = je(h.value), r = Pe(i.messages.slice(0, t), Math.max(0, t - n)), a = _.value === r;
7433
+ if (e < t) return De(Me(i.messages, h.value)), !1;
7434
+ let o = Ae(i.messages, y);
7435
+ if (o >= 0 && !ke(Y(i.messages, 0), w)) {
7436
+ let t = _.value <= 0 && we();
7437
+ return De(t ? Math.max(0, o - je(g.value)) : Le() ? Math.max(0, e - n) : o), t;
7389
7438
  }
7390
- return De(Ee(i.messages, 0), w) && !De(Ee(i.messages, e - 1), T) && Fe() && a && we(Math.max(0, e - n)), !1;
7439
+ return ke(Y(i.messages, 0), w) && !ke(Y(i.messages, e - 1), T) && Le() && a && De(Math.max(0, e - n)), !1;
7391
7440
  }
7392
- function we(e) {
7393
- let t = Me(i.messages, e);
7394
- _.value = t, y = Ee(i.messages, t);
7441
+ function De(e) {
7442
+ let t = Pe(i.messages, e);
7443
+ _.value = t, y = Y(i.messages, t);
7395
7444
  }
7396
- function Te() {
7397
- C = i.messages.length, w = Ee(i.messages, 0), T = Ee(i.messages, i.messages.length - 1);
7445
+ function Oe() {
7446
+ C = i.messages.length, w = Y(i.messages, 0), T = Y(i.messages, i.messages.length - 1);
7398
7447
  }
7399
- function Ee(e, t) {
7448
+ function Y(e, t) {
7400
7449
  let n = e[t];
7401
7450
  return n ? n.id ?? n : null;
7402
7451
  }
7403
- function De(e, t) {
7452
+ function ke(e, t) {
7404
7453
  return e === t;
7405
7454
  }
7406
- function Oe(e, t) {
7407
- return e.findIndex((e) => De(e.id ?? e, t));
7455
+ function Ae(e, t) {
7456
+ return e.findIndex((e) => ke(e.id ?? e, t));
7408
7457
  }
7409
- function ke(e) {
7458
+ function je(e) {
7410
7459
  return Math.max(1, Math.floor(e ?? 25));
7411
7460
  }
7412
- function Ae(e, t) {
7413
- return je(e, ke(t));
7461
+ function Me(e, t) {
7462
+ return Ne(e, je(t));
7414
7463
  }
7415
- function je(e, t) {
7416
- return Me(e, Math.max(0, e.length - t));
7464
+ function Ne(e, t) {
7465
+ return Pe(e, Math.max(0, e.length - t));
7417
7466
  }
7418
- function Me(e, t) {
7467
+ function Pe(e, t) {
7419
7468
  let n = Math.max(0, Math.min(e.length, t));
7420
7469
  if (n >= e.length) return n;
7421
7470
  let r = $(e[n]).turnId?.trim();
@@ -7423,69 +7472,71 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7423
7472
  for (; n > 0 && $(e[n - 1]).turnId?.trim() === r;) --n;
7424
7473
  return n;
7425
7474
  }
7426
- function Ne(e) {
7427
- Y.value !== e && (Y.value = e, a("stickiness-change", e));
7428
- }
7429
- function Pe() {
7430
- ie.value = !Fe();
7431
- }
7432
- function Fe() {
7433
- let e = J.value;
7434
- return e ? e.scrollHeight - e.scrollTop - e.clientHeight <= i.bottomThreshold : Y.value;
7475
+ function Fe(e) {
7476
+ se.value !== e && (se.value = e, a("stickiness-change", e));
7435
7477
  }
7436
7478
  function Ie() {
7437
- J.value && (J.value.scrollTop = J.value.scrollHeight, se = J.value.scrollTop, Ne(!0), Pe());
7479
+ ce.value = !Le();
7438
7480
  }
7439
7481
  function Le() {
7440
- if (oe !== null) return;
7482
+ let e = q.value;
7483
+ return e ? e.scrollHeight - e.scrollTop - e.clientHeight <= i.bottomThreshold : se.value;
7484
+ }
7485
+ function Re() {
7486
+ q.value && (q.value.scrollTop = q.value.scrollHeight, de = q.value.scrollTop, Fe(!0), Ie());
7487
+ }
7488
+ function ze() {
7489
+ if (ue !== null) return;
7441
7490
  let e = () => {
7442
- oe = null, Y.value && Ie();
7491
+ ue = null, se.value && Re();
7443
7492
  };
7444
- oe = typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : setTimeout(e, 0);
7493
+ ue = typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : setTimeout(e, 0);
7445
7494
  }
7446
7495
  return E(() => {
7447
- document.removeEventListener("pointerup", me), document.removeEventListener("selectionchange", he), ae?.disconnect(), ae = null, oe !== null && (typeof oe == "number" && typeof cancelAnimationFrame == "function" ? cancelAnimationFrame(oe) : clearTimeout(oe));
7448
- }), n({ scrollToBottom: Ie }), (n, r) => (k(), l("div", {
7496
+ document.removeEventListener("pointerup", ve), document.removeEventListener("selectionchange", ye), le?.disconnect(), le = null, ue !== null && (typeof ue == "number" && typeof cancelAnimationFrame == "function" ? cancelAnimationFrame(ue) : clearTimeout(ue));
7497
+ }), n({ scrollToBottom: Re }), (n, r) => (k(), l("div", {
7449
7498
  class: "codex-chat-theme codex-message-list",
7450
7499
  "aria-label": e.ariaLabel
7451
7500
  }, [u("div", {
7452
7501
  ref_key: "scrollElement",
7453
- ref: J,
7502
+ ref: q,
7454
7503
  class: "codex-message-list__viewport message-list",
7455
- onClickCapture: fe,
7456
- onPointerdown: pe,
7457
- onScroll: ue
7458
- }, [u("div", zu, [N.value.length === 0 ? F(n.$slots, "empty", {}, () => [u("p", Bu, z(e.emptyLabel), 1)], !0, 0) : (k(!0), l(t, { key: 1 }, P(L.value, (i) => (k(), s(Fu, {
7504
+ onClickCapture: ge,
7505
+ onPointerdown: _e,
7506
+ onScroll: me
7507
+ }, [u("div", Bu, [N.value.length === 0 ? F(n.$slots, "empty", {}, () => [u("p", Vu, R(e.emptyLabel), 1)], !0, 0) : (k(!0), l(t, { key: 1 }, P(I.value, (i) => (k(), s(Iu, {
7459
7508
  key: i.key,
7460
7509
  entries: i.entries,
7461
7510
  "answered-client-request-ids": e.answeredClientRequestIds,
7462
- active: R(i),
7463
- "show-tool-blocks": I.value.messages.toolBlocks,
7464
- status: i.turnId ? H.value.get(i.turnId) : void 0,
7511
+ active: L(i),
7512
+ "show-tool-blocks": te.value.messages.toolBlocks,
7513
+ status: i.turnId ? V.value.get(i.turnId) : void 0,
7514
+ "started-at": i.turnId ? H.value.get(i.turnId)?.startedAt : void 0,
7515
+ "duration-ms": i.turnId ? H.value.get(i.turnId)?.durationMs : void 0,
7465
7516
  "turn-id": i.turnId
7466
7517
  }, {
7467
- default: G(() => [(k(!0), l(t, null, P(i.entries, (t) => (k(), l("div", {
7518
+ default: W(() => [(k(!0), l(t, null, P(i.entries, (t) => (k(), l("div", {
7468
7519
  key: t.key,
7469
7520
  class: "codex-message-list__entry",
7470
7521
  "data-codex-message-index": t.index
7471
7522
  }, [n.$slots.message ? F(n.$slots, "message", {
7472
- message: V($)(ne(t.message, i.turnId)),
7523
+ message: B($)(G(t.message, i.turnId)),
7473
7524
  index: t.index
7474
- }, void 0, !0, 0) : (k(), s(Nu, {
7525
+ }, void 0, !0, 0) : (k(), s(Pu, {
7475
7526
  key: 1,
7476
7527
  "activity-state": t.activityState,
7477
7528
  "actions-disabled": e.actionsDisabled,
7478
- "actions-always-visible": q(t.index),
7529
+ "actions-always-visible": oe(t.index),
7479
7530
  "answered-client-request-ids": e.answeredClientRequestIds,
7480
- "can-delete-turn": e.canDeleteTurn && U(i.turnId),
7481
- "can-edit-turn": e.canEditTurn && U(i.turnId),
7482
- "can-fork-turn": e.canForkTurn && re(i.turnId),
7483
- "can-retry-turn": e.canRetryTurn && U(i.turnId),
7531
+ "can-delete-turn": e.canDeleteTurn && ie(i.turnId),
7532
+ "can-edit-turn": e.canEditTurn && ie(i.turnId),
7533
+ "can-fork-turn": e.canForkTurn && K(i.turnId),
7534
+ "can-retry-turn": e.canRetryTurn && ie(i.turnId),
7484
7535
  "deleting-turn": i.turnId === e.deletingTurnId,
7485
7536
  "follow-ups-disabled": e.followUpsDisabled,
7486
7537
  "hidden-client-request-ids": e.hiddenClientRequestIds,
7487
7538
  index: t.index,
7488
- message: ne(t.message, i.turnId),
7539
+ message: G(t.message, i.turnId),
7489
7540
  "mention-groups": e.mentionGroups,
7490
7541
  "open-image": e.openImage,
7491
7542
  plugins: e.plugins,
@@ -7507,47 +7558,47 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7507
7558
  }, d({ _: 2 }, [
7508
7559
  n.$slots.actions ? {
7509
7560
  name: "actions",
7510
- fn: G((e) => [F(n.$slots, "actions", x({ ref_for: !0 }, e), void 0, !0)]),
7561
+ fn: W((e) => [F(n.$slots, "actions", x({ ref_for: !0 }, e), void 0, !0)]),
7511
7562
  key: "0"
7512
7563
  } : void 0,
7513
7564
  n.$slots.attachment ? {
7514
7565
  name: "attachment",
7515
- fn: G((e) => [F(n.$slots, "attachment", x({ ref_for: !0 }, e), void 0, !0)]),
7566
+ fn: W((e) => [F(n.$slots, "attachment", x({ ref_for: !0 }, e), void 0, !0)]),
7516
7567
  key: "1"
7517
7568
  } : void 0,
7518
7569
  n.$slots.block ? {
7519
7570
  name: "block",
7520
- fn: G((e) => [F(n.$slots, "block", x({ ref_for: !0 }, e), void 0, !0)]),
7571
+ fn: W((e) => [F(n.$slots, "block", x({ ref_for: !0 }, e), void 0, !0)]),
7521
7572
  key: "2"
7522
7573
  } : void 0,
7523
7574
  n.$slots.header ? {
7524
7575
  name: "header",
7525
- fn: G((e) => [F(n.$slots, "header", x({ ref_for: !0 }, e), void 0, !0)]),
7576
+ fn: W((e) => [F(n.$slots, "header", x({ ref_for: !0 }, e), void 0, !0)]),
7526
7577
  key: "3"
7527
7578
  } : void 0,
7528
7579
  n.$slots.mention ? {
7529
7580
  name: "mention",
7530
- fn: G((e) => [F(n.$slots, "mention", x({ ref_for: !0 }, e), void 0, !0)]),
7581
+ fn: W((e) => [F(n.$slots, "mention", x({ ref_for: !0 }, e), void 0, !0)]),
7531
7582
  key: "4"
7532
7583
  } : void 0,
7533
7584
  n.$slots.status ? {
7534
7585
  name: "status",
7535
- fn: G((e) => [F(n.$slots, "status", x({ ref_for: !0 }, e), void 0, !0)]),
7586
+ fn: W((e) => [F(n.$slots, "status", x({ ref_for: !0 }, e), void 0, !0)]),
7536
7587
  key: "5"
7537
7588
  } : void 0,
7538
7589
  n.$slots.text ? {
7539
7590
  name: "text",
7540
- fn: G((e) => [F(n.$slots, "text", x({ ref_for: !0 }, e), void 0, !0)]),
7591
+ fn: W((e) => [F(n.$slots, "text", x({ ref_for: !0 }, e), void 0, !0)]),
7541
7592
  key: "6"
7542
7593
  } : void 0,
7543
7594
  n.$slots.thinking ? {
7544
7595
  name: "thinking",
7545
- fn: G((e) => [F(n.$slots, "thinking", x({ ref_for: !0 }, e), void 0, !0)]),
7596
+ fn: W((e) => [F(n.$slots, "thinking", x({ ref_for: !0 }, e), void 0, !0)]),
7546
7597
  key: "7"
7547
7598
  } : void 0,
7548
7599
  n.$slots.tool ? {
7549
7600
  name: "tool",
7550
- fn: G((e) => [F(n.$slots, "tool", x({ ref_for: !0 }, e), void 0, !0)]),
7601
+ fn: W((e) => [F(n.$slots, "tool", x({ ref_for: !0 }, e), void 0, !0)]),
7551
7602
  key: "8"
7552
7603
  } : void 0
7553
7604
  ]), 1032, [
@@ -7571,7 +7622,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7571
7622
  "show-tool-details",
7572
7623
  "skills",
7573
7624
  "thread-actions-disabled"
7574
- ]))], 8, Vu))), 128))]),
7625
+ ]))], 8, Hu))), 128))]),
7575
7626
  _: 2
7576
7627
  }, 1032, [
7577
7628
  "entries",
@@ -7579,21 +7630,23 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7579
7630
  "active",
7580
7631
  "show-tool-blocks",
7581
7632
  "status",
7633
+ "started-at",
7634
+ "duration-ms",
7582
7635
  "turn-id"
7583
- ]))), 128))])], 544), ie.value ? (k(), s(Lu, {
7636
+ ]))), 128))])], 544), ce.value ? (k(), s(Ru, {
7584
7637
  key: 0,
7585
7638
  class: "codex-message-list__scroll-to-bottom",
7586
7639
  label: e.scrollToBottomLabel,
7587
- onClick: Ie
7588
- }, null, 8, ["label"])) : c("", !0)], 8, Ru));
7640
+ onClick: Re
7641
+ }, null, 8, ["label"])) : c("", !0)], 8, zu));
7589
7642
  }
7590
- }), [["__scopeId", "data-v-3019818e"]]), Uu = {
7643
+ }), [["__scopeId", "data-v-238e8027"]]), Wu = {
7591
7644
  key: 0,
7592
7645
  class: "codex-workbench-layout__body codex-workbench-layout__body--scroll"
7593
- }, Wu = { class: "codex-workbench-layout__body-content" }, Gu = {
7646
+ }, Gu = { class: "codex-workbench-layout__body-content" }, Ku = {
7594
7647
  key: 1,
7595
7648
  class: "codex-workbench-layout__body codex-workbench-layout__body--child"
7596
- }, Ku = /*#__PURE__*/ X(/* @__PURE__ */ h({
7649
+ }, qu = /*#__PURE__*/ X(/* @__PURE__ */ h({
7597
7650
  __name: "CodexWorkbenchLayout",
7598
7651
  props: { scrollMode: { default: "body" } },
7599
7652
  setup(e) {
@@ -7619,7 +7672,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7619
7672
  class: C(["codex-chat-theme codex-workbench-layout", `codex-workbench-layout--${e.scrollMode}`]),
7620
7673
  style: T(a.value)
7621
7674
  }, [
7622
- e.scrollMode === "body" ? (k(), l("div", Uu, [u("div", Wu, [F(r.$slots, "default", {}, void 0, !0)])])) : (k(), l("div", Gu, [F(r.$slots, "default", {}, void 0, !0)])),
7675
+ e.scrollMode === "body" ? (k(), l("div", Wu, [u("div", Gu, [F(r.$slots, "default", {}, void 0, !0)])])) : (k(), l("div", Ku, [F(r.$slots, "default", {}, void 0, !0)])),
7623
7676
  r.$slots.header ? (k(), l("div", {
7624
7677
  key: 2,
7625
7678
  ref_key: "headerEl",
@@ -7634,36 +7687,36 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7634
7687
  }, [F(r.$slots, "footer", {}, void 0, !0)], 512)) : c("", !0)
7635
7688
  ], 6));
7636
7689
  }
7637
- }), [["__scopeId", "data-v-18471407"]]), qu = [
7690
+ }), [["__scopeId", "data-v-18471407"]]), Ju = [
7638
7691
  "aria-busy",
7639
7692
  "aria-label",
7640
7693
  "data-codex-generating"
7641
- ], Ju = {
7694
+ ], Yu = {
7642
7695
  key: 1,
7643
7696
  class: "codex-conversation-pane__hero"
7644
- }, Yu = { class: "codex-conversation-pane__hero-copy" }, Xu = { key: 0 }, Zu = {
7697
+ }, Xu = { class: "codex-conversation-pane__hero-copy" }, Zu = { key: 0 }, Qu = {
7645
7698
  key: 0,
7646
7699
  class: "codex-conversation-pane__error",
7647
7700
  role: "alert"
7648
- }, Qu = {
7701
+ }, $u = {
7649
7702
  key: 1,
7650
7703
  class: "codex-conversation-pane__approvals"
7651
- }, $u = {
7704
+ }, ed = {
7652
7705
  key: 0,
7653
7706
  class: "codex-conversation-pane__pending-question"
7654
- }, ed = ["aria-label"], td = {
7707
+ }, td = ["aria-label"], nd = {
7655
7708
  key: 0,
7656
7709
  class: "codex-conversation-pane__attachments",
7657
7710
  "aria-label": "Prompt attachments"
7658
- }, nd = ["src", "alt"], rd = {
7711
+ }, rd = ["src", "alt"], id = {
7659
7712
  key: 1,
7660
7713
  class: "codex-conversation-pane__attachment-file",
7661
7714
  "aria-hidden": "true"
7662
- }, id = ["title"], ad = { class: "codex-conversation-pane__attachment-actions" }, od = [
7715
+ }, ad = ["title"], od = { class: "codex-conversation-pane__attachment-actions" }, sd = [
7663
7716
  "aria-label",
7664
7717
  "disabled",
7665
7718
  "onClick"
7666
- ], sd = /*#__PURE__*/ X(/* @__PURE__ */ h({
7719
+ ], cd = /*#__PURE__*/ X(/* @__PURE__ */ h({
7667
7720
  __name: "CodexConversationPane",
7668
7721
  props: {
7669
7722
  ariaLabel: { default: "Conversation" },
@@ -7781,7 +7834,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7781
7834
  },
7782
7835
  emits: /* @__PURE__ */ "attach.attachmentsChange.cancel.clientResponse.copyMessage.clearGoal.continueInterruptedTurn.deleteTurn.deleteQueuedPrompt.updateQueuedPrompt.editGoal.editTurn.forkTurn.loadOlderHistory.error.interrupt.menuSelect.messageTextSelectionChange.mentionSelect.openLink.openVisualization.resolveApproval.quoteMessage.retryTurn.selectApprovalPreset.sendFollowUp.submit.steer.steerQueuedPrompt.update:modelId.update:composerState.update:modelValue.update:planMode.update:reasoningEffort.update:serviceTier".split("."),
7783
7836
  setup(e, { expose: n, emit: r }) {
7784
- let i = e, a = r, f = Ti(), p = te(/* @__PURE__ */ new Map());
7837
+ let i = e, a = r, f = Ti(), p = ne(/* @__PURE__ */ new Map());
7785
7838
  ee(no, p);
7786
7839
  let h = M(null), g = M(/* @__PURE__ */ new Set()), v = M(null), y = M(null), b = M(null), x = M(null), C = o(() => ra(i.controller)), T = o(() => {
7787
7840
  let e = C.value;
@@ -7794,7 +7847,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7794
7847
  let n = T.value;
7795
7848
  return n ? e(n) : t();
7796
7849
  }
7797
- let j = o(() => A((e) => e.composer?.state, () => i.composerState)), N = o(() => A((e) => e.composer?.attachments ?? [], () => i.attachments)), I = Ii(j.value ?? (T.value ? {
7850
+ let j = o(() => A((e) => e.composer?.state, () => i.composerState)), N = o(() => A((e) => e.composer?.attachments ?? [], () => i.attachments)), te = Ii(j.value ?? (T.value ? {
7798
7851
  text: "",
7799
7852
  selectionStart: 0,
7800
7853
  selectionEnd: 0
@@ -7802,16 +7855,16 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7802
7855
  text: i.modelValue,
7803
7856
  selectionStart: i.modelValue.length,
7804
7857
  selectionEnd: i.modelValue.length
7805
- })), L = M(I), R = M(I.text), B = M(null), H = M(null), U = M(null), ne = 0, re = 0, K = M(null), q = M([...N.value]), J = /* @__PURE__ */ new Map(), Y = M([]), ie = M(!1), ae = 0, oe = o(() => A((e) => e.identity.messages, () => i.messages ?? O.value?.messages ?? [])), se = o(() => {
7806
- let e = oe.value, t = U.value;
7858
+ })), I = M(te), L = M(te.text), z = M(null), V = M(null), H = M(null), re = 0, ie = 0, G = M(null), K = M([...N.value]), ae = /* @__PURE__ */ new Map(), oe = M([]), q = M(!1), se = 0, ce = o(() => A((e) => e.identity.messages, () => i.messages ?? O.value?.messages ?? [])), le = o(() => {
7859
+ let e = ce.value, t = H.value;
7807
7860
  return !t || e.some((e) => At(e, t)) ? e : [...e, t.message];
7808
- }), ce = o(() => A((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? O.value?.activeTurnId : i.activeTurnId)), le = o(() => A((e) => e.identity.turns, () => i.turns ?? O.value?.turns ?? [])), ue = o(() => !ke.value && ce.value == null && (le.value ?? []).at(-1)?.status === "interrupted"), fe = o(() => se.value.flatMap((e) => {
7861
+ }), ue = o(() => A((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? O.value?.activeTurnId : i.activeTurnId)), de = o(() => A((e) => e.identity.turns, () => i.turns ?? O.value?.turns ?? [])), fe = o(() => !ke.value && ue.value == null && (de.value ?? []).at(-1)?.status === "interrupted"), me = o(() => le.value.flatMap((e) => {
7809
7862
  let t = $(e);
7810
7863
  if (t.role !== "user") return [];
7811
7864
  let n = Ca(t.content);
7812
7865
  return n && n !== "(no user instructions)" ? [n] : [];
7813
- })), pe = o(() => A((e) => e.composer?.promptHistory, () => i.promptHistory)), me = o(() => xt(pe.value ?? Y.value, fe.value)), he = o(() => A((e) => e.thread?.answeredClientRequestIds, () => i.answeredClientRequestIds ?? i.surface?.answeredClientRequestIds)), ge = o(() => /* @__PURE__ */ new Set([...he.value ?? [], ...p.keys()])), _e = o(() => A((e) => e.thread?.clientRequests ?? [], () => i.clientRequests ?? O.value?.clientRequests ?? [])), ve = o(() => {
7814
- let e = /* @__PURE__ */ new Set(), t = new Map((le.value ?? []).map((e, t) => [e.id, t])), n = oe.value.map($);
7866
+ })), he = o(() => A((e) => e.composer?.promptHistory, () => i.promptHistory)), ge = o(() => xt(he.value ?? oe.value, me.value)), _e = o(() => A((e) => e.thread?.answeredClientRequestIds, () => i.answeredClientRequestIds ?? i.surface?.answeredClientRequestIds)), ve = o(() => /* @__PURE__ */ new Set([..._e.value ?? [], ...p.keys()])), ye = o(() => A((e) => e.thread?.clientRequests ?? [], () => i.clientRequests ?? O.value?.clientRequests ?? [])), be = o(() => {
7867
+ let e = /* @__PURE__ */ new Set(), t = new Map((de.value ?? []).map((e, t) => [e.id, t])), n = ce.value.map($);
7815
7868
  for (let [r, i] of n.entries()) for (let a of i.parts ?? []) {
7816
7869
  if (a.type !== "question" || a.request.payload.request.delivery !== "async") continue;
7817
7870
  let o = a.request.turnId ?? i.turnId, s = o ? t.get(o) : void 0;
@@ -7822,65 +7875,65 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7822
7875
  }) && e.add(a.request.id);
7823
7876
  }
7824
7877
  return e;
7825
- }), ye = o(() => /* @__PURE__ */ new Set([...g.value, ...ve.value])), be = o(() => {
7878
+ }), xe = o(() => /* @__PURE__ */ new Set([...g.value, ...be.value])), J = o(() => {
7826
7879
  let e = [], t = /* @__PURE__ */ new Set();
7827
- for (let n of _e.value) n.kind !== "ask_user" || n.payload.request.delivery !== "tool" || n.payload.request.questions.length === 0 || ge.value.has(n.id) || (t.add(n.id), e.push(n));
7828
- for (let n of se.value) for (let r of $(n).parts ?? []) r.type !== "question" || r.historical === !0 || r.request.payload.request.questions.length === 0 || t.has(r.request.id) || ge.value.has(r.request.id) || ye.value.has(r.request.id) || (t.add(r.request.id), e.push(r.request));
7880
+ for (let n of ye.value) n.kind !== "ask_user" || n.payload.request.delivery !== "tool" || n.payload.request.questions.length === 0 || ve.value.has(n.id) || (t.add(n.id), e.push(n));
7881
+ for (let n of le.value) for (let r of $(n).parts ?? []) r.type !== "question" || r.historical === !0 || r.request.payload.request.questions.length === 0 || t.has(r.request.id) || ve.value.has(r.request.id) || xe.value.has(r.request.id) || (t.add(r.request.id), e.push(r.request));
7829
7882
  return e;
7830
- }), xe = o(() => be.value.find((e) => e.payload.request.delivery === "tool") ?? be.value.find((e) => e.id === h.value) ?? be.value.find((e) => {
7883
+ }), Se = o(() => J.value.find((e) => e.payload.request.delivery === "tool") ?? J.value.find((e) => e.id === h.value) ?? J.value.find((e) => {
7831
7884
  if (e.payload.request.delivery !== "async") return !0;
7832
- let t = le.value?.find((t) => t.id === e.turnId);
7833
- return t ? t.status === "inProgress" : e.turnId === ce.value;
7834
- })), Se = o(() => new Set(be.value.map((e) => e.id))), Ce = o(() => _e.value.find((e) => e.kind === "confirm_tool" && !ge.value.has(e.id))), we = o(() => new Set(_e.value.filter((e) => e.kind === "confirm_tool" ? !ge.value.has(e.id) : e.payload.request.delivery === "tool").map((e) => e.itemId)));
7835
- function Ee(e, t) {
7836
- let n = i.transformMessage?.(e, t) ?? e, r = $(n), a = (e) => we.value.has(e.itemId ?? e.id);
7837
- return !r.parts?.some((e) => e.type === "question" && ye.value.has(e.request.id) || e.type === "tool" && a(e.toolCall)) && !r.toolCalls?.some(a) ? n : {
7885
+ let t = de.value?.find((t) => t.id === e.turnId);
7886
+ return t ? t.status === "inProgress" : e.turnId === ue.value;
7887
+ })), Ce = o(() => new Set(J.value.map((e) => e.id))), we = o(() => ye.value.find((e) => e.kind === "confirm_tool" && !ve.value.has(e.id))), Te = o(() => new Set(ye.value.filter((e) => e.kind === "confirm_tool" ? !ve.value.has(e.id) : e.payload.request.delivery === "tool").map((e) => e.itemId)));
7888
+ function De(e, t) {
7889
+ let n = i.transformMessage?.(e, t) ?? e, r = $(n), a = (e) => Te.value.has(e.itemId ?? e.id);
7890
+ return !r.parts?.some((e) => e.type === "question" && xe.value.has(e.request.id) || e.type === "tool" && a(e.toolCall)) && !r.toolCalls?.some(a) ? n : {
7838
7891
  ...r,
7839
- parts: r.parts?.filter((e) => e.type !== "tool" || !a(e.toolCall)).map((e) => e.type === "question" && ye.value.has(e.request.id) ? {
7892
+ parts: r.parts?.filter((e) => e.type !== "tool" || !a(e.toolCall)).map((e) => e.type === "question" && xe.value.has(e.request.id) ? {
7840
7893
  ...e,
7841
7894
  historical: !0
7842
7895
  } : e),
7843
7896
  toolCalls: r.toolCalls?.filter((e) => !a(e))
7844
7897
  };
7845
7898
  }
7846
- let De = o(() => A((e) => e.thread?.approvals ?? [], () => i.approvals ?? O.value?.approvals ?? [])), Oe = o(() => De.value[0]), ke = o(() => A((e) => e.identity.busy ?? !1, () => i.busy ?? O.value?.busy ?? !1)), Ae = o(() => ke.value || U.value !== null), { armed: je, clear: Me } = to({
7899
+ let Oe = o(() => A((e) => e.thread?.approvals ?? [], () => i.approvals ?? O.value?.approvals ?? [])), Y = o(() => Oe.value[0]), ke = o(() => A((e) => e.identity.busy ?? !1, () => i.busy ?? O.value?.busy ?? !1)), Ae = o(() => ke.value || H.value !== null), { armed: je, clear: Me } = to({
7847
7900
  root: x,
7848
7901
  busy: () => ke.value,
7849
7902
  enabled: () => i.escapeInterrupt,
7850
7903
  onInterrupt: un
7851
- }), Ne = o(() => A((e) => e.identity.conversationKey, () => i.conversationKey === void 0 ? O.value?.activeConversationId : i.conversationKey)), Pe = o(() => A((e) => e.thread?.contextUsage, () => i.contextUsage === void 0 ? O.value?.contextUsage : i.contextUsage)), Fe = o(() => A((e) => e.identity.disabled ?? !1, () => i.disabled ?? (O.value ? O.value.status !== "ready" : !1))), Ie = o(() => K.value ?? A((e) => e.identity.error, () => i.error ?? O.value?.error ?? null) ?? null), Le = o(() => A((e) => e.thread?.goal ?? null, () => i.goal === void 0 ? O.value?.goal ?? null : i.goal)), Re = o(() => A((e) => e.history?.loading ?? !1, () => i.historyLoading ?? O.value?.historyLoading ?? !1)), ze = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), Be = o(() => A((e) => e.history?.hasOlder ?? !1, () => i.hasOlderHistory ?? O.value?.historyState?.hasOlder ?? !1)), Ve = o(() => A((e) => e.history?.loadingOlder ?? !1, () => i.loadingOlderHistory ?? O.value?.historyState?.loadingOlder ?? !1)), He = o(() => A((e) => e.catalogs?.modelCatalogStatus, () => i.modelCatalogStatus ?? O.value?.modelCatalogStatus)), Ue = o(() => A((e) => e.catalogs?.models, () => i.models ?? O.value?.models)), We = o(() => A((e) => e.composer?.approvalPreset, () => i.approvalPreset === void 0 ? O.value?.approvalPreset : i.approvalPreset)), Ge = o(() => A((e) => e.composer?.planMode, () => i.planMode ?? O.value?.planMode)), Ke = o(() => A((e) => e.catalogs?.plugins, () => i.plugins ?? O.value?.plugins)), qe = o(() => A((e) => e.catalogs?.mentionGroups, () => i.mentionGroups)), Je = o(() => Dt(i.presentation)), Xe = o(() => A((e) => e.thread?.queuedPrompts ?? [], () => i.queuedPrompts ?? O.value?.queuedPrompts ?? [])), Ze = o(() => A((e) => e.composer?.selectedModelId, () => i.selectedModelId === void 0 ? O.value?.selectedModelId : i.selectedModelId)), Qe = o(() => A((e) => e.composer?.selectedReasoningEffort, () => i.selectedReasoningEffort === void 0 ? O.value?.selectedReasoningEffort : i.selectedReasoningEffort)), $e = o(() => A((e) => e.composer?.selectedServiceTier, () => i.selectedServiceTier === void 0 ? O.value?.selectedServiceTier : i.selectedServiceTier)), et = o(() => A((e) => e.catalogs?.skillCatalogStatus, () => i.skillCatalogStatus ?? O.value?.skillCatalogStatus)), tt = o(() => A((e) => e.catalogs?.skills, () => i.skills ?? O.value?.skills)), nt = o(() => A((e) => e.thread?.turnGitDiff, () => i.turnGitDiff === void 0 ? O.value?.turnGitDiff : i.turnGitDiff)), rt = o(() => A((e) => e.policy?.attachEnabled ?? !0, () => i.attachEnabled !== !1)), it = o(() => ({
7904
+ }), Ne = o(() => A((e) => e.identity.conversationKey, () => i.conversationKey === void 0 ? O.value?.activeConversationId : i.conversationKey)), Pe = o(() => A((e) => e.thread?.contextUsage, () => i.contextUsage === void 0 ? O.value?.contextUsage : i.contextUsage)), Fe = o(() => A((e) => e.identity.disabled ?? !1, () => i.disabled ?? (O.value ? O.value.status !== "ready" : !1))), Ie = o(() => G.value ?? A((e) => e.identity.error, () => i.error ?? O.value?.error ?? null) ?? null), Le = o(() => A((e) => e.thread?.goal ?? null, () => i.goal === void 0 ? O.value?.goal ?? null : i.goal)), Re = o(() => A((e) => e.history?.loading ?? !1, () => i.historyLoading ?? O.value?.historyLoading ?? !1)), ze = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), Be = o(() => A((e) => e.history?.hasOlder ?? !1, () => i.hasOlderHistory ?? O.value?.historyState?.hasOlder ?? !1)), Ve = o(() => A((e) => e.history?.loadingOlder ?? !1, () => i.loadingOlderHistory ?? O.value?.historyState?.loadingOlder ?? !1)), He = o(() => A((e) => e.catalogs?.modelCatalogStatus, () => i.modelCatalogStatus ?? O.value?.modelCatalogStatus)), Ue = o(() => A((e) => e.catalogs?.models, () => i.models ?? O.value?.models)), We = o(() => A((e) => e.composer?.approvalPreset, () => i.approvalPreset === void 0 ? O.value?.approvalPreset : i.approvalPreset)), Ge = o(() => A((e) => e.composer?.planMode, () => i.planMode ?? O.value?.planMode)), Ke = o(() => A((e) => e.catalogs?.plugins, () => i.plugins ?? O.value?.plugins)), qe = o(() => A((e) => e.catalogs?.mentionGroups, () => i.mentionGroups)), Je = o(() => Dt(i.presentation)), Xe = o(() => A((e) => e.thread?.queuedPrompts ?? [], () => i.queuedPrompts ?? O.value?.queuedPrompts ?? [])), Ze = o(() => A((e) => e.composer?.selectedModelId, () => i.selectedModelId === void 0 ? O.value?.selectedModelId : i.selectedModelId)), Qe = o(() => A((e) => e.composer?.selectedReasoningEffort, () => i.selectedReasoningEffort === void 0 ? O.value?.selectedReasoningEffort : i.selectedReasoningEffort)), $e = o(() => A((e) => e.composer?.selectedServiceTier, () => i.selectedServiceTier === void 0 ? O.value?.selectedServiceTier : i.selectedServiceTier)), et = o(() => A((e) => e.catalogs?.skillCatalogStatus, () => i.skillCatalogStatus ?? O.value?.skillCatalogStatus)), tt = o(() => A((e) => e.catalogs?.skills, () => i.skills ?? O.value?.skills)), nt = o(() => A((e) => e.thread?.turnGitDiff, () => i.turnGitDiff === void 0 ? O.value?.turnGitDiff : i.turnGitDiff)), rt = o(() => A((e) => e.policy?.attachEnabled ?? !0, () => i.attachEnabled !== !1)), it = o(() => ({
7852
7905
  ...Ot,
7853
7906
  ...T.value ? T.value.capabilities : i.capabilities,
7854
7907
  approvalPresets: T.value?.capabilities?.approvalPresets ?? (T.value ? Ot.approvalPresets : i.approvalPresets ?? O.value?.approvalPresets ?? i.capabilities?.approvalPresets) ?? Ot.approvalPresets
7855
- })), at = o(() => A((e) => e.catalogs?.commands ?? [], () => i.commands ?? kt)), ot = o(() => A((e) => e.catalogs?.files ?? [], () => i.files)), st = o(() => A((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), ct = o(() => A((e) => e.composer?.menuItems ?? [], () => i.menuItems)), lt = o(() => A((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), ut = o(() => A((e) => e.composer?.placeholder, () => i.placeholder)), dt = o(() => A((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), ft = o(() => A((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), pt = o(() => A((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), mt = o(() => A((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), ht = o(() => A((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), gt = o(() => A((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), _t = o(() => ke.value || A((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), vt = o(() => Re.value), yt = o(() => se.value.length > 0 || ke.value || De.value.length > 0);
7856
- W(() => !!(Oe.value || Ce.value || xe.value), async (e, t) => {
7908
+ })), at = o(() => A((e) => e.catalogs?.commands ?? [], () => i.commands ?? kt)), ot = o(() => A((e) => e.catalogs?.files ?? [], () => i.files)), st = o(() => A((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), ct = o(() => A((e) => e.composer?.menuItems ?? [], () => i.menuItems)), lt = o(() => A((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), ut = o(() => A((e) => e.composer?.placeholder, () => i.placeholder)), dt = o(() => A((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), ft = o(() => A((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), pt = o(() => A((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), mt = o(() => A((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), ht = o(() => A((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), gt = o(() => A((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), _t = o(() => ke.value || A((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), vt = o(() => Re.value), yt = o(() => le.value.length > 0 || ke.value || Oe.value.length > 0);
7909
+ U(() => !!(Y.value || we.value || Se.value), async (e, t) => {
7857
7910
  if (e || !t) return;
7858
7911
  let n = document.activeElement;
7859
7912
  if (!n || !y.value?.contains(n)) return;
7860
7913
  let r = Ne.value;
7861
7914
  await S(), Ne.value === r && (document.activeElement === n || document.activeElement === document.body) && v.value?.focus({ preserveSelection: !0 });
7862
- }), W(() => i.modelValue, () => {
7863
- C.value || i.composerState || i.modelValue !== R.value && (R.value = i.modelValue, L.value = {
7915
+ }), U(() => i.modelValue, () => {
7916
+ C.value || i.composerState || i.modelValue !== L.value && (L.value = i.modelValue, I.value = {
7864
7917
  text: i.modelValue,
7865
7918
  selectionStart: i.modelValue.length,
7866
7919
  selectionEnd: i.modelValue.length
7867
7920
  });
7868
- }), W(j, (e) => {
7921
+ }), U(j, (e) => {
7869
7922
  if (!e) return;
7870
7923
  let t = Ii(e);
7871
- L.value = t, R.value = t.text;
7872
- }, { deep: !0 }), W(N, (e) => {
7873
- q.value = [...e];
7874
- }), W(rt, (e) => {
7875
- !e && q.value.length > 0 && Kt([]);
7876
- }), W(Ne, (e, t) => {
7924
+ I.value = t, L.value = t.text;
7925
+ }, { deep: !0 }), U(N, (e) => {
7926
+ K.value = [...e];
7927
+ }), U(rt, (e) => {
7928
+ !e && K.value.length > 0 && Kt([]);
7929
+ }), U(Ne, (e, t) => {
7877
7930
  h.value = null, g.value = /* @__PURE__ */ new Set();
7878
- let n = U.value;
7879
- n && (!n.hasAdoptedConversationKey && (t ?? null) === n.originConversationKey ? U.value = {
7931
+ let n = H.value;
7932
+ n && (!n.hasAdoptedConversationKey && (t ?? null) === n.originConversationKey ? H.value = {
7880
7933
  ...n,
7881
7934
  adoptedConversationKey: e ?? null,
7882
7935
  hasAdoptedConversationKey: !0
7883
- } : (e ?? null) !== n.originConversationKey && (e ?? null) !== n.adoptedConversationKey && (U.value = null)), re += 1, H.value = null, Me(), B.value = null, K.value = null;
7936
+ } : (e ?? null) !== n.originConversationKey && (e ?? null) !== n.adoptedConversationKey && (H.value = null)), ie += 1, V.value = null, Me(), z.value = null, G.value = null;
7884
7937
  let r = Ii(j.value ?? (C.value ? {
7885
7938
  text: "",
7886
7939
  selectionStart: 0,
@@ -7890,52 +7943,52 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7890
7943
  selectionStart: i.modelValue.length,
7891
7944
  selectionEnd: i.modelValue.length
7892
7945
  }));
7893
- L.value = r, R.value = r.text;
7894
- }), W(oe, (e) => {
7895
- let t = U.value;
7946
+ I.value = r, L.value = r.text;
7947
+ }), U(ce, (e) => {
7948
+ let t = H.value;
7896
7949
  if (t) {
7897
7950
  if (e.some((e) => At(e, t))) {
7898
- U.value = null;
7951
+ H.value = null;
7899
7952
  return;
7900
7953
  }
7901
- t.hasAdoptedConversationKey && e.length > 0 && (U.value = null);
7954
+ t.hasAdoptedConversationKey && e.length > 0 && (H.value = null);
7902
7955
  }
7903
- }), W([se, le], () => {
7904
- let e = H.value;
7905
- e && (le.value?.some((t) => t.id === e) || se.value.some((t) => $(t).turnId === e) || (re += 1, H.value = null));
7906
- }), W(Xe, (e) => {
7907
- let t = B.value;
7908
- t && !e.some((e) => e.id === t) && (B.value = null);
7909
- }), W([
7956
+ }), U([le, de], () => {
7957
+ let e = V.value;
7958
+ e && (de.value?.some((t) => t.id === e) || le.value.some((t) => $(t).turnId === e) || (ie += 1, V.value = null));
7959
+ }), U(Xe, (e) => {
7960
+ let t = z.value;
7961
+ t && !e.some((e) => e.id === t) && (z.value = null);
7962
+ }), U([
7910
7963
  Ne,
7911
7964
  () => O.value?.activeConversationId,
7912
7965
  () => E.value?.readPromptHistory,
7913
- pe
7966
+ he
7914
7967
  ], () => {
7915
7968
  bt();
7916
- }, { immediate: !0 }), W(() => [O.value?.status, O.value?.error], ([e, t]) => {
7917
- e === "ready" && t == null && (K.value = null);
7969
+ }, { immediate: !0 }), U(() => [O.value?.status, O.value?.error], ([e, t]) => {
7970
+ e === "ready" && t == null && (G.value = null);
7918
7971
  }), D(() => {
7919
7972
  i.surface && i.surface.state.status === "idle" && Q(() => i.surface.connect());
7920
7973
  });
7921
7974
  async function bt() {
7922
- let e = ++ae, t = Ne.value;
7923
- if (ie.value = !1, Y.value = [], t == null || pe.value !== void 0) return;
7924
- let n = J.get(t);
7975
+ let e = ++se, t = Ne.value;
7976
+ if (q.value = !1, oe.value = [], t == null || he.value !== void 0) return;
7977
+ let n = ae.get(t);
7925
7978
  if (n) {
7926
- Y.value = n;
7979
+ oe.value = n;
7927
7980
  return;
7928
7981
  }
7929
7982
  let r = E.value?.readPromptHistory, a = i.surface, o = O.value?.activeConversationId;
7930
7983
  if (!(!r && !o)) {
7931
- ie.value = !0;
7984
+ q.value = !0;
7932
7985
  try {
7933
7986
  let n = r ? await r() : (await a.readConversationPromptHistory(o)).prompts;
7934
- if (e !== ae || Ne.value !== t) return;
7987
+ if (e !== se || Ne.value !== t) return;
7935
7988
  let i = [...n].slice(-100);
7936
- J.set(t, i), Y.value = i;
7989
+ ae.set(t, i), oe.value = i;
7937
7990
  } catch {} finally {
7938
- e === ae && (ie.value = !1);
7991
+ e === se && (q.value = !1);
7939
7992
  }
7940
7993
  }
7941
7994
  }
@@ -7950,16 +8003,16 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7950
8003
  }
7951
8004
  function St(e, t) {
7952
8005
  Jt("");
7953
- let n = B.value;
8006
+ let n = z.value;
7954
8007
  if (n) {
7955
- B.value = null, cn(n, e), Kt([]);
8008
+ z.value = null, cn(n, e), Kt([]);
7956
8009
  return;
7957
8010
  }
7958
- let r = qt(q.value, t), o = Ct();
8011
+ let r = qt(K.value, t), o = Ct();
7959
8012
  if (b.value?.scrollToBottom(), S(() => b.value?.scrollToBottom()), C.value) {
7960
8013
  let t = E.value?.submit;
7961
8014
  if (t) {
7962
- let n = Et(e, q.value);
8015
+ let n = Et(e, K.value);
7963
8016
  Q(() => Promise.resolve(t(e, r)), () => {
7964
8017
  jt(n), g.value = o;
7965
8018
  });
@@ -7973,10 +8026,10 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7973
8026
  }
7974
8027
  function Ct() {
7975
8028
  let e = g.value;
7976
- return g.value = /* @__PURE__ */ new Set([...e, ...be.value.filter((e) => e.payload.request.delivery === "async").map((e) => e.id)]), h.value = null, e;
8029
+ return g.value = /* @__PURE__ */ new Set([...e, ...J.value.filter((e) => e.payload.request.delivery === "async").map((e) => e.id)]), h.value = null, e;
7977
8030
  }
7978
8031
  function wt(e) {
7979
- if (!be.value.some((t) => t.id === e)) return;
8032
+ if (!J.value.some((t) => t.id === e)) return;
7980
8033
  let t = {
7981
8034
  id: e,
7982
8035
  payload: {
@@ -7990,9 +8043,9 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
7990
8043
  Z("continueInterruptedTurn") || C.value || (a("continueInterruptedTurn"), i.surface && Q(() => i.surface.continueInterruptedTurn()));
7991
8044
  }
7992
8045
  function Et(e, t) {
7993
- if (ke.value || oe.value.length > 0) return null;
7994
- let n = `codex-optimistic-user-${++ne}`;
7995
- return U.value = {
8046
+ if (ke.value || ce.value.length > 0) return null;
8047
+ let n = `codex-optimistic-user-${++re}`;
8048
+ return H.value = {
7996
8049
  adoptedConversationKey: null,
7997
8050
  hasAdoptedConversationKey: !1,
7998
8051
  originConversationKey: Ne.value ?? null,
@@ -8022,7 +8075,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8022
8075
  return n.role === "user" && Ca(n.content) === t.prompt;
8023
8076
  }
8024
8077
  function jt(e) {
8025
- e && U.value?.message.id === e && (U.value = null);
8078
+ e && H.value?.message.id === e && (H.value = null);
8026
8079
  }
8027
8080
  function Mt() {
8028
8081
  if (!Z("loadOlderHistory") && !C.value) {
@@ -8034,7 +8087,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8034
8087
  }
8035
8088
  }
8036
8089
  function Nt(e) {
8037
- let t = se.value[e];
8090
+ let t = le.value[e];
8038
8091
  if (!t) return;
8039
8092
  let n = $(t), r = Ca(n.content);
8040
8093
  n.role !== "user" || !r || (Jt(r), !Z("quoteMessage", e) && (C.value || a("quoteMessage", e)));
@@ -8073,7 +8126,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8073
8126
  async function Lt(e, t) {
8074
8127
  let n = C.value ? E.value?.openImage : i.openImage;
8075
8128
  if (!n) return !1;
8076
- K.value = null;
8129
+ G.value = null;
8077
8130
  try {
8078
8131
  return await n(e, t) !== !1;
8079
8132
  } catch (e) {
@@ -8113,15 +8166,15 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8113
8166
  }
8114
8167
  }
8115
8168
  function Wt(e) {
8116
- let t = new Map(q.value.map((e) => [e.reference, e]));
8169
+ let t = new Map(K.value.map((e) => [e.reference, e]));
8117
8170
  for (let n of e) t.set(n.reference, n);
8118
8171
  Kt([...t.values()].slice(0, 20));
8119
8172
  }
8120
8173
  function Gt(e) {
8121
- Kt(q.value.filter((t) => t.id !== e));
8174
+ Kt(K.value.filter((t) => t.id !== e));
8122
8175
  }
8123
8176
  function Kt(e) {
8124
- q.value = e, !Z("updateAttachments", e) && (C.value || a("attachmentsChange", e));
8177
+ K.value = e, !Z("updateAttachments", e) && (C.value || a("attachmentsChange", e));
8125
8178
  }
8126
8179
  function qt(e, t) {
8127
8180
  if (e.length === 0) return t;
@@ -8146,7 +8199,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8146
8199
  }
8147
8200
  function Yt(e) {
8148
8201
  let t = Ii(e);
8149
- L.value = t, R.value = t.text, !Z("updateComposerState", t) && (C.value || (a("update:modelValue", t.text), a("update:composerState", t)));
8202
+ I.value = t, L.value = t.text, !Z("updateComposerState", t) && (C.value || (a("update:modelValue", t.text), a("update:composerState", t)));
8150
8203
  }
8151
8204
  function Xt() {
8152
8205
  Z("cancel") || C.value || (a("cancel"), i.surface && Q(() => i.surface.interrupt()));
@@ -8158,14 +8211,14 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8158
8211
  Z("onMessageCopied", e) || C.value || a("copyMessage", e);
8159
8212
  }
8160
8213
  async function $t(e) {
8161
- if (H.value !== null) return;
8214
+ if (V.value !== null) return;
8162
8215
  let t = E.value?.deleteTurn;
8163
8216
  if (C.value && !t) return;
8164
- let n = ++re, r = !1;
8165
- H.value = e;
8217
+ let n = ++ie, r = !1;
8218
+ V.value = e;
8166
8219
  try {
8167
8220
  if (t) {
8168
- K.value = null;
8221
+ G.value = null;
8169
8222
  let n;
8170
8223
  try {
8171
8224
  n = t(e);
@@ -8182,7 +8235,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8182
8235
  }
8183
8236
  a("deleteTurn", e), i.surface && await Q(() => i.surface.deleteTurn(e));
8184
8237
  } finally {
8185
- !r && re === n && (H.value = null);
8238
+ !r && ie === n && (V.value = null);
8186
8239
  }
8187
8240
  }
8188
8241
  function en(e) {
@@ -8201,18 +8254,18 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8201
8254
  Z("clearGoal") || C.value || (a("clearGoal"), i.surface && Q(() => i.surface.clearGoal()));
8202
8255
  }
8203
8256
  function on(e) {
8204
- B.value === e && (B.value = null), !Z("deleteQueuedPrompt", e) && (C.value || (a("deleteQueuedPrompt", e), i.surface && Q(() => i.surface.deleteQueuedPrompt(e))));
8257
+ z.value === e && (z.value = null), !Z("deleteQueuedPrompt", e) && (C.value || (a("deleteQueuedPrompt", e), i.surface && Q(() => i.surface.deleteQueuedPrompt(e))));
8205
8258
  }
8206
8259
  function sn(e) {
8207
- if (R.value.length > 0) return;
8260
+ if (L.value.length > 0) return;
8208
8261
  let t = Xe.value.find((t) => t.id === e);
8209
- t && (B.value = e, Jt(t.text), v.value?.focus());
8262
+ t && (z.value = e, Jt(t.text), v.value?.focus());
8210
8263
  }
8211
8264
  function cn(e, t) {
8212
8265
  Z("updateQueuedPrompt", e, t) || C.value || (a("updateQueuedPrompt", e, t), i.surface && Q(() => i.surface.updateQueuedPrompt(e, t)));
8213
8266
  }
8214
8267
  function ln(e, t) {
8215
- it.value.steerPrompt && (B.value === e && (B.value = null), t === void 0 ? Z("steerQueuedPrompt", e) : Z("steerQueuedPrompt", e, t), !C.value && (t === void 0 ? a("steerQueuedPrompt", e) : a("steerQueuedPrompt", e, t), i.surface && Q(() => t === void 0 ? i.surface.steerQueuedPrompt(e) : i.surface.steerQueuedPrompt(e, t))));
8268
+ it.value.steerPrompt && (z.value === e && (z.value = null), t === void 0 ? Z("steerQueuedPrompt", e) : Z("steerQueuedPrompt", e, t), !C.value && (t === void 0 ? a("steerQueuedPrompt", e) : a("steerQueuedPrompt", e, t), i.surface && Q(() => t === void 0 ? i.surface.steerQueuedPrompt(e) : i.surface.steerQueuedPrompt(e, t))));
8216
8269
  }
8217
8270
  function un() {
8218
8271
  Me(), !Z("interrupt") && (C.value || (a("interrupt"), i.surface && Q(() => i.surface.interrupt())));
@@ -8222,12 +8275,12 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8222
8275
  St(e, t);
8223
8276
  return;
8224
8277
  }
8225
- let n = B.value;
8278
+ let n = z.value;
8226
8279
  if (n) {
8227
- B.value = null, ln(n, e), Kt([]);
8280
+ z.value = null, ln(n, e), Kt([]);
8228
8281
  return;
8229
8282
  }
8230
- let r = qt(q.value, t);
8283
+ let r = qt(K.value, t);
8231
8284
  if (C.value) {
8232
8285
  let t = E.value?.steer;
8233
8286
  if (t) {
@@ -8279,7 +8332,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8279
8332
  return n ? (Q(() => Promise.resolve(n(...t))), !0) : !1;
8280
8333
  }
8281
8334
  async function Q(e, t) {
8282
- K.value = null;
8335
+ G.value = null;
8283
8336
  try {
8284
8337
  await e();
8285
8338
  } catch (e) {
@@ -8287,10 +8340,10 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8287
8340
  }
8288
8341
  }
8289
8342
  function xn(e) {
8290
- K.value = e instanceof Error ? e.message : String(e);
8343
+ G.value = e instanceof Error ? e.message : String(e);
8291
8344
  }
8292
8345
  function Sn(e) {
8293
- K.value = e, a("error", e);
8346
+ G.value = e, a("error", e);
8294
8347
  }
8295
8348
  function Cn() {
8296
8349
  v.value?.focus();
@@ -8309,30 +8362,30 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8309
8362
  }, [vt.value ? (k(), s(bs, {
8310
8363
  key: 0,
8311
8364
  class: "codex-conversation-pane__history-loader"
8312
- })) : (k(), s(Ku, {
8365
+ })) : (k(), s(qu, {
8313
8366
  key: 1,
8314
8367
  class: "codex-conversation-pane__layout",
8315
8368
  "scroll-mode": "child"
8316
8369
  }, {
8317
- footer: G(() => [u("footer", {
8370
+ footer: W(() => [u("footer", {
8318
8371
  ref_key: "footerElement",
8319
8372
  ref: y,
8320
8373
  class: "codex-conversation-pane__footer"
8321
- }, [Ie.value ? (k(), l("p", Zu, z(Ie.value), 1)) : c("", !0), Oe.value ? (k(), l("div", Qu, [F(n.$slots, "approval", { approval: Oe.value }, () => [(k(), s(na, {
8322
- key: Oe.value.id,
8323
- approval: Oe.value,
8374
+ }, [Ie.value ? (k(), l("p", Qu, R(Ie.value), 1)) : c("", !0), Y.value ? (k(), l("div", $u, [F(n.$slots, "approval", { approval: Y.value }, () => [(k(), s(na, {
8375
+ key: Y.value.id,
8376
+ approval: Y.value,
8324
8377
  disabled: Fe.value,
8325
- onResolve: r[1] ||= (e, t) => mn(Oe.value.id, e, t)
8326
- }, null, 8, ["approval", "disabled"]))], !0)])) : Ce.value ? (k(), s(Zo, {
8327
- key: Ce.value.id,
8378
+ onResolve: r[1] ||= (e, t) => mn(Y.value.id, e, t)
8379
+ }, null, 8, ["approval", "disabled"]))], !0)])) : we.value ? (k(), s(Zo, {
8380
+ key: we.value.id,
8328
8381
  class: "codex-conversation-pane__confirmation-composer",
8329
- request: Ce.value,
8382
+ request: we.value,
8330
8383
  onClientResponse: Zt
8331
- }, null, 8, ["request"])) : xe.value ? (k(), s(Jo, {
8332
- key: xe.value.id,
8384
+ }, null, 8, ["request"])) : Se.value ? (k(), s(Jo, {
8385
+ key: Se.value.id,
8333
8386
  class: "codex-conversation-pane__question-composer",
8334
- "answered-client-request-ids": ge.value,
8335
- request: xe.value,
8387
+ "answered-client-request-ids": ve.value,
8388
+ request: Se.value,
8336
8389
  onClientResponse: Zt
8337
8390
  }, null, 8, ["answered-client-request-ids", "request"])) : (k(), l(t, { key: 4 }, [
8338
8391
  F(n.$slots, "before-composer", {}, void 0, !0),
@@ -8342,7 +8395,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8342
8395
  goal: Le.value,
8343
8396
  presentation: Je.value.shelf,
8344
8397
  "queued-prompts": Xe.value,
8345
- "queued-prompt-edit-disabled": R.value.length > 0,
8398
+ "queued-prompt-edit-disabled": L.value.length > 0,
8346
8399
  "queued-prompt-steer-disabled": !it.value.steerPrompt,
8347
8400
  "turn-git-diff": nt.value,
8348
8401
  onClearGoal: an,
@@ -8352,7 +8405,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8352
8405
  onSteerQueuedPrompt: ln
8353
8406
  }, d({ _: 2 }, [n.$slots["composer-shelf-actions"] ? {
8354
8407
  name: "actions",
8355
- fn: G((e) => [F(n.$slots, "composer-shelf-actions", w(_(e)), void 0, !0)]),
8408
+ fn: W((e) => [F(n.$slots, "composer-shelf-actions", w(_(e)), void 0, !0)]),
8356
8409
  key: "0"
8357
8410
  } : void 0]), 1032, [
8358
8411
  "disabled",
@@ -8371,21 +8424,21 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8371
8424
  autofocus: e.autofocus,
8372
8425
  "attach-enabled": rt.value,
8373
8426
  capabilities: it.value,
8374
- "can-continue-interrupted-turn": ue.value,
8427
+ "can-continue-interrupted-turn": fe.value,
8375
8428
  commands: at.value,
8376
- "composer-state": L.value,
8429
+ "composer-state": I.value,
8377
8430
  "context-usage": Pe.value,
8378
8431
  disabled: Fe.value,
8379
- draft: R.value,
8432
+ draft: L.value,
8380
8433
  "empty-send-prompt": e.emptySendPrompt,
8381
8434
  "follow-up-behavior": dt.value,
8382
8435
  files: ot.value,
8383
- "has-attachments": q.value.length > 0,
8436
+ "has-attachments": K.value.length > 0,
8384
8437
  "has-external-content": e.hasComposerContext,
8385
- "interrupt-armed": V(je),
8438
+ "interrupt-armed": B(je),
8386
8439
  plugins: Ke.value,
8387
- "prompt-history": me.value,
8388
- "prompt-history-loading": ie.value,
8440
+ "prompt-history": ge.value,
8441
+ "prompt-history-loading": q.value,
8389
8442
  "queued-prompt-id": Xe.value[0]?.id ?? null,
8390
8443
  "is-sending": ke.value,
8391
8444
  "leading-menu-items": st.value,
@@ -8420,24 +8473,24 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8420
8473
  "onUpdate:reasoningEffort": _n,
8421
8474
  "onUpdate:serviceTier": vn
8422
8475
  }, d({
8423
- "before-meta": G(() => [be.value.length > 0 ? (k(), l("span", $u, [u("button", {
8476
+ "before-meta": W(() => [J.value.length > 0 ? (k(), l("span", ed, [u("button", {
8424
8477
  class: "codex-conversation-pane__pending-question-cancel",
8425
8478
  type: "button",
8426
8479
  "aria-label": "Cancel pending question",
8427
- onClick: r[2] ||= (e) => wt(be.value[0].id)
8428
- }, [m(V(Te), {
8480
+ onClick: r[2] ||= (e) => wt(J.value[0].id)
8481
+ }, [m(B(Ee), {
8429
8482
  class: "codex-conversation-pane__pending-question-icon",
8430
8483
  "aria-hidden": "true"
8431
- }), m(V(de), {
8484
+ }), m(B(pe), {
8432
8485
  class: "codex-conversation-pane__pending-question-remove",
8433
8486
  "aria-hidden": "true"
8434
8487
  })]), u("button", {
8435
8488
  class: "codex-conversation-pane__pending-question-open",
8436
8489
  type: "button",
8437
- "aria-label": be.value.length === 1 ? "Pending question" : `${be.value.length} pending questions`,
8438
- onClick: r[3] ||= (e) => h.value = be.value[0].id
8439
- }, z(be.value.length === 1 ? "Pending question" : `${be.value.length} pending questions`), 9, ed)])) : c("", !0)]),
8440
- before: G(() => [q.value.length > 0 ? (k(), l("div", td, [(k(!0), l(t, null, P(q.value, (e, t) => (k(), l("div", {
8490
+ "aria-label": J.value.length === 1 ? "Pending question" : `${J.value.length} pending questions`,
8491
+ onClick: r[3] ||= (e) => h.value = J.value[0].id
8492
+ }, R(J.value.length === 1 ? "Pending question" : `${J.value.length} pending questions`), 9, td)])) : c("", !0)]),
8493
+ before: W(() => [K.value.length > 0 ? (k(), l("div", nd, [(k(!0), l(t, null, P(K.value, (e, t) => (k(), l("div", {
8441
8494
  key: e.id,
8442
8495
  class: "codex-conversation-pane__attachment"
8443
8496
  }, [
@@ -8446,13 +8499,13 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8446
8499
  class: "codex-conversation-pane__attachment-preview",
8447
8500
  src: e.previewUrl,
8448
8501
  alt: e.name
8449
- }, null, 8, nd)) : (k(), l("span", rd, "📎")),
8502
+ }, null, 8, rd)) : (k(), l("span", id, "📎")),
8450
8503
  u("span", {
8451
8504
  class: "codex-conversation-pane__attachment-name",
8452
8505
  title: e.name
8453
- }, z(e.name), 9, id),
8454
- u("span", ad, [F(n.$slots, "composer-attachment-actions", {
8455
- attachments: q.value,
8506
+ }, R(e.name), 9, ad),
8507
+ u("span", od, [F(n.$slots, "composer-attachment-actions", {
8508
+ attachments: K.value,
8456
8509
  index: t,
8457
8510
  disabled: Fe.value
8458
8511
  }, void 0, !0), u("button", {
@@ -8461,68 +8514,68 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8461
8514
  "aria-label": `Remove ${e.name}`,
8462
8515
  disabled: Fe.value,
8463
8516
  onClick: (t) => Gt(e.id)
8464
- }, [m(V(Ye), { "aria-hidden": "true" })], 8, od)])
8517
+ }, [m(B(Ye), { "aria-hidden": "true" })], 8, sd)])
8465
8518
  ]))), 128))])) : c("", !0), F(n.$slots, "composer-context", { disabled: Fe.value }, void 0, !0)]),
8466
8519
  _: 2
8467
8520
  }, [
8468
8521
  n.$slots["menu-icon"] ? {
8469
8522
  name: "menu-icon",
8470
- fn: G((e) => [F(n.$slots, "menu-icon", w(_(e)), void 0, !0)]),
8523
+ fn: W((e) => [F(n.$slots, "menu-icon", w(_(e)), void 0, !0)]),
8471
8524
  key: "0"
8472
8525
  } : void 0,
8473
8526
  n.$slots["menu-item"] ? {
8474
8527
  name: "menu-item",
8475
- fn: G((e) => [F(n.$slots, "menu-item", w(_(e)), void 0, !0)]),
8528
+ fn: W((e) => [F(n.$slots, "menu-item", w(_(e)), void 0, !0)]),
8476
8529
  key: "1"
8477
8530
  } : void 0,
8478
8531
  n.$slots["suggestion-item"] ? {
8479
8532
  name: "suggestion-item",
8480
- fn: G((e) => [F(n.$slots, "suggestion-item", w(_(e)), void 0, !0)]),
8533
+ fn: W((e) => [F(n.$slots, "suggestion-item", w(_(e)), void 0, !0)]),
8481
8534
  key: "2"
8482
8535
  } : void 0,
8483
8536
  n.$slots.mention ? {
8484
8537
  name: "mention",
8485
- fn: G((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
8538
+ fn: W((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
8486
8539
  key: "3"
8487
8540
  } : void 0,
8488
8541
  n.$slots["composer-after-input"] ? {
8489
8542
  name: "after-input",
8490
- fn: G(() => [F(n.$slots, "composer-after-input", {}, void 0, !0)]),
8543
+ fn: W(() => [F(n.$slots, "composer-after-input", {}, void 0, !0)]),
8491
8544
  key: "4"
8492
8545
  } : void 0,
8493
8546
  n.$slots["composer-after"] ? {
8494
8547
  name: "after",
8495
- fn: G(() => [F(n.$slots, "composer-after", {}, void 0, !0)]),
8548
+ fn: W(() => [F(n.$slots, "composer-after", {}, void 0, !0)]),
8496
8549
  key: "5"
8497
8550
  } : void 0
8498
8551
  ]), 1032, /* @__PURE__ */ "autofocus.attach-enabled.capabilities.can-continue-interrupted-turn.commands.composer-state.context-usage.disabled.draft.empty-send-prompt.follow-up-behavior.files.has-attachments.has-external-content.interrupt-armed.plugins.prompt-history.prompt-history-loading.queued-prompt-id.is-sending.leading-menu-items.menu-items.model-menu-items.mention-groups.model-catalog-status.models.placeholder.approval-preset.plan-mode.presentation.selected-model-id.selected-reasoning-effort.selected-service-tier.skill-catalog-status.skills.transcribe-audio".split("."))),
8499
8552
  F(n.$slots, "after-composer", {}, void 0, !0)
8500
8553
  ], 64))], 512)]),
8501
- default: G(() => [yt.value ? (k(), s(Hu, {
8554
+ default: W(() => [yt.value ? (k(), s(Uu, {
8502
8555
  key: 0,
8503
8556
  ref_key: "messageList",
8504
8557
  ref: b,
8505
8558
  class: "codex-conversation-pane__messages",
8506
8559
  "actions-disabled": gt.value,
8507
- "active-turn-id": ce.value,
8508
- "answered-client-request-ids": ge.value,
8560
+ "active-turn-id": ue.value,
8561
+ "answered-client-request-ids": ve.value,
8509
8562
  "aria-label": e.ariaLabel,
8510
8563
  busy: Ae.value,
8511
8564
  "can-delete-turn": ft.value,
8512
8565
  "can-edit-turn": pt.value,
8513
8566
  "can-fork-turn": mt.value,
8514
8567
  "can-retry-turn": ht.value,
8515
- "deleting-turn-id": H.value,
8568
+ "deleting-turn-id": V.value,
8516
8569
  "empty-label": e.emptyTitle,
8517
8570
  "follow-ups-disabled": _t.value,
8518
8571
  "has-older-messages": Be.value,
8519
- "hidden-client-request-ids": Se.value,
8572
+ "hidden-client-request-ids": Ce.value,
8520
8573
  "render-strategy": ze.value,
8521
8574
  "loading-older-messages": Ve.value,
8522
8575
  "initial-message-batch-size": e.initialMessageBatchSize,
8523
8576
  "message-batch-size": e.messageBatchSize,
8524
8577
  "message-text-selection": e.messageTextSelection,
8525
- messages: se.value,
8578
+ messages: le.value,
8526
8579
  "mention-groups": qe.value,
8527
8580
  "open-image": Lt,
8528
8581
  plugins: Ke.value,
@@ -8532,8 +8585,8 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8532
8585
  "show-tool-details": e.showToolDetails,
8533
8586
  skills: tt.value,
8534
8587
  "tool-visibility": e.toolVisibility,
8535
- "transform-message": ye.value.size > 0 || we.value.size > 0 ? Ee : e.transformMessage,
8536
- turns: le.value,
8588
+ "transform-message": xe.value.size > 0 || Te.value.size > 0 ? De : e.transformMessage,
8589
+ turns: de.value,
8537
8590
  onCancel: Xt,
8538
8591
  onClientResponse: Zt,
8539
8592
  onCopyMessage: Qt,
@@ -8550,71 +8603,71 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8550
8603
  }, d({ _: 2 }, [
8551
8604
  n.$slots.message ? {
8552
8605
  name: "message",
8553
- fn: G((e) => [F(n.$slots, "message", w(_(e)), void 0, !0)]),
8606
+ fn: W((e) => [F(n.$slots, "message", w(_(e)), void 0, !0)]),
8554
8607
  key: "0"
8555
8608
  } : void 0,
8556
8609
  n.$slots["message-actions"] ? {
8557
8610
  name: "actions",
8558
- fn: G((e) => [F(n.$slots, "message-actions", w(_(e)), void 0, !0)]),
8611
+ fn: W((e) => [F(n.$slots, "message-actions", w(_(e)), void 0, !0)]),
8559
8612
  key: "1"
8560
8613
  } : void 0,
8561
8614
  n.$slots["message-attachment"] ? {
8562
8615
  name: "attachment",
8563
- fn: G((e) => [F(n.$slots, "message-attachment", w(_(e)), void 0, !0)]),
8616
+ fn: W((e) => [F(n.$slots, "message-attachment", w(_(e)), void 0, !0)]),
8564
8617
  key: "2"
8565
8618
  } : void 0,
8566
8619
  n.$slots["message-block"] ? {
8567
8620
  name: "block",
8568
- fn: G((e) => [F(n.$slots, "message-block", w(_(e)), void 0, !0)]),
8621
+ fn: W((e) => [F(n.$slots, "message-block", w(_(e)), void 0, !0)]),
8569
8622
  key: "3"
8570
8623
  } : void 0,
8571
8624
  n.$slots["message-header"] ? {
8572
8625
  name: "header",
8573
- fn: G((e) => [F(n.$slots, "message-header", w(_(e)), void 0, !0)]),
8626
+ fn: W((e) => [F(n.$slots, "message-header", w(_(e)), void 0, !0)]),
8574
8627
  key: "4"
8575
8628
  } : void 0,
8576
8629
  n.$slots.mention ? {
8577
8630
  name: "mention",
8578
- fn: G((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
8631
+ fn: W((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
8579
8632
  key: "5"
8580
8633
  } : void 0,
8581
8634
  n.$slots["message-status"] ? {
8582
8635
  name: "status",
8583
- fn: G((e) => [F(n.$slots, "message-status", w(_(e)), void 0, !0)]),
8636
+ fn: W((e) => [F(n.$slots, "message-status", w(_(e)), void 0, !0)]),
8584
8637
  key: "6"
8585
8638
  } : void 0,
8586
8639
  n.$slots["message-text"] ? {
8587
8640
  name: "text",
8588
- fn: G((e) => [F(n.$slots, "message-text", w(_(e)), void 0, !0)]),
8641
+ fn: W((e) => [F(n.$slots, "message-text", w(_(e)), void 0, !0)]),
8589
8642
  key: "7"
8590
8643
  } : void 0,
8591
8644
  n.$slots["message-thinking"] ? {
8592
8645
  name: "thinking",
8593
- fn: G((e) => [F(n.$slots, "message-thinking", w(_(e)), void 0, !0)]),
8646
+ fn: W((e) => [F(n.$slots, "message-thinking", w(_(e)), void 0, !0)]),
8594
8647
  key: "8"
8595
8648
  } : void 0,
8596
8649
  n.$slots["message-tool"] ? {
8597
8650
  name: "tool",
8598
- fn: G((e) => [F(n.$slots, "message-tool", w(_(e)), void 0, !0)]),
8651
+ fn: W((e) => [F(n.$slots, "message-tool", w(_(e)), void 0, !0)]),
8599
8652
  key: "9"
8600
8653
  } : void 0
8601
- ]), 1032, /* @__PURE__ */ "actions-disabled.active-turn-id.answered-client-request-ids.aria-label.busy.can-delete-turn.can-edit-turn.can-fork-turn.can-retry-turn.deleting-turn-id.empty-label.follow-ups-disabled.has-older-messages.hidden-client-request-ids.render-strategy.loading-older-messages.initial-message-batch-size.message-batch-size.message-text-selection.messages.mention-groups.plugins.presentation.reset-key.scroll-to-bottom-label.show-tool-details.skills.tool-visibility.transform-message.turns".split("."))) : (k(), l("div", Ju, [F(n.$slots, "empty", {
8654
+ ]), 1032, /* @__PURE__ */ "actions-disabled.active-turn-id.answered-client-request-ids.aria-label.busy.can-delete-turn.can-edit-turn.can-fork-turn.can-retry-turn.deleting-turn-id.empty-label.follow-ups-disabled.has-older-messages.hidden-client-request-ids.render-strategy.loading-older-messages.initial-message-batch-size.message-batch-size.message-text-selection.messages.mention-groups.plugins.presentation.reset-key.scroll-to-bottom-label.show-tool-details.skills.tool-visibility.transform-message.turns".split("."))) : (k(), l("div", Yu, [F(n.$slots, "empty", {
8602
8655
  title: e.emptyTitle,
8603
8656
  description: e.emptyDescription
8604
- }, () => [u("div", Yu, [u("h1", null, z(e.emptyTitle), 1), e.emptyDescription ? (k(), l("p", Xu, z(e.emptyDescription), 1)) : c("", !0)])], !0)]))]),
8657
+ }, () => [u("div", Xu, [u("h1", null, R(e.emptyTitle), 1), e.emptyDescription ? (k(), l("p", Zu, R(e.emptyDescription), 1)) : c("", !0)])], !0)]))]),
8605
8658
  _: 3
8606
- }))], 40, qu));
8659
+ }))], 40, Ju));
8607
8660
  }
8608
- }), [["__scopeId", "data-v-c7008843"]]), cd = {
8661
+ }), [["__scopeId", "data-v-c7008843"]]), ld = {
8609
8662
  class: "codex-conversation-sidebar",
8610
8663
  "aria-label": "Conversations"
8611
- }, ld = { class: "codex-conversation-sidebar__header" }, ud = { class: "codex-conversation-sidebar__brand" }, dd = ["disabled"], fd = {
8664
+ }, ud = { class: "codex-conversation-sidebar__header" }, dd = { class: "codex-conversation-sidebar__brand" }, fd = ["disabled"], pd = {
8612
8665
  key: 0,
8613
8666
  class: "codex-conversation-sidebar__empty"
8614
- }, pd = {
8667
+ }, md = {
8615
8668
  key: 1,
8616
8669
  class: "codex-conversation-sidebar__list"
8617
- }, md = ["aria-current", "onClick"], hd = ["aria-label", "title"], gd = { class: "codex-conversation-sidebar__title" }, _d = { class: "codex-conversation-sidebar__time" }, vd = ["aria-label", "onClick"], yd = /*#__PURE__*/ X(/* @__PURE__ */ h({
8670
+ }, hd = ["aria-current", "onClick"], gd = ["aria-label", "title"], _d = { class: "codex-conversation-sidebar__title" }, vd = { class: "codex-conversation-sidebar__time" }, yd = ["aria-label", "onClick"], bd = /*#__PURE__*/ X(/* @__PURE__ */ h({
8618
8671
  __name: "CodexConversationSidebar",
8619
8672
  props: {
8620
8673
  activeConversationId: { default: null },
@@ -8646,12 +8699,12 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8646
8699
  let n = Math.floor(t / 60);
8647
8700
  return n < 24 ? `${n}h` : `${Math.floor(n / 24)}d`;
8648
8701
  }
8649
- return (n, o) => (k(), l("aside", cd, [u("div", ld, [u("span", ud, z(e.brand), 1), u("button", {
8702
+ return (n, o) => (k(), l("aside", ld, [u("div", ud, [u("span", dd, R(e.brand), 1), u("button", {
8650
8703
  class: "codex-conversation-sidebar__new",
8651
8704
  type: "button",
8652
8705
  disabled: e.createDisabled,
8653
8706
  onClick: o[0] ||= (e) => r("create")
8654
- }, [...o[1] ||= [u("span", { "aria-hidden": "true" }, "+", -1), p(" New thread ", -1)]], 8, dd)]), e.conversations.length === 0 ? (k(), l("p", fd, z(e.loading ? "Loading threads…" : "No conversations yet"), 1)) : (k(), l("nav", pd, [(k(!0), l(t, null, P(e.conversations, (t) => (k(), l("div", {
8707
+ }, [...o[1] ||= [u("span", { "aria-hidden": "true" }, "+", -1), p(" New thread ", -1)]], 8, fd)]), e.conversations.length === 0 ? (k(), l("p", pd, R(e.loading ? "Loading threads…" : "No conversations yet"), 1)) : (k(), l("nav", md, [(k(!0), l(t, null, P(e.conversations, (t) => (k(), l("div", {
8655
8708
  key: t.id,
8656
8709
  class: C(["codex-conversation-sidebar__item", { "codex-conversation-sidebar__item--active": t.id === e.activeConversationId }])
8657
8710
  }, [u("button", {
@@ -8664,10 +8717,10 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8664
8717
  class: C(["codex-conversation-sidebar__status", `codex-conversation-sidebar__status--${t.status}`]),
8665
8718
  "aria-label": `Status: ${t.status}`,
8666
8719
  title: t.status
8667
- }, null, 10, hd),
8668
- u("span", gd, z(t.title), 1),
8669
- u("span", _d, z(a(t.updatedAt)), 1)
8670
- ], 8, md), u("button", {
8720
+ }, null, 10, gd),
8721
+ u("span", _d, R(t.title), 1),
8722
+ u("span", vd, R(a(t.updatedAt)), 1)
8723
+ ], 8, hd), u("button", {
8671
8724
  class: "codex-conversation-sidebar__delete",
8672
8725
  type: "button",
8673
8726
  "aria-label": `Delete ${t.title}`,
@@ -8677,15 +8730,15 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8677
8730
  "aria-hidden": "true",
8678
8731
  fill: "none",
8679
8732
  viewBox: "0 0 24 24"
8680
- }, [u("path", { d: "M4 7h16M10 11v6m4-6v6M9 7l1-2h4l1 2m2 0-1 12H8L7 7" })], -1)]], 8, vd)], 2))), 128))]))]));
8733
+ }, [u("path", { d: "M4 7h16M10 11v6m4-6v6M9 7l1-2h4l1 2m2 0-1 12H8L7 7" })], -1)]], 8, yd)], 2))), 128))]))]));
8681
8734
  }
8682
- }), [["__scopeId", "data-v-97c47314"]]), bd = { class: "chat-composer-file-menu__section" }, xd = ["onMousedown"], Sd = { class: "chat-composer-file-menu__name" }, Cd = { class: "chat-composer-file-menu__path" }, wd = {
8735
+ }), [["__scopeId", "data-v-97c47314"]]), xd = { class: "chat-composer-file-menu__section" }, Sd = ["onMousedown"], Cd = { class: "chat-composer-file-menu__name" }, wd = { class: "chat-composer-file-menu__path" }, Td = {
8683
8736
  key: 0,
8684
8737
  class: "chat-composer-file-menu__hint"
8685
- }, Td = {
8738
+ }, Ed = {
8686
8739
  key: 1,
8687
8740
  class: "chat-composer-file-menu__empty"
8688
- }, Ed = /*#__PURE__*/ X(/* @__PURE__ */ h({
8741
+ }, Dd = /*#__PURE__*/ X(/* @__PURE__ */ h({
8689
8742
  __name: "ChatComposerFileMentionMenu",
8690
8743
  props: {
8691
8744
  activeIndex: {},
@@ -8695,7 +8748,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8695
8748
  emits: ["select"],
8696
8749
  setup(e) {
8697
8750
  let n = e, r = Wn(), i = M(null);
8698
- return W(() => [n.activeIndex, n.visibleFiles], async () => {
8751
+ return U(() => [n.activeIndex, n.visibleFiles], async () => {
8699
8752
  await S();
8700
8753
  let e = i.value?.querySelectorAll(".chat-composer-file-menu__item").item(n.activeIndex);
8701
8754
  typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
@@ -8706,28 +8759,28 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8706
8759
  role: "listbox",
8707
8760
  "aria-label": "Files"
8708
8761
  }, [
8709
- u("div", bd, z(V(r)("chat.files.title")), 1),
8762
+ u("div", xd, R(B(r)("chat.files.title")), 1),
8710
8763
  (k(!0), l(t, null, P(e.visibleFiles, (t, r) => (k(), l("button", {
8711
8764
  key: t.path,
8712
8765
  class: C(["chat-composer-file-menu__item", { "chat-composer-file-menu__item--active": r === e.activeIndex }]),
8713
8766
  role: "option",
8714
8767
  type: "button",
8715
- onMousedown: q((e) => n.$emit("select", t), ["prevent"])
8768
+ onMousedown: K((e) => n.$emit("select", t), ["prevent"])
8716
8769
  }, [
8717
- m(V(_e), {
8770
+ m(B(ye), {
8718
8771
  class: "chat-composer-file-menu__icon",
8719
8772
  "aria-hidden": "true"
8720
8773
  }),
8721
- u("span", Sd, z(t.name), 1),
8722
- u("span", Cd, z(t.path), 1)
8723
- ], 42, xd))), 128)),
8724
- e.showHint ? (k(), l("div", wd, z(V(r)("chat.files.hint")), 1)) : e.visibleFiles.length === 0 ? (k(), l("div", Td, z(V(r)("chat.files.empty")), 1)) : c("", !0)
8774
+ u("span", Cd, R(t.name), 1),
8775
+ u("span", wd, R(t.path), 1)
8776
+ ], 42, Sd))), 128)),
8777
+ e.showHint ? (k(), l("div", Td, R(B(r)("chat.files.hint")), 1)) : e.visibleFiles.length === 0 ? (k(), l("div", Ed, R(B(r)("chat.files.empty")), 1)) : c("", !0)
8725
8778
  ], 512));
8726
8779
  }
8727
- }), [["__scopeId", "data-v-122fc71c"]]), Dd = ["onMousedown"], Od = ["src"], kd = { class: "chat-composer-plugin-menu__main" }, Ad = { class: "chat-composer-plugin-menu__name" }, jd = { class: "chat-composer-plugin-menu__description" }, Md = {
8780
+ }), [["__scopeId", "data-v-122fc71c"]]), Od = ["onMousedown"], kd = ["src"], Ad = { class: "chat-composer-plugin-menu__main" }, jd = { class: "chat-composer-plugin-menu__name" }, Md = { class: "chat-composer-plugin-menu__description" }, Nd = {
8728
8781
  key: 0,
8729
8782
  class: "chat-composer-plugin-menu__empty"
8730
- }, Nd = /*#__PURE__*/ X(/* @__PURE__ */ h({
8783
+ }, Pd = /*#__PURE__*/ X(/* @__PURE__ */ h({
8731
8784
  __name: "ChatComposerPluginMenu",
8732
8785
  props: {
8733
8786
  activeIndex: {},
@@ -8736,7 +8789,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8736
8789
  emits: ["select"],
8737
8790
  setup(e) {
8738
8791
  let n = e, r = M(null);
8739
- return W(() => [n.activeIndex, n.visiblePlugins], async () => {
8792
+ return U(() => [n.activeIndex, n.visiblePlugins], async () => {
8740
8793
  await S();
8741
8794
  let e = r.value?.querySelectorAll(".chat-composer-plugin-menu__item").item(n.activeIndex);
8742
8795
  typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
@@ -8753,7 +8806,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8753
8806
  class: C(["chat-composer-plugin-menu__item", { "chat-composer-plugin-menu__item--active": r === e.activeIndex }]),
8754
8807
  role: "option",
8755
8808
  type: "button",
8756
- onMousedown: q((e) => n.$emit("select", t), ["prevent"])
8809
+ onMousedown: K((e) => n.$emit("select", t), ["prevent"])
8757
8810
  }, [t.iconUrl ? (k(), l("img", {
8758
8811
  key: 0,
8759
8812
  class: "chat-composer-plugin-menu__icon chat-composer-plugin-menu__icon-image",
@@ -8761,24 +8814,24 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
8761
8814
  alt: "",
8762
8815
  "aria-hidden": "true",
8763
8816
  referrerpolicy: "no-referrer"
8764
- }, null, 8, Od)) : (k(), s(V(je), {
8817
+ }, null, 8, kd)) : (k(), s(B(je), {
8765
8818
  key: 1,
8766
8819
  class: "chat-composer-plugin-menu__icon",
8767
8820
  "aria-hidden": "true"
8768
- })), u("span", kd, [u("span", Ad, z(V(sr)(t)), 1), u("span", jd, z(V(cr)(t)), 1)])], 42, Dd))), 128)),
8769
- e.visiblePlugins.length === 0 ? (k(), l("div", Md, "No matching plugins")) : c("", !0)
8821
+ })), u("span", Ad, [u("span", jd, R(B(sr)(t)), 1), u("span", Md, R(B(cr)(t)), 1)])], 42, Od))), 128)),
8822
+ e.visiblePlugins.length === 0 ? (k(), l("div", Nd, "No matching plugins")) : c("", !0)
8770
8823
  ], 512));
8771
8824
  }
8772
- }), [["__scopeId", "data-v-336657b0"]]), Pd = 0;
8773
- function Fd(e) {
8774
- return Pd += 1, {
8775
- id: `queued-prompt-${Pd}`,
8825
+ }), [["__scopeId", "data-v-336657b0"]]), Fd = 0;
8826
+ function Id(e) {
8827
+ return Fd += 1, {
8828
+ id: `queued-prompt-${Fd}`,
8776
8829
  text: e
8777
8830
  };
8778
8831
  }
8779
8832
  //#endregion
8780
8833
  //#region src/use-codex-surface.ts
8781
- var Id = {
8834
+ var Ld = {
8782
8835
  status: "idle",
8783
8836
  authentication: {
8784
8837
  status: "notLoaded",
@@ -8823,8 +8876,8 @@ var Id = {
8823
8876
  historyLoading: !1,
8824
8877
  error: null
8825
8878
  };
8826
- function Ld(e) {
8827
- let t = A(structuredClone(Id)), n = A(/* @__PURE__ */ new Set()), r = j(n), i = R(null), a = /* @__PURE__ */ new Set(), o = 0, s = (e) => {
8879
+ function Rd(e) {
8880
+ let t = A(structuredClone(Ld)), n = A(/* @__PURE__ */ new Set()), r = j(n), i = L(null), a = /* @__PURE__ */ new Set(), o = 0, s = (e) => {
8828
8881
  Object.assign(t, e), n.clear();
8829
8882
  for (let t of e.answeredClientRequestIds) n.add(t);
8830
8883
  }, c = Tt(e, (e) => {
@@ -8885,7 +8938,7 @@ function Ld(e) {
8885
8938
  }
8886
8939
  //#endregion
8887
8940
  //#region src/use-codex-live-chat.ts
8888
- function Rd(e) {
8941
+ function zd(e) {
8889
8942
  let t = M("idle"), n = M(null), r = M(!1), i = M([]), a, o = !1;
8890
8943
  function s(t) {
8891
8944
  if (!(!("conversationId" in t) || t.conversationId !== e.conversationId)) {
@@ -8946,7 +8999,7 @@ function Rd(e) {
8946
8999
  let a = new Audio();
8947
9000
  if (a.autoplay = !0, u.audio = a, i.ontrack = (e) => {
8948
9001
  a.srcObject = e.streams[0] ?? new MediaStream([e.track]), a.play().catch((e) => {
8949
- u.cancelled || (n.value = zd(e), d().catch(() => void 0));
9002
+ u.cancelled || (n.value = Bd(e), d().catch(() => void 0));
8950
9003
  });
8951
9004
  }, i.onconnectionstatechange = () => {
8952
9005
  u.cancelled || (i.connectionState === "connected" && (clearTimeout(u.timer), t.value = "connected"), (i.connectionState === "failed" || i.connectionState === "closed") && (n.value = "Live chat connection ended", d().catch(() => void 0)));
@@ -8966,7 +9019,7 @@ function Rd(e) {
8966
9019
  n.value = "Timed out connecting live chat", d().catch(() => void 0);
8967
9020
  }, 3e4));
8968
9021
  } catch (e) {
8969
- if (!u.cancelled) throw n.value = zd(e), t.value = "error", c(u), await l(u).catch(() => void 0), a === u && (a = void 0), e;
9022
+ if (!u.cancelled) throw n.value = Bd(e), t.value = "error", c(u), await l(u).catch(() => void 0), a === u && (a = void 0), e;
8970
9023
  } finally {
8971
9024
  u.cancelled && c(u);
8972
9025
  }
@@ -8978,7 +9031,7 @@ function Rd(e) {
8978
9031
  try {
8979
9032
  e.requested && await e.done?.catch(() => void 0), await l(e);
8980
9033
  } catch (e) {
8981
- throw n.value = zd(e), e;
9034
+ throw n.value = Bd(e), e;
8982
9035
  } finally {
8983
9036
  a === e && (a = void 0), t.value = n.value ? "error" : "idle";
8984
9037
  }
@@ -9001,16 +9054,16 @@ function Rd(e) {
9001
9054
  setMuted: f
9002
9055
  };
9003
9056
  }
9004
- function zd(e) {
9057
+ function Bd(e) {
9005
9058
  return e instanceof Error ? e.message : String(e);
9006
9059
  }
9007
9060
  //#endregion
9008
9061
  //#region src/codex-theme.ts
9009
- function Bd(e, t = {}) {
9062
+ function Vd(e, t = {}) {
9010
9063
  let n = e.getAttribute("data-codex-theme"), r = /* @__PURE__ */ new Map(), i = t.mode ?? "system";
9011
9064
  e.setAttribute("data-codex-theme", i);
9012
9065
  for (let [n, i] of Object.entries(t.tokens ?? {})) {
9013
- let t = Vd(n);
9066
+ let t = Hd(n);
9014
9067
  r.has(t) || r.set(t, e.style.getPropertyValue(t)), i == null || !i.trim() ? e.style.removeProperty(t) : e.style.setProperty(t, i);
9015
9068
  }
9016
9069
  return () => {
@@ -9018,7 +9071,7 @@ function Bd(e, t = {}) {
9018
9071
  for (let [t, n] of r) n ? e.style.setProperty(t, n) : e.style.removeProperty(t);
9019
9072
  };
9020
9073
  }
9021
- function Vd(e) {
9074
+ function Hd(e) {
9022
9075
  let t = e.trim();
9023
9076
  if (t.startsWith("--codex-")) return t;
9024
9077
  let n = t.replace(/^--/, "").replace(/([a-z\d])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z\d-]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
@@ -9026,6 +9079,6 @@ function Vd(e) {
9026
9079
  return `--codex-${n}`;
9027
9080
  }
9028
9081
  //#endregion
9029
- export { co as CodexAnimatedDiffStat, na as CodexApprovalPrompt, Ms as CodexAttachmentBlock, xu as CodexCompactionMessage, Vi as CodexComposer, nn as CodexComposerActionMenu, zt as CodexComposerActiveModes, xr as CodexComposerAtMentionMenu, Ed as CodexComposerFileMentionMenu, en as CodexComposerMenu, Qt as CodexComposerMenuList, Nd as CodexComposerPluginMenu, Ft as CodexComposerSendButton, gs as CodexComposerShelf, Ir as CodexComposerSkillMenu, Qr as CodexComposerSlashMenu, an as CodexComposerVoiceButton, dn as CodexComposerVoiceField, Yn as CodexContextUsageIndicator, bs as CodexConversationHistoryLoader, sd as CodexConversationPane, yd as CodexConversationSidebar, Rs as CodexFoldTransition, Fs as CodexFollowUps, ns as CodexGoal, Ss as CodexIconButton, Ds as CodexImageLightbox, nc as CodexMediaBlock, ni as CodexMentionChip, _c as CodexMermaidBlock, Nu as CodexMessage, yu as CodexMessageActions, du as CodexMessageBlock, Tu as CodexMessageEditor, Hu as CodexMessageList, Fu as CodexMessageTurn, tr as CodexModelReasoningSelector, Jo as CodexQuestionRequest, cs as CodexQueuedPrompt, us as CodexQueuedPrompts, oi as CodexRichTextEditor, Lu as CodexScrollToBottom, Dl as CodexToolCall, So as CodexToolCallTitle, Xo as CodexToolConfirmation, Pl as CodexToolGroup, lo as CodexToolIcon, qo as CodexToolUserInputRequest, ps as CodexTurnGitInfo, tu as CodexUserText, ru as CodexVisualizationBlock, cu as CodexWorkGroup, Ku as CodexWorkbenchLayout, Bd as applyCodexTheme, Vt as approvalPresetOptions, Ot as codexCapabilities, kt as codexCommands, pn as codexConversationLinkFromHref, zr as commandDescription, ia as createCodexConversationPaneController, Fd as createQueuedChatPrompt, Bt as defaultApprovalPreset, Gn as defaultCodexChatTranslate, Et as defaultCodexConversationPresentation, Rr as filterComposerCommands, ri as filterComposerMentionGroups, or as filterComposerPlugins, Cr as filterComposerSkills, ii as findComposerMention, Ei as getCodexGlobalHostCapabilities, Di as getCodexNativeRendererApi, Vl as humanizeMentionName, ki as ingestCodexAttachments, Ht as isApprovalPreset, Cc as languageForFilePath, fn as parseCodexEditorFileReference, Fl as parseCodexUserText, Oi as pickCodexAttachments, cr as pluginDescription, sr as pluginDisplayName, lr as pluginInsertText, ur as pluginMatchesMention, Or as promptSkillInputsFromText, Un as provideCodexChatTranslate, wi as provideCodexHostCapabilities, pl as provideCodexToolCallDetails, ul as provideCodexToolPresentation, Z as registerCodexToolTitlePresenter, Sc as renderCodeBlock, kc as renderMarkdown, ra as resolveCodexConversationPaneValue, Dt as resolveCodexConversationPresentation, Tr as skillDescription, wr as skillDisplayName, Er as skillInsertText, Dr as skillMatchesMention, qa as surfaceMessageToChatMessage, $ as toCodexChatMessage, Ka as toCodexChatMessages, Wn as useCodexChatTranslate, Pi as useCodexComposerVoice, Ti as useCodexHostCapabilities, Rd as useCodexLiveChat, Ld as useCodexSurface, ml as useCodexToolCallDetails, dl as useCodexToolPresentation };
9082
+ export { co as CodexAnimatedDiffStat, na as CodexApprovalPrompt, Ms as CodexAttachmentBlock, Su as CodexCompactionMessage, Vi as CodexComposer, nn as CodexComposerActionMenu, zt as CodexComposerActiveModes, xr as CodexComposerAtMentionMenu, Dd as CodexComposerFileMentionMenu, en as CodexComposerMenu, Qt as CodexComposerMenuList, Pd as CodexComposerPluginMenu, Ft as CodexComposerSendButton, gs as CodexComposerShelf, Ir as CodexComposerSkillMenu, Qr as CodexComposerSlashMenu, an as CodexComposerVoiceButton, dn as CodexComposerVoiceField, Yn as CodexContextUsageIndicator, bs as CodexConversationHistoryLoader, cd as CodexConversationPane, bd as CodexConversationSidebar, Rs as CodexFoldTransition, Fs as CodexFollowUps, ns as CodexGoal, Ss as CodexIconButton, Ds as CodexImageLightbox, nc as CodexMediaBlock, ni as CodexMentionChip, _c as CodexMermaidBlock, Pu as CodexMessage, bu as CodexMessageActions, fu as CodexMessageBlock, Eu as CodexMessageEditor, Uu as CodexMessageList, Iu as CodexMessageTurn, tr as CodexModelReasoningSelector, Jo as CodexQuestionRequest, cs as CodexQueuedPrompt, us as CodexQueuedPrompts, oi as CodexRichTextEditor, Ru as CodexScrollToBottom, Dl as CodexToolCall, So as CodexToolCallTitle, Xo as CodexToolConfirmation, Pl as CodexToolGroup, lo as CodexToolIcon, qo as CodexToolUserInputRequest, ps as CodexTurnGitInfo, tu as CodexUserText, ru as CodexVisualizationBlock, lu as CodexWorkGroup, qu as CodexWorkbenchLayout, Vd as applyCodexTheme, Vt as approvalPresetOptions, Ot as codexCapabilities, kt as codexCommands, pn as codexConversationLinkFromHref, zr as commandDescription, ia as createCodexConversationPaneController, Id as createQueuedChatPrompt, Bt as defaultApprovalPreset, Gn as defaultCodexChatTranslate, Et as defaultCodexConversationPresentation, Rr as filterComposerCommands, ri as filterComposerMentionGroups, or as filterComposerPlugins, Cr as filterComposerSkills, ii as findComposerMention, Ei as getCodexGlobalHostCapabilities, Di as getCodexNativeRendererApi, Vl as humanizeMentionName, ki as ingestCodexAttachments, Ht as isApprovalPreset, Cc as languageForFilePath, fn as parseCodexEditorFileReference, Fl as parseCodexUserText, Oi as pickCodexAttachments, cr as pluginDescription, sr as pluginDisplayName, lr as pluginInsertText, ur as pluginMatchesMention, Or as promptSkillInputsFromText, Un as provideCodexChatTranslate, wi as provideCodexHostCapabilities, pl as provideCodexToolCallDetails, ul as provideCodexToolPresentation, Z as registerCodexToolTitlePresenter, Sc as renderCodeBlock, kc as renderMarkdown, ra as resolveCodexConversationPaneValue, Dt as resolveCodexConversationPresentation, Tr as skillDescription, wr as skillDisplayName, Er as skillInsertText, Dr as skillMatchesMention, qa as surfaceMessageToChatMessage, $ as toCodexChatMessage, Ka as toCodexChatMessages, Wn as useCodexChatTranslate, Pi as useCodexComposerVoice, Ti as useCodexHostCapabilities, zd as useCodexLiveChat, Rd as useCodexSurface, ml as useCodexToolCallDetails, dl as useCodexToolPresentation };
9030
9083
 
9031
9084
  //# sourceMappingURL=index.js.map