@codex-app-sdk/vue 0.21.1 → 0.21.3

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,7 +1,7 @@
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, isMemoSame as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeProps as T, normalizeStyle as E, onBeforeUnmount as D, onMounted as ee, onScopeDispose as O, openBlock as k, provide as A, reactive as j, readonly as M, ref as N, render as te, renderList as P, renderSlot as F, resolveComponent as I, resolveDynamicComponent as L, shallowReactive as ne, shallowRef as R, toDisplayString as z, toValue as B, unref as V, useSlots as re, vModelText as H, vShow as ie, watch as U, withCtx as W, withDirectives as G, withKeys as K, withModifiers as q } from "vue";
2
- import { normalizePromptContent as ae, promptContentDispatchText as oe, promptContentText as se, replacePromptContentRange as ce, slicePromptContent as le, trimPromptContent as ue } from "@codex-app-sdk/core/surface";
3
- import { Lexer as de, Marked as fe, Renderer as J } from "marked";
4
- import { IconArrowDown as Y, IconArrowFork as pe, IconBolt as me, IconBrain as he, IconCheck as ge, IconCheck as _e, IconChevronDown as ve, IconChevronLeft as ye, IconChevronRight as be, IconChevronUp as X, IconCircleX as xe, IconCode as Se, IconCopy as Ce, IconDownload as we, IconExternalLink as Te, IconEye as Ee, IconFileText as De, IconFolder as Oe, IconHandStop as ke, IconInfoCircle as Ae, IconLayoutDashboard as je, IconListDetails as Me, IconLoader2 as Ne, IconMaximize as Pe, IconMessageQuestion as Fe, IconMicrophone as Ie, IconMicrophoneOff as Le, IconPaperclip as Re, IconPencil as ze, IconPhoto as Be, IconPlayerPlayFilled as Ve, IconPlugConnected as He, IconPlus as Ue, IconQuote as We, IconRotateClockwise as Ge, IconSearch as Ke, IconShieldCheck as qe, IconSparkleHighlight as Je, IconSparkles as Ye, IconSquareCheck as Xe, IconSquareDashed as Ze, IconSquareX as Qe, IconSteeringWheel as $e, IconTargetArrow as et, IconTerminal as tt, IconTerminal2 as nt, IconTool as rt, IconTrash as it, IconWorldSearch as at, IconX as ot } 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, isMemoSame as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeProps as T, normalizeStyle as E, onBeforeUnmount as D, onMounted as ee, onScopeDispose as O, openBlock as k, provide as A, reactive as j, readonly as M, ref as N, render as te, renderList as P, renderSlot as F, resolveComponent as I, resolveDynamicComponent as L, shallowReactive as ne, shallowRef as R, toDisplayString as z, toValue as B, unref as V, useSlots as H, vModelText as U, vShow as re, watch as W, withCtx as G, withDirectives as K, withKeys as q, withModifiers as J } from "vue";
2
+ import { normalizePromptContent as ie, promptContentDispatchText as ae, promptContentText as oe, replacePromptContentRange as se, slicePromptContent as ce, trimPromptContent as le } from "@codex-app-sdk/core/surface";
3
+ import { Lexer as ue, Marked as de, Renderer as Y } from "marked";
4
+ import { IconArrowDown as X, IconArrowFork as fe, IconBolt as pe, IconBrain as me, IconCheck as he, IconCheck as ge, IconChevronDown as _e, IconChevronLeft as ve, IconChevronRight as ye, IconChevronUp as be, IconCircleX as xe, IconCode as Se, IconCopy as Ce, IconDownload as we, IconExternalLink as Te, IconEye as Ee, IconFileText as De, IconFolder as Oe, IconHandStop as ke, IconInfoCircle as Ae, IconLayoutDashboard as je, IconListDetails as Me, IconLoader2 as Ne, IconMaximize as Pe, IconMessageQuestion as Fe, IconMicrophone as Ie, IconMicrophoneOff as Le, IconPaperclip as Re, IconPencil as ze, IconPhoto as Be, IconPlayerPlayFilled as Ve, IconPlugConnected as He, IconPlus as Ue, IconQuote as We, IconRotateClockwise as Ge, IconSearch as Ke, IconShieldCheck as qe, IconSparkleHighlight as Je, IconSparkles as Ye, IconSquareCheck as Xe, IconSquareDashed as Ze, IconSquareX as Qe, IconSteeringWheel as $e, IconTargetArrow as et, IconTerminal as tt, IconTerminal2 as nt, IconTool as rt, IconTrash as it, IconWorldSearch as at, IconX as ot } from "@tabler/icons-vue";
5
5
  import st from "fix-webm-duration";
6
6
  import { renderMermaidSVG as ct } from "beautiful-mermaid";
7
7
  import lt from "katex";
@@ -348,7 +348,7 @@ function ln(e, t) {
348
348
  //#endregion
349
349
  //#region src/chat/user-text.ts
350
350
  function un(e, t, n = [], r = [], i = []) {
351
- return t === void 0 ? fn(e, n, r, i, !1) : ae(t).flatMap((e) => e.type === "text" ? mn(e.text, (e) => e.split(/(`[^`\n]+`|\n)/g).filter(Boolean).map((e) => e === "\n" ? { type: "line-break" } : e.startsWith("`") && e.endsWith("`") ? {
351
+ return t === void 0 ? fn(e, n, r, i, !1) : ie(t).flatMap((e) => e.type === "text" ? mn(e.text, (e) => e.split(/(`[^`\n]+`|\n)/g).filter(Boolean).map((e) => e === "\n" ? { type: "line-break" } : e.startsWith("`") && e.endsWith("`") ? {
352
352
  type: "code",
353
353
  text: e.slice(1, -1)
354
354
  } : {
@@ -396,7 +396,7 @@ function fn(e, t = [], n = [], r = [], i = !0) {
396
396
  return mn(e, (e) => hn(e, t, n, r, i));
397
397
  }
398
398
  function pn(e, t = [], n = [], r = []) {
399
- return ae(fn(e, t, n, r, !1).map((e) => {
399
+ return ie(fn(e, t, n, r, !1).map((e) => {
400
400
  switch (e.type) {
401
401
  case "skill-mention": return {
402
402
  type: "mention",
@@ -443,7 +443,7 @@ function pn(e, t = [], n = [], r = []) {
443
443
  }));
444
444
  }
445
445
  function mn(e, t) {
446
- return /https?:\/\//i.test(e) ? de.lexInline(e, { gfm: !0 }).flatMap((e) => {
446
+ return /https?:\/\//i.test(e) ? ue.lexInline(e, { gfm: !0 }).flatMap((e) => {
447
447
  let n = e.type === "link" && /^https?:\/\//i.test(e.raw) ? Vt(e.href) : null;
448
448
  return n?.kind === "external" ? [{
449
449
  type: "link",
@@ -622,21 +622,21 @@ var Tn = [
622
622
  "disabled",
623
623
  "aria-disabled",
624
624
  "aria-label"
625
- ], Z = {
625
+ ], En = {
626
626
  key: 1,
627
627
  class: "codex-composer-send-button__spinner",
628
628
  "aria-hidden": "true",
629
629
  width: "16",
630
630
  height: "16",
631
631
  viewBox: "0 0 16 16"
632
- }, Q = {
632
+ }, Z = {
633
633
  key: 2,
634
634
  class: "codex-composer-send-button__stop",
635
635
  "aria-hidden": "true",
636
636
  width: "16",
637
637
  height: "16",
638
638
  viewBox: "0 0 16 16"
639
- }, En = /*@__PURE__*/ h({
639
+ }, Q = /*@__PURE__*/ h({
640
640
  __name: "CodexComposerSendButton",
641
641
  props: {
642
642
  busy: {
@@ -684,7 +684,7 @@ var Tn = [
684
684
  "aria-hidden": "true",
685
685
  size: 16
686
686
  })) : c("", !0),
687
- e.busy ? (k(), l("svg", Z, [...n[2] ||= [u("circle", {
687
+ e.busy ? (k(), l("svg", En, [...n[2] ||= [u("circle", {
688
688
  cx: "8",
689
689
  cy: "8",
690
690
  r: "6",
@@ -694,7 +694,7 @@ var Tn = [
694
694
  "stroke-dasharray": "28",
695
695
  "stroke-dashoffset": "10"
696
696
  }, null, -1)]])) : c("", !0),
697
- e.busy || e.interruptArmed ? (k(), l("svg", Q, [...n[3] ||= [u("rect", {
697
+ e.busy || e.interruptArmed ? (k(), l("svg", Z, [...n[3] ||= [u("rect", {
698
698
  x: "4",
699
699
  y: "4",
700
700
  width: "8",
@@ -708,7 +708,7 @@ var Tn = [
708
708
  let n = e.__vccOpts || e;
709
709
  for (let [e, r] of t) n[e] = r;
710
710
  return n;
711
- }, Dn = /*#__PURE__*/ $(En, [["__scopeId", "data-v-8a422712"]]), On = {
711
+ }, Dn = /*#__PURE__*/ $(Q, [["__scopeId", "data-v-8a422712"]]), On = {
712
712
  key: 0,
713
713
  class: "codex-chat-theme chat-composer__modes",
714
714
  "aria-label": "Active composer modes"
@@ -857,7 +857,7 @@ function Ln(e, t, n, r, i) {
857
857
  Bn(e, zn(e)[0]);
858
858
  });
859
859
  }
860
- }, [...Vn(e, t).nodes, v(be, {
860
+ }, [...Vn(e, t).nodes, v(ye, {
861
861
  class: "codex-composer-menu-list__chevron",
862
862
  "aria-hidden": "true"
863
863
  })]), a ? In(e.items, e.label, t, (t) => {
@@ -940,7 +940,7 @@ function Vn(e, t) {
940
940
  leadingRadioCheck: !1
941
941
  };
942
942
  let r = t.icon?.({ item: e }), i = e.type === "radio" && e.checked && !r?.length, a;
943
- return a = r?.length ? r : i ? [v(_e, {
943
+ return a = r?.length ? r : i ? [v(ge, {
944
944
  class: "codex-composer-menu-list__icon codex-composer-menu-list__radio-check",
945
945
  "aria-hidden": "true"
946
946
  })] : "leadingColor" in e && e.leadingColor ? [v("span", {
@@ -993,11 +993,11 @@ var Wn = /* @__PURE__ */ h({
993
993
  onSelect: r
994
994
  }, d({ _: 2 }, [t.$slots.icon ? {
995
995
  name: "icon",
996
- fn: W((e) => [F(t.$slots, "icon", T(_(e)))]),
996
+ fn: G((e) => [F(t.$slots, "icon", T(_(e)))]),
997
997
  key: "0"
998
998
  } : void 0, t.$slots.item ? {
999
999
  name: "item",
1000
- fn: W((e) => [F(t.$slots, "item", T(_(e)))]),
1000
+ fn: G((e) => [F(t.$slots, "item", T(_(e)))]),
1001
1001
  key: "1"
1002
1002
  } : void 0]), 1032, ["aria-label", "items"]));
1003
1003
  }
@@ -1024,7 +1024,7 @@ var Wn = /* @__PURE__ */ h({
1024
1024
  emits: ["select", "update:open"],
1025
1025
  setup(e, { expose: t, emit: n }) {
1026
1026
  let r = e, i = n, a = N(null), f = N(null), p = N(!1), m = o(() => r.open ?? p.value);
1027
- ee(() => document.addEventListener("click", y)), D(() => document.removeEventListener("click", y)), U(m, async (e) => {
1027
+ ee(() => document.addEventListener("click", y)), D(() => document.removeEventListener("click", y)), W(m, async (e) => {
1028
1028
  if (!e) return;
1029
1029
  await C();
1030
1030
  let t = a.value?.querySelector(".codex-composer-menu__list > button[role^=\"menuitem\"], .codex-composer-menu__list > div > button[role^=\"menuitem\"]");
@@ -1053,7 +1053,7 @@ var Wn = /* @__PURE__ */ h({
1053
1053
  ref_key: "root",
1054
1054
  ref: a,
1055
1055
  class: "codex-chat-theme codex-composer-menu",
1056
- onKeydown: n[0] ||= K(q((e) => v(!0), ["prevent", "stop"]), ["escape"])
1056
+ onKeydown: n[0] ||= q(J((e) => v(!0), ["prevent", "stop"]), ["escape"])
1057
1057
  }, [F(t.$slots, "trigger", {
1058
1058
  open: m.value,
1059
1059
  toggle: g
@@ -1084,11 +1084,11 @@ var Wn = /* @__PURE__ */ h({
1084
1084
  onSelect: b
1085
1085
  }, d({ _: 2 }, [t.$slots.icon ? {
1086
1086
  name: "icon",
1087
- fn: W((e) => [F(t.$slots, "icon", T(_(e)), void 0, !0)]),
1087
+ fn: G((e) => [F(t.$slots, "icon", T(_(e)), void 0, !0)]),
1088
1088
  key: "0"
1089
1089
  } : void 0, t.$slots.item ? {
1090
1090
  name: "item",
1091
- fn: W((e) => [F(t.$slots, "item", T(_(e)), void 0, !0)]),
1091
+ fn: G((e) => [F(t.$slots, "item", T(_(e)), void 0, !0)]),
1092
1092
  key: "1"
1093
1093
  } : void 0]), 1032, [
1094
1094
  "class",
@@ -1224,7 +1224,7 @@ var Wn = /* @__PURE__ */ h({
1224
1224
  items: a.value,
1225
1225
  onSelect: f
1226
1226
  }, d({
1227
- trigger: W(({ open: t, toggle: n }) => [u("button", {
1227
+ trigger: G(({ open: t, toggle: n }) => [u("button", {
1228
1228
  class: "chat-composer-action-menu__button",
1229
1229
  type: "button",
1230
1230
  "aria-label": "Composer actions",
@@ -1236,11 +1236,11 @@ var Wn = /* @__PURE__ */ h({
1236
1236
  _: 2
1237
1237
  }, [t.$slots.icon ? {
1238
1238
  name: "icon",
1239
- fn: W((e) => [F(t.$slots, "icon", T(_(e)), void 0, !0)]),
1239
+ fn: G((e) => [F(t.$slots, "icon", T(_(e)), void 0, !0)]),
1240
1240
  key: "0"
1241
1241
  } : void 0, t.$slots.item ? {
1242
1242
  name: "item",
1243
- fn: W((e) => [F(t.$slots, "item", T(_(e)), void 0, !0)]),
1243
+ fn: G((e) => [F(t.$slots, "item", T(_(e)), void 0, !0)]),
1244
1244
  key: "1"
1245
1245
  } : void 0]), 1032, ["disabled", "items"])) : c("", !0);
1246
1246
  }
@@ -1260,7 +1260,7 @@ var Wn = /* @__PURE__ */ h({
1260
1260
  emits: ["toggle"],
1261
1261
  setup(e, { emit: t }) {
1262
1262
  let n = e, r = t, i = N(!1);
1263
- return U(() => n.recording, () => {
1263
+ return W(() => n.recording, () => {
1264
1264
  i.value = !1;
1265
1265
  }), (t, n) => (k(), l("button", {
1266
1266
  class: w(["codex-chat-theme chat-composer__voice", { "chat-composer__voice--recording": e.recording }]),
@@ -1739,7 +1739,7 @@ var Ir = ["aria-label"], Lr = {
1739
1739
  "update:serviceTier"
1740
1740
  ],
1741
1741
  setup(e, { emit: t }) {
1742
- let n = e, r = t, i = o(() => n.models.find((e) => e.id === n.modelId) ?? n.models.find((e) => e.isDefault) ?? n.models[0] ?? null), a = o(() => i.value?.supportedReasoningEfforts ?? []), d = o(() => n.showReasoning && a.value.length > 0), f = o(() => n.reasoningEffort ?? i.value?.defaultReasoningEffort ?? a.value[0]?.reasoningEffort ?? null), p = o(() => i.value?.serviceTiers ?? []), h = o(() => n.showServiceTier && p.value.length > 0), g = o(() => p.value.find((e) => /^(fast|priority)$/i.test(e.id) || /\b(fast|priority)\b/i.test(e.name)) ?? null), _ = o(() => p.value.find((e) => /^ultrafast$/i.test(e.id) || /\bultra[ -]?fast\b/i.test(e.name)) ?? null), v = o(() => [g.value, _.value].filter((e) => e !== null)), y = o(() => v.value.find((e) => e.id === n.serviceTier)), b = (e) => e ? e === _.value?.id ? "Ultrafast" : "Fast mode" : "Normal speed", x = o(() => y.value && y.value === _.value ? Hr : me), S = o(() => y.value?.description ?? "Default processing for this model."), C = o(() => n.disabled), T = o(() => {
1742
+ let n = e, r = t, i = o(() => n.models.find((e) => e.id === n.modelId) ?? n.models.find((e) => e.isDefault) ?? n.models[0] ?? null), a = o(() => i.value?.supportedReasoningEfforts ?? []), d = o(() => n.showReasoning && a.value.length > 0), f = o(() => n.reasoningEffort ?? i.value?.defaultReasoningEffort ?? a.value[0]?.reasoningEffort ?? null), p = o(() => i.value?.serviceTiers ?? []), h = o(() => n.showServiceTier && p.value.length > 0), g = o(() => p.value.find((e) => /^(fast|priority)$/i.test(e.id) || /\b(fast|priority)\b/i.test(e.name)) ?? null), _ = o(() => p.value.find((e) => /^ultrafast$/i.test(e.id) || /\bultra[ -]?fast\b/i.test(e.name)) ?? null), v = o(() => [g.value, _.value].filter((e) => e !== null)), y = o(() => v.value.find((e) => e.id === n.serviceTier)), b = (e) => e ? e === _.value?.id ? "Ultrafast" : "Fast mode" : "Normal speed", x = o(() => y.value && y.value === _.value ? Hr : pe), S = o(() => y.value?.description ?? "Default processing for this model."), C = o(() => n.disabled), T = o(() => {
1743
1743
  let e = [];
1744
1744
  n.menuItems.length > 0 && (e.push(...M(n.menuItems)), e.push({
1745
1745
  id: "host-model-menu-separator",
@@ -1818,7 +1818,7 @@ var Ir = ["aria-label"], Lr = {
1818
1818
  type: "radio",
1819
1819
  label: b(e?.id),
1820
1820
  checked: e ? e.id === n.serviceTier : !y.value,
1821
- icon: e === _.value ? Hr : e ? me : void 0,
1821
+ icon: e === _.value ? Hr : e ? pe : void 0,
1822
1822
  payload: {
1823
1823
  source: "selector",
1824
1824
  kind: "serviceTier",
@@ -1829,7 +1829,7 @@ var Ir = ["aria-label"], Lr = {
1829
1829
  else {
1830
1830
  let n = g.value;
1831
1831
  e.push({
1832
- accessory: me,
1832
+ accessory: pe,
1833
1833
  checked: !!y.value,
1834
1834
  closeOnSelect: !1,
1835
1835
  ...t,
@@ -1915,12 +1915,12 @@ var Ir = ["aria-label"], Lr = {
1915
1915
  title: E.value,
1916
1916
  disabled: ""
1917
1917
  }, [
1918
- m(V(he), {
1918
+ m(V(me), {
1919
1919
  class: "chat-model-selector__compact-icon",
1920
1920
  "aria-hidden": "true"
1921
1921
  }),
1922
1922
  u("span", Wr, z(E.value), 1),
1923
- m(V(ve), {
1923
+ m(V(_e), {
1924
1924
  class: "chat-model-selector__chevron",
1925
1925
  "aria-hidden": "true"
1926
1926
  })
@@ -1933,7 +1933,7 @@ var Ir = ["aria-label"], Lr = {
1933
1933
  "menu-class": "chat-model-selector__menu",
1934
1934
  onSelect: j
1935
1935
  }, {
1936
- trigger: W(({ open: e, toggle: t }) => [u("button", {
1936
+ trigger: G(({ open: e, toggle: t }) => [u("button", {
1937
1937
  class: "chat-model-selector__button",
1938
1938
  type: "button",
1939
1939
  "aria-label": "Model and reasoning",
@@ -1943,7 +1943,7 @@ var Ir = ["aria-label"], Lr = {
1943
1943
  disabled: C.value,
1944
1944
  onClick: t
1945
1945
  }, [
1946
- m(V(he), {
1946
+ m(V(me), {
1947
1947
  class: "chat-model-selector__compact-icon",
1948
1948
  "aria-hidden": "true"
1949
1949
  }),
@@ -1953,7 +1953,7 @@ var Ir = ["aria-label"], Lr = {
1953
1953
  "aria-hidden": "true"
1954
1954
  })) : c("", !0),
1955
1955
  u("span", Kr, z(E.value), 1),
1956
- m(V(ve), {
1956
+ m(V(_e), {
1957
1957
  class: "chat-model-selector__chevron",
1958
1958
  "aria-hidden": "true"
1959
1959
  })
@@ -2003,7 +2003,7 @@ var Ir = ["aria-label"], Lr = {
2003
2003
  class: w(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": s(r.id, t.id) === e.activeIndex }]),
2004
2004
  role: "option",
2005
2005
  type: "button",
2006
- onMousedown: q((e) => n.$emit("select-mention", t, r), ["prevent"])
2006
+ onMousedown: J((e) => n.$emit("select-mention", t, r), ["prevent"])
2007
2007
  }, [F(n.$slots, "mention", {
2008
2008
  group: r,
2009
2009
  item: t,
@@ -2017,7 +2017,7 @@ var Ir = ["aria-label"], Lr = {
2017
2017
  class: w(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": a.value + r === e.activeIndex }]),
2018
2018
  role: "option",
2019
2019
  type: "button",
2020
- onMousedown: q((e) => n.$emit("select-plugin", t), ["prevent"])
2020
+ onMousedown: J((e) => n.$emit("select-plugin", t), ["prevent"])
2021
2021
  }, [m(V(He), {
2022
2022
  class: "chat-composer-at-menu__icon",
2023
2023
  "aria-hidden": "true"
@@ -2027,7 +2027,7 @@ var Ir = ["aria-label"], Lr = {
2027
2027
  class: w(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": a.value + e.visiblePlugins.length + r === e.activeIndex }]),
2028
2028
  role: "option",
2029
2029
  type: "button",
2030
- onMousedown: q((e) => n.$emit("select-file", t), ["prevent"])
2030
+ onMousedown: J((e) => n.$emit("select-file", t), ["prevent"])
2031
2031
  }, [m(V(De), {
2032
2032
  class: "chat-composer-at-menu__icon",
2033
2033
  "aria-hidden": "true"
@@ -2037,7 +2037,7 @@ var Ir = ["aria-label"], Lr = {
2037
2037
  class: w(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": s(r.id, t.id) === e.activeIndex }]),
2038
2038
  role: "option",
2039
2039
  type: "button",
2040
- onMousedown: q((e) => n.$emit("select-mention", t, r), ["prevent"])
2040
+ onMousedown: J((e) => n.$emit("select-mention", t, r), ["prevent"])
2041
2041
  }, [F(n.$slots, "mention", {
2042
2042
  group: r,
2043
2043
  item: t,
@@ -2065,7 +2065,7 @@ var Ir = ["aria-label"], Lr = {
2065
2065
  emits: ["select"],
2066
2066
  setup(e) {
2067
2067
  let n = e, r = Pr(), i = N(null);
2068
- return U(() => [n.activeIndex, n.visibleSkills], async () => {
2068
+ return W(() => [n.activeIndex, n.visibleSkills], async () => {
2069
2069
  await C();
2070
2070
  let e = i.value?.querySelectorAll(".chat-composer-skill-menu__item").item(n.activeIndex);
2071
2071
  typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
@@ -2082,7 +2082,7 @@ var Ir = ["aria-label"], Lr = {
2082
2082
  class: w(["chat-composer-skill-menu__item", { "chat-composer-skill-menu__item--active": r === e.activeIndex }]),
2083
2083
  role: "option",
2084
2084
  type: "button",
2085
- onMousedown: q((e) => n.$emit("select", t), ["prevent"])
2085
+ onMousedown: J((e) => n.$emit("select", t), ["prevent"])
2086
2086
  }, [u("span", si, [m(V(Je))]), u("span", ci, [u("span", li, z(V(Zt)(t, e.plugins ?? [])), 1), u("span", ui, z(V(Qt)(t)), 1)])], 42, oi))), 128)),
2087
2087
  e.visibleSkills.length === 0 ? (k(), l("div", di, z(V(r)("chat.skills.empty")), 1)) : c("", !0)
2088
2088
  ], 512));
@@ -2132,7 +2132,7 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2132
2132
  emits: ["selectCommand", "selectSkill"],
2133
2133
  setup(e) {
2134
2134
  let n = e, r = Pr(), i = N(null);
2135
- return U(() => [
2135
+ return W(() => [
2136
2136
  n.activeIndex,
2137
2137
  n.visibleCommands,
2138
2138
  n.visibleSkills
@@ -2151,13 +2151,13 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2151
2151
  class: w(["chat-composer-slash-menu__item", { "chat-composer-slash-menu__item--active": r === e.activeIndex }]),
2152
2152
  role: "option",
2153
2153
  type: "button",
2154
- onMousedown: q((e) => n.$emit("selectCommand", t), ["prevent"])
2154
+ onMousedown: J((e) => n.$emit("selectCommand", t), ["prevent"])
2155
2155
  }, [u("span", vi, [m(V(tt))]), u("span", yi, [u("span", bi, z(t.name), 1), u("span", xi, z(V(hi)(t)), 1)])], 42, _i))), 128))], 64)) : c("", !0), e.visibleSkills.length > 0 ? (k(), l(t, { key: 1 }, [u("div", Si, z(V(r)("chat.skills.title")), 1), (k(!0), l(t, null, P(e.visibleSkills, (t, r) => (k(), l("button", {
2156
2156
  key: t.path,
2157
2157
  class: w(["chat-composer-slash-menu__item", { "chat-composer-slash-menu__item--active": e.visibleCommands.length + r === e.activeIndex }]),
2158
2158
  role: "option",
2159
2159
  type: "button",
2160
- onMousedown: q((e) => n.$emit("selectSkill", t), ["prevent"])
2160
+ onMousedown: J((e) => n.$emit("selectSkill", t), ["prevent"])
2161
2161
  }, [u("span", wi, [m(V(Je))]), u("span", Ti, [u("span", Ei, z(t.name), 1), u("span", Di, z(V(Qt)(t)), 1)])], 42, Ci))), 128))], 64)) : c("", !0)], 512));
2162
2162
  }
2163
2163
  }), [["__scopeId", "data-v-7ac08005"]]), ki = { class: "chat-mention-chip" }, Ai = ["src"], ji = { class: "chat-mention-chip__label" }, Mi = /*#__PURE__*/ $(/* @__PURE__ */ h({
@@ -2216,11 +2216,11 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2216
2216
  "update:content"
2217
2217
  ],
2218
2218
  setup(e, { expose: n, emit: r }) {
2219
- let i = e, a = re(), o = r, s = N(null), c = N(0);
2220
- U(() => i.modelValue, (e) => {
2219
+ let i = e, a = H(), o = r, s = N(null), c = N(0);
2220
+ W(() => i.modelValue, (e) => {
2221
2221
  !s.value || h() === e || F(e, Math.min(c.value, e.length));
2222
- }), U(() => i.content, (e) => {
2223
- !s.value || !e || se(e) !== i.modelValue || JSON.stringify(ae(e)) === JSON.stringify(j()) || I(e, Math.min(c.value, i.modelValue.length), { focus: !1 });
2222
+ }), W(() => i.content, (e) => {
2223
+ !s.value || !e || oe(e) !== i.modelValue || JSON.stringify(ie(e)) === JSON.stringify(j()) || I(e, Math.min(c.value, i.modelValue.length), { focus: !1 });
2224
2224
  }, { deep: !0 }), ee(() => {
2225
2225
  F(i.modelValue, i.modelValue.length, { focus: !1 }), document.addEventListener("selectionchange", u);
2226
2226
  }), D(() => {
@@ -2397,12 +2397,12 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2397
2397
  }
2398
2398
  let n = j();
2399
2399
  I([
2400
- ...le(n, 0, t.start),
2400
+ ...ce(n, 0, t.start),
2401
2401
  {
2402
2402
  type: "text",
2403
2403
  text: e
2404
2404
  },
2405
- ...le(n, t.end, h().length)
2405
+ ...ce(n, t.end, h().length)
2406
2406
  ], t.start + e.length, { focus: !0 }), d(), w(t.start + e.length);
2407
2407
  }
2408
2408
  function A() {
@@ -2410,7 +2410,7 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2410
2410
  }
2411
2411
  function j() {
2412
2412
  let e = [], t = (n) => {
2413
- if (n instanceof HTMLElement && n.dataset.promptMention) e.push(...ae([JSON.parse(n.dataset.promptMention)]));
2413
+ if (n instanceof HTMLElement && n.dataset.promptMention) e.push(...ie([JSON.parse(n.dataset.promptMention)]));
2414
2414
  else if (n.nodeType === Node.TEXT_NODE || n instanceof HTMLBRElement) {
2415
2415
  let t = g(n), r = e.at(-1);
2416
2416
  r?.type === "text" ? r.text += t : t && e.push({
@@ -2421,7 +2421,7 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2421
2421
  };
2422
2422
  return s.value?.childNodes.forEach(t), e;
2423
2423
  }
2424
- function M(e, t = se(e).length) {
2424
+ function M(e, t = oe(e).length) {
2425
2425
  I(e, t, { focus: !1 });
2426
2426
  }
2427
2427
  function P(e, t, n) {
@@ -2434,17 +2434,17 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2434
2434
  te(null, r);
2435
2435
  let a = j();
2436
2436
  I([
2437
- ...le(a, 0, t),
2437
+ ...ce(a, 0, t),
2438
2438
  e,
2439
2439
  {
2440
2440
  type: "text",
2441
2441
  text: " "
2442
2442
  },
2443
- ...le(a, n, h().length)
2443
+ ...ce(a, n, h().length)
2444
2444
  ], i), d(), w(i);
2445
2445
  }
2446
2446
  function F(e, t = c.value, n = {}) {
2447
- I(i.content && se(i.content) === e ? i.content : [{
2447
+ I(i.content && oe(i.content) === e ? i.content : [{
2448
2448
  type: "text",
2449
2449
  text: e
2450
2450
  }], t, n);
@@ -2453,8 +2453,8 @@ var gi = { class: "chat-composer-slash-menu__section" }, _i = ["onMousedown"], v
2453
2453
  let r = s.value;
2454
2454
  if (!r) return;
2455
2455
  let i = n.focus ?? document.activeElement === r, a = document.createDocumentFragment();
2456
- for (let t of ae(e)) t.type === "mention" ? a.append(R(t)) : L(a, t.text);
2457
- let o = se(e);
2456
+ for (let t of ie(e)) t.type === "mention" ? a.append(R(t)) : L(a, t.text);
2457
+ let o = oe(e);
2458
2458
  if (o.endsWith("\n")) {
2459
2459
  let e = document.createElement("br");
2460
2460
  e.dataset.trailingLineBreak = "", a.append(e);
@@ -2572,26 +2572,26 @@ function zi(e) {
2572
2572
  let t = N(null), n = N(0), r = N(0), i = N(0), a = N(0), s = N(0), c = null, l = !1, u, d = o(() => Ii(e.prompt.value, e.caretPosition.value)), f = o(() => {
2573
2573
  let t = d.value;
2574
2574
  return t?.query ? Li([...e.files()], t.query, 5) : [];
2575
- }), p = o(() => d.value !== null && !d.value.query && e.files().length > 0), m = o(() => t.value === "at" && d.value !== null && e.files().length > 0 && !q()), h = o(() => Yt(e.prompt.value, e.caretPosition.value, "$")), g = o(() => Fi(e.prompt.value, e.caretPosition.value)), _ = o(() => Xt([...e.skills()], h.value?.query ?? "", -1, e.plugins?.() ?? [])), v = o(() => t.value === "skill" && e.skillsEnabled() && h.value !== null && e.skills().length > 0 && !q()), y = o(() => nn([...e.plugins?.() ?? []], g.value?.query ?? "")), b = o(() => cn(e.mentionGroups?.() ?? [], d.value?.query ?? "")), x = o(() => b.value.filter((e) => e.placement !== "after").flatMap((e) => e.items.map((t) => ({
2575
+ }), p = o(() => d.value !== null && !d.value.query && e.files().length > 0), m = o(() => t.value === "at" && d.value !== null && e.files().length > 0 && !J()), h = o(() => Yt(e.prompt.value, e.caretPosition.value, "$")), g = o(() => Fi(e.prompt.value, e.caretPosition.value)), _ = o(() => Xt([...e.skills()], h.value?.query ?? "", -1, e.plugins?.() ?? [])), v = o(() => t.value === "skill" && e.skillsEnabled() && h.value !== null && e.skills().length > 0 && !J()), y = o(() => nn([...e.plugins?.() ?? []], g.value?.query ?? "")), b = o(() => cn(e.mentionGroups?.() ?? [], d.value?.query ?? "")), x = o(() => b.value.filter((e) => e.placement !== "after").flatMap((e) => e.items.map((t) => ({
2576
2576
  group: e,
2577
2577
  item: t
2578
2578
  })))), S = o(() => b.value.filter((e) => e.placement === "after").flatMap((e) => e.items.map((t) => ({
2579
2579
  group: e,
2580
2580
  item: t
2581
- })))), C = o(() => !1), w = o(() => x.value.length + y.value.length + f.value.length + S.value.length), T = o(() => t.value === "at" && d.value !== null && (w.value > 0 || p.value) && !q()), E = o(() => pi(e.prompt.value, e.caretPosition.value)), D = o(() => mi([...e.commands()], E.value?.query ?? "")), ee = o(() => (e.skillsEnabled(), [])), O = o(() => D.value.length + ee.value.length), k = o(() => t.value === "slash" && E.value !== null && O.value > 0 && !q());
2582
- U([_, h], () => {
2581
+ })))), C = o(() => !1), w = o(() => x.value.length + y.value.length + f.value.length + S.value.length), T = o(() => t.value === "at" && d.value !== null && (w.value > 0 || p.value) && !J()), E = o(() => pi(e.prompt.value, e.caretPosition.value)), D = o(() => mi([...e.commands()], E.value?.query ?? "")), ee = o(() => (e.skillsEnabled(), [])), O = o(() => D.value.length + ee.value.length), k = o(() => t.value === "slash" && E.value !== null && O.value > 0 && !J());
2582
+ W([_, h], () => {
2583
2583
  r.value = 0;
2584
- }), U([y, g], () => {
2584
+ }), W([y, g], () => {
2585
2585
  i.value = 0, a.value = 0;
2586
- }), U(b, () => {
2586
+ }), W(b, () => {
2587
2587
  a.value = 0;
2588
- }), U([
2588
+ }), W([
2589
2589
  D,
2590
2590
  ee,
2591
2591
  E
2592
2592
  ], () => {
2593
2593
  s.value = 0;
2594
- }), U([f, d], () => {
2594
+ }), W([f, d], () => {
2595
2595
  n.value = 0;
2596
2596
  });
2597
2597
  function A(e) {
@@ -2618,7 +2618,7 @@ function zi(e) {
2618
2618
  }) ? !0 : k.value && O.value > 0 && e.key === "Tab" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey ? (e.preventDefault(), R("complete"), !0) : !!j(e, k.value, O.value, s, () => R("execute"));
2619
2619
  }
2620
2620
  function j(e, t, n, r, i) {
2621
- 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 = K(), H(), !0) : e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && n > 0 ? (e.preventDefault(), i(), !0) : !1 : !1;
2621
+ 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 = q(), U(), !0) : e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && n > 0 ? (e.preventDefault(), i(), !0) : !1 : !1;
2622
2622
  }
2623
2623
  function M(t) {
2624
2624
  let n = d.value;
@@ -2682,11 +2682,11 @@ function zi(e) {
2682
2682
  if (!r || !e.editor.value) return;
2683
2683
  let i = `/${t.slashName ?? t.name}`;
2684
2684
  if (t.composerMode) {
2685
- 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);
2685
+ e.prompt.value = `${e.prompt.value.slice(0, r.start)}${e.prompt.value.slice(r.end)}`, e.caretPosition.value = r.start, U(), e.onCommandActivated?.(t), e.onTextInserted(r.start);
2686
2686
  return;
2687
2687
  }
2688
2688
  if (n === "execute" || n === "default" && t.submitOnSelect) {
2689
- e.prompt.value = "", e.caretPosition.value = 0, H(), e.onCommandSubmitted(i);
2689
+ e.prompt.value = "", e.caretPosition.value = 0, U(), e.onCommandSubmitted(i);
2690
2690
  return;
2691
2691
  }
2692
2692
  B(`${i} `, r.start, r.end);
@@ -2703,37 +2703,37 @@ function zi(e) {
2703
2703
  function z(t, n, r) {
2704
2704
  e.editor.value?.insertMention(t, n, r);
2705
2705
  let i = n + t.label.length + 1;
2706
- e.caretPosition.value = i, H(), e.onTextInserted(i);
2706
+ e.caretPosition.value = i, U(), e.onTextInserted(i);
2707
2707
  }
2708
2708
  function B(t, n, r) {
2709
2709
  e.prompt.value = `${e.prompt.value.slice(0, n)}${t}${e.prompt.value.slice(r)}`;
2710
2710
  let i = n + t.length;
2711
- e.caretPosition.value = i, H(), e.onTextInserted(i);
2711
+ e.caretPosition.value = i, U(), e.onTextInserted(i);
2712
2712
  }
2713
2713
  function V(t) {
2714
- e.caretPosition.value = t?.end ?? e.editor.value?.getSelectionRange().end ?? e.prompt.value.length, G();
2715
- }
2716
- function re() {
2717
- u !== void 0 && window.clearTimeout(u), u = window.setTimeout(H, 120);
2714
+ e.caretPosition.value = t?.end ?? e.editor.value?.getSelectionRange().end ?? e.prompt.value.length, K();
2718
2715
  }
2719
2716
  function H() {
2717
+ u !== void 0 && window.clearTimeout(u), u = window.setTimeout(U, 120);
2718
+ }
2719
+ function U() {
2720
2720
  t.value = null;
2721
2721
  }
2722
- function ie() {
2723
- l = !0, H();
2722
+ function re() {
2723
+ l = !0, U();
2724
2724
  }
2725
- function W() {
2725
+ function G() {
2726
2726
  l = !1;
2727
2727
  }
2728
- function G() {
2728
+ function K() {
2729
2729
  if (u !== void 0 && window.clearTimeout(u), l) {
2730
- H();
2730
+ U();
2731
2731
  return;
2732
2732
  }
2733
- let e = K();
2733
+ let n = q();
2734
2734
  if (c !== null) {
2735
- if (e === c) {
2736
- H();
2735
+ if (n === c) {
2736
+ U();
2737
2737
  return;
2738
2738
  }
2739
2739
  c = null;
@@ -2743,19 +2743,20 @@ function zi(e) {
2743
2743
  return;
2744
2744
  }
2745
2745
  if (h.value !== null) {
2746
- t.value = "skill";
2746
+ let n = t.value !== "skill";
2747
+ t.value = "skill", n && e.onSkillsRequested?.();
2747
2748
  return;
2748
2749
  }
2749
2750
  if (E.value !== null) {
2750
2751
  t.value = "slash";
2751
2752
  return;
2752
2753
  }
2753
- H();
2754
+ U();
2754
2755
  }
2755
- function K() {
2756
+ function q() {
2756
2757
  return `${e.prompt.value}\u0000${e.caretPosition.value}`;
2757
2758
  }
2758
- function q() {
2759
+ function J() {
2759
2760
  return e.disabled() && !e.isSending();
2760
2761
  }
2761
2762
  return {
@@ -2765,9 +2766,9 @@ function zi(e) {
2765
2766
  activePluginIndex: i,
2766
2767
  activeSlashIndex: s,
2767
2768
  atMenuVisible: T,
2768
- close: H,
2769
- closeSoon: re,
2770
- resume: W,
2769
+ close: U,
2770
+ closeSoon: H,
2771
+ resume: G,
2771
2772
  fileMenuShowsHint: p,
2772
2773
  fileMenuVisible: m,
2773
2774
  handleKeydown: A,
@@ -2780,8 +2781,8 @@ function zi(e) {
2780
2781
  skillMenuVisible: v,
2781
2782
  pluginMenuVisible: C,
2782
2783
  slashMenuVisible: k,
2783
- suspend: ie,
2784
- sync: G,
2784
+ suspend: re,
2785
+ sync: K,
2785
2786
  updateCaretPosition: V,
2786
2787
  visibleFiles: f,
2787
2788
  visibleSkills: _,
@@ -2903,10 +2904,17 @@ var Zi = Symbol("image-preview-pool"), Qi = class {
2903
2904
  originalBytes: 0,
2904
2905
  thumbnailBytes: 0,
2905
2906
  previewPixels: 0
2906
- }, this.entries.set(e, t)), t.users++, t;
2907
+ }, this.entries.set(e, t)), t.users++, t.thumbnail && !t.source.value && this.room(t.previewPixels, t, !1) && (t.bytes = t.previewPixels, t.source.value = t.thumbnail, t.state.value = "ready"), this.touch(t), t;
2907
2908
  }
2908
2909
  release(e) {
2909
- e.users = Math.max(0, e.users - 1), !e.users && (this.drop(e), this.entries.delete(e.reference));
2910
+ if (e.users = Math.max(0, e.users - 1), !e.users) {
2911
+ if (e.near = 0, e.visible = 0, this.viewport && e.thumbnail && e.ownedOriginal && e.reference.length <= 512 && /^conversation-image:[^:]+:[a-f0-9]{64}$/i.test(e.reference)) {
2912
+ let e = [...this.entries.values()].filter((e) => !e.users);
2913
+ for (let t of e.slice(0, Math.max(0, e.length - 128))) this.drop(t);
2914
+ return;
2915
+ }
2916
+ this.drop(e);
2917
+ }
2910
2918
  }
2911
2919
  clear() {
2912
2920
  for (let e of this.entries.values()) e.users = 0, this.drop(e);
@@ -2916,17 +2924,13 @@ var Zi = Symbol("image-preview-pool"), Qi = class {
2916
2924
  e.width = Math.min(1024, Math.max(1, t * Math.min(2, globalThis.devicePixelRatio))), !e.near && !e.visible && this.dropPreview(e);
2917
2925
  }
2918
2926
  load(e, t = !1) {
2919
- return e.source.value ? (this.touch(e), Promise.resolve()) : e.pending ? e.pending : (e.state.value = "loading", e.pending = new Promise((n) => {
2927
+ return e.source.value ? (this.touch(e), Promise.resolve()) : e.pending ? e.pending : e.thumbnail ? (e.users && (!this.viewport || e.near || t) && this.room(e.previewPixels, e, t) && (this.touch(e), e.bytes = e.previewPixels, e.source.value = e.thumbnail, e.state.value = "ready"), Promise.resolve()) : (e.state.value = "loading", e.pending = new Promise((n) => {
2920
2928
  this.queue.push({
2921
2929
  entry: e,
2922
2930
  run: async () => {
2923
2931
  let r, i = !1;
2924
2932
  try {
2925
2933
  if (!e.users || this.viewport && !e.near && !t) return;
2926
- if (e.thumbnail) {
2927
- this.room(e.previewPixels, e, t) && (this.touch(e), e.bytes = e.previewPixels, e.source.value = e.thumbnail, e.state.value = "ready");
2928
- return;
2929
- }
2930
2934
  if (!e.original.value) {
2931
2935
  let n = await this.read(e.reference);
2932
2936
  if (!e.users || !n || n.length > 24 * 1024 * 1024) return;
@@ -2958,6 +2962,10 @@ var Zi = Symbol("image-preview-pool"), Qi = class {
2958
2962
  }
2959
2963
  room(e, t, n) {
2960
2964
  let r = [...this.entries.values()].reduce((e, t) => e + t.bytes + t.originalBytes + t.thumbnailBytes, 0), i = [...this.entries.values()].filter((e) => e !== t && !e.pending && !(this.viewport && e.visible && !n)).sort((e, t) => e.visible - t.visible || e.near - t.near);
2965
+ for (let t of i.filter((e) => !e.users)) {
2966
+ if (r + e <= this.budget) break;
2967
+ r -= t.bytes + t.originalBytes + t.thumbnailBytes, this.drop(t);
2968
+ }
2961
2969
  for (let t of i) {
2962
2970
  if (r + e <= this.budget) break;
2963
2971
  r -= t.bytes, this.viewport ? this.dropPreview(t) : (r -= t.originalBytes + t.thumbnailBytes, this.drop(t));
@@ -2972,7 +2980,7 @@ var Zi = Symbol("image-preview-pool"), Qi = class {
2972
2980
  e.source.value = void 0, e.bytes = 0, e.state.value !== "loading" && (e.state.value = "idle");
2973
2981
  }
2974
2982
  drop(e) {
2975
- this.dropPreview(e), e.ownedPreview && URL.revokeObjectURL(e.thumbnail), e.thumbnail = void 0, e.thumbnailBytes = 0, e.previewPixels = 0, e.ownedPreview = !1, e.ownedOriginal && URL.revokeObjectURL(e.original.value), e.original.value = void 0, e.originalBytes = 0, e.ownedOriginal = !1;
2983
+ this.dropPreview(e), e.ownedPreview && URL.revokeObjectURL(e.thumbnail), e.thumbnail = void 0, e.thumbnailBytes = 0, e.previewPixels = 0, e.ownedPreview = !1, e.ownedOriginal && URL.revokeObjectURL(e.original.value), e.original.value = void 0, e.originalBytes = 0, e.ownedOriginal = !1, !e.users && this.entries.get(e.reference) === e && this.entries.delete(e.reference);
2976
2984
  }
2977
2985
  pump() {
2978
2986
  for (; this.active < 2 && this.queue.length;) this.active++, this.queue.sort((e, t) => t.entry.visible - e.entry.visible || t.entry.near - e.entry.near), this.queue.shift().run().finally(() => {
@@ -3278,7 +3286,7 @@ function pa(e) {
3278
3286
  let t = e.text.length, n = Math.max(0, Math.min(e.selectionStart, t)), r = Math.max(n, Math.min(e.selectionEnd, t));
3279
3287
  return {
3280
3288
  text: e.text,
3281
- ...e.content && se(e.content) === e.text ? { content: ae(e.content) } : {},
3289
+ ...e.content && oe(e.content) === e.text ? { content: ie(e.content) } : {},
3282
3290
  selectionStart: n,
3283
3291
  selectionEnd: r,
3284
3292
  ...e.activeCommandId ? { activeCommandId: e.activeCommandId } : {}
@@ -3337,6 +3345,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3337
3345
  "attach",
3338
3346
  "menuSelect",
3339
3347
  "mentionSelect",
3348
+ "requestSkills",
3340
3349
  "interrupt",
3341
3350
  "update:modelId",
3342
3351
  "update:composerState",
@@ -3349,12 +3358,12 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3349
3358
  let r = e, i = n, a = na(), f = N(""), p = N([]), h = N(null), g = N(!1), v = N(null), y = N(0), b = N(0), x = N(0), E = N(0), { exit: D, recall: O, remember: A, seed: j } = wn({
3350
3359
  apply: bt,
3351
3360
  currentPrompt: () => f.value
3352
- }), M = !1, te = null, P = 0, I = o(() => r.capabilities ?? Lt), L = o(() => It(r.presentation)), ne = o(() => zt(r.commands ?? Rt, I.value.goals)), R = o(() => ne.value.find((e) => e.id === h.value) ?? null), z = o(() => ne.value.find((e) => (e.slashName ?? e.name) === "goal" && e.composerMode) ?? null), B = o(() => !!(z.value && h.value === z.value.id)), re = o(() => !!(I.value.planMode && r.planMode && !B.value)), H = o(() => R.value?.composerMode?.placeholder ?? (r.suggestedPrompt?.trim() ? r.suggestedPrompt : r.placeholder ?? "Ask Codex…")), ie = o(() => L.value.composer.voice && !!(r.transcribeAudio || a?.capabilities.transcription)), G = o(() => !!f.value.trim()), ae = o(() => r.emptySendPrompt?.trim() ?? ""), le = o(() => !!((R.value ? G.value : G.value || r.hasAttachments || r.hasExternalContent) && !r.disabled)), de = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !G.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), fe = o(() => !!(ae.value && !r.isSending && !r.disabled && !G.value && !r.hasAttachments && !r.hasExternalContent && !R.value && !de.value)), J = null, Y = o(() => !!(r.isSending && !G.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !xe.value && !Ce.value)), pe = o(() => Y.value), me = o(() => r.followUpBehavior === "steer" && I.value.steerPrompt), he = o(() => r.interruptArmed ? !1 : Se.value || Ce.value ? !0 : xe.value && !r.disabled ? !1 : !le.value && !Y.value && !de.value), ge = o(() => de.value ? "Continue" : fe.value ? "Send default prompt" : r.isSending ? me.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), _e = o(() => {
3361
+ }), M = !1, te = null, P = 0, I = o(() => r.capabilities ?? Lt), L = o(() => It(r.presentation)), ne = o(() => zt(r.commands ?? Rt, I.value.goals)), R = o(() => ne.value.find((e) => e.id === h.value) ?? null), z = o(() => ne.value.find((e) => (e.slashName ?? e.name) === "goal" && e.composerMode) ?? null), B = o(() => !!(z.value && h.value === z.value.id)), H = o(() => !!(I.value.planMode && r.planMode && !B.value)), U = o(() => R.value?.composerMode?.placeholder ?? (r.suggestedPrompt?.trim() ? r.suggestedPrompt : r.placeholder ?? "Ask Codex…")), re = o(() => L.value.composer.voice && !!(r.transcribeAudio || a?.capabilities.transcription)), K = o(() => !!f.value.trim()), ie = o(() => r.emptySendPrompt?.trim() ?? ""), ce = o(() => !!((R.value ? K.value : K.value || r.hasAttachments || r.hasExternalContent) && !r.disabled)), ue = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !K.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), de = o(() => !!(ie.value && !r.isSending && !r.disabled && !K.value && !r.hasAttachments && !r.hasExternalContent && !R.value && !ue.value)), Y = null, X = o(() => !!(r.isSending && !K.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !xe.value && !Ce.value)), fe = o(() => X.value), pe = o(() => r.followUpBehavior === "steer" && I.value.steerPrompt), me = o(() => r.interruptArmed ? !1 : Se.value || Ce.value ? !0 : xe.value && !r.disabled ? !1 : !ce.value && !X.value && !ue.value), he = o(() => ue.value ? "Continue" : de.value ? "Send default prompt" : r.isSending ? pe.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), ge = o(() => {
3353
3362
  if (r.interruptArmed) return "Press Escape again or click to stop generation";
3354
- if (Y.value) return "Interrupt";
3355
- let e = `${ge.value} (Enter)`;
3356
- return !r.isSending || !I.value.steerPrompt ? e : `${e}. ${me.value ? "Queue" : "Steer"} prompt (Cmd/Ctrl+Enter)`;
3357
- }), { buttonDisabled: ve, buttonLabel: ye, buttonTitle: be, error: X, isRecording: xe, isStarting: Se, isTranscribing: Ce, transcript: we, audioLevel: Te, cancel: Ee, stop: De, toggle: Oe } = ua({
3363
+ if (X.value) return "Interrupt";
3364
+ let e = `${he.value} (Enter)`;
3365
+ return !r.isSending || !I.value.steerPrompt ? e : `${e}. ${pe.value ? "Queue" : "Steer"} prompt (Cmd/Ctrl+Enter)`;
3366
+ }), { buttonDisabled: _e, buttonLabel: ve, buttonTitle: ye, error: be, isRecording: xe, isStarting: Se, isTranscribing: Ce, transcript: we, audioLevel: Te, cancel: Ee, stop: De, toggle: Oe } = ua({
3358
3367
  isDisabled: () => r.disabled,
3359
3368
  isSending: () => r.isSending,
3360
3369
  onTranscript: ct,
@@ -3366,19 +3375,19 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3366
3375
  let e = f.value.slice(E.value);
3367
3376
  return e && !/^\s/.test(e) ? ` ${e}` : e;
3368
3377
  });
3369
- U(X, (e) => i("error", e));
3378
+ W(be, (e) => i("error", e));
3370
3379
  function je(e) {
3371
3380
  !Se.value && !xe.value && !Ce.value || (e.preventDefault(), e.stopPropagation(), Ee());
3372
3381
  }
3373
- U(Ce, (e) => {
3374
- if (e || J === null) return;
3375
- let t = J;
3376
- J = null, C(() => {
3382
+ W(Ce, (e) => {
3383
+ if (e || Y === null) return;
3384
+ let t = Y;
3385
+ Y = null, C(() => {
3377
3386
  v.value?.setCaret(t);
3378
3387
  });
3379
3388
  });
3380
3389
  let Me = 0;
3381
- U(() => [r.promptHistory, r.promptHistoryLoading], ([e, t]) => {
3390
+ W(() => [r.promptHistory, r.promptHistoryLoading], ([e, t]) => {
3382
3391
  if (j(e ?? []), t || Me === 0) return;
3383
3392
  let n = Me;
3384
3393
  Me = 0;
@@ -3403,29 +3412,32 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3403
3412
  prompt: f,
3404
3413
  skills: () => r.skills ?? [],
3405
3414
  skillsEnabled: () => I.value.skills,
3415
+ onSkillsRequested: () => {
3416
+ (!r.skillCatalogStatus || r.skillCatalogStatus === "notLoaded" || r.skillCatalogStatus === "error") && i("requestSkills");
3417
+ },
3406
3418
  editor: v
3407
3419
  });
3408
- U(() => r.composerState, (e) => {
3420
+ W(() => r.composerState, (e) => {
3409
3421
  e && ht(e);
3410
3422
  }, {
3411
3423
  deep: !0,
3412
3424
  immediate: !0
3413
- }), U(() => r.draftRevision, () => {
3425
+ }), W(() => r.draftRevision, () => {
3414
3426
  r.composerState || lt(r.draft ?? "");
3415
- }, { immediate: r.draftRevision !== void 0 }), U(f, () => St()), ee(() => {
3427
+ }, { immediate: r.draftRevision !== void 0 }), W(f, () => St()), ee(() => {
3416
3428
  r.autofocus && v.value?.focusEnd();
3417
3429
  });
3418
3430
  function it() {
3419
3431
  if (!(Se.value || xe.value || Ce.value)) {
3420
- if (de.value) {
3432
+ if (ue.value) {
3421
3433
  i("continueInterruptedTurn");
3422
3434
  return;
3423
3435
  }
3424
- if (fe.value) {
3425
- i("send", ae.value);
3436
+ if (de.value) {
3437
+ i("send", ie.value);
3426
3438
  return;
3427
3439
  }
3428
- r.isSending && me.value ? ot() : st("send");
3440
+ r.isSending && pe.value ? ot() : st("send");
3429
3441
  }
3430
3442
  }
3431
3443
  async function at() {
@@ -3437,7 +3449,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3437
3449
  await De() && it();
3438
3450
  return;
3439
3451
  }
3440
- if (Y.value) {
3452
+ if (X.value) {
3441
3453
  i("interrupt");
3442
3454
  return;
3443
3455
  }
@@ -3458,8 +3470,8 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3458
3470
  }
3459
3471
  function st(e) {
3460
3472
  let t = f.value.trim();
3461
- if (!le.value || e === "steer" && !t && !r.hasAttachments && !r.hasExternalContent) return;
3462
- let n = R.value ? `/${R.value.slashName ?? R.value.name}` : null, a = n && t ? `${n} ${t}` : t || (r.hasAttachments ? "(no user instructions)" : ""), o = ue(v.value?.readContent() ?? [{
3473
+ if (!ce.value || e === "steer" && !t && !r.hasAttachments && !r.hasExternalContent) return;
3474
+ let n = R.value ? `/${R.value.slashName ?? R.value.name}` : null, a = n && t ? `${n} ${t}` : t || (r.hasAttachments ? "(no user instructions)" : ""), o = le(v.value?.readContent() ?? [{
3463
3475
  type: "text",
3464
3476
  text: t
3465
3477
  }]);
@@ -3471,19 +3483,19 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3471
3483
  ...g.value ? { inputMethod: "dictated" } : {},
3472
3484
  ...s ? { content: o } : {}
3473
3485
  } : void 0;
3474
- t && A(oe(o, a)), y.value += 1, p.value = [], f.value = "", h.value = null, g.value = !1, x.value = 0, E.value = 0, b.value = 0, Ie(), C(() => v.value?.focusEnd()), e === "send" ? c ? i("send", a, c) : i("send", a) : c ? i("steer", a, c) : i("steer", a);
3486
+ t && A(ae(o, a)), y.value += 1, p.value = [], f.value = "", h.value = null, g.value = !1, x.value = 0, E.value = 0, b.value = 0, Ie(), C(() => v.value?.focusEnd()), e === "send" ? c ? i("send", a, c) : i("send", a) : c ? i("steer", a, c) : i("steer", a);
3475
3487
  }
3476
3488
  async function ct(e) {
3477
3489
  let t = e.trim();
3478
3490
  if (!t) return;
3479
3491
  let n = v.value?.getSelectionRange(), r = n?.start ?? x.value, i = n?.end ?? E.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;
3480
- p.value = ce(se(p.value) === f.value ? p.value : [{
3492
+ p.value = se(oe(p.value) === f.value ? p.value : [{
3481
3493
  type: "text",
3482
3494
  text: f.value
3483
3495
  }], r, i, [{
3484
3496
  type: "text",
3485
3497
  text: s
3486
- }]), f.value = se(p.value), g.value = !0, b.value = c, x.value = c, E.value = c, J = c, Ie();
3498
+ }]), f.value = oe(p.value), g.value = !0, b.value = c, x.value = c, E.value = c, Y = c, Ie();
3487
3499
  }
3488
3500
  function lt(e) {
3489
3501
  D(), ht({
@@ -3559,7 +3571,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3559
3571
  }
3560
3572
  }
3561
3573
  if (e.key === "Tab" && e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey) {
3562
- e.preventDefault(), I.value.planMode && mt(!re.value);
3574
+ e.preventDefault(), I.value.planMode && mt(!H.value);
3563
3575
  return;
3564
3576
  }
3565
3577
  if (e.key === "Enter") {
@@ -3568,7 +3580,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3568
3580
  return;
3569
3581
  }
3570
3582
  if (e.preventDefault(), e.metaKey !== e.ctrlKey && !e.altKey) {
3571
- r.isSending ? me.value ? st("send") : ot() : it();
3583
+ r.isSending ? pe.value ? st("send") : ot() : it();
3572
3584
  return;
3573
3585
  }
3574
3586
  !e.metaKey && !e.ctrlKey && !e.altKey && it();
@@ -3584,7 +3596,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3584
3596
  }
3585
3597
  function bt(e) {
3586
3598
  let t = pn(e, r.plugins, r.skills, r.mentionGroups);
3587
- p.value = t, f.value = se(t);
3599
+ p.value = t, f.value = oe(t);
3588
3600
  let n = f.value.length;
3589
3601
  x.value = n, E.value = n, b.value = n, Xe(), C(() => {
3590
3602
  v.value?.setContent(t, n);
@@ -3597,7 +3609,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3597
3609
  if (M) return;
3598
3610
  let e = pa({
3599
3611
  text: f.value,
3600
- ...se(p.value) === f.value && p.value.some((e) => e.type === "mention") ? { content: p.value } : {},
3612
+ ...oe(p.value) === f.value && p.value.some((e) => e.type === "mention") ? { content: p.value } : {},
3601
3613
  selectionStart: x.value,
3602
3614
  selectionEnd: E.value,
3603
3615
  activeCommandId: h.value
@@ -3624,8 +3636,8 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3624
3636
  return t({ focus: Et }), (t, n) => (k(), l("form", {
3625
3637
  class: w(["codex-chat-theme chat-composer", { "chat-composer--disabled": e.disabled && !e.isSending }]),
3626
3638
  "aria-label": "Prompt composer",
3627
- onSubmit: q(it, ["prevent"]),
3628
- onKeydown: K(je, ["esc"])
3639
+ onSubmit: J(it, ["prevent"]),
3640
+ onKeydown: q(je, ["esc"])
3629
3641
  }, [
3630
3642
  F(t.$slots, "before", {}, void 0, !0),
3631
3643
  V(Be) ? (k(), s(ii, {
@@ -3640,7 +3652,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3640
3652
  onSelectMention: V(Ge)
3641
3653
  }, d({ _: 2 }, [t.$slots["suggestion-item"] ? {
3642
3654
  name: "mention",
3643
- fn: W((e) => [F(t.$slots, "suggestion-item", S(e, { surface: "menu" }), void 0, !0)]),
3655
+ fn: G((e) => [F(t.$slots, "suggestion-item", S(e, { surface: "menu" }), void 0, !0)]),
3644
3656
  key: "0"
3645
3657
  } : void 0]), 1032, [
3646
3658
  "active-index",
@@ -3678,7 +3690,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3678
3690
  "onSelectCommand",
3679
3691
  "onSelectSkill"
3680
3692
  ])) : c("", !0),
3681
- u("div", ma, [ie.value && (V(Se) || V(xe) || V(Ce)) ? (k(), s(rr, {
3693
+ u("div", ma, [re.value && (V(Se) || V(xe) || V(Ce)) ? (k(), s(rr, {
3682
3694
  key: 0,
3683
3695
  class: "chat-composer__input",
3684
3696
  recording: V(xe),
@@ -3703,7 +3715,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3703
3715
  content: p.value,
3704
3716
  "onUpdate:content": n[1] ||= (e) => p.value = e,
3705
3717
  class: "chat-composer__input",
3706
- placeholder: H.value,
3718
+ placeholder: U.value,
3707
3719
  disabled: e.disabled && !e.isSending,
3708
3720
  files: e.files,
3709
3721
  "mention-groups": e.mentionGroups,
@@ -3718,7 +3730,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3718
3730
  onPaste: Ct
3719
3731
  }, d({ _: 2 }, [t.$slots.mention ? {
3720
3732
  name: "mention",
3721
- fn: W((e) => [F(t.$slots, "mention", S(e, { surface: "composer" }), void 0, !0)]),
3733
+ fn: G((e) => [F(t.$slots, "mention", S(e, { surface: "composer" }), void 0, !0)]),
3722
3734
  key: "0"
3723
3735
  } : void 0]), 1032, [
3724
3736
  "modelValue",
@@ -3743,7 +3755,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3743
3755
  "approval-preset": e.approvalPreset,
3744
3756
  "approval-presets": I.value.approvalPresets ?? [],
3745
3757
  "goal-mode": B.value,
3746
- "plan-mode": re.value,
3758
+ "plan-mode": H.value,
3747
3759
  "show-approval-menu": I.value.approvals && !!e.approvalPreset && (I.value.approvalPresets?.length ?? 0) > 0,
3748
3760
  "show-goal-mode": I.value.goals,
3749
3761
  "show-plan-mode": I.value.planMode,
@@ -3754,11 +3766,11 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3754
3766
  "onUpdate:planMode": mt
3755
3767
  }, d({ _: 2 }, [t.$slots["menu-icon"] ? {
3756
3768
  name: "icon",
3757
- fn: W((e) => [F(t.$slots, "menu-icon", T(_(e)), void 0, !0)]),
3769
+ fn: G((e) => [F(t.$slots, "menu-icon", T(_(e)), void 0, !0)]),
3758
3770
  key: "0"
3759
3771
  } : void 0, t.$slots["menu-item"] ? {
3760
3772
  name: "item",
3761
- fn: W((e) => [F(t.$slots, "menu-item", T(_(e)), void 0, !0)]),
3773
+ fn: G((e) => [F(t.$slots, "menu-item", T(_(e)), void 0, !0)]),
3762
3774
  key: "1"
3763
3775
  } : void 0]), 1032, [
3764
3776
  "attach-enabled",
@@ -3775,7 +3787,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3775
3787
  ])) : c("", !0),
3776
3788
  F(t.$slots, "before-meta", {}, void 0, !0),
3777
3789
  m(jn, {
3778
- "plan-mode": re.value,
3790
+ "plan-mode": H.value,
3779
3791
  command: R.value,
3780
3792
  onDisablePlanMode: n[5] ||= (e) => mt(!1),
3781
3793
  onRemoveCommand: ut
@@ -3811,12 +3823,12 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3811
3823
  "show-service-tier",
3812
3824
  "show-reasoning"
3813
3825
  ])) : c("", !0),
3814
- ie.value ? (k(), s(Xn, {
3826
+ re.value ? (k(), s(Xn, {
3815
3827
  key: 2,
3816
- disabled: V(ve),
3817
- label: V(ye),
3828
+ disabled: V(_e),
3829
+ label: V(ve),
3818
3830
  recording: V(xe),
3819
- title: V(be),
3831
+ title: V(ye),
3820
3832
  onToggle: V(Oe)
3821
3833
  }, null, 8, [
3822
3834
  "disabled",
@@ -3827,12 +3839,12 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3827
3839
  ])) : c("", !0),
3828
3840
  m(Dn, {
3829
3841
  class: "chat-composer__send",
3830
- disabled: he.value,
3831
- "hover-to-enable": fe.value,
3832
- busy: pe.value,
3842
+ disabled: me.value,
3843
+ "hover-to-enable": de.value,
3844
+ busy: fe.value,
3833
3845
  "interrupt-armed": e.interruptArmed,
3834
- "submit-label": ge.value,
3835
- title: _e.value,
3846
+ "submit-label": he.value,
3847
+ title: ge.value,
3836
3848
  "interrupt-label": "Codex is working",
3837
3849
  onClick: at
3838
3850
  }, null, 8, [
@@ -3847,7 +3859,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3847
3859
  ])])
3848
3860
  ], 34));
3849
3861
  }
3850
- }), [["__scopeId", "data-v-30de1ce7"]]), ya = { class: "codex-chat-theme codex-request-card chat-tool-confirmation" }, ba = { class: "codex-request-header chat-tool-confirmation__header" }, xa = { class: "codex-request-eyebrow chat-tool-confirmation__tag" }, Sa = { class: "codex-request-title chat-tool-confirmation__question" }, Ca = {
3862
+ }), [["__scopeId", "data-v-90841919"]]), ya = { class: "codex-chat-theme codex-request-card chat-tool-confirmation" }, ba = { class: "codex-request-header chat-tool-confirmation__header" }, xa = { class: "codex-request-eyebrow chat-tool-confirmation__tag" }, Sa = { class: "codex-request-title chat-tool-confirmation__question" }, Ca = {
3851
3863
  key: 0,
3852
3864
  class: "codex-request-description chat-tool-confirmation__description"
3853
3865
  }, wa = {
@@ -3929,7 +3941,7 @@ var ma = { class: "chat-composer__input-row" }, ha = { class: "chat-composer__me
3929
3941
  onDecide: m
3930
3942
  }, d({ _: 2 }, [e.approval.command || e.approval.cwd || e.approval.requestedPermissions?.length ? {
3931
3943
  name: "details",
3932
- fn: W(() => [u("div", ka, [
3944
+ fn: G(() => [u("div", ka, [
3933
3945
  e.approval.command ? (k(), l("code", Aa, z(e.approval.command), 1)) : c("", !0),
3934
3946
  e.approval.cwd ? (k(), l("small", ja, z(e.approval.cwd), 1)) : c("", !0),
3935
3947
  e.approval.requestedPermissions?.length ? (k(), l("ul", Ma, [(k(!0), l(t, null, P(e.approval.requestedPermissions, (e, t) => (k(), l("li", { key: t }, z(h(e)), 1))), 128))])) : c("", !0)
@@ -4051,7 +4063,7 @@ function Ua(e) {
4051
4063
  }));
4052
4064
  return Wa({
4053
4065
  content: t.join("\n\n"),
4054
- ...e.metadata?.promptContent === void 0 ? {} : { promptContent: ae(e.metadata.promptContent) },
4066
+ ...e.metadata?.promptContent === void 0 ? {} : { promptContent: ie(e.metadata.promptContent) },
4055
4067
  createdAt: e.createdAt,
4056
4068
  id: e.id,
4057
4069
  parts: n,
@@ -4571,7 +4583,7 @@ function Ro(e) {
4571
4583
  //#region src/chat/use-conversation-escape-interrupt.ts
4572
4584
  function zo(e) {
4573
4585
  let t = N(!1), n = null, r = !1;
4574
- U([e.busy, e.enabled], () => {
4586
+ W([e.busy, e.enabled], () => {
4575
4587
  c(), i();
4576
4588
  }), ee(i), D(() => {
4577
4589
  c(), a();
@@ -4631,7 +4643,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4631
4643
  key: e.place,
4632
4644
  class: "chat-animated-diff-stat__digit-column"
4633
4645
  }, [m(i, { name: "chat-animated-diff-stat__digit" }, {
4634
- default: W(() => [(k(), l("span", {
4646
+ default: G(() => [(k(), l("span", {
4635
4647
  key: `${e.place}-${e.digit}`,
4636
4648
  class: "chat-animated-diff-stat__digit"
4637
4649
  }, z(e.digit), 1))]),
@@ -4735,16 +4747,16 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4735
4747
  key: 1,
4736
4748
  class: "chat-tool-call__title-target chat-tool-call__title-target--link",
4737
4749
  href: e.link.href,
4738
- onClick: q((t) => r("open-link", e.link), ["stop", "prevent"]),
4739
- onKeydown: [K(q((t) => r("open-link", e.link), ["stop", "prevent"]), ["enter"]), K(q((t) => r("open-link", e.link), ["stop", "prevent"]), ["space"])]
4750
+ onClick: J((t) => r("open-link", e.link), ["stop", "prevent"]),
4751
+ onKeydown: [q(J((t) => r("open-link", e.link), ["stop", "prevent"]), ["enter"]), q(J((t) => r("open-link", e.link), ["stop", "prevent"]), ["space"])]
4740
4752
  }, z(e.label), 41, Qo)) : (k(), l("span", $o, z(e.label), 1)),
4741
4753
  e.suffix ? (k(), l("span", es, z(e.suffix), 1)) : c("", !0)
4742
4754
  ], 64))), 128)) : e.titleTargetLink ? (k(), l("a", {
4743
4755
  key: 1,
4744
4756
  class: "chat-tool-call__title-target chat-tool-call__title-target--link",
4745
4757
  href: e.titleTargetLink.href,
4746
- onClick: i[0] ||= q((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]),
4747
- 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"])]
4758
+ onClick: i[0] ||= J((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]),
4759
+ onKeydown: [i[1] ||= q(J((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["enter"]), i[2] ||= q(J((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["space"])]
4748
4760
  }, z(e.titleTarget), 41, ts)) : (k(), l("span", ns, z(e.titleTarget), 1))])
4749
4761
  ])) : (k(), l("span", rs, z(e.title), 1))], 10, Jo), e.lineDiff ? (k(), l("span", is, [e.lineDiff.addedLines ? (k(), s(Ko, {
4750
4762
  key: 0,
@@ -4817,8 +4829,8 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4817
4829
  return e;
4818
4830
  }), F = o(() => !M.value && !A.value && !r.historical && !!T.value), I = o(() => T.value?.options ?? []), ne = o(() => {
4819
4831
  let e = T.value;
4820
- return !!e && (me(e) || e.isOther === !0);
4821
- }), R, { buttonDisabled: B, buttonTitle: re, error: H, isStarting: ie, isRecording: G, isTranscribing: K, transcript: q, audioLevel: ae, toggle: oe, cancel: se, stop: ce } = ua({
4832
+ return !!e && (pe(e) || e.isOther === !0);
4833
+ }), R, { buttonDisabled: B, buttonTitle: H, error: U, isStarting: re, isRecording: K, isTranscribing: q, transcript: J, audioLevel: ie, toggle: ae, cancel: oe, stop: se } = ua({
4822
4834
  isDisabled: () => !F.value || !ne.value || !!T.value?.isSecret,
4823
4835
  isSending: () => !1,
4824
4836
  onTranscript: async (e) => {
@@ -4829,20 +4841,20 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4829
4841
  let r = R.before.length + n.length;
4830
4842
  await C(), _.value?.focus(), _.value?.setSelectionRange(r, r);
4831
4843
  }
4832
- }), le = o(() => ie.value || G.value || K.value), ue = o(() => `${R?.before ?? ""}${q.value.finalText}${q.value.partialText}${R?.after ?? ""}`);
4833
- U([
4844
+ }), ce = o(() => re.value || K.value || q.value), le = o(() => `${R?.before ?? ""}${J.value.finalText}${J.value.partialText}${R?.after ?? ""}`);
4845
+ W([
4834
4846
  x,
4835
4847
  () => T.value?.id,
4836
4848
  F,
4837
4849
  ne,
4838
4850
  () => T.value?.isSecret
4839
4851
  ], () => {
4840
- R = void 0, H.value = null, se();
4852
+ R = void 0, U.value = null, oe();
4841
4853
  }, { flush: "sync" });
4842
- async function de() {
4854
+ async function ue() {
4843
4855
  let e = T.value;
4844
4856
  if (e) {
4845
- if (!le.value) {
4857
+ if (!ce.value) {
4846
4858
  let t = v[e.id] ?? "", n = t.slice(0, _.value?.selectionStart ?? t.length), r = t.slice(_.value?.selectionEnd ?? t.length);
4847
4859
  R = {
4848
4860
  id: e.id,
@@ -4850,44 +4862,44 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4850
4862
  after: r && !/^\s/.test(r) ? ` ${r}` : r
4851
4863
  };
4852
4864
  }
4853
- await oe();
4865
+ await ae();
4854
4866
  }
4855
4867
  }
4856
- let fe = o(() => {
4868
+ let de = o(() => {
4857
4869
  let e = T.value;
4858
4870
  return e && e.header.trim() !== e.question.trim() ? e.header : "Question";
4859
- }), J = o(() => {
4860
- if (ie.value) return "Starting microphone...";
4861
- if (G.value) return "Listening...";
4862
- if (K.value) return "Transcribing...";
4863
- let e = T.value;
4864
- return e?.isSecret ? "Enter private answer" : e && me(e) ? "Type your answer..." : "Or write your own answer...";
4865
4871
  }), Y = o(() => {
4872
+ if (re.value) return "Starting microphone...";
4873
+ if (K.value) return "Listening...";
4874
+ if (q.value) return "Transcribing...";
4866
4875
  let e = T.value;
4867
- return ie.value || K.value || !e ? !1 : G.value ? !!(q.value.finalText + q.value.partialText).trim() : Se(e) ? !E.value || S.value.every((e) => Se(e)) : !1;
4876
+ return e?.isSecret ? "Enter private answer" : e && pe(e) ? "Type your answer..." : "Or write your own answer...";
4877
+ }), X = o(() => {
4878
+ let e = T.value;
4879
+ return re.value || q.value || !e ? !1 : K.value ? !!(J.value.finalText + J.value.partialText).trim() : Se(e) ? !E.value || S.value.every((e) => Se(e)) : !1;
4868
4880
  });
4869
- function pe() {
4881
+ function fe() {
4870
4882
  C(() => window.setTimeout(() => {
4871
4883
  let e = T.value;
4872
- !F.value || !e || (me(e) ? _.value?.focus() : (!document.activeElement || document.activeElement === document.body) && g.value?.focus());
4884
+ !F.value || !e || (pe(e) ? _.value?.focus() : (!document.activeElement || document.activeElement === document.body) && g.value?.focus());
4873
4885
  }, 0));
4874
4886
  }
4875
- ee(pe), U(a, pe);
4876
- function me(e) {
4887
+ ee(fe), W(a, fe);
4888
+ function pe(e) {
4877
4889
  return e.options === null;
4878
4890
  }
4879
- let he = /\s*\(recommended\)\s*$/i;
4880
- function _e(e) {
4881
- return e.replace(he, "").trim() || e;
4891
+ let me = /\s*\(recommended\)\s*$/i;
4892
+ function ge(e) {
4893
+ return e.replace(me, "").trim() || e;
4882
4894
  }
4883
- function ve(e) {
4884
- return he.test(e);
4895
+ function _e(e) {
4896
+ return me.test(e);
4885
4897
  }
4886
- function ye(e, t) {
4898
+ function ve(e, t) {
4887
4899
  return h[e]?.includes(t) ?? !1;
4888
4900
  }
4889
- function be(e, t) {
4890
- if (A.value || M.value || le.value) return;
4901
+ function ye(e, t) {
4902
+ if (A.value || M.value || ce.value) return;
4891
4903
  let n = e.id;
4892
4904
  if (h[n] ??= [], e.multiSelect) {
4893
4905
  let e = h[n].indexOf(t);
@@ -4896,7 +4908,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4896
4908
  }
4897
4909
  h[n] = [t], v[n] = "", Te();
4898
4910
  }
4899
- function X(e, t) {
4911
+ function be(e, t) {
4900
4912
  A.value || M.value || xe(e, t.target.value);
4901
4913
  }
4902
4914
  function xe(e, t) {
@@ -4906,37 +4918,37 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4906
4918
  return (h[e.id]?.length ?? 0) > 0 || !!v[e.id]?.trim();
4907
4919
  }
4908
4920
  function Ce(e) {
4909
- if (e.key === "Escape" && le.value) {
4910
- e.preventDefault(), e.stopPropagation(), se();
4921
+ if (e.key === "Escape" && ce.value) {
4922
+ e.preventDefault(), e.stopPropagation(), oe();
4911
4923
  return;
4912
4924
  }
4913
4925
  if (e.isComposing || e.metaKey || e.ctrlKey || e.altKey || !F.value) return;
4914
4926
  let t = T.value;
4915
4927
  if (t && /^[1-9]$/.test(e.key)) {
4916
4928
  let n = t.options?.[Number(e.key) - 1];
4917
- n && (e.preventDefault(), be(t, n.label));
4929
+ n && (e.preventDefault(), ye(t, n.label));
4918
4930
  return;
4919
4931
  }
4920
- e.key === "Enter" && e.target === g.value && Y.value && (e.preventDefault(), Te());
4932
+ e.key === "Enter" && e.target === g.value && X.value && (e.preventDefault(), Te());
4921
4933
  }
4922
4934
  function we(e) {
4923
- if (e.key === "Escape" && le.value) {
4935
+ if (e.key === "Escape" && ce.value) {
4924
4936
  Ce(e);
4925
4937
  return;
4926
4938
  }
4927
- e.stopPropagation(), !(e.key !== "Enter" || e.isComposing || e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && (e.preventDefault(), Y.value && Te());
4939
+ e.stopPropagation(), !(e.key !== "Enter" || e.isComposing || e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && (e.preventDefault(), X.value && Te());
4928
4940
  }
4929
4941
  async function Te() {
4930
- ie.value || K.value || G.value && !await ce() || Y.value && (E.value ? Oe() : Ee());
4942
+ re.value || q.value || K.value && !await se() || X.value && (E.value ? Oe() : Ee());
4931
4943
  }
4932
4944
  function Ee() {
4933
- Y.value && (a.value += 1);
4945
+ X.value && (a.value += 1);
4934
4946
  }
4935
4947
  function De() {
4936
4948
  a.value > 0 && --a.value;
4937
4949
  }
4938
4950
  function Oe() {
4939
- if (!x.value || A.value || M.value || !Y.value) return;
4951
+ if (!x.value || A.value || M.value || !X.value) return;
4940
4952
  let e = S.value.reduce((e, t) => (e[t.id] = Ae(t), e), {});
4941
4953
  d.value = !0, i("client-response", {
4942
4954
  id: x.value,
@@ -4954,7 +4966,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4954
4966
  }
4955
4967
  function Ae(e) {
4956
4968
  let t = [...h[e.id] ?? []], n = v[e.id]?.trim();
4957
- return (me(e) || e.isOther) && n && t.push(n), { answers: t };
4969
+ return (pe(e) || e.isOther) && n && t.push(n), { answers: t };
4958
4970
  }
4959
4971
  function je(e) {
4960
4972
  return e.answers.filter(Boolean).join(", ") || "-";
@@ -4979,7 +4991,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4979
4991
  title: "Cancelled user question",
4980
4992
  icon: V(Qe)
4981
4993
  }, null, 8, ["icon"])])) : A.value ? (k(), l("div", ls, [m(as, {
4982
- title: "Answered user question",
4994
+ title: "User answered question",
4983
4995
  icon: V(Xe)
4984
4996
  }, null, 8, ["icon"]), (k(!0), l(t, null, P(S.value, (e) => (k(), l("div", {
4985
4997
  key: e.id,
@@ -4991,7 +5003,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
4991
5003
  u("header", fs, [u("span", ps, [m(V(Fe), {
4992
5004
  size: 16,
4993
5005
  "aria-hidden": "true"
4994
- }), u("span", ms, z(fe.value), 1)]), u("div", hs, [S.value.length > 1 ? (k(), l("span", gs, z(a.value + 1) + " / " + z(S.value.length), 1)) : c("", !0), u("button", {
5006
+ }), u("span", ms, z(de.value), 1)]), u("div", hs, [S.value.length > 1 ? (k(), l("span", gs, z(a.value + 1) + " / " + z(S.value.length), 1)) : c("", !0), u("button", {
4995
5007
  class: "chat-tool-user-input__dismiss",
4996
5008
  type: "button",
4997
5009
  "aria-label": "Cancel question",
@@ -5009,15 +5021,15 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
5009
5021
  key: e.label,
5010
5022
  "aria-keyshortcuts": n < 9 ? String(n + 1) : void 0,
5011
5023
  "aria-label": e.label,
5012
- "aria-pressed": ye(T.value.id, e.label),
5013
- class: w(["chat-tool-user-input__option", { "chat-tool-user-input__option--selected": ye(T.value.id, e.label) }]),
5024
+ "aria-pressed": ve(T.value.id, e.label),
5025
+ class: w(["chat-tool-user-input__option", { "chat-tool-user-input__option--selected": ve(T.value.id, e.label) }]),
5014
5026
  type: "button",
5015
- onClick: (t) => be(T.value, e.label)
5016
- }, [u("span", xs, [ye(T.value.id, e.label) ? (k(), s(V(ge), {
5027
+ onClick: (t) => ye(T.value, e.label)
5028
+ }, [u("span", xs, [ve(T.value.id, e.label) ? (k(), s(V(he), {
5017
5029
  key: 0,
5018
5030
  size: 14,
5019
5031
  "stroke-width": "3"
5020
- })) : (k(), l(t, { key: 1 }, [p(z(n + 1), 1)], 64))]), u("span", Ss, [u("span", Cs, [u("span", ws, z(_e(e.label)), 1), ve(e.label) ? (k(), l("span", Ts, "Recommended")) : c("", !0)]), e.description ? (k(), l("span", Es, z(e.description), 1)) : c("", !0)])], 10, bs))), 128))], 8, ys)) : c("", !0),
5032
+ })) : (k(), l(t, { key: 1 }, [p(z(n + 1), 1)], 64))]), u("span", Ss, [u("span", Cs, [u("span", ws, z(ge(e.label)), 1), _e(e.label) ? (k(), l("span", Ts, "Recommended")) : c("", !0)]), e.description ? (k(), l("span", Es, z(e.description), 1)) : c("", !0)])], 10, bs))), 128))], 8, ys)) : c("", !0),
5021
5033
  u("footer", { class: w(["chat-tool-user-input__footer", { "chat-tool-user-input__footer--divided": I.value.length > 0 }]) }, [
5022
5034
  ne.value ? (k(), l("div", Ds, [m(V(ze), {
5023
5035
  class: "chat-tool-user-input__write-icon",
@@ -5026,15 +5038,15 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
5026
5038
  }), (k(), s(L(T.value.isSecret ? "input" : "textarea"), {
5027
5039
  ref_key: "answerField",
5028
5040
  ref: _,
5029
- class: w(["chat-tool-user-input__other-input", { "chat-tool-user-input__other-input--direct": me(T.value) }]),
5030
- "aria-label": me(T.value) ? T.value.question : "Other answer",
5041
+ class: w(["chat-tool-user-input__other-input", { "chat-tool-user-input__other-input--direct": pe(T.value) }]),
5042
+ "aria-label": pe(T.value) ? T.value.question : "Other answer",
5031
5043
  autocomplete: T.value.isSecret ? "off" : void 0,
5032
- placeholder: J.value,
5033
- readonly: le.value,
5044
+ placeholder: Y.value,
5045
+ readonly: ce.value,
5034
5046
  rows: T.value.isSecret ? void 0 : 1,
5035
5047
  type: T.value.isSecret ? "password" : void 0,
5036
- value: le.value ? ue.value : v[T.value.id] ?? "",
5037
- onInput: r[0] ||= (e) => X(T.value, e),
5048
+ value: ce.value ? le.value : v[T.value.id] ?? "",
5049
+ onInput: r[0] ||= (e) => be(T.value, e),
5038
5050
  onKeydown: we
5039
5051
  }, null, 40, [
5040
5052
  "class",
@@ -5046,7 +5058,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
5046
5058
  "type",
5047
5059
  "value"
5048
5060
  ]))])) : c("", !0),
5049
- V(H) ? (k(), l("p", Os, z(V(H)), 1)) : c("", !0),
5061
+ V(U) ? (k(), l("p", Os, z(V(U)), 1)) : c("", !0),
5050
5062
  u("div", ks, [
5051
5063
  a.value > 0 ? (k(), l("button", {
5052
5064
  key: 0,
@@ -5057,12 +5069,12 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
5057
5069
  ne.value && !T.value.isSecret ? (k(), s(Xn, {
5058
5070
  key: 1,
5059
5071
  disabled: V(B),
5060
- recording: V(G),
5061
- label: V(G) ? "Stop dictation" : "Dictate answer",
5062
- title: V(re) === "Record voice prompt" ? "Dictate answer" : V(re),
5063
- onToggle: de
5072
+ recording: V(K),
5073
+ label: V(K) ? "Stop dictation" : "Dictate answer",
5074
+ title: V(H) === "Record voice prompt" ? "Dictate answer" : V(H),
5075
+ onToggle: ue
5064
5076
  }, {
5065
- recording: W(() => [m(Zn, { "audio-level": V(ae) }, null, 8, ["audio-level"])]),
5077
+ recording: G(() => [m(Zn, { "audio-level": V(ie) }, null, 8, ["audio-level"])]),
5066
5078
  _: 1
5067
5079
  }, 8, [
5068
5080
  "disabled",
@@ -5072,7 +5084,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
5072
5084
  ])) : c("", !0),
5073
5085
  u("button", {
5074
5086
  class: "codex-request-button codex-request-button--primary chat-tool-user-input__button chat-tool-user-input__button--primary",
5075
- disabled: !Y.value,
5087
+ disabled: !X.value,
5076
5088
  type: "button",
5077
5089
  onClick: Te
5078
5090
  }, z(E.value ? "Send" : "Next"), 9, As)
@@ -5080,7 +5092,7 @@ var Bo = Symbol("codex-app-sdk-question-responses"), Vo = Symbol("codex-app-sdk-
5080
5092
  ], 2)
5081
5093
  ], 64)) : c("", !0)], 42, ss));
5082
5094
  }
5083
- }), [["__scopeId", "data-v-19831504"]]), Ms = /* @__PURE__ */ h({
5095
+ }), [["__scopeId", "data-v-f2d1aa95"]]), Ms = /* @__PURE__ */ h({
5084
5096
  __name: "ChatQuestionRequest",
5085
5097
  props: {
5086
5098
  answeredClientRequestIds: {},
@@ -5284,11 +5296,11 @@ var Ws = /*#__PURE__*/ $(Vs, [["render", Us], ["__scopeId", "data-v-65051749"]])
5284
5296
  class: "chat-queued-prompt",
5285
5297
  "aria-label": "Queued prompt"
5286
5298
  }, {
5287
- leading: W(() => [m(V(tt), {
5299
+ leading: G(() => [m(V(tt), {
5288
5300
  class: "chat-queued-prompt__icon",
5289
5301
  "aria-hidden": "true"
5290
5302
  })]),
5291
- actions: W(() => [u("div", Zs, [
5303
+ actions: G(() => [u("div", Zs, [
5292
5304
  u("button", {
5293
5305
  class: "chat-queued-prompt__action",
5294
5306
  type: "button",
@@ -5313,7 +5325,7 @@ var Ws = /*#__PURE__*/ $(Vs, [["render", Us], ["__scopeId", "data-v-65051749"]])
5313
5325
  onClick: r[2] ||= (t) => n("delete", e.prompt.id)
5314
5326
  }, [m(V(it), { "aria-hidden": "true" })])
5315
5327
  ])]),
5316
- default: W(() => [u("span", Xs, z(e.prompt.text), 1)]),
5328
+ default: G(() => [u("span", Xs, z(e.prompt.text), 1)]),
5317
5329
  _: 1
5318
5330
  }));
5319
5331
  }
@@ -5334,7 +5346,7 @@ var Ws = /*#__PURE__*/ $(Vs, [["render", Us], ["__scopeId", "data-v-65051749"]])
5334
5346
  key: 0,
5335
5347
  class: "chat-queued-prompts"
5336
5348
  }, {
5337
- default: W(() => [(k(!0), l(t, null, P(e.prompts, (t) => (k(), s(ec, {
5349
+ default: G(() => [(k(!0), l(t, null, P(e.prompts, (t) => (k(), s(ec, {
5338
5350
  key: t.id,
5339
5351
  "edit-disabled": e.editDisabled,
5340
5352
  "steer-disabled": e.steerDisabled,
@@ -5394,7 +5406,7 @@ var Ws = /*#__PURE__*/ $(Vs, [["render", Us], ["__scopeId", "data-v-65051749"]])
5394
5406
  "steerQueuedPrompt"
5395
5407
  ],
5396
5408
  setup(n) {
5397
- let i = n, a = re(), 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(() => _(a.drawers?.({ disabled: p.value }))), h = o(() => _(a.actions?.({ disabled: p.value }))), g = o(() => u.value || d.value || !!f.value || m.value || h.value);
5409
+ 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(() => _(a.drawers?.({ disabled: p.value }))), h = o(() => _(a.actions?.({ disabled: p.value }))), g = o(() => u.value || d.value || !!f.value || m.value || h.value);
5398
5410
  function _(n) {
5399
5411
  return (Array.isArray(n) ? n : [n]).some((n) => {
5400
5412
  if (n == null || typeof n == "boolean") return !1;
@@ -5523,7 +5535,7 @@ function bc(e) {
5523
5535
  }
5524
5536
  function xc(e, t) {
5525
5537
  let n = na(), r = R();
5526
- return U(e, async (e, i, a) => {
5538
+ return W(e, async (e, i, a) => {
5527
5539
  let o = !0;
5528
5540
  if (a(() => {
5529
5541
  o = !1;
@@ -5544,18 +5556,18 @@ function Sc(e, t) {
5544
5556
  let n = b(Zi, void 0);
5545
5557
  if (!n) return;
5546
5558
  let r = R();
5547
- return U(e, (e, t, i) => {
5559
+ return W(e, (e, t, i) => {
5548
5560
  if (r.value = void 0, !e) return;
5549
5561
  let a = n.acquire(e);
5550
5562
  r.value = a, i(() => n.release(a)), n.viewport || n.load(a);
5551
- }, { immediate: !0 }), U([r, t], ([e, t], r, i) => {
5563
+ }, { immediate: !0 }), W([r, t], ([e, t], r, i) => {
5552
5564
  if (!e || !t || !n.viewport) return;
5553
5565
  let a = !1, o = !1, s = vc(t, (r) => {
5554
5566
  let i = r.near && !a || r.visible && !o;
5555
5567
  e.near += Number(r.near) - Number(a), e.visible += Number(r.visible) - Number(o), a = r.near, o = r.visible, n.visibilityChanged(e, t.clientWidth || 512), i && n.load(e);
5556
5568
  });
5557
5569
  i(() => {
5558
- s(), e.near -= Number(a), e.visible -= Number(o);
5570
+ s(), e.near = Math.max(0, e.near - Number(a)), e.visible = Math.max(0, e.visible - Number(o));
5559
5571
  });
5560
5572
  }, { flush: "post" }), {
5561
5573
  viewport: n.viewport,
@@ -5602,7 +5614,7 @@ var wc = /*#__PURE__*/ $(/* @__PURE__ */ h({
5602
5614
  "aria-label": e.label,
5603
5615
  title: e.title || e.label
5604
5616
  }, {
5605
- default: W(() => [F(t.$slots, "default", {}, void 0, !0)]),
5617
+ default: G(() => [F(t.$slots, "default", {}, void 0, !0)]),
5606
5618
  _: 3
5607
5619
  }, 8, [
5608
5620
  "class",
@@ -5655,7 +5667,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5655
5667
  mode: "light",
5656
5668
  style: {}
5657
5669
  }), u = b(pc, void 0), d = b(mc, void 0), f = N([]), p = N(-1), h = N(-1), g = N(!1), _ = N(!1), v = o(() => f.value[p.value]), y = xc(() => r.open && p.value !== h.value && v.value?.reference || "", _), x = o(() => p.value === h.value ? r.src : y.value);
5658
- U(() => r.open, (e) => {
5670
+ W(() => r.open, (e) => {
5659
5671
  if (e) {
5660
5672
  let e = d?.value.role === "assistant" && u?.value || [];
5661
5673
  p.value = e.findIndex((e) => e.messageId === d?.value.id && e.reference === r.reference && e.label === r.label), h.value = p.value, f.value = p.value < 0 ? [] : [...e], g.value = !1, a.value = Ec(r.themeSource), window.addEventListener("keydown", S);
@@ -5679,14 +5691,14 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5679
5691
  role: "dialog",
5680
5692
  "aria-modal": "true",
5681
5693
  "aria-label": v.value?.label || e.label,
5682
- onClick: r[4] ||= q((e) => i("close"), ["self"])
5694
+ onClick: r[4] ||= J((e) => i("close"), ["self"])
5683
5695
  }, [
5684
5696
  m(wc, {
5685
5697
  class: "chat-image-lightbox__close chat-media-block__fullscreen-close",
5686
5698
  label: e.closeLabel,
5687
5699
  onClick: r[0] ||= (e) => i("close")
5688
5700
  }, {
5689
- default: W(() => [m(V(ot))]),
5701
+ default: G(() => [m(V(ot))]),
5690
5702
  _: 1
5691
5703
  }, 8, ["label"]),
5692
5704
  f.value.length > 1 ? (k(), s(wc, {
@@ -5696,7 +5708,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5696
5708
  disabled: _.value || p.value === 0,
5697
5709
  onClick: r[1] ||= (e) => C(-1)
5698
5710
  }, {
5699
- default: W(() => [m(V(ye))]),
5711
+ default: G(() => [m(V(ve))]),
5700
5712
  _: 1
5701
5713
  }, 8, ["disabled"])) : c("", !0),
5702
5714
  x.value && !g.value ? (k(), l("img", {
@@ -5713,7 +5725,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5713
5725
  disabled: _.value || p.value === f.value.length - 1,
5714
5726
  onClick: r[3] ||= (e) => C(1)
5715
5727
  }, {
5716
- default: W(() => [m(V(be))]),
5728
+ default: G(() => [m(V(ye))]),
5717
5729
  _: 1
5718
5730
  }, 8, ["disabled"])) : c("", !0)
5719
5731
  ], 12, Dc)) : c("", !0)]));
@@ -5729,11 +5741,11 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5729
5741
  },
5730
5742
  setup(e) {
5731
5743
  let t = e, n = na(), r = N(null), i = Sc(() => t.attachment.kind === "image" && (t.attachment.url || t.attachment.path) || "", r), a = o(() => Cc(t.attachment) ?? Cc(i?.dimensions.value)), d = N(!1), f = N(), p = N(!1), h = o(() => i ? i.source.value : t.attachment.kind === "image" && x(t.attachment.url) ? t.attachment.url : f.value), g = o(() => i ? i.original.value : h.value), _ = o(() => C(t.attachment.path) || S(t.attachment.url));
5732
- U(h, () => {
5744
+ W(h, () => {
5733
5745
  d.value = !1;
5734
5746
  });
5735
5747
  let v = 0;
5736
- U([
5748
+ W([
5737
5749
  () => t.attachment.kind,
5738
5750
  () => t.attachment.path,
5739
5751
  () => t.attachment.url
@@ -5824,7 +5836,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5824
5836
  href: _.value,
5825
5837
  title: e.attachment.path || e.attachment.url || e.attachment.name
5826
5838
  }, {
5827
- default: W(() => [e.attachment.kind === "image" ? (k(), s(V(Be), {
5839
+ default: G(() => [e.attachment.kind === "image" ? (k(), s(V(Be), {
5828
5840
  key: 0,
5829
5841
  "aria-hidden": "true"
5830
5842
  })) : (k(), s(V(Re), {
@@ -5877,7 +5889,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5877
5889
  label: n.value ? e.copiedLabel : e.label,
5878
5890
  onClick: i
5879
5891
  }, {
5880
- default: W(() => [e.showIcon !== !1 && n.value ? (k(), s(V(_e), { key: 0 })) : e.showIcon === !1 ? c("", !0) : (k(), s(V(Ce), { key: 1 }))]),
5892
+ default: G(() => [e.showIcon !== !1 && n.value ? (k(), s(V(ge), { key: 0 })) : e.showIcon === !1 ? c("", !0) : (k(), s(V(Ce), { key: 1 }))]),
5881
5893
  _: 1
5882
5894
  }, 8, ["disabled", "label"]));
5883
5895
  }
@@ -5958,7 +5970,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5958
5970
  label: tl,
5959
5971
  onClick: o[1] ||= (e) => v("fullscreen")
5960
5972
  }, {
5961
- default: W(() => [m(V(Pe))]),
5973
+ default: G(() => [m(V(Pe))]),
5962
5974
  _: 1
5963
5975
  }),
5964
5976
  m(Vc, {
@@ -5970,9 +5982,9 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5970
5982
  download: _.value,
5971
5983
  href: p.value,
5972
5984
  label: Qc,
5973
- onClick: o[2] ||= q(() => {}, ["stop"])
5985
+ onClick: o[2] ||= J(() => {}, ["stop"])
5974
5986
  }, {
5975
- default: W(() => [m(V(we))]),
5987
+ default: G(() => [m(V(we))]),
5976
5988
  _: 1
5977
5989
  }, 8, ["download", "href"]),
5978
5990
  e.media.prompt ? (k(), s(wc, {
@@ -5980,7 +5992,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5980
5992
  label: il,
5981
5993
  onClick: x
5982
5994
  }, {
5983
- default: W(() => [m(V(Ae))]),
5995
+ default: G(() => [m(V(Ae))]),
5984
5996
  _: 1
5985
5997
  })) : c("", !0)
5986
5998
  ])]),
@@ -5988,7 +6000,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
5988
6000
  key: 0,
5989
6001
  open: h.value
5990
6002
  }, {
5991
- default: W(() => [u("div", Xc, [u("div", { class: "chat-media-block__details-title" }, z(il)), u("p", Zc, z(e.media.prompt), 1)])]),
6003
+ default: G(() => [u("div", Xc, [u("div", { class: "chat-media-block__details-title" }, z(il)), u("p", Zc, z(e.media.prompt), 1)])]),
5992
6004
  _: 1
5993
6005
  }, 8, ["open"])) : c("", !0),
5994
6006
  m(Ac, {
@@ -6062,7 +6074,7 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
6062
6074
  function b(e) {
6063
6075
  e.key === "Escape" && y();
6064
6076
  }
6065
- return U(r, (e) => {
6077
+ return W(r, (e) => {
6066
6078
  e ? window.addEventListener("keydown", b) : window.removeEventListener("keydown", b);
6067
6079
  }), D(() => {
6068
6080
  window.removeEventListener("keydown", b);
@@ -6076,14 +6088,14 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
6076
6088
  label: h.value,
6077
6089
  onClick: _
6078
6090
  }, {
6079
- default: W(() => [i.value ? (k(), s(V(Ee), { key: 0 })) : (k(), s(V(Se), { key: 1 }))]),
6091
+ default: G(() => [i.value ? (k(), s(V(Ee), { key: 0 })) : (k(), s(V(Se), { key: 1 }))]),
6080
6092
  _: 1
6081
6093
  }, 8, ["label"]), m(wc, {
6082
6094
  bordered: "",
6083
6095
  label: _l,
6084
6096
  onClick: v
6085
6097
  }, {
6086
- default: W(() => [m(V(Pe))]),
6098
+ default: G(() => [m(V(Pe))]),
6087
6099
  _: 1
6088
6100
  })]),
6089
6101
  i.value ? (k(), l("pre", sl, [u("code", null, z(t.code), 1)])) : g.value.svg ? (k(), l("div", {
@@ -6099,20 +6111,20 @@ var Dc = ["data-codex-theme", "aria-label"], Oc = ["alt", "src"], kc = {
6099
6111
  role: "dialog",
6100
6112
  "aria-modal": "true",
6101
6113
  "aria-label": _l,
6102
- onClick: q(y, ["self"])
6114
+ onClick: J(y, ["self"])
6103
6115
  }, [u("div", dl, [u("div", fl, [m(wc, {
6104
6116
  bordered: "",
6105
6117
  label: h.value,
6106
6118
  onClick: _
6107
6119
  }, {
6108
- default: W(() => [i.value ? (k(), s(V(Ee), { key: 0 })) : (k(), s(V(Se), { key: 1 }))]),
6120
+ default: G(() => [i.value ? (k(), s(V(Ee), { key: 0 })) : (k(), s(V(Se), { key: 1 }))]),
6109
6121
  _: 1
6110
6122
  }, 8, ["label"]), m(wc, {
6111
6123
  bordered: "",
6112
6124
  label: gl,
6113
6125
  onClick: y
6114
6126
  }, {
6115
- default: W(() => [m(V(ot))]),
6127
+ default: G(() => [m(V(ot))]),
6116
6128
  _: 1
6117
6129
  })]), i.value ? (k(), l("pre", pl, [u("code", null, z(t.code), 1)])) : g.value.svg ? (k(), l("div", {
6118
6130
  key: 1,
@@ -6240,7 +6252,7 @@ function Ll(e) {
6240
6252
  }
6241
6253
  //#endregion
6242
6254
  //#region src/chat/message-markdown.ts
6243
- var Rl = new J();
6255
+ var Rl = new Y();
6244
6256
  Rl.html = ({ text: e }) => xl(e), Rl.code = ({ text: e, lang: t }) => Nl(e, t), Rl.link = ({ href: e, title: t, tokens: n }) => {
6245
6257
  let r = Xl(n), i = ql(e);
6246
6258
  if (!i) return `<span class="chat-message-link chat-message-link--blocked">${r}</span>`;
@@ -6252,7 +6264,7 @@ Rl.html = ({ text: e }) => xl(e), Rl.code = ({ text: e, lang: t }) => Nl(e, t),
6252
6264
  let a = t ? ` title="${Sl(t)}"` : "";
6253
6265
  return `<img class="chat-message-image" src="${Sl(r)}" alt="${i}"${a} loading="lazy" decoding="async" referrerpolicy="no-referrer">`;
6254
6266
  };
6255
- var zl = new fe({
6267
+ var zl = new de({
6256
6268
  async: !1,
6257
6269
  breaks: !0,
6258
6270
  gfm: !0,
@@ -6517,7 +6529,7 @@ var uu = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
6517
6529
  URL.revokeObjectURL(e), g.delete(e);
6518
6530
  }, 1e3));
6519
6531
  }
6520
- return U(() => [t.source, t.complete], v), ee(() => window.addEventListener("message", y)), D(() => {
6532
+ return W(() => [t.source, t.complete], v), ee(() => window.addEventListener("message", y)), D(() => {
6521
6533
  window.removeEventListener("message", y), _();
6522
6534
  for (let [e, t] of g) clearTimeout(t), URL.revokeObjectURL(e);
6523
6535
  }), (t, r) => (k(), l("section", du, [u("header", fu, [
@@ -6528,7 +6540,7 @@ var uu = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
6528
6540
  label: V(n)(a.value ? "chat.html.preview" : "chat.html.source"),
6529
6541
  onClick: r[0] ||= (e) => a.value = !a.value
6530
6542
  }, {
6531
- default: W(() => [a.value ? (k(), s(V(Ee), { key: 0 })) : (k(), s(V(Se), { key: 1 }))]),
6543
+ default: G(() => [a.value ? (k(), s(V(Ee), { key: 0 })) : (k(), s(V(Se), { key: 1 }))]),
6532
6544
  _: 1
6533
6545
  }, 8, ["label"]),
6534
6546
  m(Vc, {
@@ -6540,11 +6552,11 @@ var uu = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
6540
6552
  label: V(n)("chat.html.download"),
6541
6553
  onClick: x
6542
6554
  }, {
6543
- default: W(() => [m(V(we))]),
6555
+ default: G(() => [m(V(we))]),
6544
6556
  _: 1
6545
6557
  }, 8, ["label"])
6546
6558
  ])
6547
- ]), u("div", gu, [G((k(), l("iframe", {
6559
+ ]), u("div", gu, [K((k(), l("iframe", {
6548
6560
  key: o.value,
6549
6561
  ref_key: "frame",
6550
6562
  ref: i,
@@ -6552,7 +6564,7 @@ var uu = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
6552
6564
  title: e.title || V(n)("chat.html.title"),
6553
6565
  sandbox: "allow-scripts",
6554
6566
  referrerpolicy: "no-referrer"
6555
- }, null, 8, _u)), [[ie, !a.value]]), a.value ? (k(), l("pre", vu, [u("code", null, z(e.source), 1)])) : c("", !0)])]));
6567
+ }, null, 8, _u)), [[re, !a.value]]), a.value ? (k(), l("pre", vu, [u("code", null, z(e.source), 1)])) : c("", !0)])]));
6556
6568
  }
6557
6569
  }), [["__scopeId", "data-v-f327ab9d"]]), bu = () => void 0, xu = Symbol("codex-app-sdk-tool-presentation");
6558
6570
  function Su(e) {
@@ -6685,7 +6697,7 @@ var Du = {
6685
6697
  "title-target-parts",
6686
6698
  "tool-call",
6687
6699
  "tool-presentation"
6688
- ]), e.expandable === !1 ? c("", !0) : (k(), s(L(f.value ? V(X) : V(ve)), {
6700
+ ]), e.expandable === !1 ? c("", !0) : (k(), s(L(f.value ? V(be) : V(_e)), {
6689
6701
  key: 0,
6690
6702
  class: "chat-tool-group__chevron",
6691
6703
  size: 15
@@ -6713,7 +6725,7 @@ var Du = {
6713
6725
  "title-target-parts",
6714
6726
  "tool-call",
6715
6727
  "tool-presentation"
6716
- ]), (k(), s(L(f.value ? V(X) : V(ve)), {
6728
+ ]), (k(), s(L(f.value ? V(be) : V(_e)), {
6717
6729
  class: "chat-tool-call__chevron",
6718
6730
  size: 15
6719
6731
  }))])) : (k(), l("div", Ou, [m(as, {
@@ -6738,15 +6750,15 @@ var Du = {
6738
6750
  ])])), e.headerless && (O.value || T.value.length) ? (k(), l("div", ku, [D.value ? (k(), l("div", Au, [u("div", ju, z(T.value.length ? "Files" : "Input"), 1), T.value.length ? (k(), l("div", Mu, [(k(!0), l(t, null, P(T.value, (e) => (k(), l("a", {
6739
6751
  key: e.href,
6740
6752
  href: e.href,
6741
- onClick: q((t) => i("open-link", e), ["stop", "prevent"])
6753
+ onClick: J((t) => i("open-link", e), ["stop", "prevent"])
6742
6754
  }, z(e.path), 9, Nu))), 128))])) : (k(), l("pre", Pu, z(M(h.value)), 1))])) : c("", !0), O.value && ee.value ? (k(), l("div", Fu, [r[5] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", Iu, z(M(e.toolCall.result)), 1)])) : c("", !0)])) : A.value ? (k(), s(Uc, {
6743
6755
  key: 4,
6744
6756
  open: f.value
6745
6757
  }, {
6746
- default: W(() => [u("div", Lu, [D.value ? (k(), l("div", Ru, [u("div", zu, z(T.value.length ? "Files" : "Input"), 1), T.value.length ? (k(), l("div", Bu, [(k(!0), l(t, null, P(T.value, (e) => (k(), l("a", {
6758
+ default: G(() => [u("div", Lu, [D.value ? (k(), l("div", Ru, [u("div", zu, z(T.value.length ? "Files" : "Input"), 1), T.value.length ? (k(), l("div", Bu, [(k(!0), l(t, null, P(T.value, (e) => (k(), l("a", {
6747
6759
  key: e.href,
6748
6760
  href: e.href,
6749
- onClick: q((t) => i("open-link", e), ["stop", "prevent"])
6761
+ onClick: J((t) => i("open-link", e), ["stop", "prevent"])
6750
6762
  }, z(e.path), 9, Vu))), 128))])) : (k(), l("pre", Hu, z(M(h.value)), 1))])) : c("", !0), O.value && ee.value ? (k(), l("div", Uu, [r[6] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", Wu, z(M(e.toolCall.result)), 1)])) : c("", !0)])]),
6751
6763
  _: 1
6752
6764
  }, 8, ["open"])) : c("", !0)], 2));
@@ -6784,7 +6796,7 @@ var Du = {
6784
6796
  }
6785
6797
  return r.activityTitle ?? "No actions";
6786
6798
  });
6787
- U(() => r.toolCalls.map((e) => ({
6799
+ W(() => r.toolCalls.map((e) => ({
6788
6800
  id: e.id,
6789
6801
  active: F(e)
6790
6802
  })), (e) => {
@@ -6793,7 +6805,7 @@ var Du = {
6793
6805
  for (let e of n) M(e);
6794
6806
  for (let e of f.value) t.has(e) || M(e);
6795
6807
  h = n;
6796
- }, { flush: "sync" }), U([
6808
+ }, { flush: "sync" }), W([
6797
6809
  () => S.value.length,
6798
6810
  d,
6799
6811
  () => x.value?.id
@@ -6845,7 +6857,7 @@ var Du = {
6845
6857
  type: E.value ? "button" : void 0,
6846
6858
  onClick: O
6847
6859
  }, {
6848
- default: W(() => [x.value ? (k(), s(Gu, {
6860
+ default: G(() => [x.value ? (k(), s(Gu, {
6849
6861
  key: 0,
6850
6862
  class: "chat-tool-group__active",
6851
6863
  "summary-only": "",
@@ -6877,7 +6889,7 @@ var Du = {
6877
6889
  label: "Total removed lines",
6878
6890
  value: T.value.removedLines
6879
6891
  }, null, 8, ["value"])) : c("", !0)])) : c("", !0),
6880
- E.value ? (k(), s(L(d.value ? V(X) : V(ve)), {
6892
+ E.value ? (k(), s(L(d.value ? V(be) : V(_e)), {
6881
6893
  key: 1,
6882
6894
  class: "chat-tool-group__chevron",
6883
6895
  size: 15
@@ -6886,7 +6898,7 @@ var Du = {
6886
6898
  _: 1
6887
6899
  }, 8, ["class", "type"])) : c("", !0),
6888
6900
  m(Uc, { open: d.value }, {
6889
- default: W(() => [u("div", Yu, [(k(!0), l(t, null, P(b.value, (t) => (k(), s(Gu, {
6901
+ default: G(() => [u("div", Yu, [(k(!0), l(t, null, P(b.value, (t) => (k(), s(Gu, {
6890
6902
  key: t.id,
6891
6903
  "answered-client-request-ids": e.answeredClientRequestIds,
6892
6904
  headerless: v.value,
@@ -6911,7 +6923,7 @@ var Du = {
6911
6923
  "aria-live": "polite",
6912
6924
  onAfterLeave: te
6913
6925
  }, {
6914
- default: W(() => [(k(!0), l(t, null, P(S.value, (t) => (k(), l("div", {
6926
+ default: G(() => [(k(!0), l(t, null, P(S.value, (t) => (k(), l("div", {
6915
6927
  key: t.id,
6916
6928
  class: "chat-tool-group__running-item"
6917
6929
  }, [u("div", Xu, [m(Gu, {
@@ -6980,7 +6992,7 @@ var Du = {
6980
6992
  class: w(["chat-user-text__mention", `chat-user-text__mention--${n.type === "plugin-mention" ? "plugin" : "skill"}`]),
6981
6993
  title: d(n)
6982
6994
  }, {
6983
- icon: W(() => [u("span", { class: w(["chat-user-text__mention-icon-frame", {
6995
+ icon: G(() => [u("span", { class: w(["chat-user-text__mention-icon-frame", {
6984
6996
  "chat-user-text__mention-icon-frame--has-light": a(n, "light"),
6985
6997
  "chat-user-text__mention-icon-frame--has-dark": a(n, "dark")
6986
6998
  }]) }, [
@@ -7085,7 +7097,7 @@ var ud = {
7085
7097
  },
7086
7098
  setup(e) {
7087
7099
  let t = e, n = Pr(), r = b(Vo, void 0), i = b(Ho, void 0), a = o(() => r?.enabled.value === !0 && i !== void 0), d = o(() => a.value ? r.completedWithoutFinal.value : !t.active && !t.finalStarted), f = N(t.active && !t.finalStarted), m = N(!1), h = o(() => a.value ? r.active.value : t.active && !t.finalStarted), g = o(() => !a.value || h.value || r.hasDetails?.value !== !1), _ = o(() => r?.detailsLoading?.value === !0), v = o(() => h.value || d.value ? !0 : a.value ? r.expanded.value : f.value), y = o(() => !t.continuation && !d.value && (!a.value || r.headerMessageIndex.value === i.value)), x = N(Date.now()), S;
7088
- U(h, (e) => {
7100
+ W(h, (e) => {
7089
7101
  clearInterval(S), S = void 0, e && (x.value = Date.now(), S = setInterval(() => {
7090
7102
  x.value = Date.now();
7091
7103
  }, 1e3));
@@ -7102,9 +7114,9 @@ var ud = {
7102
7114
  let a = v.value ? "HideDetails" : "ViewDetails";
7103
7115
  return n(`chat.work.${i}${a}${t ? "For" : ""}`, e);
7104
7116
  });
7105
- U(() => t.finalStarted, (e, t) => {
7117
+ W(() => t.finalStarted, (e, t) => {
7106
7118
  !a.value && e && !t && (f.value = !1);
7107
- }), U(() => t.active, (e) => {
7119
+ }), W(() => t.active, (e) => {
7108
7120
  !a.value && !m.value && (f.value = e && !t.finalStarted);
7109
7121
  });
7110
7122
  function E() {
@@ -7136,14 +7148,14 @@ var ud = {
7136
7148
  size: 15,
7137
7149
  role: "status",
7138
7150
  "aria-label": V(n)("chat.work.loadingDetails")
7139
- }, null, 8, ["aria-label"])) : h.value ? c("", !0) : (k(), s(L(v.value ? V(ve) : V(be)), {
7151
+ }, null, 8, ["aria-label"])) : h.value ? c("", !0) : (k(), s(L(v.value ? V(_e) : V(ye)), {
7140
7152
  key: 1,
7141
7153
  size: 15
7142
7154
  }))], 8, fd)) : c("", !0), y.value && g.value ? (k(), s(Uc, {
7143
7155
  key: 2,
7144
7156
  open: v.value
7145
7157
  }, {
7146
- default: W(() => [u("div", md, [V(r)?.detailsError?.value ? (k(), l("div", hd, [p(z(V(r).detailsError.value) + " ", 1), u("button", {
7158
+ default: G(() => [u("div", md, [V(r)?.detailsError?.value ? (k(), l("div", hd, [p(z(V(r).detailsError.value) + " ", 1), u("button", {
7147
7159
  type: "button",
7148
7160
  onClick: t[0] ||= (e) => V(r).reloadDetails?.()
7149
7161
  }, z(V(n)("chat.actions.retry")), 1)])) : F(e.$slots, "default", {}, void 0, !0, 1)])]),
@@ -7202,7 +7214,7 @@ var ud = {
7202
7214
  skills: e.skills
7203
7215
  }, d({ _: 2 }, [n.$slots.mention ? {
7204
7216
  name: "mention",
7205
- fn: W((e) => [F(n.$slots, "mention", T(_(e)), void 0, !0)]),
7217
+ fn: G((e) => [F(n.$slots, "mention", T(_(e)), void 0, !0)]),
7206
7218
  key: "0"
7207
7219
  } : void 0]), 1032, [
7208
7220
  "content",
@@ -7303,7 +7315,7 @@ var ud = {
7303
7315
  continuation: e.block.continuation,
7304
7316
  "final-started": e.block.finalStarted
7305
7317
  }, {
7306
- default: W(() => [(k(!0), l(t, null, P(e.block.blocks, (t, o) => F(n.$slots, "block", {
7318
+ default: G(() => [(k(!0), l(t, null, P(e.block.blocks, (t, o) => F(n.$slots, "block", {
7307
7319
  block: t,
7308
7320
  blockIndex: o
7309
7321
  }, () => [m(a, {
@@ -7323,17 +7335,17 @@ var ud = {
7323
7335
  }, d({ _: 2 }, [
7324
7336
  n.$slots.block ? {
7325
7337
  name: "block",
7326
- fn: W((e) => [F(n.$slots, "block", S({ ref_for: !0 }, e), void 0, !0)]),
7338
+ fn: G((e) => [F(n.$slots, "block", S({ ref_for: !0 }, e), void 0, !0)]),
7327
7339
  key: "0"
7328
7340
  } : void 0,
7329
7341
  n.$slots.text ? {
7330
7342
  name: "text",
7331
- fn: W((e) => [F(n.$slots, "text", S({ ref_for: !0 }, e), void 0, !0)]),
7343
+ fn: G((e) => [F(n.$slots, "text", S({ ref_for: !0 }, e), void 0, !0)]),
7332
7344
  key: "1"
7333
7345
  } : void 0,
7334
7346
  n.$slots.tool ? {
7335
7347
  name: "tool",
7336
- fn: W((e) => [F(n.$slots, "tool", S({ ref_for: !0 }, e), void 0, !0)]),
7348
+ fn: G((e) => [F(n.$slots, "tool", S({ ref_for: !0 }, e), void 0, !0)]),
7337
7349
  key: "2"
7338
7350
  } : void 0
7339
7351
  ]), 1032, [
@@ -7468,7 +7480,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7468
7480
  label: V(i)("chat.actions.edit"),
7469
7481
  onClick: n[0] ||= (e) => r("edit")
7470
7482
  }, {
7471
- default: W(() => [e.iconsVisible ? (k(), s(V(ze), { key: 0 })) : c("", !0)]),
7483
+ default: G(() => [e.iconsVisible ? (k(), s(V(ze), { key: 0 })) : c("", !0)]),
7472
7484
  _: 1
7473
7485
  }, 8, ["disabled", "label"])) : c("", !0),
7474
7486
  e.message.role === "user" && p.value ? (k(), s(wc, {
@@ -7477,7 +7489,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7477
7489
  label: V(i)("chat.actions.quote"),
7478
7490
  onClick: n[1] ||= (e) => r("quote")
7479
7491
  }, {
7480
- default: W(() => [e.iconsVisible ? (k(), s(V(We), { key: 0 })) : c("", !0)]),
7492
+ default: G(() => [e.iconsVisible ? (k(), s(V(We), { key: 0 })) : c("", !0)]),
7481
7493
  _: 1
7482
7494
  }, 8, ["disabled", "label"])) : c("", !0),
7483
7495
  e.message.role === "assistant" && e.canRetry && m.value ? (k(), s(wc, {
@@ -7486,7 +7498,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7486
7498
  label: V(i)("chat.actions.retry"),
7487
7499
  onClick: n[2] ||= (e) => r("retry")
7488
7500
  }, {
7489
- default: W(() => [e.iconsVisible ? (k(), s(V(Ge), { key: 0 })) : c("", !0)]),
7501
+ default: G(() => [e.iconsVisible ? (k(), s(V(Ge), { key: 0 })) : c("", !0)]),
7490
7502
  _: 1
7491
7503
  }, 8, ["disabled", "label"])) : c("", !0),
7492
7504
  e.canFork && f.value ? (k(), s(wc, {
@@ -7495,7 +7507,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7495
7507
  label: V(i)("chat.actions.fork"),
7496
7508
  onClick: n[3] ||= (e) => r("fork")
7497
7509
  }, {
7498
- default: W(() => [e.iconsVisible ? (k(), s(V(pe), {
7510
+ default: G(() => [e.iconsVisible ? (k(), s(V(fe), {
7499
7511
  key: 0,
7500
7512
  class: "chat-message-actions__fork-icon"
7501
7513
  })) : c("", !0)]),
@@ -7508,7 +7520,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7508
7520
  label: e.deleting ? V(i)("chat.actions.deleting") : V(i)("chat.actions.delete"),
7509
7521
  onClick: n[4] ||= (e) => r("delete")
7510
7522
  }, {
7511
- default: W(() => [e.iconsVisible && e.deleting ? (k(), s(V(Ne), {
7523
+ default: G(() => [e.iconsVisible && e.deleting ? (k(), s(V(Ne), {
7512
7524
  key: 0,
7513
7525
  class: "chat-message-actions__spinner"
7514
7526
  })) : e.iconsVisible ? (k(), s(V(it), { key: 1 })) : c("", !0)]),
@@ -7547,7 +7559,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7547
7559
  emits: ["cancel", "save"],
7548
7560
  setup(e, { emit: t }) {
7549
7561
  let n = e, r = t, i = N(n.content), a = N(null), o = N(null), c = null;
7550
- U(() => n.content, (e) => {
7562
+ W(() => n.content, (e) => {
7551
7563
  i.value = e;
7552
7564
  }), ee(() => {
7553
7565
  c = requestAnimationFrame(() => {
@@ -7575,7 +7587,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7575
7587
  }
7576
7588
  function m() {
7577
7589
  let e = i.value.trim();
7578
- e && (a.value ? r("save", e, { content: ue(a.value.readContent()) }) : r("save", e));
7590
+ e && (a.value ? r("save", e, { content: le(a.value.readContent()) }) : r("save", e));
7579
7591
  }
7580
7592
  return (t, n) => (k(), l("div", Fd, [e.promptContent?.some((e) => e.type === "mention") ? (k(), s(Pi, {
7581
7593
  key: 0,
@@ -7592,7 +7604,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7592
7604
  "modelValue",
7593
7605
  "content",
7594
7606
  "aria-label"
7595
- ])) : G((k(), l("textarea", {
7607
+ ])) : K((k(), l("textarea", {
7596
7608
  key: 1,
7597
7609
  ref_key: "input",
7598
7610
  ref: o,
@@ -7600,11 +7612,11 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7600
7612
  class: "chat-message__edit-input",
7601
7613
  "aria-label": e.inputLabel,
7602
7614
  onKeydown: [
7603
- K(q(d, ["prevent"]), ["escape"]),
7604
- K(q(m, ["meta", "prevent"]), ["enter"]),
7605
- K(q(m, ["ctrl", "prevent"]), ["enter"])
7615
+ q(J(d, ["prevent"]), ["escape"]),
7616
+ q(J(m, ["meta", "prevent"]), ["enter"]),
7617
+ q(J(m, ["ctrl", "prevent"]), ["enter"])
7606
7618
  ]
7607
- }, null, 40, Id)), [[H, i.value]]), u("div", Ld, [u("button", {
7619
+ }, null, 40, Id)), [[U, i.value]]), u("div", Ld, [u("button", {
7608
7620
  type: "button",
7609
7621
  class: "chat-message__edit-button",
7610
7622
  onClick: d
@@ -7712,44 +7724,44 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7712
7724
  }))), M = o(() => C.value.map((e, t) => ({
7713
7725
  block: e,
7714
7726
  blockIndex: t
7715
- }))), te = o(() => h.value.role === "user" ? M.value.filter(({ block: e }) => e.type === "attachment") : []), I = o(() => h.value.role === "user" ? M.value.filter(({ block: e }) => e.type !== "attachment") : j.value), L = o(() => go(h.value.content)), B = N(!1), re = o(() => h.value.type !== "compaction" && h.value.type !== "steer" && !ee.value && !B.value), H = o(() => r.actionsDisabled || h.value.role === "assistant" && h.value.streaming === !0), ie = N(!1), U = N(!1), G = b(fc, void 0) ?? R(), K = o(() => h.value.id ?? r.index), q = o(() => r.deletingTurn || !H.value && !!(r.actionsAlwaysVisible || ie.value || U.value || G.value === K.value));
7727
+ }))), te = o(() => h.value.role === "user" ? M.value.filter(({ block: e }) => e.type === "attachment") : []), I = o(() => h.value.role === "user" ? M.value.filter(({ block: e }) => e.type !== "attachment") : j.value), L = o(() => go(h.value.content)), B = N(!1), H = o(() => h.value.type !== "compaction" && h.value.type !== "steer" && !ee.value && !B.value), U = o(() => r.actionsDisabled || h.value.role === "assistant" && h.value.streaming === !0), re = N(!1), W = N(!1), K = b(fc, void 0) ?? R(), q = o(() => h.value.id ?? r.index), J = o(() => r.deletingTurn || !U.value && !!(r.actionsAlwaysVisible || re.value || W.value || K.value === q.value));
7728
+ function ie(e) {
7729
+ e.pointerType === "touch" && (K.value = q.value);
7730
+ }
7716
7731
  function ae(e) {
7717
- e.pointerType === "touch" && (G.value = K.value);
7732
+ W.value = e.relatedTarget instanceof Node && e.currentTarget.contains(e.relatedTarget);
7718
7733
  }
7719
- function oe(e) {
7720
- U.value = e.relatedTarget instanceof Node && e.currentTarget.contains(e.relatedTarget);
7734
+ let oe = o(() => H.value), se = o(() => !!h.value.turnId && r.canDeleteTurn && x.value.messages.actions.delete), ce = o(() => !!h.value.turnId && r.canEditTurn && x.value.messages.actions.edit), le = o(() => !!h.value.turnId && r.canForkTurn && x.value.messages.actions.fork), ue = o(() => !!h.value.turnId && r.canRetryTurn && x.value.messages.actions.retry), de = o(() => D.value.some(Se)), Y = o(() => _.value?.latestStreamingAssistantIndex.value === void 0 || _.value.latestStreamingAssistantIndex.value === r.index), X = o(() => h.value.role === "assistant" && h.value.streaming !== !0 && _.value?.itemsView?.value !== "summary" && C.value.length === 0), fe = o(() => h.value.role === "assistant" && h.value.streaming === !0 && Y.value && !de.value), pe = o(() => h.value.role === "assistant" && h.value.streaming === !0 && Y.value && de.value);
7735
+ function me() {
7736
+ h.value.role !== "user" || !ce.value || (B.value = !0);
7721
7737
  }
7722
- let se = o(() => re.value), ce = o(() => !!h.value.turnId && r.canDeleteTurn && x.value.messages.actions.delete), le = o(() => !!h.value.turnId && r.canEditTurn && x.value.messages.actions.edit), ue = o(() => !!h.value.turnId && r.canForkTurn && x.value.messages.actions.fork), de = o(() => !!h.value.turnId && r.canRetryTurn && x.value.messages.actions.retry), fe = o(() => D.value.some(Se)), J = o(() => _.value?.latestStreamingAssistantIndex.value === void 0 || _.value.latestStreamingAssistantIndex.value === r.index), Y = o(() => h.value.role === "assistant" && h.value.streaming !== !0 && _.value?.itemsView?.value !== "summary" && C.value.length === 0), pe = o(() => h.value.role === "assistant" && h.value.streaming === !0 && J.value && !fe.value), me = o(() => h.value.role === "assistant" && h.value.streaming === !0 && J.value && fe.value);
7723
7738
  function he() {
7724
- h.value.role !== "user" || !le.value || (B.value = !0);
7725
- }
7726
- function ge() {
7727
7739
  B.value = !1;
7728
7740
  }
7729
- function _e(e, t) {
7741
+ function ge(e, t) {
7730
7742
  let n = h.value.turnId;
7731
7743
  n && (i("edit-turn", {
7732
7744
  content: e,
7733
7745
  turnId: n,
7734
7746
  ...t ? { options: t } : {}
7735
- }), ge());
7747
+ }), he());
7736
7748
  }
7737
- function ve() {
7738
- if (!ce.value || r.threadActionsDisabled) return;
7749
+ function _e() {
7750
+ if (!se.value || r.threadActionsDisabled) return;
7739
7751
  let e = h.value.turnId;
7740
7752
  e && i("delete-turn", e);
7741
7753
  }
7742
- function ye() {
7743
- if (!ue.value || r.threadActionsDisabled) return;
7754
+ function ve() {
7755
+ if (!le.value || r.threadActionsDisabled) return;
7744
7756
  let e = h.value.turnId;
7745
7757
  e && i("fork-turn", e);
7746
7758
  }
7747
- function be() {
7748
- if (!de.value || r.threadActionsDisabled) return;
7759
+ function ye() {
7760
+ if (!ue.value || r.threadActionsDisabled) return;
7749
7761
  let e = h.value.turnId;
7750
7762
  e && i("retry-turn", e);
7751
7763
  }
7752
- function X(e, t) {
7764
+ function be(e, t) {
7753
7765
  return r.openImage?.(e, {
7754
7766
  index: r.index,
7755
7767
  intent: t?.intent ?? "open",
@@ -7775,14 +7787,14 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7775
7787
  ])) : O.value ? c("", !0) : (k(), l("div", {
7776
7788
  key: 1,
7777
7789
  class: w(["codex-chat-theme chat-message", [`chat-message--${h.value.role}`, {
7778
- "chat-message--actions-visible": q.value && !H.value,
7790
+ "chat-message--actions-visible": J.value && !U.value,
7779
7791
  "chat-message--editing": B.value
7780
7792
  }]]),
7781
- onPointerenter: r[12] ||= (e) => ie.value = e.pointerType !== "touch",
7782
- onPointerleave: r[13] ||= (e) => ie.value = !1,
7783
- onPointerdown: ae,
7784
- onFocusin: r[14] ||= (e) => U.value = !0,
7785
- onFocusout: oe
7793
+ onPointerenter: r[12] ||= (e) => re.value = e.pointerType !== "touch",
7794
+ onPointerleave: r[13] ||= (e) => re.value = !1,
7795
+ onPointerdown: ie,
7796
+ onFocusin: r[14] ||= (e) => W.value = !0,
7797
+ onFocusout: ae
7786
7798
  }, [u("div", zd, [
7787
7799
  n.$slots.header ? (k(), l("div", Bd, [F(n.$slots, "header", {
7788
7800
  index: e.index,
@@ -7795,24 +7807,24 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7795
7807
  message: h.value
7796
7808
  }, () => [m(bd, {
7797
7809
  block: t,
7798
- "open-image": X
7810
+ "open-image": be
7799
7811
  }, d({ _: 2 }, [n.$slots.attachment ? {
7800
7812
  name: "attachment",
7801
- fn: W((t) => [F(n.$slots, "attachment", S({ ref_for: !0 }, t, {
7813
+ fn: G((t) => [F(n.$slots, "attachment", S({ ref_for: !0 }, t, {
7802
7814
  index: e.index,
7803
7815
  message: h.value
7804
7816
  }), void 0, !0)]),
7805
7817
  key: "0"
7806
7818
  } : void 0]), 1032, ["block"])], !0, `attachment-${r}`)), 128))])) : c("", !0),
7807
- B.value || I.value.length > 0 || Y.value || pe.value || me.value ? (k(), l("div", Hd, [B.value ? (k(), s(Rd, {
7819
+ B.value || I.value.length > 0 || X.value || fe.value || pe.value ? (k(), l("div", Hd, [B.value ? (k(), s(Rd, {
7808
7820
  key: 0,
7809
7821
  "cancel-label": V(f)("chat.actions.cancel"),
7810
7822
  content: L.value,
7811
7823
  "prompt-content": h.value.promptContent,
7812
7824
  "input-label": V(f)("chat.actions.editPrompt"),
7813
7825
  "save-label": V(f)("chat.actions.resubmit"),
7814
- onCancel: ge,
7815
- onSave: _e
7826
+ onCancel: he,
7827
+ onSave: ge
7816
7828
  }, null, 8, [
7817
7829
  "cancel-label",
7818
7830
  "content",
@@ -7827,7 +7839,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7827
7839
  "follow-ups-disabled": e.followUpsDisabled,
7828
7840
  "mention-groups": e.mentionGroups,
7829
7841
  plugins: e.plugins,
7830
- "open-image": X,
7842
+ "open-image": be,
7831
7843
  "show-tool-details": e.showToolDetails,
7832
7844
  skills: e.skills,
7833
7845
  onCancel: r[0] ||= (e) => i("cancel"),
@@ -7838,7 +7850,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7838
7850
  }, d({ _: 2 }, [
7839
7851
  n.$slots.block ? {
7840
7852
  name: "block",
7841
- fn: W((t) => [F(n.$slots, "block", S({ ref_for: !0 }, t, {
7853
+ fn: G((t) => [F(n.$slots, "block", S({ ref_for: !0 }, t, {
7842
7854
  index: e.index,
7843
7855
  message: h.value
7844
7856
  }), void 0, !0)]),
@@ -7846,7 +7858,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7846
7858
  } : void 0,
7847
7859
  n.$slots.text ? {
7848
7860
  name: "text",
7849
- fn: W((t) => [F(n.$slots, "text", S({ ref_for: !0 }, t, {
7861
+ fn: G((t) => [F(n.$slots, "text", S({ ref_for: !0 }, t, {
7850
7862
  index: e.index,
7851
7863
  message: h.value
7852
7864
  }), void 0, !0)]),
@@ -7854,7 +7866,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7854
7866
  } : void 0,
7855
7867
  n.$slots.tool ? {
7856
7868
  name: "tool",
7857
- fn: W((t) => [F(n.$slots, "tool", S({ ref_for: !0 }, t, {
7869
+ fn: G((t) => [F(n.$slots, "tool", S({ ref_for: !0 }, t, {
7858
7870
  index: e.index,
7859
7871
  message: h.value
7860
7872
  }), void 0, !0)]),
@@ -7879,7 +7891,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7879
7891
  "follow-ups-disabled": e.followUpsDisabled,
7880
7892
  "mention-groups": e.mentionGroups,
7881
7893
  plugins: e.plugins,
7882
- "open-image": X,
7894
+ "open-image": be,
7883
7895
  "show-tool-details": e.showToolDetails,
7884
7896
  skills: e.skills,
7885
7897
  onCancel: r[5] ||= (e) => i("cancel"),
@@ -7890,7 +7902,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7890
7902
  }, d({ _: 2 }, [
7891
7903
  n.$slots.attachment ? {
7892
7904
  name: "attachment",
7893
- fn: W((t) => [F(n.$slots, "attachment", S({ ref_for: !0 }, t, {
7905
+ fn: G((t) => [F(n.$slots, "attachment", S({ ref_for: !0 }, t, {
7894
7906
  index: e.index,
7895
7907
  message: h.value
7896
7908
  }), void 0, !0)]),
@@ -7898,7 +7910,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7898
7910
  } : void 0,
7899
7911
  n.$slots.text ? {
7900
7912
  name: "text",
7901
- fn: W((t) => [F(n.$slots, "text", S({ ref_for: !0 }, t, {
7913
+ fn: G((t) => [F(n.$slots, "text", S({ ref_for: !0 }, t, {
7902
7914
  index: e.index,
7903
7915
  message: h.value
7904
7916
  }), void 0, !0)]),
@@ -7906,7 +7918,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7906
7918
  } : void 0,
7907
7919
  n.$slots.mention ? {
7908
7920
  name: "mention",
7909
- fn: W((t) => [F(n.$slots, "mention", S({ ref_for: !0 }, t, {
7921
+ fn: G((t) => [F(n.$slots, "mention", S({ ref_for: !0 }, t, {
7910
7922
  index: e.index,
7911
7923
  message: h.value
7912
7924
  }), void 0, !0)]),
@@ -7914,7 +7926,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7914
7926
  } : void 0,
7915
7927
  n.$slots.tool ? {
7916
7928
  name: "tool",
7917
- fn: W((t) => [F(n.$slots, "tool", S({ ref_for: !0 }, t, {
7929
+ fn: G((t) => [F(n.$slots, "tool", S({ ref_for: !0 }, t, {
7918
7930
  index: e.index,
7919
7931
  message: h.value
7920
7932
  }), void 0, !0)]),
@@ -7929,14 +7941,14 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7929
7941
  "show-tool-details",
7930
7942
  "skills"
7931
7943
  ])], !0, 1)], 64))), 128)),
7932
- Y.value ? (k(), l("span", Ud, z(V(f)("chat.message.emptyResponse")), 1)) : c("", !0),
7933
- pe.value ? F(n.$slots, "thinking", {
7944
+ X.value ? (k(), l("span", Ud, z(V(f)("chat.message.emptyResponse")), 1)) : c("", !0),
7945
+ fe.value ? F(n.$slots, "thinking", {
7934
7946
  index: e.index,
7935
7947
  message: h.value
7936
7948
  }, () => [u("span", {
7937
7949
  class: "chat-message__thinking codex-text-shimmer",
7938
7950
  "data-label": p.value
7939
- }, z(p.value), 9, Wd)], !0, 1) : me.value ? F(n.$slots, "status", {
7951
+ }, z(p.value), 9, Wd)], !0, 1) : pe.value ? F(n.$slots, "status", {
7940
7952
  index: e.index,
7941
7953
  message: h.value,
7942
7954
  status: "streaming"
@@ -7945,30 +7957,30 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
7945
7957
  "aria-label": "Streaming"
7946
7958
  }, null, -1)], !0, 2) : c("", !0)
7947
7959
  ], 64))])) : c("", !0),
7948
- se.value ? F(n.$slots, "actions", {
7949
- disabled: H.value,
7960
+ oe.value ? F(n.$slots, "actions", {
7961
+ disabled: U.value,
7950
7962
  index: e.index,
7951
7963
  message: h.value
7952
7964
  }, () => [m(Md, {
7953
- class: w(["chat-message__actions", { "chat-message__actions--reserved": H.value }]),
7954
- "aria-hidden": H.value ? "true" : void 0,
7955
- inert: H.value ? "" : void 0,
7956
- "can-delete": ce.value,
7957
- "can-edit": le.value,
7958
- "can-fork": ue.value,
7959
- "can-retry": de.value,
7965
+ class: w(["chat-message__actions", { "chat-message__actions--reserved": U.value }]),
7966
+ "aria-hidden": U.value ? "true" : void 0,
7967
+ inert: U.value ? "" : void 0,
7968
+ "can-delete": se.value,
7969
+ "can-edit": ce.value,
7970
+ "can-fork": le.value,
7971
+ "can-retry": ue.value,
7960
7972
  "copy-action": xe,
7961
7973
  deleting: e.deletingTurn,
7962
7974
  message: h.value,
7963
- "icons-visible": q.value,
7975
+ "icons-visible": J.value,
7964
7976
  "mutation-disabled": e.threadActionsDisabled,
7965
7977
  presentation: x.value.messages.actions,
7966
7978
  onCopy: r[10] ||= (t) => i("copy-message", e.index),
7967
- onDelete: ve,
7968
- onEdit: he,
7969
- onFork: ye,
7979
+ onDelete: _e,
7980
+ onEdit: me,
7981
+ onFork: ve,
7970
7982
  onQuote: r[11] ||= (t) => i("quote-message", e.index),
7971
- onRetry: be
7983
+ onRetry: ye
7972
7984
  }, null, 8, [
7973
7985
  "class",
7974
7986
  "aria-hidden",
@@ -8008,9 +8020,9 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8008
8020
  entry: e,
8009
8021
  message: Ba(e.message)
8010
8022
  }))), a = o(() => n.turnId), s = o(() => i.value.some(({ message: e }) => e.role === "assistant" && So(e))), c = o(() => [...i.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0)?.entry.index), u = o(() => n.active === !1 ? void 0 : [...i.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0 && (e.parts?.length ?? 0) > 0)?.entry.index), d = o(() => i.value.some(({ entry: e, message: t }) => t.role === "assistant" && (u.value === void 0 || e.index >= u.value) && (t.parts?.some((e) => e.type === "text" && e.phase === "final_answer" && e.content.trim().length > 0) ?? !1))), f = o(() => !d.value && (n.active ?? i.value.some(({ message: e }) => e.role === "assistant" && e.streaming === !0))), p = o(() => n.status), m = o(() => n.startedAt), h = o(() => n.durationMs), g = o(() => n.itemsView !== "summary" && !f.value && !d.value && (p.value === "interrupted" || p.value === "failed")), _ = o(() => n.itemsView === void 0 && s.value && !f.value && !d.value && (p.value === void 0 || p.value === "completed")), v = o(() => i.value.find(({ message: e }) => e.role === "assistant" && (n.itemsView !== void 0 || T(e)))?.entry.index), y = o(() => n.itemsView === "summary" || i.value.some(({ message: e }) => e.type === "steer" && oo(e).length > 0 || e.role === "assistant" && oo(e).some((e) => (n.showToolBlocks || e.type !== "tool" && e.type !== "tool-group") && Co(e, n.answeredClientRequestIds)))), x = o(() => !!(a.value && v.value !== void 0)), S = N(f.value && !d.value || g.value), C = N(!1), w = o(() => !f.value && S.value && (n.detailsLoading || n.itemsView === "summary" && !n.detailsError));
8011
- U(d, (e, t) => {
8023
+ W(d, (e, t) => {
8012
8024
  e && !t && !C.value && (S.value = !1);
8013
- }), U([f, g], ([e, t]) => {
8025
+ }), W([f, g], ([e, t]) => {
8014
8026
  C.value || (S.value = e && !d.value || t);
8015
8027
  }), A(Vo, {
8016
8028
  active: f,
@@ -8035,7 +8047,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8035
8047
  toggle() {
8036
8048
  C.value = !0, S.value = !S.value;
8037
8049
  }
8038
- }), U([
8050
+ }), W([
8039
8051
  f,
8040
8052
  S,
8041
8053
  () => n.itemsView,
@@ -8062,7 +8074,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8062
8074
  "aria-label": e.label,
8063
8075
  title: e.label,
8064
8076
  onClick: r[0] ||= (e) => n("click")
8065
- }, [m(V(Y), {
8077
+ }, [m(V(X), {
8066
8078
  "aria-hidden": "true",
8067
8079
  size: 24,
8068
8080
  "stroke-width": 1.75
@@ -8156,11 +8168,11 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8156
8168
  status: "streaming",
8157
8169
  parts: []
8158
8170
  }, p = R();
8159
- A(fc, p), U(() => i.resetKey, () => {
8171
+ A(fc, p), W(() => i.resetKey, () => {
8160
8172
  p.value = void 0;
8161
8173
  });
8162
8174
  let m = b(Bo, void 0) ?? ne(/* @__PURE__ */ new Map());
8163
- A(Bo, m), U(() => i.messages, (e) => {
8175
+ A(Bo, m), W(() => i.messages, (e) => {
8164
8176
  let t = {}, n = /* @__PURE__ */ new Set();
8165
8177
  for (let n of e) {
8166
8178
  if (!("metadata" in n)) continue;
@@ -8204,10 +8216,10 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8204
8216
  });
8205
8217
  }
8206
8218
  return n;
8207
- }), B = o(() => It(i.presentation)), re = o((e) => {
8219
+ }), B = o(() => It(i.presentation)), H = o((e) => {
8208
8220
  let t = Object.fromEntries(Object.entries(i).filter(([e]) => e !== "messages" && e !== "turns"));
8209
8221
  return e && Object.keys(e).length === Object.keys(t).length && Object.keys(t).every((n) => t[n] === e[n]) ? e : t;
8210
- }), H = o((e) => {
8222
+ }), U = o((e) => {
8211
8223
  let t = [];
8212
8224
  for (let e of L.value) {
8213
8225
  let n = Ba(e.message).turnId?.trim() || void 0, r = t.at(-1);
@@ -8223,7 +8235,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8223
8235
  }
8224
8236
  let n = new Set(I.value.filter((e) => e.role === "assistant").map((e) => Ba(e).turnId?.trim()));
8225
8237
  for (let [e, r] of t.entries()) {
8226
- if (!r.turnId || r.turnId === K.value || ae.value.get(r.turnId) !== "completed" || n.has(r.turnId) || !r.entries.some((e) => e.message.role === "user")) continue;
8238
+ if (!r.turnId || r.turnId === q.value || ie.value.get(r.turnId) !== "completed" || n.has(r.turnId) || !r.entries.some((e) => e.message.role === "user")) continue;
8227
8239
  let t = `codex-empty-response:${r.turnId}`;
8228
8240
  r.entries.push({
8229
8241
  index: i.messages.length + e + 1,
@@ -8246,8 +8258,8 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8246
8258
  }) ? t : e;
8247
8259
  });
8248
8260
  });
8249
- function ie(e) {
8250
- let t = e ? q.value.get(e) : void 0;
8261
+ function re(e) {
8262
+ let t = e ? J.value.get(e) : void 0;
8251
8263
  return [
8252
8264
  t?.status,
8253
8265
  t?.startedAt,
@@ -8258,25 +8270,25 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8258
8270
  t?.detailsError
8259
8271
  ];
8260
8272
  }
8261
- function G(e) {
8273
+ function K(e) {
8262
8274
  if (i.busy && e.entries.some(({ index: e, message: t }) => e < i.messages.length && t.role === "assistant" && Ba(t).streaming === !0)) return !0;
8263
8275
  if (i.activeTurnId !== void 0) return e.turnId !== void 0 && e.turnId === i.activeTurnId;
8264
8276
  }
8265
- let K = o(() => i.activeTurnId !== void 0 && i.activeTurnId !== null ? i.activeTurnId : (i.busy ? [...i.messages].reverse().map(Ba).find((e) => e.role === "assistant" && e.streaming)?.turnId?.trim() : void 0) || null), q = o(() => new Map(i.turns?.map((e) => [e.id, e]) ?? [])), ae = o(() => new Map(i.turns?.map((e) => [e.id, e.status]) ?? [])), oe = o(() => new Map(i.turns?.map((e) => [e.id, {
8277
+ let q = o(() => i.activeTurnId !== void 0 && i.activeTurnId !== null ? i.activeTurnId : (i.busy ? [...i.messages].reverse().map(Ba).find((e) => e.role === "assistant" && e.streaming)?.turnId?.trim() : void 0) || null), J = o(() => new Map(i.turns?.map((e) => [e.id, e]) ?? [])), ie = o(() => new Map(i.turns?.map((e) => [e.id, e.status]) ?? [])), ae = o(() => new Map(i.turns?.map((e) => [e.id, {
8266
8278
  startedAt: e.startedAt,
8267
- durationMs: e.durationMs ?? se(e.startedAt, e.completedAt)
8279
+ durationMs: e.durationMs ?? oe(e.startedAt, e.completedAt)
8268
8280
  }]) ?? []));
8269
- function se(e, t) {
8281
+ function oe(e, t) {
8270
8282
  if (!e || !t) return null;
8271
8283
  let n = Date.parse(t) - Date.parse(e);
8272
8284
  return Number.isFinite(n) && n >= 0 ? n : null;
8273
8285
  }
8274
- function ce(e) {
8275
- return !e || e === K.value ? !1 : ae.value.get(e) !== "inProgress";
8286
+ function se(e) {
8287
+ return !e || e === q.value ? !1 : ie.value.get(e) !== "inProgress";
8276
8288
  }
8277
- function le(e, t) {
8278
- let n = t ? ae.value.get(t) : void 0;
8279
- return !n || n === "inProgress" || t === K.value ? e : "content" in e ? e.streaming ? {
8289
+ function ce(e, t) {
8290
+ let n = t ? ie.value.get(t) : void 0;
8291
+ return !n || n === "inProgress" || t === q.value ? e : "content" in e ? e.streaming ? {
8280
8292
  ...e,
8281
8293
  streaming: !1
8282
8294
  } : e : e.status === "streaming" ? {
@@ -8284,40 +8296,40 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8284
8296
  status: "complete"
8285
8297
  } : e;
8286
8298
  }
8287
- function ue(e) {
8288
- if (!ce(e)) return !1;
8289
- let t = ae.value.get(e);
8299
+ function le(e) {
8300
+ if (!se(e)) return !1;
8301
+ let t = ie.value.get(e);
8290
8302
  return t === void 0 || t === "completed";
8291
8303
  }
8292
- let de = o(() => [...L.value].reverse().find((e) => e.message.role === "assistant")?.index);
8293
- function fe(e) {
8294
- return e === de.value;
8304
+ let ue = o(() => [...L.value].reverse().find((e) => e.message.role === "assistant")?.index);
8305
+ function de(e) {
8306
+ return e === ue.value;
8295
8307
  }
8296
- let J = N(null), Y = N(!0), pe = N(!1), me = null, he = null, ge = 0, _e = !1, ve = null;
8308
+ let Y = N(null), X = N(!0), fe = N(!1), pe = null, me = null, he = 0, ge = !1, _e = null;
8297
8309
  ee(async () => {
8298
8310
  document.addEventListener("pointerup", Se), document.addEventListener("selectionchange", Ce), await C(), We();
8299
- let e = J.value?.querySelector(".codex-message-list__content");
8300
- e && typeof ResizeObserver < "u" && (me = new ResizeObserver(() => {
8301
- Y.value ? Ge() : He();
8302
- }), me.observe(e)), Ge();
8303
- }), U(() => i.messages.length, async (e) => {
8304
- let t = T, n = J.value, r = n.scrollHeight, i = n.scrollTop;
8311
+ let e = Y.value?.querySelector(".codex-message-list__content");
8312
+ e && typeof ResizeObserver < "u" && (pe = new ResizeObserver(() => {
8313
+ X.value ? Ge() : He();
8314
+ }), pe.observe(e)), Ge();
8315
+ }), W(() => i.messages.length, async (e) => {
8316
+ let t = T, n = Y.value, r = n.scrollHeight, i = n.scrollTop;
8305
8317
  T = e;
8306
8318
  let a = h.value === "lazy" && je(e, t);
8307
8319
  Ne();
8308
- let o = !a && Y.value && Ue();
8320
+ let o = !a && X.value && Ue();
8309
8321
  await C(), a && n ? n.scrollTop = i + n.scrollHeight - r : o && We();
8310
- }), U([
8322
+ }), W([
8311
8323
  () => i.resetKey,
8312
8324
  () => i.messages.length,
8313
8325
  () => i.messages.at(-1)
8314
8326
  ], ([e, t, n], [r, i, a]) => {
8315
- e !== r || t !== i || !n || !a || n.id && a.id && n.id !== a.id || be();
8316
- }), U(() => i.messageTextSelection, (e) => {
8327
+ e !== r || t !== i || !n || !a || n.id && a.id && n.id !== a.id || ye();
8328
+ }), W(() => i.messageTextSelection, (e) => {
8317
8329
  e || Ee();
8318
- }), U(() => i.resetKey, async (e, t) => {
8330
+ }), W(() => i.resetKey, async (e, t) => {
8319
8331
  Ee();
8320
- let n = J.value;
8332
+ let n = Y.value;
8321
8333
  n && t != null && y.set(t, {
8322
8334
  renderedAnchor: w,
8323
8335
  scrollTop: n.scrollTop,
@@ -8325,35 +8337,35 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8325
8337
  });
8326
8338
  let r = e == null ? void 0 : y.get(e), a = r ? Ie(i.messages, r.renderedAnchor) : -1;
8327
8339
  Me(a >= 0 ? a : Re(i.messages, g.value)), j.value = !1, M = !1, Ve(r?.stickToBottom ?? !0), Ne(), await C(), r && n ? (n.scrollTop = r.stickToBottom ? n.scrollHeight : r.scrollTop, He()) : We();
8328
- }), U(() => [i.loadingOlderMessages, i.hasOlderMessages], () => {
8340
+ }), W(() => [i.loadingOlderMessages, i.hasOlderMessages], () => {
8329
8341
  M = !1;
8330
- }), U(() => [
8342
+ }), W(() => [
8331
8343
  h.value,
8332
8344
  g.value,
8333
8345
  _.value
8334
8346
  ], async () => {
8335
- h.value === "lazy" && (Me(Re(i.messages, g.value)), Ne(), await C(), Y.value && We());
8347
+ h.value === "lazy" && (Me(Re(i.messages, g.value)), Ne(), await C(), X.value && We());
8336
8348
  });
8337
- function ye() {
8349
+ function ve() {
8338
8350
  Ee();
8339
- let e = J.value, t = e !== null && e.scrollTop < ge;
8340
- e && (ge = e.scrollTop), He(), pe.value ? t && Ve(!1) : Ve(!0), h.value === "lazy" && ke() && v.value <= 0 && i.hasOlderMessages && !i.loadingOlderMessages ? Oe() : h.value === "lazy" && ke() && Ae();
8351
+ let e = Y.value, t = e !== null && e.scrollTop < he;
8352
+ e && (he = e.scrollTop), He(), fe.value ? t && Ve(!1) : Ve(!0), h.value === "lazy" && ke() && v.value <= 0 && i.hasOlderMessages && !i.loadingOlderMessages ? Oe() : h.value === "lazy" && ke() && Ae();
8341
8353
  }
8342
- function be() {
8343
- Y.value ? Ge() : C(He);
8354
+ function ye() {
8355
+ X.value ? Ge() : C(He);
8344
8356
  }
8345
- function X(e) {
8357
+ function be(e) {
8346
8358
  let t = e.target;
8347
8359
  !(t instanceof Element) || !t.closest(".chat-work-group__header") || Ve(!1);
8348
8360
  }
8349
8361
  function xe() {
8350
- i.messageTextSelection && (_e = !0);
8362
+ i.messageTextSelection && (ge = !0);
8351
8363
  }
8352
8364
  function Se() {
8353
- _e && (_e = !1, we());
8365
+ ge && (ge = !1, we());
8354
8366
  }
8355
8367
  function Ce() {
8356
- !i.messageTextSelection || _e || we();
8368
+ !i.messageTextSelection || ge || we();
8357
8369
  }
8358
8370
  function we() {
8359
8371
  if (!i.messageTextSelection) {
@@ -8388,14 +8400,14 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8388
8400
  ...u.id ? { messageId: u.id } : {},
8389
8401
  ...u.turnId ? { turnId: u.turnId } : {}
8390
8402
  };
8391
- De(ve, d) || (ve = d, a("message-text-selection-change", d));
8403
+ De(_e, d) || (_e = d, a("message-text-selection-change", d));
8392
8404
  }
8393
8405
  function Te(e) {
8394
8406
  let t = (e instanceof Element ? e : e.parentElement)?.closest("[data-codex-message-index]") ?? null;
8395
- return t && J.value?.contains(t) ? t : null;
8407
+ return t && Y.value?.contains(t) ? t : null;
8396
8408
  }
8397
8409
  function Ee() {
8398
- _e = !1, ve && (ve = null, a("message-text-selection-change", null));
8410
+ ge = !1, _e && (_e = null, a("message-text-selection-change", null));
8399
8411
  }
8400
8412
  function De(e, t) {
8401
8413
  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);
@@ -8404,12 +8416,12 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8404
8416
  !i.hasOlderMessages || i.loadingOlderMessages || M || (M = !0, a("load-older-messages"));
8405
8417
  }
8406
8418
  function ke() {
8407
- let e = J.value;
8419
+ let e = Y.value;
8408
8420
  return e !== null && e.scrollTop <= e.clientHeight;
8409
8421
  }
8410
8422
  async function Ae() {
8411
8423
  if (j.value || v.value <= 0) return;
8412
- let e = J.value, t = e.scrollHeight, n = e.scrollTop;
8424
+ let e = Y.value, t = e.scrollHeight, n = e.scrollTop;
8413
8425
  j.value = !0, Me(Math.max(0, v.value - Le(_.value))), await C(), e.scrollTop = n + e.scrollHeight - t, j.value = !1, v.value <= 0 && Oe();
8414
8426
  }
8415
8427
  function je(e, t) {
@@ -8457,45 +8469,45 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8457
8469
  return n;
8458
8470
  }
8459
8471
  function Ve(e) {
8460
- Y.value !== e && (Y.value = e, a("stickiness-change", e));
8472
+ X.value !== e && (X.value = e, a("stickiness-change", e));
8461
8473
  }
8462
8474
  function He() {
8463
- pe.value = !Ue();
8475
+ fe.value = !Ue();
8464
8476
  }
8465
8477
  function Ue() {
8466
- let e = J.value;
8467
- return e ? e.scrollHeight - e.scrollTop - e.clientHeight <= i.bottomThreshold : Y.value;
8478
+ let e = Y.value;
8479
+ return e ? e.scrollHeight - e.scrollTop - e.clientHeight <= i.bottomThreshold : X.value;
8468
8480
  }
8469
8481
  function We() {
8470
- J.value && (J.value.scrollTop = J.value.scrollHeight, ge = J.value.scrollTop, Ve(!0), He());
8482
+ Y.value && (Y.value.scrollTop = Y.value.scrollHeight, he = Y.value.scrollTop, Ve(!0), He());
8471
8483
  }
8472
8484
  function Ge() {
8473
- if (he !== null) return;
8485
+ if (me !== null) return;
8474
8486
  let e = () => {
8475
- he = null, Y.value && We();
8487
+ me = null, X.value && We();
8476
8488
  };
8477
- he = typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : setTimeout(e, 0);
8489
+ me = typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : setTimeout(e, 0);
8478
8490
  }
8479
8491
  return D(() => {
8480
- document.removeEventListener("pointerup", Se), document.removeEventListener("selectionchange", Ce), me?.disconnect(), me = null, he !== null && (typeof he == "number" && typeof cancelAnimationFrame == "function" ? cancelAnimationFrame(he) : clearTimeout(he));
8492
+ document.removeEventListener("pointerup", Se), document.removeEventListener("selectionchange", Ce), pe?.disconnect(), pe = null, me !== null && (typeof me == "number" && typeof cancelAnimationFrame == "function" ? cancelAnimationFrame(me) : clearTimeout(me));
8481
8493
  }), n({ scrollToBottom: We }), (n, r) => (k(), l("div", {
8482
8494
  class: "codex-chat-theme codex-message-list",
8483
8495
  "aria-label": e.ariaLabel
8484
8496
  }, [u("div", {
8485
8497
  ref_key: "scrollElement",
8486
- ref: J,
8498
+ ref: Y,
8487
8499
  class: "codex-message-list__viewport message-list",
8488
- onClickCapture: X,
8500
+ onClickCapture: be,
8489
8501
  onPointerdown: xe,
8490
- onScroll: ye
8491
- }, [u("div", Qd, [L.value.length === 0 ? F(n.$slots, "empty", {}, () => [u("p", $d, z(e.emptyLabel), 1)], !0, 0) : (k(!0), l(t, { key: 1 }, P(H.value, (i, o, c, u) => {
8502
+ onScroll: ve
8503
+ }, [u("div", Qd, [L.value.length === 0 ? F(n.$slots, "empty", {}, () => [u("p", $d, z(e.emptyLabel), 1)], !0, 0) : (k(!0), l(t, { key: 1 }, P(U.value, (i, o, c, u) => {
8492
8504
  let f = [
8493
8505
  i,
8494
- re.value,
8495
- K.value,
8496
- de.value,
8497
- ...ie(i.turnId),
8498
- G(i),
8506
+ H.value,
8507
+ q.value,
8508
+ ue.value,
8509
+ ...re(i.turnId),
8510
+ K(i),
8499
8511
  ...Object.values(n.$slots)
8500
8512
  ];
8501
8513
  if (u && u.el && u.key === i.key && x(u, f)) return u;
@@ -8503,26 +8515,26 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8503
8515
  key: i.key,
8504
8516
  entries: i.entries,
8505
8517
  "answered-client-request-ids": e.answeredClientRequestIds,
8506
- active: G(i),
8518
+ active: K(i),
8507
8519
  "show-tool-blocks": B.value.messages.toolBlocks,
8508
- status: i.turnId ? ae.value.get(i.turnId) : void 0,
8509
- "started-at": i.turnId ? oe.value.get(i.turnId)?.startedAt : void 0,
8510
- "duration-ms": i.turnId ? oe.value.get(i.turnId)?.durationMs : void 0,
8520
+ status: i.turnId ? ie.value.get(i.turnId) : void 0,
8521
+ "started-at": i.turnId ? ae.value.get(i.turnId)?.startedAt : void 0,
8522
+ "duration-ms": i.turnId ? ae.value.get(i.turnId)?.durationMs : void 0,
8511
8523
  "turn-id": i.turnId,
8512
- "items-view": i.turnId ? q.value.get(i.turnId)?.itemsView : void 0,
8513
- "details-loading": i.turnId ? q.value.get(i.turnId)?.detailsLoading : void 0,
8514
- "details-error": i.turnId ? q.value.get(i.turnId)?.detailsError : void 0,
8524
+ "items-view": i.turnId ? J.value.get(i.turnId)?.itemsView : void 0,
8525
+ "details-loading": i.turnId ? J.value.get(i.turnId)?.detailsLoading : void 0,
8526
+ "details-error": i.turnId ? J.value.get(i.turnId)?.detailsError : void 0,
8515
8527
  onLoadTurnHistory: r[13] ||= (e) => a("load-turn-history", e)
8516
8528
  }, {
8517
- default: W(() => [(k(!0), l(t, null, P(i.entries, (t, o, c, u) => {
8529
+ default: G(() => [(k(!0), l(t, null, P(i.entries, (t, o, c, u) => {
8518
8530
  let f = [
8519
8531
  t.message,
8520
8532
  t.index,
8521
8533
  t.activityState,
8522
- re.value,
8523
- K.value,
8524
- de.value,
8525
- ...ie(i.turnId),
8534
+ H.value,
8535
+ q.value,
8536
+ ue.value,
8537
+ ...re(i.turnId),
8526
8538
  Object.keys(n.$slots).length ? {} : void 0
8527
8539
  ];
8528
8540
  if (u && u.el && u.key === t.key && x(u, f)) return u;
@@ -8531,23 +8543,23 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8531
8543
  class: "codex-message-list__entry",
8532
8544
  "data-codex-message-index": t.index
8533
8545
  }, [n.$slots.message ? F(n.$slots, "message", {
8534
- message: V(Ba)(le(t.message, i.turnId)),
8546
+ message: V(Ba)(ce(t.message, i.turnId)),
8535
8547
  index: t.index
8536
8548
  }, void 0, !0, 0) : (k(), s(Kd, {
8537
8549
  key: 1,
8538
8550
  "activity-state": t.activityState,
8539
8551
  "actions-disabled": e.actionsDisabled,
8540
- "actions-always-visible": fe(t.index),
8552
+ "actions-always-visible": de(t.index),
8541
8553
  "answered-client-request-ids": e.answeredClientRequestIds,
8542
- "can-delete-turn": e.canDeleteTurn && ce(i.turnId),
8543
- "can-edit-turn": e.canEditTurn && ce(i.turnId),
8544
- "can-fork-turn": e.canForkTurn && ue(i.turnId),
8545
- "can-retry-turn": e.canRetryTurn && ce(i.turnId),
8554
+ "can-delete-turn": e.canDeleteTurn && se(i.turnId),
8555
+ "can-edit-turn": e.canEditTurn && se(i.turnId),
8556
+ "can-fork-turn": e.canForkTurn && le(i.turnId),
8557
+ "can-retry-turn": e.canRetryTurn && se(i.turnId),
8546
8558
  "deleting-turn": !!(e.deletingTurnId && i.turnId === e.deletingTurnId),
8547
8559
  "follow-ups-disabled": e.followUpsDisabled,
8548
8560
  "hidden-client-request-ids": e.hiddenClientRequestIds,
8549
8561
  index: t.index,
8550
- message: le(t.message, i.turnId),
8562
+ message: ce(t.message, i.turnId),
8551
8563
  "mention-groups": e.mentionGroups,
8552
8564
  "open-image": e.openImage,
8553
8565
  plugins: e.plugins,
@@ -8569,47 +8581,47 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8569
8581
  }, d({ _: 2 }, [
8570
8582
  n.$slots.actions ? {
8571
8583
  name: "actions",
8572
- fn: W((e) => [F(n.$slots, "actions", S({ ref_for: !0 }, e), void 0, !0)]),
8584
+ fn: G((e) => [F(n.$slots, "actions", S({ ref_for: !0 }, e), void 0, !0)]),
8573
8585
  key: "0"
8574
8586
  } : void 0,
8575
8587
  n.$slots.attachment ? {
8576
8588
  name: "attachment",
8577
- fn: W((e) => [F(n.$slots, "attachment", S({ ref_for: !0 }, e), void 0, !0)]),
8589
+ fn: G((e) => [F(n.$slots, "attachment", S({ ref_for: !0 }, e), void 0, !0)]),
8578
8590
  key: "1"
8579
8591
  } : void 0,
8580
8592
  n.$slots.block ? {
8581
8593
  name: "block",
8582
- fn: W((e) => [F(n.$slots, "block", S({ ref_for: !0 }, e), void 0, !0)]),
8594
+ fn: G((e) => [F(n.$slots, "block", S({ ref_for: !0 }, e), void 0, !0)]),
8583
8595
  key: "2"
8584
8596
  } : void 0,
8585
8597
  n.$slots.header ? {
8586
8598
  name: "header",
8587
- fn: W((e) => [F(n.$slots, "header", S({ ref_for: !0 }, e), void 0, !0)]),
8599
+ fn: G((e) => [F(n.$slots, "header", S({ ref_for: !0 }, e), void 0, !0)]),
8588
8600
  key: "3"
8589
8601
  } : void 0,
8590
8602
  n.$slots.mention ? {
8591
8603
  name: "mention",
8592
- fn: W((e) => [F(n.$slots, "mention", S({ ref_for: !0 }, e), void 0, !0)]),
8604
+ fn: G((e) => [F(n.$slots, "mention", S({ ref_for: !0 }, e), void 0, !0)]),
8593
8605
  key: "4"
8594
8606
  } : void 0,
8595
8607
  n.$slots.status ? {
8596
8608
  name: "status",
8597
- fn: W((e) => [F(n.$slots, "status", S({ ref_for: !0 }, e), void 0, !0)]),
8609
+ fn: G((e) => [F(n.$slots, "status", S({ ref_for: !0 }, e), void 0, !0)]),
8598
8610
  key: "5"
8599
8611
  } : void 0,
8600
8612
  n.$slots.text ? {
8601
8613
  name: "text",
8602
- fn: W((e) => [F(n.$slots, "text", S({ ref_for: !0 }, e), void 0, !0)]),
8614
+ fn: G((e) => [F(n.$slots, "text", S({ ref_for: !0 }, e), void 0, !0)]),
8603
8615
  key: "6"
8604
8616
  } : void 0,
8605
8617
  n.$slots.thinking ? {
8606
8618
  name: "thinking",
8607
- fn: W((e) => [F(n.$slots, "thinking", S({ ref_for: !0 }, e), void 0, !0)]),
8619
+ fn: G((e) => [F(n.$slots, "thinking", S({ ref_for: !0 }, e), void 0, !0)]),
8608
8620
  key: "7"
8609
8621
  } : void 0,
8610
8622
  n.$slots.tool ? {
8611
8623
  name: "tool",
8612
- fn: W((e) => [F(n.$slots, "tool", S({ ref_for: !0 }, e), void 0, !0)]),
8624
+ fn: G((e) => [F(n.$slots, "tool", S({ ref_for: !0 }, e), void 0, !0)]),
8613
8625
  key: "8"
8614
8626
  } : void 0
8615
8627
  ]), 1032, [
@@ -8651,7 +8663,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8651
8663
  "details-error"
8652
8664
  ]));
8653
8665
  return p.memo = f, p;
8654
- }, r, 14), 128))])], 544), pe.value ? (k(), s(Xd, {
8666
+ }, r, 14), 128))])], 544), fe.value ? (k(), s(Xd, {
8655
8667
  key: 0,
8656
8668
  class: "codex-message-list__scroll-to-bottom",
8657
8669
  label: e.scrollToBottomLabel,
@@ -8908,21 +8920,21 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8908
8920
  text: i.modelValue,
8909
8921
  selectionStart: i.modelValue.length,
8910
8922
  selectionEnd: i.modelValue.length
8911
- })), I = N(te), L = N(te.text), R = N(null), B = N(null), re = N(null), H = 0, ie = 0, G = N(null), K = N([...M.value]), q = /* @__PURE__ */ new Map(), ae = N([]), se = N(!1), ce = 0, le = o(() => O((e) => e.identity.messages, () => i.messages ?? D.value?.messages ?? [])), ue = o(() => {
8912
- let e = le.value, t = re.value;
8923
+ })), I = N(te), L = N(te.text), R = N(null), B = N(null), H = N(null), U = 0, re = 0, K = N(null), q = N([...M.value]), J = /* @__PURE__ */ new Map(), ie = N([]), oe = N(!1), se = 0, ce = o(() => O((e) => e.identity.messages, () => i.messages ?? D.value?.messages ?? [])), le = o(() => {
8924
+ let e = ce.value, t = H.value;
8913
8925
  return !t || e.some((e) => kt(e, t)) ? e : [...e, t.message];
8914
- }), de = o(() => O((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? D.value?.activeTurnId : i.activeTurnId)), fe = o(() => O((e) => e.identity.turns, () => i.turns ?? D.value?.turns ?? [])), J = o(() => !ke.value && de.value == null && (fe.value ?? []).at(-1)?.status === "interrupted"), Y = o(() => ue.value.flatMap((e) => {
8926
+ }), ue = o(() => O((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? D.value?.activeTurnId : i.activeTurnId)), de = o(() => O((e) => e.identity.turns, () => i.turns ?? D.value?.turns ?? [])), Y = o(() => !ke.value && ue.value == null && (de.value ?? []).at(-1)?.status === "interrupted"), X = o(() => le.value.flatMap((e) => {
8915
8927
  let t = Ba(e);
8916
8928
  if (t.role !== "user") return [];
8917
- let n = go(t.promptContent ? oe(t.promptContent, t.content) : t.content);
8929
+ let n = go(t.promptContent ? ae(t.promptContent, t.content) : t.content);
8918
8930
  return n && n !== "(no user instructions)" ? [n] : [];
8919
- })), pe = o(() => O((e) => e.composer?.promptHistory, () => i.promptHistory)), me = o(() => Ct(pe.value ?? ae.value, Y.value)), he = o(() => O((e) => e.thread?.answeredClientRequestIds, () => i.answeredClientRequestIds ?? i.surface?.answeredClientRequestIds));
8920
- function ge(e, t) {
8931
+ })), fe = o(() => O((e) => e.composer?.promptHistory, () => i.promptHistory)), pe = o(() => Ct(fe.value ?? ie.value, X.value)), me = o(() => O((e) => e.thread?.answeredClientRequestIds, () => i.answeredClientRequestIds ?? i.surface?.answeredClientRequestIds));
8932
+ function he(e, t) {
8921
8933
  let n = new Set(t);
8922
8934
  return e && n.size === e.size && [...n].every((t) => e.has(t)) ? e : n;
8923
8935
  }
8924
- let _e = o((e) => ge(e, [...he.value ?? [], ...p.keys()])), ve = o(() => O((e) => e.thread?.clientRequests ?? [], () => i.clientRequests ?? D.value?.clientRequests ?? [])), ye = o(() => {
8925
- let e = /* @__PURE__ */ new Set(), t = new Map((fe.value ?? []).map((e, t) => [e.id, t])), n = le.value.map(Ba);
8936
+ let ge = o((e) => he(e, [...me.value ?? [], ...p.keys()])), _e = o(() => O((e) => e.thread?.clientRequests ?? [], () => i.clientRequests ?? D.value?.clientRequests ?? [])), ve = o(() => {
8937
+ let e = /* @__PURE__ */ new Set(), t = new Map((de.value ?? []).map((e, t) => [e.id, t])), n = ce.value.map(Ba);
8926
8938
  for (let [r, i] of n.entries()) for (let a of i.parts ?? []) {
8927
8939
  if (a.type !== "question" || a.request.payload.request.delivery !== "async") continue;
8928
8940
  let o = a.request.turnId ?? i.turnId, s = o ? t.get(o) : void 0;
@@ -8933,65 +8945,65 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
8933
8945
  }) && e.add(a.request.id);
8934
8946
  }
8935
8947
  return e;
8936
- }), be = o(() => /* @__PURE__ */ new Set([...g.value, ...ye.value])), X = o(() => {
8948
+ }), ye = o(() => /* @__PURE__ */ new Set([...g.value, ...ve.value])), be = o(() => {
8937
8949
  let e = [], t = /* @__PURE__ */ new Set();
8938
- for (let n of ve.value) n.kind !== "ask_user" || n.payload.request.delivery !== "tool" || n.payload.request.questions.length === 0 || _e.value.has(n.id) || (t.add(n.id), e.push(n));
8939
- for (let n of ue.value) for (let r of Ba(n).parts ?? []) r.type !== "question" || r.historical === !0 || r.request.payload.request.questions.length === 0 || t.has(r.request.id) || _e.value.has(r.request.id) || be.value.has(r.request.id) || (t.add(r.request.id), e.push(r.request));
8950
+ 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));
8951
+ for (let n of le.value) for (let r of Ba(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));
8940
8952
  return e;
8941
- }), Se = o(() => X.value.find((e) => e.payload.request.delivery === "tool") ?? X.value.find((e) => e.id === h.value) ?? X.value.find((e) => {
8953
+ }), Se = o(() => be.value.find((e) => e.payload.request.delivery === "tool") ?? be.value.find((e) => e.id === h.value) ?? be.value.find((e) => {
8942
8954
  if (e.payload.request.delivery !== "async") return !0;
8943
- let t = fe.value?.find((t) => t.id === e.turnId);
8944
- return t ? t.status === "inProgress" : e.turnId === de.value;
8945
- })), Ce = o((e) => ge(e, X.value.map((e) => e.id))), we = o(() => ve.value.find((e) => e.kind === "confirm_tool" && !_e.value.has(e.id))), Te = o(() => new Set(ve.value.filter((e) => e.kind === "confirm_tool" ? !_e.value.has(e.id) : e.payload.request.delivery === "tool").map((e) => e.itemId)));
8955
+ let t = de.value?.find((t) => t.id === e.turnId);
8956
+ return t ? t.status === "inProgress" : e.turnId === ue.value;
8957
+ })), Ce = o((e) => he(e, be.value.map((e) => e.id))), we = o(() => _e.value.find((e) => e.kind === "confirm_tool" && !ge.value.has(e.id))), Te = 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)));
8946
8958
  function Ee(e, t) {
8947
8959
  let n = i.transformMessage?.(e, t) ?? e, r = Ba(n), a = (e) => Te.value.has(e.itemId ?? e.id);
8948
- return !r.parts?.some((e) => e.type === "question" && be.value.has(e.request.id) || e.type === "tool" && a(e.toolCall)) && !r.toolCalls?.some(a) ? n : {
8960
+ 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 : {
8949
8961
  ...r,
8950
- parts: r.parts?.filter((e) => e.type !== "tool" || !a(e.toolCall)).map((e) => e.type === "question" && be.value.has(e.request.id) ? {
8962
+ parts: r.parts?.filter((e) => e.type !== "tool" || !a(e.toolCall)).map((e) => e.type === "question" && ye.value.has(e.request.id) ? {
8951
8963
  ...e,
8952
8964
  historical: !0
8953
8965
  } : e),
8954
8966
  toolCalls: r.toolCalls?.filter((e) => !a(e))
8955
8967
  };
8956
8968
  }
8957
- let De = o(() => O((e) => e.thread?.approvals ?? [], () => i.approvals ?? D.value?.approvals ?? [])), Oe = o(() => De.value[0]), ke = o(() => O((e) => e.identity.busy ?? !1, () => i.busy ?? D.value?.busy ?? !1)), Ae = o(() => ke.value || re.value !== null), { armed: je, clear: Me } = zo({
8969
+ let De = o(() => O((e) => e.thread?.approvals ?? [], () => i.approvals ?? D.value?.approvals ?? [])), Oe = o(() => De.value[0]), ke = o(() => O((e) => e.identity.busy ?? !1, () => i.busy ?? D.value?.busy ?? !1)), Ae = o(() => ke.value || H.value !== null), { armed: je, clear: Me } = zo({
8958
8970
  root: x,
8959
8971
  busy: () => ke.value,
8960
8972
  enabled: () => i.escapeInterrupt,
8961
- onInterrupt: gn
8962
- }), Ne = o(() => O((e) => e.identity.conversationKey, () => i.conversationKey === void 0 ? D.value?.activeConversationId : i.conversationKey)), Pe = o(() => O((e) => e.thread?.contextUsage, () => i.contextUsage === void 0 ? D.value?.contextUsage : i.contextUsage)), Ie = o(() => O((e) => e.identity.disabled ?? !1, () => i.disabled ?? (D.value ? D.value.status !== "ready" : !1))), Le = o(() => G.value ?? O((e) => e.identity.error, () => i.error ?? D.value?.error ?? null) ?? null), Re = o(() => O((e) => e.thread?.goal ?? null, () => i.goal === void 0 ? D.value?.goal ?? null : i.goal)), ze = o(() => O((e) => e.history?.loading ?? !1, () => i.historyLoading ?? D.value?.historyLoading ?? !1)), Be = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), Ve = o(() => O((e) => e.history?.hasOlder ?? !1, () => i.hasOlderHistory ?? D.value?.historyState?.hasOlder ?? !1)), He = o(() => O((e) => e.history?.loadingOlder ?? !1, () => i.loadingOlderHistory ?? D.value?.historyState?.loadingOlder ?? !1)), Ue = o(() => O((e) => e.catalogs?.modelCatalogStatus, () => i.modelCatalogStatus ?? D.value?.modelCatalogStatus)), We = o(() => O((e) => e.catalogs?.models, () => i.models ?? D.value?.models)), Ge = o(() => O((e) => e.composer?.approvalPreset, () => i.approvalPreset === void 0 ? D.value?.approvalPreset : i.approvalPreset)), Ke = o(() => O((e) => e.composer?.planMode, () => i.planMode ?? D.value?.planMode)), qe = o(() => O((e) => e.catalogs?.plugins, () => i.plugins ?? D.value?.plugins)), Je = o(() => O((e) => e.catalogs?.mentionGroups, () => i.mentionGroups)), Ye = o(() => It(i.presentation)), Xe = o(() => O((e) => e.thread?.queuedPrompts ?? [], () => i.queuedPrompts ?? D.value?.queuedPrompts ?? [])), Ze = o(() => O((e) => e.composer?.selectedModelId, () => i.selectedModelId === void 0 ? D.value?.selectedModelId : i.selectedModelId)), Qe = o(() => O((e) => e.composer?.selectedReasoningEffort, () => i.selectedReasoningEffort === void 0 ? D.value?.selectedReasoningEffort : i.selectedReasoningEffort)), $e = o(() => O((e) => e.composer?.selectedServiceTier, () => i.selectedServiceTier === void 0 ? D.value?.selectedServiceTier : i.selectedServiceTier)), et = o(() => O((e) => e.catalogs?.skillCatalogStatus, () => i.skillCatalogStatus ?? D.value?.skillCatalogStatus)), tt = o(() => O((e) => e.catalogs?.skills, () => i.skills ?? D.value?.skills)), nt = o(() => O((e) => e.thread?.turnGitDiff, () => i.turnGitDiff === void 0 ? D.value?.turnGitDiff : i.turnGitDiff)), rt = o(() => O((e) => e.policy?.attachEnabled ?? !0, () => i.attachEnabled !== !1)), it = o(() => ({
8973
+ onInterrupt: _n
8974
+ }), Ne = o(() => O((e) => e.identity.conversationKey, () => i.conversationKey === void 0 ? D.value?.activeConversationId : i.conversationKey)), Pe = o(() => O((e) => e.thread?.contextUsage, () => i.contextUsage === void 0 ? D.value?.contextUsage : i.contextUsage)), Ie = o(() => O((e) => e.identity.disabled ?? !1, () => i.disabled ?? (D.value ? D.value.status !== "ready" : !1))), Le = o(() => K.value ?? O((e) => e.identity.error, () => i.error ?? D.value?.error ?? null) ?? null), Re = o(() => O((e) => e.thread?.goal ?? null, () => i.goal === void 0 ? D.value?.goal ?? null : i.goal)), ze = o(() => O((e) => e.history?.loading ?? !1, () => i.historyLoading ?? D.value?.historyLoading ?? !1)), Be = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), Ve = o(() => O((e) => e.history?.hasOlder ?? !1, () => i.hasOlderHistory ?? D.value?.historyState?.hasOlder ?? !1)), He = o(() => O((e) => e.history?.loadingOlder ?? !1, () => i.loadingOlderHistory ?? D.value?.historyState?.loadingOlder ?? !1)), Ue = o(() => O((e) => e.catalogs?.modelCatalogStatus, () => i.modelCatalogStatus ?? D.value?.modelCatalogStatus)), We = o(() => O((e) => e.catalogs?.models, () => i.models ?? D.value?.models)), Ge = o(() => O((e) => e.composer?.approvalPreset, () => i.approvalPreset === void 0 ? D.value?.approvalPreset : i.approvalPreset)), Ke = o(() => O((e) => e.composer?.planMode, () => i.planMode ?? D.value?.planMode)), qe = o(() => O((e) => e.catalogs?.plugins, () => i.plugins ?? D.value?.plugins)), Je = o(() => O((e) => e.catalogs?.mentionGroups, () => i.mentionGroups)), Ye = o(() => It(i.presentation)), Xe = o(() => O((e) => e.thread?.queuedPrompts ?? [], () => i.queuedPrompts ?? D.value?.queuedPrompts ?? [])), Ze = o(() => O((e) => e.composer?.selectedModelId, () => i.selectedModelId === void 0 ? D.value?.selectedModelId : i.selectedModelId)), Qe = o(() => O((e) => e.composer?.selectedReasoningEffort, () => i.selectedReasoningEffort === void 0 ? D.value?.selectedReasoningEffort : i.selectedReasoningEffort)), $e = o(() => O((e) => e.composer?.selectedServiceTier, () => i.selectedServiceTier === void 0 ? D.value?.selectedServiceTier : i.selectedServiceTier)), et = o(() => O((e) => e.catalogs?.skillCatalogStatus, () => i.skillCatalogStatus ?? D.value?.skillCatalogStatus)), tt = o(() => O((e) => e.catalogs?.skills, () => i.skills ?? D.value?.skills)), nt = o(() => O((e) => e.thread?.turnGitDiff, () => i.turnGitDiff === void 0 ? D.value?.turnGitDiff : i.turnGitDiff)), rt = o(() => O((e) => e.policy?.attachEnabled ?? !0, () => i.attachEnabled !== !1)), it = o(() => ({
8963
8975
  ...Lt,
8964
8976
  ...w.value ? w.value.capabilities : i.capabilities,
8965
8977
  approvalPresets: w.value?.capabilities?.approvalPresets ?? (w.value ? Lt.approvalPresets : i.approvalPresets ?? D.value?.approvalPresets ?? i.capabilities?.approvalPresets) ?? Lt.approvalPresets
8966
- })), at = o(() => O((e) => e.catalogs?.commands ?? [], () => i.commands ?? Rt)), st = o(() => O((e) => e.catalogs?.files ?? [], () => i.files)), ct = o(() => O((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), lt = o(() => O((e) => e.composer?.menuItems ?? [], () => i.menuItems)), ut = o(() => O((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), dt = o(() => O((e) => e.composer?.placeholder, () => i.placeholder)), ft = o(() => O((e) => e.composer?.suggestedPrompt, () => i.suggestedPrompt)), pt = o(() => O((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), mt = o(() => O((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), ht = o(() => O((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), gt = o(() => O((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), _t = o(() => O((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), vt = o(() => O((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), yt = o(() => ke.value || O((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), bt = o(() => ze.value), xt = o(() => ue.value.length > 0 || ke.value || De.value.length > 0);
8967
- U(() => !!(Oe.value || we.value || Se.value), async (e, t) => {
8978
+ })), at = o(() => O((e) => e.catalogs?.commands ?? [], () => i.commands ?? Rt)), st = o(() => O((e) => e.catalogs?.files ?? [], () => i.files)), ct = o(() => O((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), lt = o(() => O((e) => e.composer?.menuItems ?? [], () => i.menuItems)), ut = o(() => O((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), dt = o(() => O((e) => e.composer?.placeholder, () => i.placeholder)), ft = o(() => O((e) => e.composer?.suggestedPrompt, () => i.suggestedPrompt)), pt = o(() => O((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), mt = o(() => O((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), ht = o(() => O((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), gt = o(() => O((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), _t = o(() => O((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), vt = o(() => O((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), yt = o(() => ke.value || O((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), bt = o(() => ze.value), xt = o(() => le.value.length > 0 || ke.value || De.value.length > 0);
8979
+ W(() => !!(Oe.value || we.value || Se.value), async (e, t) => {
8968
8980
  if (e || !t) return;
8969
8981
  let n = document.activeElement;
8970
8982
  if (!n || !y.value?.contains(n)) return;
8971
8983
  let r = Ne.value;
8972
8984
  await C(), Ne.value === r && (document.activeElement === n || document.activeElement === document.body) && v.value?.focus({ preserveSelection: !0 });
8973
- }), U(() => i.modelValue, () => {
8985
+ }), W(() => i.modelValue, () => {
8974
8986
  S.value || i.composerState || i.modelValue !== L.value && (L.value = i.modelValue, I.value = {
8975
8987
  text: i.modelValue,
8976
8988
  selectionStart: i.modelValue.length,
8977
8989
  selectionEnd: i.modelValue.length
8978
8990
  });
8979
- }), U(j, (e) => {
8991
+ }), W(j, (e) => {
8980
8992
  if (!e) return;
8981
8993
  let t = pa(e);
8982
8994
  I.value = t, L.value = t.text;
8983
- }, { deep: !0 }), U(M, (e) => {
8984
- K.value = [...e];
8985
- }), U(rt, (e) => {
8986
- !e && K.value.length > 0 && Qt([]);
8987
- }), U(Ne, (e, t) => {
8995
+ }, { deep: !0 }), W(M, (e) => {
8996
+ q.value = [...e];
8997
+ }), W(rt, (e) => {
8998
+ !e && q.value.length > 0 && Qt([]);
8999
+ }), W(Ne, (e, t) => {
8988
9000
  h.value = null, g.value = /* @__PURE__ */ new Set();
8989
- let n = re.value;
8990
- n && (!n.hasAdoptedConversationKey && (t ?? null) === n.originConversationKey ? re.value = {
9001
+ let n = H.value;
9002
+ n && (!n.hasAdoptedConversationKey && (t ?? null) === n.originConversationKey ? H.value = {
8991
9003
  ...n,
8992
9004
  adoptedConversationKey: e ?? null,
8993
9005
  hasAdoptedConversationKey: !0
8994
- } : (e ?? null) !== n.originConversationKey && (e ?? null) !== n.adoptedConversationKey && (re.value = null)), ie += 1, B.value = null, Me(), R.value = null, G.value = null;
9006
+ } : (e ?? null) !== n.originConversationKey && (e ?? null) !== n.adoptedConversationKey && (H.value = null)), re += 1, B.value = null, Me(), R.value = null, K.value = null;
8995
9007
  let r = pa(j.value ?? (S.value ? {
8996
9008
  text: "",
8997
9009
  selectionStart: 0,
@@ -9002,51 +9014,51 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9002
9014
  selectionEnd: i.modelValue.length
9003
9015
  }));
9004
9016
  I.value = r, L.value = r.text;
9005
- }), U(le, (e) => {
9006
- let t = re.value;
9017
+ }), W(ce, (e) => {
9018
+ let t = H.value;
9007
9019
  if (t) {
9008
9020
  if (e.some((e) => kt(e, t))) {
9009
- re.value = null;
9021
+ H.value = null;
9010
9022
  return;
9011
9023
  }
9012
- t.hasAdoptedConversationKey && e.length > 0 && (re.value = null);
9024
+ t.hasAdoptedConversationKey && e.length > 0 && (H.value = null);
9013
9025
  }
9014
- }), U([ue, fe], () => {
9026
+ }), W([le, de], () => {
9015
9027
  let e = B.value;
9016
- e && (fe.value?.some((t) => t.id === e) || ue.value.some((t) => Ba(t).turnId === e) || (ie += 1, B.value = null));
9017
- }), U(Xe, (e) => {
9028
+ e && (de.value?.some((t) => t.id === e) || le.value.some((t) => Ba(t).turnId === e) || (re += 1, B.value = null));
9029
+ }), W(Xe, (e) => {
9018
9030
  let t = R.value;
9019
9031
  t && !e.some((e) => e.id === t) && (R.value = null);
9020
- }), U([
9032
+ }), W([
9021
9033
  Ne,
9022
9034
  () => D.value?.activeConversationId,
9023
9035
  () => E.value?.readPromptHistory,
9024
- pe
9036
+ fe
9025
9037
  ], () => {
9026
9038
  St();
9027
- }, { immediate: !0 }), U(() => [D.value?.status, D.value?.error], ([e, t]) => {
9028
- e === "ready" && t == null && (G.value = null);
9039
+ }, { immediate: !0 }), W(() => [D.value?.status, D.value?.error], ([e, t]) => {
9040
+ e === "ready" && t == null && (K.value = null);
9029
9041
  }), ee(() => {
9030
9042
  i.surface && i.surface.state.status === "idle" && Q(() => i.surface.connect());
9031
9043
  });
9032
9044
  async function St() {
9033
- let e = ++ce, t = Ne.value;
9034
- if (se.value = !1, ae.value = [], t == null || pe.value !== void 0) return;
9035
- let n = q.get(t);
9045
+ let e = ++se, t = Ne.value;
9046
+ if (oe.value = !1, ie.value = [], t == null || fe.value !== void 0) return;
9047
+ let n = J.get(t);
9036
9048
  if (n) {
9037
- ae.value = n;
9049
+ ie.value = n;
9038
9050
  return;
9039
9051
  }
9040
9052
  let r = E.value?.readPromptHistory, a = i.surface, o = D.value?.activeConversationId;
9041
9053
  if (!(!r && !o)) {
9042
- se.value = !0;
9054
+ oe.value = !0;
9043
9055
  try {
9044
9056
  let n = r ? await r() : (await a.readConversationPromptHistory(o)).prompts;
9045
- if (e !== ce || Ne.value !== t) return;
9057
+ if (e !== se || Ne.value !== t) return;
9046
9058
  let i = [...n].slice(-100);
9047
- q.set(t, i), ae.value = i;
9059
+ J.set(t, i), ie.value = i;
9048
9060
  } catch {} finally {
9049
- e === ce && (se.value = !1);
9061
+ e === se && (oe.value = !1);
9050
9062
  }
9051
9063
  }
9052
9064
  }
@@ -9063,14 +9075,14 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9063
9075
  en("");
9064
9076
  let n = R.value;
9065
9077
  if (n) {
9066
- R.value = null, mn(n, e, t), Qt([]);
9078
+ R.value = null, hn(n, e, t), Qt([]);
9067
9079
  return;
9068
9080
  }
9069
- let r = $t(K.value, t), o = Tt();
9081
+ let r = $t(q.value, t), o = Tt();
9070
9082
  if (b.value?.scrollToBottom(), C(() => b.value?.scrollToBottom()), S.value) {
9071
9083
  let t = E.value?.submit;
9072
9084
  if (t) {
9073
- let n = Ot(e, K.value, r?.content);
9085
+ let n = Ot(e, q.value, r?.content);
9074
9086
  Q(() => Promise.resolve(t(e, r)), () => {
9075
9087
  At(n), g.value = o;
9076
9088
  });
@@ -9084,10 +9096,10 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9084
9096
  }
9085
9097
  function Tt() {
9086
9098
  let e = g.value;
9087
- return g.value = /* @__PURE__ */ new Set([...e, ...X.value.filter((e) => e.payload.request.delivery === "async").map((e) => e.id)]), h.value = null, e;
9099
+ return g.value = /* @__PURE__ */ new Set([...e, ...be.value.filter((e) => e.payload.request.delivery === "async").map((e) => e.id)]), h.value = null, e;
9088
9100
  }
9089
9101
  function Et(e) {
9090
- if (!X.value.some((t) => t.id === e)) return;
9102
+ if (!be.value.some((t) => t.id === e)) return;
9091
9103
  let t = {
9092
9104
  id: e,
9093
9105
  payload: {
@@ -9095,15 +9107,15 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9095
9107
  cancelled: !0
9096
9108
  }
9097
9109
  };
9098
- p.set(e, t.payload), g.value = /* @__PURE__ */ new Set([...g.value, e]), h.value = null, rn(t);
9110
+ p.set(e, t.payload), g.value = /* @__PURE__ */ new Set([...g.value, e]), h.value = null, an(t);
9099
9111
  }
9100
9112
  function Dt() {
9101
9113
  Z("continueInterruptedTurn") || S.value || (a("continueInterruptedTurn"), i.surface && Q(() => i.surface.continueInterruptedTurn()));
9102
9114
  }
9103
9115
  function Ot(e, t, n) {
9104
- if (ke.value || le.value.length > 0) return null;
9105
- let r = `codex-optimistic-user-${++H}`;
9106
- return re.value = {
9116
+ if (ke.value || ce.value.length > 0) return null;
9117
+ let r = `codex-optimistic-user-${++U}`;
9118
+ return H.value = {
9107
9119
  adoptedConversationKey: null,
9108
9120
  hasAdoptedConversationKey: !1,
9109
9121
  originConversationKey: Ne.value ?? null,
@@ -9134,7 +9146,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9134
9146
  return n.role === "user" && go(n.content) === t.prompt;
9135
9147
  }
9136
9148
  function At(e) {
9137
- e && re.value?.message.id === e && (re.value = null);
9149
+ e && H.value?.message.id === e && (H.value = null);
9138
9150
  }
9139
9151
  function jt(e) {
9140
9152
  if (!Z("loadTurnHistory", e) && !S.value) {
@@ -9155,7 +9167,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9155
9167
  }
9156
9168
  }
9157
9169
  function Nt(e) {
9158
- let t = ue.value[e];
9170
+ let t = le.value[e];
9159
9171
  if (!t) return;
9160
9172
  let n = Ba(t), r = go(n.content);
9161
9173
  n.role !== "user" || !r || (en(r), !Z("quoteMessage", e) && (S.value || a("quoteMessage", e)));
@@ -9165,7 +9177,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9165
9177
  let e = zt(at.value, it.value.goals).find((e) => (e.slashName ?? e.name) === "goal" && e.composerMode);
9166
9178
  if (!e) return;
9167
9179
  let t = Re.value.objective;
9168
- tn({
9180
+ nn({
9169
9181
  text: t,
9170
9182
  selectionStart: t.length,
9171
9183
  selectionEnd: t.length,
@@ -9184,30 +9196,30 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9184
9196
  function Bt(e) {
9185
9197
  if (!Z("openLink", e) && !S.value) {
9186
9198
  if (a("openLink", e), i.openConversationLink) {
9187
- Promise.resolve(i.openConversationLink(e)).catch(En);
9199
+ Promise.resolve(i.openConversationLink(e)).catch($);
9188
9200
  return;
9189
9201
  }
9190
- e.kind === "external" && (f ? f.openExternal(e.href).catch(En) : window.open(e.href, "_blank", "noopener,noreferrer"));
9202
+ e.kind === "external" && (f ? f.openExternal(e.href).catch($) : window.open(e.href, "_blank", "noopener,noreferrer"));
9191
9203
  }
9192
9204
  }
9193
9205
  function Ht(e) {
9194
- Z("openVisualization", e) || S.value || (a("openVisualization", e), i.openVisualization && Promise.resolve(i.openVisualization(e)).catch(En));
9206
+ Z("openVisualization", e) || S.value || (a("openVisualization", e), i.openVisualization && Promise.resolve(i.openVisualization(e)).catch($));
9195
9207
  }
9196
9208
  async function Ut(e, t) {
9197
9209
  let n = S.value ? E.value?.openImage : i.openImage;
9198
9210
  if (!n) return !1;
9199
- G.value = null;
9211
+ K.value = null;
9200
9212
  try {
9201
9213
  return await n(e, t) !== !1;
9202
9214
  } catch (e) {
9203
- return En(e), !0;
9215
+ return $(e), !0;
9204
9216
  }
9205
9217
  }
9206
9218
  async function Wt() {
9207
9219
  if (!Z("attach") && (S.value || a("attach"), rt.value)) try {
9208
9220
  Xt(await aa(i.pickAttachments, f));
9209
9221
  } catch (e) {
9210
- En(e);
9222
+ $(e);
9211
9223
  }
9212
9224
  }
9213
9225
  function Gt(e) {
@@ -9232,19 +9244,19 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9232
9244
  try {
9233
9245
  Xt(await oa(e, i.ingestAttachments, f));
9234
9246
  } catch (e) {
9235
- En(e);
9247
+ $(e);
9236
9248
  }
9237
9249
  }
9238
9250
  function Xt(e) {
9239
- let t = new Map(K.value.map((e) => [e.reference, e]));
9251
+ let t = new Map(q.value.map((e) => [e.reference, e]));
9240
9252
  for (let n of e) t.set(n.reference, n);
9241
9253
  Qt([...t.values()].slice(0, 20));
9242
9254
  }
9243
9255
  function Zt(e) {
9244
- Qt(K.value.filter((t) => t.id !== e));
9256
+ Qt(q.value.filter((t) => t.id !== e));
9245
9257
  }
9246
9258
  function Qt(e) {
9247
- K.value = e, !Z("updateAttachments", e) && (S.value || a("attachmentsChange", e));
9259
+ q.value = e, !Z("updateAttachments", e) && (S.value || a("attachmentsChange", e));
9248
9260
  }
9249
9261
  function $t(e, t) {
9250
9262
  if (e.length === 0) return t;
@@ -9261,39 +9273,44 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9261
9273
  };
9262
9274
  }
9263
9275
  function en(e) {
9264
- tn({
9276
+ nn({
9265
9277
  text: e,
9266
9278
  selectionStart: e.length,
9267
9279
  selectionEnd: e.length
9268
9280
  });
9269
9281
  }
9270
- function tn(e) {
9282
+ async function tn() {
9283
+ if (Z("requestSkills") || S.value || !i.surface?.listSkills) return;
9284
+ let e = i.surface.state, t = e.conversations.find((t) => t.id === e.activeConversationId)?.cwd;
9285
+ await Q(() => i.surface.listSkills(t ? { cwd: t } : {}));
9286
+ }
9287
+ function nn(e) {
9271
9288
  let t = pa(e);
9272
9289
  I.value = t, L.value = t.text, !Z("updateComposerState", t) && (S.value || (a("update:modelValue", t.text), a("update:composerState", t)));
9273
9290
  }
9274
- function nn() {
9291
+ function rn() {
9275
9292
  Z("cancel") || S.value || (a("cancel"), i.surface && Q(() => i.surface.interrupt()));
9276
9293
  }
9277
- function rn(e) {
9294
+ function an(e) {
9278
9295
  Z("clientResponse", e) || S.value || (a("clientResponse", e), i.surface && Q(() => i.surface.respondToClientRequest(e)));
9279
9296
  }
9280
- function an(e) {
9297
+ function on(e) {
9281
9298
  Z("onMessageCopied", e) || S.value || a("copyMessage", e);
9282
9299
  }
9283
- async function on(e) {
9300
+ async function sn(e) {
9284
9301
  if (B.value !== null) return;
9285
9302
  let t = E.value?.deleteTurn;
9286
9303
  if (S.value && !t) return;
9287
- let n = ++ie, r = !1;
9304
+ let n = ++re, r = !1;
9288
9305
  B.value = e;
9289
9306
  try {
9290
9307
  if (t) {
9291
- G.value = null;
9308
+ K.value = null;
9292
9309
  let n;
9293
9310
  try {
9294
9311
  n = t(e);
9295
9312
  } catch (e) {
9296
- En(e);
9313
+ $(e);
9297
9314
  return;
9298
9315
  }
9299
9316
  if (n === void 0) {
@@ -9305,65 +9322,65 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9305
9322
  }
9306
9323
  a("deleteTurn", e), i.surface && await Q(() => i.surface.deleteTurn(e));
9307
9324
  } finally {
9308
- !r && ie === n && (B.value = null);
9325
+ !r && re === n && (B.value = null);
9309
9326
  }
9310
9327
  }
9311
- function sn(e) {
9328
+ function cn(e) {
9312
9329
  Z("editTurn", e) || S.value || (a("editTurn", e), i.surface && Q(() => i.surface.editTurn(e.turnId, e.content, e.options)));
9313
9330
  }
9314
- function cn(e) {
9331
+ function ln(e) {
9315
9332
  Z("forkTurn", e) || S.value || (a("forkTurn", e), i.surface && Q(() => i.surface.forkTurn(e)));
9316
9333
  }
9317
- function ln(e) {
9334
+ function un(e) {
9318
9335
  Z("retryTurn", e) || S.value || (a("retryTurn", e), i.surface && Q(() => i.surface.retryTurn(e)));
9319
9336
  }
9320
- function un(e) {
9337
+ function dn(e) {
9321
9338
  Z("sendFollowUp", e) || S.value || (a("sendFollowUp", e), i.surface && Q(() => i.surface.sendMessage(e)));
9322
9339
  }
9323
- function dn() {
9340
+ function fn() {
9324
9341
  Z("clearGoal") || S.value || (a("clearGoal"), i.surface && Q(() => i.surface.clearGoal()));
9325
9342
  }
9326
- function fn(e) {
9343
+ function pn(e) {
9327
9344
  R.value === e && (R.value = null), !Z("deleteQueuedPrompt", e) && (S.value || (a("deleteQueuedPrompt", e), i.surface && Q(() => i.surface.deleteQueuedPrompt(e))));
9328
9345
  }
9329
- function pn(e) {
9346
+ function mn(e) {
9330
9347
  if (L.value.length > 0) return;
9331
9348
  let t = Xe.value.find((t) => t.id === e);
9332
- t && (R.value = e, tn({
9349
+ t && (R.value = e, nn({
9333
9350
  text: t.text,
9334
9351
  content: t.options?.content,
9335
9352
  selectionStart: t.text.length,
9336
9353
  selectionEnd: t.text.length
9337
9354
  }), v.value?.focus());
9338
9355
  }
9339
- function mn(e, t, n) {
9356
+ function hn(e, t, n) {
9340
9357
  Z("updateQueuedPrompt", ...n ? [
9341
9358
  e,
9342
9359
  t,
9343
9360
  n
9344
9361
  ] : [e, t]) || S.value || (n ? a("updateQueuedPrompt", e, t, n) : a("updateQueuedPrompt", e, t), i.surface && Q(() => n ? i.surface.updateQueuedPrompt(e, t, n) : i.surface.updateQueuedPrompt(e, t)));
9345
9362
  }
9346
- function hn(e, t, n) {
9363
+ function gn(e, t, n) {
9347
9364
  it.value.steerPrompt && (R.value === e && (R.value = null), t === void 0 ? Z("steerQueuedPrompt", e) : Z("steerQueuedPrompt", ...n ? [
9348
9365
  e,
9349
9366
  t,
9350
9367
  n
9351
9368
  ] : [e, t]), !S.value && (t === void 0 ? a("steerQueuedPrompt", e) : n ? a("steerQueuedPrompt", e, t, n) : a("steerQueuedPrompt", e, t), i.surface && Q(() => t === void 0 ? i.surface.steerQueuedPrompt(e) : n ? i.surface.steerQueuedPrompt(e, t, n) : i.surface.steerQueuedPrompt(e, t))));
9352
9369
  }
9353
- function gn() {
9370
+ function _n() {
9354
9371
  Me(), !Z("interrupt") && (S.value || (a("interrupt"), i.surface && Q(() => i.surface.interrupt())));
9355
9372
  }
9356
- function _n(e, t) {
9373
+ function vn(e, t) {
9357
9374
  if (!it.value.steerPrompt) {
9358
9375
  wt(e, t);
9359
9376
  return;
9360
9377
  }
9361
9378
  let n = R.value;
9362
9379
  if (n) {
9363
- R.value = null, hn(n, e, t), Qt([]);
9380
+ R.value = null, gn(n, e, t), Qt([]);
9364
9381
  return;
9365
9382
  }
9366
- let r = $t(K.value, t);
9383
+ let r = $t(q.value, t);
9367
9384
  if (S.value) {
9368
9385
  let t = E.value?.steer;
9369
9386
  if (t) {
@@ -9380,7 +9397,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9380
9397
  g.value = o;
9381
9398
  }), Qt([]);
9382
9399
  }
9383
- function vn(e) {
9400
+ function yn(e) {
9384
9401
  if (!Z("selectApprovalPreset", e)) {
9385
9402
  if (S.value) {
9386
9403
  Z("updateSettings", { approvalPreset: e });
@@ -9389,25 +9406,25 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9389
9406
  a("selectApprovalPreset", e), i.surface && Q(() => i.surface.updateConversationSettings({ approvalPreset: e }));
9390
9407
  }
9391
9408
  }
9392
- function yn(e, t, n) {
9409
+ function bn(e, t, n) {
9393
9410
  Z("resolveApproval", e, t, n) || S.value || (a("resolveApproval", e, t, n), i.surface && Q(() => i.surface.resolveApproval(e, t, n)));
9394
9411
  }
9395
- function bn(e) {
9412
+ function xn(e) {
9396
9413
  Z("updateSettings", { modelId: e }) || S.value || (a("update:modelId", e), i.surface && Q(() => i.surface.updateConversationSettings({ modelId: e })));
9397
9414
  }
9398
- function xn(e) {
9415
+ function Sn(e) {
9399
9416
  Z("updateSettings", { planMode: e }) || S.value || (a("update:planMode", e), i.surface && Q(() => i.surface.updateConversationSettings({ planMode: e })));
9400
9417
  }
9401
- function Sn(e) {
9418
+ function Cn(e) {
9402
9419
  Z("updateSettings", { reasoningEffort: e }) || S.value || (a("update:reasoningEffort", e), i.surface && Q(() => i.surface.updateConversationSettings({ reasoningEffort: e })));
9403
9420
  }
9404
- function Cn(e) {
9421
+ function wn(e) {
9405
9422
  Z("updateSettings", { serviceTier: e }) || S.value || (a("update:serviceTier", e), i.surface && Q(() => i.surface.updateConversationSettings({ serviceTier: e })));
9406
9423
  }
9407
- function wn(e) {
9424
+ function Tn(e) {
9408
9425
  Z("menuSelect", e) || S.value || a("menuSelect", e);
9409
9426
  }
9410
- function Tn(e, t) {
9427
+ function En(e, t) {
9411
9428
  Z("mentionSelect", e, t) || S.value || a("mentionSelect", e, t);
9412
9429
  }
9413
9430
  function Z(e, ...t) {
@@ -9415,23 +9432,23 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9415
9432
  return n ? (Q(() => Promise.resolve(n(...t))), !0) : !1;
9416
9433
  }
9417
9434
  async function Q(e, t) {
9418
- G.value = null;
9435
+ K.value = null;
9419
9436
  try {
9420
9437
  await e();
9421
9438
  } catch (e) {
9422
- t?.(), En(e);
9439
+ t?.(), $(e);
9423
9440
  }
9424
9441
  }
9425
- function En(e) {
9426
- G.value = e instanceof Error ? e.message : String(e);
9427
- }
9428
9442
  function $(e) {
9429
- G.value = e, a("error", e);
9443
+ K.value = e instanceof Error ? e.message : String(e);
9444
+ }
9445
+ function Dn(e) {
9446
+ K.value = e, a("error", e);
9430
9447
  }
9431
- function Dn() {
9448
+ function On() {
9432
9449
  v.value?.focus();
9433
9450
  }
9434
- return n({ focusComposer: Dn }), (n, r) => (k(), l("section", {
9451
+ return n({ focusComposer: On }), (n, r) => (k(), l("section", {
9435
9452
  ref_key: "paneElement",
9436
9453
  ref: x,
9437
9454
  class: "codex-chat-theme codex-conversation-pane",
@@ -9450,7 +9467,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9450
9467
  class: "codex-conversation-pane__layout",
9451
9468
  "scroll-mode": "child"
9452
9469
  }, {
9453
- footer: W(() => [u("footer", {
9470
+ footer: G(() => [u("footer", {
9454
9471
  ref_key: "footerElement",
9455
9472
  ref: y,
9456
9473
  class: "codex-conversation-pane__footer"
@@ -9458,18 +9475,18 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9458
9475
  key: Oe.value.id,
9459
9476
  approval: Oe.value,
9460
9477
  disabled: Ie.value,
9461
- onResolve: r[1] ||= (e, t) => yn(Oe.value.id, e, t)
9478
+ onResolve: r[1] ||= (e, t) => bn(Oe.value.id, e, t)
9462
9479
  }, null, 8, ["approval", "disabled"]))], !0)])) : we.value ? (k(), s(Fs, {
9463
9480
  key: we.value.id,
9464
9481
  class: "codex-conversation-pane__confirmation-composer",
9465
9482
  request: we.value,
9466
- onClientResponse: rn
9483
+ onClientResponse: an
9467
9484
  }, null, 8, ["request"])) : Se.value ? (k(), s(Ms, {
9468
9485
  key: Se.value.id,
9469
9486
  class: "codex-conversation-pane__question-composer",
9470
- "answered-client-request-ids": _e.value,
9487
+ "answered-client-request-ids": ge.value,
9471
9488
  request: Se.value,
9472
- onClientResponse: rn
9489
+ onClientResponse: an
9473
9490
  }, null, 8, ["answered-client-request-ids", "request"])) : (k(), l(t, { key: 4 }, [
9474
9491
  F(n.$slots, "before-composer", {}, void 0, !0),
9475
9492
  m(sc, {
@@ -9481,18 +9498,18 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9481
9498
  "queued-prompt-edit-disabled": L.value.length > 0,
9482
9499
  "queued-prompt-steer-disabled": !it.value.steerPrompt,
9483
9500
  "turn-git-diff": nt.value,
9484
- onClearGoal: dn,
9485
- onDeleteQueuedPrompt: fn,
9486
- onEditQueuedPrompt: pn,
9501
+ onClearGoal: fn,
9502
+ onDeleteQueuedPrompt: pn,
9503
+ onEditQueuedPrompt: mn,
9487
9504
  onEditGoal: Pt,
9488
- onSteerQueuedPrompt: hn
9505
+ onSteerQueuedPrompt: gn
9489
9506
  }, d({ _: 2 }, [n.$slots["composer-drawers"] ? {
9490
9507
  name: "drawers",
9491
- fn: W((e) => [F(n.$slots, "composer-drawers", T(_(e)), void 0, !0)]),
9508
+ fn: G((e) => [F(n.$slots, "composer-drawers", T(_(e)), void 0, !0)]),
9492
9509
  key: "0"
9493
9510
  } : void 0, n.$slots["composer-shelf-actions"] ? {
9494
9511
  name: "actions",
9495
- fn: W((e) => [F(n.$slots, "composer-shelf-actions", T(_(e)), void 0, !0)]),
9512
+ fn: G((e) => [F(n.$slots, "composer-shelf-actions", T(_(e)), void 0, !0)]),
9496
9513
  key: "1"
9497
9514
  } : void 0]), 1032, [
9498
9515
  "disabled",
@@ -9511,7 +9528,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9511
9528
  autofocus: e.autofocus,
9512
9529
  "attach-enabled": rt.value,
9513
9530
  capabilities: it.value,
9514
- "can-continue-interrupted-turn": J.value,
9531
+ "can-continue-interrupted-turn": Y.value,
9515
9532
  commands: at.value,
9516
9533
  "composer-state": I.value,
9517
9534
  "context-usage": Pe.value,
@@ -9520,12 +9537,12 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9520
9537
  "empty-send-prompt": e.emptySendPrompt,
9521
9538
  "follow-up-behavior": pt.value,
9522
9539
  files: st.value,
9523
- "has-attachments": K.value.length > 0,
9540
+ "has-attachments": q.value.length > 0,
9524
9541
  "has-external-content": e.hasComposerContext,
9525
9542
  "interrupt-armed": V(je),
9526
9543
  plugins: qe.value,
9527
- "prompt-history": me.value,
9528
- "prompt-history-loading": se.value,
9544
+ "prompt-history": pe.value,
9545
+ "prompt-history-loading": oe.value,
9529
9546
  "queued-prompt-id": Xe.value[0]?.id ?? null,
9530
9547
  "is-sending": ke.value,
9531
9548
  "leading-menu-items": ct.value,
@@ -9545,27 +9562,28 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9545
9562
  "skill-catalog-status": et.value,
9546
9563
  skills: tt.value,
9547
9564
  "transcribe-audio": e.transcribeAudio,
9548
- onError: $,
9565
+ onError: Dn,
9549
9566
  onAttach: Wt,
9550
9567
  onContinueInterruptedTurn: Dt,
9551
- onInterrupt: gn,
9552
- onMenuSelect: wn,
9553
- onMentionSelect: Tn,
9554
- onSelectApprovalPreset: vn,
9568
+ onInterrupt: _n,
9569
+ onMenuSelect: Tn,
9570
+ onMentionSelect: En,
9571
+ onRequestSkills: tn,
9572
+ onSelectApprovalPreset: yn,
9555
9573
  onSend: wt,
9556
- onSteer: _n,
9557
- onSteerQueuedPrompt: hn,
9558
- "onUpdate:modelId": bn,
9559
- "onUpdate:composerState": tn,
9560
- "onUpdate:planMode": xn,
9561
- "onUpdate:reasoningEffort": Sn,
9562
- "onUpdate:serviceTier": Cn
9574
+ onSteer: vn,
9575
+ onSteerQueuedPrompt: gn,
9576
+ "onUpdate:modelId": xn,
9577
+ "onUpdate:composerState": nn,
9578
+ "onUpdate:planMode": Sn,
9579
+ "onUpdate:reasoningEffort": Cn,
9580
+ "onUpdate:serviceTier": wn
9563
9581
  }, d({
9564
- "before-meta": W(() => [X.value.length > 0 ? (k(), l("span", mf, [u("button", {
9582
+ "before-meta": G(() => [be.value.length > 0 ? (k(), l("span", mf, [u("button", {
9565
9583
  class: "codex-conversation-pane__pending-question-cancel",
9566
9584
  type: "button",
9567
9585
  "aria-label": "Cancel pending question",
9568
- onClick: r[2] ||= (e) => Et(X.value[0].id)
9586
+ onClick: r[2] ||= (e) => Et(be.value[0].id)
9569
9587
  }, [m(V(Fe), {
9570
9588
  class: "codex-conversation-pane__pending-question-icon",
9571
9589
  "aria-hidden": "true"
@@ -9575,10 +9593,10 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9575
9593
  })]), u("button", {
9576
9594
  class: "codex-conversation-pane__pending-question-open",
9577
9595
  type: "button",
9578
- "aria-label": X.value.length === 1 ? "Pending question" : `${X.value.length} pending questions`,
9579
- onClick: r[3] ||= (e) => h.value = X.value[0].id
9580
- }, z(X.value.length === 1 ? "Pending question" : `${X.value.length} pending questions`), 9, hf)])) : c("", !0)]),
9581
- before: W(() => [K.value.length > 0 ? (k(), l("div", gf, [(k(!0), l(t, null, P(K.value, (e, t) => (k(), l("div", {
9596
+ "aria-label": be.value.length === 1 ? "Pending question" : `${be.value.length} pending questions`,
9597
+ onClick: r[3] ||= (e) => h.value = be.value[0].id
9598
+ }, z(be.value.length === 1 ? "Pending question" : `${be.value.length} pending questions`), 9, hf)])) : c("", !0)]),
9599
+ before: G(() => [q.value.length > 0 ? (k(), l("div", gf, [(k(!0), l(t, null, P(q.value, (e, t) => (k(), l("div", {
9582
9600
  key: e.id,
9583
9601
  class: "codex-conversation-pane__attachment"
9584
9602
  }, [
@@ -9593,7 +9611,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9593
9611
  title: e.name
9594
9612
  }, z(e.name), 9, yf),
9595
9613
  u("span", bf, [F(n.$slots, "composer-attachment-actions", {
9596
- attachments: K.value,
9614
+ attachments: q.value,
9597
9615
  index: t,
9598
9616
  disabled: Ie.value
9599
9617
  }, void 0, !0), u("button", {
@@ -9608,46 +9626,46 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9608
9626
  }, [
9609
9627
  n.$slots["menu-icon"] ? {
9610
9628
  name: "menu-icon",
9611
- fn: W((e) => [F(n.$slots, "menu-icon", T(_(e)), void 0, !0)]),
9629
+ fn: G((e) => [F(n.$slots, "menu-icon", T(_(e)), void 0, !0)]),
9612
9630
  key: "0"
9613
9631
  } : void 0,
9614
9632
  n.$slots["menu-item"] ? {
9615
9633
  name: "menu-item",
9616
- fn: W((e) => [F(n.$slots, "menu-item", T(_(e)), void 0, !0)]),
9634
+ fn: G((e) => [F(n.$slots, "menu-item", T(_(e)), void 0, !0)]),
9617
9635
  key: "1"
9618
9636
  } : void 0,
9619
9637
  n.$slots["suggestion-item"] ? {
9620
9638
  name: "suggestion-item",
9621
- fn: W((e) => [F(n.$slots, "suggestion-item", T(_(e)), void 0, !0)]),
9639
+ fn: G((e) => [F(n.$slots, "suggestion-item", T(_(e)), void 0, !0)]),
9622
9640
  key: "2"
9623
9641
  } : void 0,
9624
9642
  n.$slots.mention ? {
9625
9643
  name: "mention",
9626
- fn: W((e) => [F(n.$slots, "mention", T(_(e)), void 0, !0)]),
9644
+ fn: G((e) => [F(n.$slots, "mention", T(_(e)), void 0, !0)]),
9627
9645
  key: "3"
9628
9646
  } : void 0,
9629
9647
  n.$slots["composer-after-input"] ? {
9630
9648
  name: "after-input",
9631
- fn: W(() => [F(n.$slots, "composer-after-input", {}, void 0, !0)]),
9649
+ fn: G(() => [F(n.$slots, "composer-after-input", {}, void 0, !0)]),
9632
9650
  key: "4"
9633
9651
  } : void 0,
9634
9652
  n.$slots["composer-after"] ? {
9635
9653
  name: "after",
9636
- fn: W(() => [F(n.$slots, "composer-after", {}, void 0, !0)]),
9654
+ fn: G(() => [F(n.$slots, "composer-after", {}, void 0, !0)]),
9637
9655
  key: "5"
9638
9656
  } : void 0
9639
9657
  ]), 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.suggested-prompt.approval-preset.plan-mode.presentation.selected-model-id.selected-reasoning-effort.selected-service-tier.skill-catalog-status.skills.transcribe-audio".split("."))),
9640
9658
  F(n.$slots, "after-composer", {}, void 0, !0)
9641
9659
  ], 64))], 512)]),
9642
- default: W(() => [xt.value ? (k(), s(V(nf), {
9660
+ default: G(() => [xt.value ? (k(), s(V(nf), {
9643
9661
  key: 0,
9644
9662
  "source-slots": n.$slots,
9645
9663
  ref_key: "messageList",
9646
9664
  ref: b,
9647
9665
  class: "codex-conversation-pane__messages",
9648
9666
  "actions-disabled": vt.value,
9649
- "active-turn-id": de.value,
9650
- "answered-client-request-ids": _e.value,
9667
+ "active-turn-id": ue.value,
9668
+ "answered-client-request-ids": ge.value,
9651
9669
  "aria-label": e.ariaLabel,
9652
9670
  busy: Ae.value,
9653
9671
  "can-delete-turn": mt.value,
@@ -9664,7 +9682,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9664
9682
  "initial-message-batch-size": e.initialMessageBatchSize,
9665
9683
  "message-batch-size": e.messageBatchSize,
9666
9684
  "message-text-selection": e.messageTextSelection,
9667
- messages: ue.value,
9685
+ messages: le.value,
9668
9686
  "mention-groups": Je.value,
9669
9687
  "open-image": Ut,
9670
9688
  plugins: qe.value,
@@ -9674,22 +9692,22 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9674
9692
  "show-tool-details": e.showToolDetails,
9675
9693
  skills: tt.value,
9676
9694
  "tool-visibility": e.toolVisibility,
9677
- "transform-message": be.value.size > 0 || Te.value.size > 0 ? Ee : e.transformMessage,
9678
- turns: fe.value,
9679
- onCancel: nn,
9680
- onClientResponse: rn,
9681
- onCopyMessage: an,
9682
- onDeleteTurn: on,
9683
- onEditTurn: sn,
9684
- onForkTurn: cn,
9695
+ "transform-message": ye.value.size > 0 || Te.value.size > 0 ? Ee : e.transformMessage,
9696
+ turns: de.value,
9697
+ onCancel: rn,
9698
+ onClientResponse: an,
9699
+ onCopyMessage: on,
9700
+ onDeleteTurn: sn,
9701
+ onEditTurn: cn,
9702
+ onForkTurn: ln,
9685
9703
  onLoadOlderMessages: Mt,
9686
9704
  onLoadTurnHistory: jt,
9687
9705
  onMessageTextSelectionChange: r[0] ||= (e) => a("messageTextSelectionChange", e),
9688
9706
  onOpenLink: Bt,
9689
9707
  onOpenVisualization: Ht,
9690
9708
  onQuoteMessage: Nt,
9691
- onRetryTurn: ln,
9692
- onSendFollowUp: un
9709
+ onRetryTurn: un,
9710
+ onSendFollowUp: dn
9693
9711
  }, null, 8, /* @__PURE__ */ "source-slots.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", lf, [F(n.$slots, "empty", {
9694
9712
  title: e.emptyTitle,
9695
9713
  description: e.emptyDescription
@@ -9697,7 +9715,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9697
9715
  _: 3
9698
9716
  }))], 40, cf));
9699
9717
  }
9700
- }), [["__scopeId", "data-v-24cebe97"]]), Cf = {
9718
+ }), [["__scopeId", "data-v-d9f2dfde"]]), Cf = {
9701
9719
  class: "codex-conversation-sidebar",
9702
9720
  "aria-label": "Conversations"
9703
9721
  }, wf = { class: "codex-conversation-sidebar__header" }, Tf = { class: "codex-conversation-sidebar__brand" }, Ef = ["disabled"], Df = {
@@ -9787,7 +9805,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9787
9805
  emits: ["select"],
9788
9806
  setup(e) {
9789
9807
  let n = e, r = Pr(), i = N(null);
9790
- return U(() => [n.activeIndex, n.visibleFiles], async () => {
9808
+ return W(() => [n.activeIndex, n.visibleFiles], async () => {
9791
9809
  await C();
9792
9810
  let e = i.value?.querySelectorAll(".chat-composer-file-menu__item").item(n.activeIndex);
9793
9811
  typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
@@ -9804,7 +9822,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9804
9822
  class: w(["chat-composer-file-menu__item", { "chat-composer-file-menu__item--active": r === e.activeIndex }]),
9805
9823
  role: "option",
9806
9824
  type: "button",
9807
- onMousedown: q((e) => n.$emit("select", t), ["prevent"])
9825
+ onMousedown: J((e) => n.$emit("select", t), ["prevent"])
9808
9826
  }, [
9809
9827
  m(V(De), {
9810
9828
  class: "chat-composer-file-menu__icon",
@@ -9828,7 +9846,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9828
9846
  emits: ["select"],
9829
9847
  setup(e) {
9830
9848
  let n = e, r = N(null);
9831
- return U(() => [n.activeIndex, n.visiblePlugins], async () => {
9849
+ return W(() => [n.activeIndex, n.visiblePlugins], async () => {
9832
9850
  await C();
9833
9851
  let e = r.value?.querySelectorAll(".chat-composer-plugin-menu__item").item(n.activeIndex);
9834
9852
  typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
@@ -9845,7 +9863,7 @@ var kd = ["aria-busy", "aria-label"], Ad = ["title"], jd = ["title"], Md = /*#__
9845
9863
  class: w(["chat-composer-plugin-menu__item", { "chat-composer-plugin-menu__item--active": r === e.activeIndex }]),
9846
9864
  role: "option",
9847
9865
  type: "button",
9848
- onMousedown: q((e) => n.$emit("select", t), ["prevent"])
9866
+ onMousedown: J((e) => n.$emit("select", t), ["prevent"])
9849
9867
  }, [t.iconUrl ? (k(), l("img", {
9850
9868
  key: 0,
9851
9869
  class: "chat-composer-plugin-menu__icon chat-composer-plugin-menu__icon-image",
@@ -9933,6 +9951,7 @@ function Qf(e) {
9933
9951
  return o === t && s(n), n;
9934
9952
  }
9935
9953
  return {
9954
+ listSkills: (t) => e.listSkills ? e.listSkills(t) : Promise.reject(/* @__PURE__ */ Error("Skill discovery is unavailable")),
9936
9955
  state: M(t),
9937
9956
  lastEvent: M(i),
9938
9957
  answeredClientRequestIds: r,