@codex-app-sdk/vue 0.16.6 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/ChatWorkGroup.vue.d.ts.map +1 -1
- package/dist/chat/chat-i18n.d.ts.map +1 -1
- package/dist/chat/message-work-state.d.ts +2 -0
- package/dist/chat/message-work-state.d.ts.map +1 -1
- package/dist/chat/work-duration.d.ts +3 -0
- package/dist/chat/work-duration.d.ts.map +1 -0
- package/dist/components/CodexMessageList.vue.d.ts.map +1 -1
- package/dist/components/CodexMessageTurn.vue.d.ts +2 -0
- package/dist/components/CodexMessageTurn.vue.d.ts.map +1 -1
- package/dist/index.js +985 -936
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Comment as e, Fragment as t, Teleport as n, Text as r, Transition as i, TransitionGroup as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createStaticVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, getCurrentScope as g, guardReactiveProps as _, h as v, hasInjectionContext as y, inject as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as E, onMounted as D, onScopeDispose as O, openBlock as k, provide as ee, reactive as A, readonly as j, ref as M, render as N, renderList as P, renderSlot as F, resolveComponent as
|
|
2
|
-
import { IconArrowDown as
|
|
1
|
+
import { Comment as e, Fragment as t, Teleport as n, Text as r, Transition as i, TransitionGroup as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createStaticVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, getCurrentScope as g, guardReactiveProps as _, h as v, hasInjectionContext as y, inject as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as E, onMounted as D, onScopeDispose as O, openBlock as k, provide as ee, reactive as A, readonly as j, ref as M, render as N, renderList as P, renderSlot as F, resolveComponent as te, resolveDynamicComponent as I, shallowReactive as ne, shallowRef as L, toDisplayString as R, toValue as z, unref as B, useSlots as V, vModelText as H, vShow as re, watch as U, withCtx as W, withDirectives as ie, withKeys as G, withModifiers as K } from "vue";
|
|
2
|
+
import { IconArrowDown as ae, IconArrowFork as oe, IconBolt as q, IconBrain as se, IconCheck as ce, IconCheck as le, IconChevronDown as ue, IconChevronRight as de, IconChevronUp as fe, IconCircleX as pe, IconCode as me, IconCopy as he, IconDownload as ge, IconExternalLink as _e, IconEye as ve, IconFileText as ye, IconFolder as be, IconHandStop as xe, IconInfoCircle as J, IconLayoutDashboard as Se, IconListDetails as Ce, IconLoader2 as we, IconMaximize as Te, IconMessageQuestion as Ee, IconMicrophone as De, IconPaperclip as Oe, IconPencil as Y, IconPhoto as ke, IconPlayerPlayFilled as Ae, IconPlugConnected as je, IconPlus as Me, IconQuote as Ne, IconRotateClockwise as Pe, IconSearch as Fe, IconShieldCheck as Ie, IconSparkleHighlight as Le, IconSparkles as Re, IconSquareCheck as ze, IconSquareDashed as Be, IconSquareX as Ve, IconSteeringWheel as He, IconTargetArrow as Ue, IconTerminal as We, IconTerminal2 as Ge, IconTool as Ke, IconTrash as qe, IconWorldSearch as Je, IconX as Ye } from "@tabler/icons-vue";
|
|
3
3
|
import Xe from "fix-webm-duration";
|
|
4
4
|
import { renderMermaidSVG as Ze } from "beautiful-mermaid";
|
|
5
5
|
import { Marked as Qe, Renderer as $e } from "marked";
|
|
@@ -230,7 +230,7 @@ var jt = [
|
|
|
230
230
|
onMouseleave: n[1] ||= (e) => i.value = !1,
|
|
231
231
|
onClick: d
|
|
232
232
|
}, [
|
|
233
|
-
!e.busy && !e.interruptArmed ? (k(), s(
|
|
233
|
+
!e.busy && !e.interruptArmed ? (k(), s(B(Ae), {
|
|
234
234
|
key: 0,
|
|
235
235
|
"aria-hidden": "true",
|
|
236
236
|
size: 16
|
|
@@ -279,8 +279,8 @@ var jt = [
|
|
|
279
279
|
setup(e, { emit: t }) {
|
|
280
280
|
let n = t;
|
|
281
281
|
return (t, r) => e.planMode || e.command ? (k(), l("div", It, [e.planMode ? (k(), l("span", Lt, [
|
|
282
|
-
m(
|
|
283
|
-
m(
|
|
282
|
+
m(B(Ce), { class: "chat-composer__mode__icon" }),
|
|
283
|
+
m(B(pe), {
|
|
284
284
|
class: "chat-composer__mode__remove",
|
|
285
285
|
"aria-label": "Disable plan mode",
|
|
286
286
|
role: "button",
|
|
@@ -288,14 +288,14 @@ var jt = [
|
|
|
288
288
|
}),
|
|
289
289
|
r[2] ||= p(" Plan ", -1)
|
|
290
290
|
])) : c("", !0), e.command ? (k(), l("span", Rt, [
|
|
291
|
-
m(
|
|
292
|
-
m(
|
|
291
|
+
m(B(Ue), { class: "chat-composer__mode__icon" }),
|
|
292
|
+
m(B(pe), {
|
|
293
293
|
class: "chat-composer__mode__remove",
|
|
294
294
|
"aria-label": `Remove ${e.command.composerMode?.label ?? e.command.displayName ?? e.command.name} command`,
|
|
295
295
|
role: "button",
|
|
296
296
|
onClick: r[1] ||= (e) => n("removeCommand")
|
|
297
297
|
}, null, 8, ["aria-label"]),
|
|
298
|
-
p(" " +
|
|
298
|
+
p(" " + R(e.command.composerMode?.label ?? e.command.displayName ?? e.command.name), 1)
|
|
299
299
|
])) : c("", !0)])) : c("", !0);
|
|
300
300
|
}
|
|
301
301
|
}), [["__scopeId", "data-v-64a83e97"]]), Bt = "ask-for-approval", Vt = [
|
|
@@ -408,7 +408,7 @@ function Gt(e, t, n, r, i) {
|
|
|
408
408
|
Jt(e, qt(e)[0]);
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
}, [...Yt(e, t).nodes, v(
|
|
411
|
+
}, [...Yt(e, t).nodes, v(de, {
|
|
412
412
|
class: "codex-composer-menu-list__chevron",
|
|
413
413
|
"aria-hidden": "true"
|
|
414
414
|
})]), a ? Wt(e.items, e.label, t, (t) => {
|
|
@@ -488,7 +488,7 @@ function Yt(e, t) {
|
|
|
488
488
|
leadingRadioCheck: !1
|
|
489
489
|
};
|
|
490
490
|
let r = t.icon?.({ item: e }), i = e.type === "radio" && e.checked && !r?.length, a;
|
|
491
|
-
return a = r?.length ? r : i ? [v(
|
|
491
|
+
return a = r?.length ? r : i ? [v(le, {
|
|
492
492
|
class: "codex-composer-menu-list__icon codex-composer-menu-list__radio-check",
|
|
493
493
|
"aria-hidden": "true"
|
|
494
494
|
})] : "leadingColor" in e && e.leadingColor ? [v("span", {
|
|
@@ -535,17 +535,17 @@ var Qt = /* @__PURE__ */ h({
|
|
|
535
535
|
function r(e) {
|
|
536
536
|
n("select", e);
|
|
537
537
|
}
|
|
538
|
-
return (t, n) => (k(), s(
|
|
538
|
+
return (t, n) => (k(), s(B(Ut), {
|
|
539
539
|
"aria-label": e.ariaLabel,
|
|
540
540
|
items: e.items,
|
|
541
541
|
onSelect: r
|
|
542
542
|
}, d({ _: 2 }, [t.$slots.icon ? {
|
|
543
543
|
name: "icon",
|
|
544
|
-
fn:
|
|
544
|
+
fn: W((e) => [F(t.$slots, "icon", w(_(e)))]),
|
|
545
545
|
key: "0"
|
|
546
546
|
} : void 0, t.$slots.item ? {
|
|
547
547
|
name: "item",
|
|
548
|
-
fn:
|
|
548
|
+
fn: W((e) => [F(t.$slots, "item", w(_(e)))]),
|
|
549
549
|
key: "1"
|
|
550
550
|
} : void 0]), 1032, ["aria-label", "items"]));
|
|
551
551
|
}
|
|
@@ -572,7 +572,7 @@ var Qt = /* @__PURE__ */ h({
|
|
|
572
572
|
emits: ["select", "update:open"],
|
|
573
573
|
setup(e, { expose: t, emit: n }) {
|
|
574
574
|
let r = e, i = n, a = M(null), f = M(null), p = M(!1), m = o(() => r.open ?? p.value);
|
|
575
|
-
D(() => document.addEventListener("click", y)), E(() => document.removeEventListener("click", y)),
|
|
575
|
+
D(() => document.addEventListener("click", y)), E(() => document.removeEventListener("click", y)), U(m, async (e) => {
|
|
576
576
|
if (!e) return;
|
|
577
577
|
await S();
|
|
578
578
|
let t = a.value?.querySelector(".codex-composer-menu__list > button[role^=\"menuitem\"], .codex-composer-menu__list > div > button[role^=\"menuitem\"]");
|
|
@@ -601,7 +601,7 @@ var Qt = /* @__PURE__ */ h({
|
|
|
601
601
|
ref_key: "root",
|
|
602
602
|
ref: a,
|
|
603
603
|
class: "codex-chat-theme codex-composer-menu",
|
|
604
|
-
onKeydown: n[0] ||= K(
|
|
604
|
+
onKeydown: n[0] ||= G(K((e) => v(!0), ["prevent", "stop"]), ["escape"])
|
|
605
605
|
}, [F(t.$slots, "trigger", {
|
|
606
606
|
open: m.value,
|
|
607
607
|
toggle: g
|
|
@@ -632,11 +632,11 @@ var Qt = /* @__PURE__ */ h({
|
|
|
632
632
|
onSelect: b
|
|
633
633
|
}, d({ _: 2 }, [t.$slots.icon ? {
|
|
634
634
|
name: "icon",
|
|
635
|
-
fn:
|
|
635
|
+
fn: W((e) => [F(t.$slots, "icon", w(_(e)), void 0, !0)]),
|
|
636
636
|
key: "0"
|
|
637
637
|
} : void 0, t.$slots.item ? {
|
|
638
638
|
name: "item",
|
|
639
|
-
fn:
|
|
639
|
+
fn: W((e) => [F(t.$slots, "item", w(_(e)), void 0, !0)]),
|
|
640
640
|
key: "1"
|
|
641
641
|
} : void 0]), 1032, [
|
|
642
642
|
"class",
|
|
@@ -725,7 +725,7 @@ var Qt = /* @__PURE__ */ h({
|
|
|
725
725
|
label: "Plan mode",
|
|
726
726
|
accessory: "switch",
|
|
727
727
|
checked: n.planMode,
|
|
728
|
-
icon:
|
|
728
|
+
icon: Ce
|
|
729
729
|
}), e.push(...n.items), n.attachEnabled && (e.length > 0 && e.at(-1)?.type !== "separator" && e.push({
|
|
730
730
|
id: "group-attach",
|
|
731
731
|
type: "separator"
|
|
@@ -733,11 +733,11 @@ var Qt = /* @__PURE__ */ h({
|
|
|
733
733
|
id: "attach",
|
|
734
734
|
type: "action",
|
|
735
735
|
label: "Add Files & Photos",
|
|
736
|
-
icon:
|
|
736
|
+
icon: Oe
|
|
737
737
|
})), e;
|
|
738
738
|
});
|
|
739
739
|
function l(e) {
|
|
740
|
-
return e === "ask-for-approval" ?
|
|
740
|
+
return e === "ask-for-approval" ? xe : e === "approve-for-me" ? Re : Ie;
|
|
741
741
|
}
|
|
742
742
|
function f(e) {
|
|
743
743
|
let t = e.payload;
|
|
@@ -772,7 +772,7 @@ var Qt = /* @__PURE__ */ h({
|
|
|
772
772
|
items: a.value,
|
|
773
773
|
onSelect: f
|
|
774
774
|
}, d({
|
|
775
|
-
trigger:
|
|
775
|
+
trigger: W(({ open: t, toggle: n }) => [u("button", {
|
|
776
776
|
class: "chat-composer-action-menu__button",
|
|
777
777
|
type: "button",
|
|
778
778
|
"aria-label": "Composer actions",
|
|
@@ -780,15 +780,15 @@ var Qt = /* @__PURE__ */ h({
|
|
|
780
780
|
"aria-expanded": t,
|
|
781
781
|
disabled: e.disabled,
|
|
782
782
|
onClick: n
|
|
783
|
-
}, [m(
|
|
783
|
+
}, [m(B(Me))], 8, tn)]),
|
|
784
784
|
_: 2
|
|
785
785
|
}, [t.$slots.icon ? {
|
|
786
786
|
name: "icon",
|
|
787
|
-
fn:
|
|
787
|
+
fn: W((e) => [F(t.$slots, "icon", w(_(e)), void 0, !0)]),
|
|
788
788
|
key: "0"
|
|
789
789
|
} : void 0, t.$slots.item ? {
|
|
790
790
|
name: "item",
|
|
791
|
-
fn:
|
|
791
|
+
fn: W((e) => [F(t.$slots, "item", w(_(e)), void 0, !0)]),
|
|
792
792
|
key: "1"
|
|
793
793
|
} : void 0]), 1032, ["disabled", "items"])) : c("", !0);
|
|
794
794
|
}
|
|
@@ -816,7 +816,7 @@ var Qt = /* @__PURE__ */ h({
|
|
|
816
816
|
"aria-label": e.label,
|
|
817
817
|
title: e.title,
|
|
818
818
|
onClick: r[0] ||= (e) => n("toggle")
|
|
819
|
-
}, [m(
|
|
819
|
+
}, [m(B(De), { "aria-hidden": "true" })], 10, rn));
|
|
820
820
|
}
|
|
821
821
|
}), [["__scopeId", "data-v-77a2a099"]]), on = { class: "codex-chat-theme chat-composer__audio-field" }, sn = { class: "chat-composer__audio-text" }, cn = { class: "chat-composer__audio-partial" }, ln = {
|
|
822
822
|
key: 0,
|
|
@@ -840,15 +840,15 @@ var Qt = /* @__PURE__ */ h({
|
|
|
840
840
|
setup(e) {
|
|
841
841
|
let t = e, n = o(() => t.before || t.after || t.transcript?.finalText || t.transcript?.partialText);
|
|
842
842
|
return (t, r) => (k(), l("div", on, [u("div", sn, [
|
|
843
|
-
p(
|
|
844
|
-
u("span", null,
|
|
845
|
-
u("span", cn,
|
|
846
|
-
p(
|
|
843
|
+
p(R(e.before), 1),
|
|
844
|
+
u("span", null, R(e.transcript?.finalText), 1),
|
|
845
|
+
u("span", cn, R(e.transcript?.partialText), 1),
|
|
846
|
+
p(R(e.after), 1),
|
|
847
847
|
e.recording ? (k(), l("span", ln, [u("span", {
|
|
848
848
|
class: "chat-composer__listening-dot",
|
|
849
849
|
style: T({ "--audio-level": e.audioLevel ?? 0 }),
|
|
850
850
|
"aria-hidden": "true"
|
|
851
|
-
}, null, 4)])) : n.value ? c("", !0) : (k(), l("span", un,
|
|
851
|
+
}, null, 4)])) : n.value ? c("", !0) : (k(), l("span", un, R(e.starting ? "Starting microphone..." : "Transcribing..."), 1))
|
|
852
852
|
])]));
|
|
853
853
|
}
|
|
854
854
|
}), [["__scopeId", "data-v-f93d37c1"]]);
|
|
@@ -1180,12 +1180,19 @@ var Vn = Symbol("codex-app-sdk-chat-translate"), Hn = {
|
|
|
1180
1180
|
"chat.files.title": "Files",
|
|
1181
1181
|
"chat.message.emptyResponse": "Empty response",
|
|
1182
1182
|
"chat.work.doneHideDetails": "Done · Hide details",
|
|
1183
|
+
"chat.work.doneHideDetailsFor": "Done · {duration} · Hide details",
|
|
1183
1184
|
"chat.work.doneViewDetails": "Done · View details",
|
|
1185
|
+
"chat.work.doneViewDetailsFor": "Done · {duration} · View details",
|
|
1184
1186
|
"chat.work.failedHideDetails": "Failed · Hide details",
|
|
1187
|
+
"chat.work.failedHideDetailsFor": "Failed · {duration} · Hide details",
|
|
1185
1188
|
"chat.work.failedViewDetails": "Failed · View details",
|
|
1189
|
+
"chat.work.failedViewDetailsFor": "Failed · {duration} · View details",
|
|
1186
1190
|
"chat.work.stoppedHideDetails": "Stopped · Hide details",
|
|
1191
|
+
"chat.work.stoppedHideDetailsFor": "Stopped · {duration} · Hide details",
|
|
1187
1192
|
"chat.work.stoppedViewDetails": "Stopped · View details",
|
|
1193
|
+
"chat.work.stoppedViewDetailsFor": "Stopped · {duration} · View details",
|
|
1188
1194
|
"chat.work.working": "Working",
|
|
1195
|
+
"chat.work.workingFor": "Working · {duration}",
|
|
1189
1196
|
"chat.skills.empty": "No matching skills",
|
|
1190
1197
|
"chat.skills.title": "Skills"
|
|
1191
1198
|
};
|
|
@@ -1228,15 +1235,15 @@ var Kn = ["aria-label"], qn = {
|
|
|
1228
1235
|
key: 0,
|
|
1229
1236
|
class: "codex-chat-theme chat-context-usage",
|
|
1230
1237
|
style: T({ "--chat-context-usage-percent": `${r.value}%` }),
|
|
1231
|
-
"aria-label":
|
|
1238
|
+
"aria-label": B(n)("chat.contextUsage.ariaLabel"),
|
|
1232
1239
|
tabindex: "0"
|
|
1233
1240
|
}, [t[0] ||= u("span", { class: "chat-context-usage__dot" }, null, -1), u("span", qn, [
|
|
1234
|
-
u("span", Jn,
|
|
1235
|
-
u("strong", null,
|
|
1241
|
+
u("span", Jn, R(B(n)("chat.contextUsage.title")), 1),
|
|
1242
|
+
u("strong", null, R(B(n)("chat.contextUsage.usedAndLeft", {
|
|
1236
1243
|
used: r.value,
|
|
1237
1244
|
left: i.value.leftPercent
|
|
1238
1245
|
})), 1),
|
|
1239
|
-
u("span", null,
|
|
1246
|
+
u("span", null, R(B(n)("chat.contextUsage.tokensUsed", {
|
|
1240
1247
|
used: i.value.usedTokens,
|
|
1241
1248
|
window: i.value.windowTokens
|
|
1242
1249
|
})), 1)
|
|
@@ -1426,12 +1433,12 @@ var Kn = ["aria-label"], qn = {
|
|
|
1426
1433
|
title: y.value,
|
|
1427
1434
|
disabled: ""
|
|
1428
1435
|
}, [
|
|
1429
|
-
m(
|
|
1436
|
+
m(B(se), {
|
|
1430
1437
|
class: "chat-model-selector__compact-icon",
|
|
1431
1438
|
"aria-hidden": "true"
|
|
1432
1439
|
}),
|
|
1433
|
-
u("span", Qn,
|
|
1434
|
-
m(
|
|
1440
|
+
u("span", Qn, R(y.value), 1),
|
|
1441
|
+
m(B(ue), {
|
|
1435
1442
|
class: "chat-model-selector__chevron",
|
|
1436
1443
|
"aria-hidden": "true"
|
|
1437
1444
|
})
|
|
@@ -1444,7 +1451,7 @@ var Kn = ["aria-label"], qn = {
|
|
|
1444
1451
|
"menu-class": "chat-model-selector__menu",
|
|
1445
1452
|
onSelect: w
|
|
1446
1453
|
}, {
|
|
1447
|
-
trigger:
|
|
1454
|
+
trigger: W(({ open: e, toggle: t }) => [u("button", {
|
|
1448
1455
|
class: "chat-model-selector__button",
|
|
1449
1456
|
type: "button",
|
|
1450
1457
|
"aria-label": "Model and reasoning",
|
|
@@ -1454,17 +1461,17 @@ var Kn = ["aria-label"], qn = {
|
|
|
1454
1461
|
disabled: _.value,
|
|
1455
1462
|
onClick: t
|
|
1456
1463
|
}, [
|
|
1457
|
-
m(
|
|
1464
|
+
m(B(se), {
|
|
1458
1465
|
class: "chat-model-selector__compact-icon",
|
|
1459
1466
|
"aria-hidden": "true"
|
|
1460
1467
|
}),
|
|
1461
|
-
i.value && g.value && n.serviceTier === g.value.id ? (k(), s(
|
|
1468
|
+
i.value && g.value && n.serviceTier === g.value.id ? (k(), s(B(q), {
|
|
1462
1469
|
key: 0,
|
|
1463
1470
|
class: "chat-model-selector__leading-icon",
|
|
1464
1471
|
"aria-hidden": "true"
|
|
1465
1472
|
})) : c("", !0),
|
|
1466
|
-
u("span", er,
|
|
1467
|
-
m(
|
|
1473
|
+
u("span", er, R(y.value), 1),
|
|
1474
|
+
m(B(ue), {
|
|
1468
1475
|
class: "chat-model-selector__chevron",
|
|
1469
1476
|
"aria-hidden": "true"
|
|
1470
1477
|
})
|
|
@@ -1570,54 +1577,54 @@ var dr = {
|
|
|
1570
1577
|
return -1;
|
|
1571
1578
|
}
|
|
1572
1579
|
return (n, o) => (k(), l("div", dr, [
|
|
1573
|
-
(k(!0), l(t, null, P(r.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", fr,
|
|
1580
|
+
(k(!0), l(t, null, P(r.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", fr, R(r.label), 1), (k(!0), l(t, null, P(r.items, (t) => (k(), l("button", {
|
|
1574
1581
|
key: `custom:${r.id}:${t.id}`,
|
|
1575
1582
|
class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": s(r.id, t.id) === e.activeIndex }]),
|
|
1576
1583
|
role: "option",
|
|
1577
1584
|
type: "button",
|
|
1578
|
-
onMousedown:
|
|
1585
|
+
onMousedown: K((e) => n.$emit("select-mention", t, r), ["prevent"])
|
|
1579
1586
|
}, [F(n.$slots, "mention", {
|
|
1580
1587
|
group: r,
|
|
1581
1588
|
item: t,
|
|
1582
1589
|
active: s(r.id, t.id) === e.activeIndex
|
|
1583
|
-
}, () => [m(
|
|
1590
|
+
}, () => [m(B(Le), {
|
|
1584
1591
|
class: "chat-composer-at-menu__icon",
|
|
1585
1592
|
"aria-hidden": "true"
|
|
1586
|
-
}), u("span", null, [u("strong", null,
|
|
1593
|
+
}), u("span", null, [u("strong", null, R(t.label), 1), t.description ? (k(), l("small", mr, R(t.description), 1)) : c("", !0)])], !0)], 42, pr))), 128))], 64))), 128)),
|
|
1587
1594
|
e.visiblePlugins.length ? (k(), l(t, { key: 0 }, [o[0] ||= u("div", { class: "chat-composer-at-menu__section" }, "Plugins", -1), (k(!0), l(t, null, P(e.visiblePlugins, (t, r) => (k(), l("button", {
|
|
1588
1595
|
key: `plugin:${t.id}`,
|
|
1589
1596
|
class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": a.value + r === e.activeIndex }]),
|
|
1590
1597
|
role: "option",
|
|
1591
1598
|
type: "button",
|
|
1592
|
-
onMousedown:
|
|
1593
|
-
}, [m(
|
|
1599
|
+
onMousedown: K((e) => n.$emit("select-plugin", t), ["prevent"])
|
|
1600
|
+
}, [m(B(je), {
|
|
1594
1601
|
class: "chat-composer-at-menu__icon",
|
|
1595
1602
|
"aria-hidden": "true"
|
|
1596
|
-
}), u("span", null, [u("strong", null,
|
|
1603
|
+
}), u("span", null, [u("strong", null, R(B(sr)(t)), 1), u("small", null, R(B(cr)(t)), 1)])], 42, hr))), 128))], 64)) : c("", !0),
|
|
1597
1604
|
e.visibleFiles.length ? (k(), l(t, { key: 1 }, [o[1] ||= u("div", { class: "chat-composer-at-menu__section" }, "Files", -1), (k(!0), l(t, null, P(e.visibleFiles, (t, r) => (k(), l("button", {
|
|
1598
1605
|
key: `file:${t.path}`,
|
|
1599
1606
|
class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": a.value + e.visiblePlugins.length + r === e.activeIndex }]),
|
|
1600
1607
|
role: "option",
|
|
1601
1608
|
type: "button",
|
|
1602
|
-
onMousedown:
|
|
1603
|
-
}, [m(
|
|
1609
|
+
onMousedown: K((e) => n.$emit("select-file", t), ["prevent"])
|
|
1610
|
+
}, [m(B(ye), {
|
|
1604
1611
|
class: "chat-composer-at-menu__icon",
|
|
1605
1612
|
"aria-hidden": "true"
|
|
1606
|
-
}), u("span", null, [u("strong", null,
|
|
1607
|
-
(k(!0), l(t, null, P(i.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", _r,
|
|
1613
|
+
}), u("span", null, [u("strong", null, R(t.name), 1), u("small", null, R(t.path), 1)])], 42, gr))), 128))], 64)) : c("", !0),
|
|
1614
|
+
(k(!0), l(t, null, P(i.value, (r) => (k(), l(t, { key: `custom:${r.id}` }, [u("div", _r, R(r.label), 1), (k(!0), l(t, null, P(r.items, (t) => (k(), l("button", {
|
|
1608
1615
|
key: `custom:${r.id}:${t.id}`,
|
|
1609
1616
|
class: C(["chat-composer-at-menu__item", { "chat-composer-at-menu__item--active": s(r.id, t.id) === e.activeIndex }]),
|
|
1610
1617
|
role: "option",
|
|
1611
1618
|
type: "button",
|
|
1612
|
-
onMousedown:
|
|
1619
|
+
onMousedown: K((e) => n.$emit("select-mention", t, r), ["prevent"])
|
|
1613
1620
|
}, [F(n.$slots, "mention", {
|
|
1614
1621
|
group: r,
|
|
1615
1622
|
item: t,
|
|
1616
1623
|
active: s(r.id, t.id) === e.activeIndex
|
|
1617
|
-
}, () => [m(
|
|
1624
|
+
}, () => [m(B(Le), {
|
|
1618
1625
|
class: "chat-composer-at-menu__icon",
|
|
1619
1626
|
"aria-hidden": "true"
|
|
1620
|
-
}), u("span", null, [u("strong", null,
|
|
1627
|
+
}), u("span", null, [u("strong", null, R(t.label), 1), t.description ? (k(), l("small", yr, R(t.description), 1)) : c("", !0)])], !0)], 42, vr))), 128))], 64))), 128)),
|
|
1621
1628
|
e.showFileHint && !e.visibleFiles.length ? (k(), l("div", br, "Type to search files")) : c("", !0)
|
|
1622
1629
|
]));
|
|
1623
1630
|
}
|
|
@@ -1695,7 +1702,7 @@ var kr = { class: "chat-composer-skill-menu__section" }, Ar = ["onMousedown"], j
|
|
|
1695
1702
|
emits: ["select"],
|
|
1696
1703
|
setup(e) {
|
|
1697
1704
|
let n = e, r = Wn(), i = M(null);
|
|
1698
|
-
return
|
|
1705
|
+
return U(() => [n.activeIndex, n.visibleSkills], async () => {
|
|
1699
1706
|
await S();
|
|
1700
1707
|
let e = i.value?.querySelectorAll(".chat-composer-skill-menu__item").item(n.activeIndex);
|
|
1701
1708
|
typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
|
|
@@ -1706,15 +1713,15 @@ var kr = { class: "chat-composer-skill-menu__section" }, Ar = ["onMousedown"], j
|
|
|
1706
1713
|
role: "listbox",
|
|
1707
1714
|
"aria-label": "Skills"
|
|
1708
1715
|
}, [
|
|
1709
|
-
u("div", kr,
|
|
1716
|
+
u("div", kr, R(B(r)("chat.skills.title")), 1),
|
|
1710
1717
|
(k(!0), l(t, null, P(e.visibleSkills, (t, r) => (k(), l("button", {
|
|
1711
1718
|
key: t.path,
|
|
1712
1719
|
class: C(["chat-composer-skill-menu__item", { "chat-composer-skill-menu__item--active": r === e.activeIndex }]),
|
|
1713
1720
|
role: "option",
|
|
1714
1721
|
type: "button",
|
|
1715
|
-
onMousedown:
|
|
1716
|
-
}, [u("span", jr, [m(
|
|
1717
|
-
e.visibleSkills.length === 0 ? (k(), l("div", Fr,
|
|
1722
|
+
onMousedown: K((e) => n.$emit("select", t), ["prevent"])
|
|
1723
|
+
}, [u("span", jr, [m(B(Le))]), u("span", Mr, [u("span", Nr, R(B(wr)(t, e.plugins ?? [])), 1), u("span", Pr, R(B(Tr)(t)), 1)])], 42, Ar))), 128)),
|
|
1724
|
+
e.visibleSkills.length === 0 ? (k(), l("div", Fr, R(B(r)("chat.skills.empty")), 1)) : c("", !0)
|
|
1718
1725
|
], 512));
|
|
1719
1726
|
}
|
|
1720
1727
|
}), [["__scopeId", "data-v-03636565"]]);
|
|
@@ -1762,7 +1769,7 @@ var Br = { class: "chat-composer-slash-menu__section" }, Vr = ["onMousedown"], H
|
|
|
1762
1769
|
emits: ["selectCommand", "selectSkill"],
|
|
1763
1770
|
setup(e) {
|
|
1764
1771
|
let n = e, r = Wn(), i = M(null);
|
|
1765
|
-
return
|
|
1772
|
+
return U(() => [
|
|
1766
1773
|
n.activeIndex,
|
|
1767
1774
|
n.visibleCommands,
|
|
1768
1775
|
n.visibleSkills
|
|
@@ -1776,19 +1783,19 @@ var Br = { class: "chat-composer-slash-menu__section" }, Vr = ["onMousedown"], H
|
|
|
1776
1783
|
class: "codex-chat-theme chat-composer-slash-menu",
|
|
1777
1784
|
role: "listbox",
|
|
1778
1785
|
"aria-label": "Commands and skills"
|
|
1779
|
-
}, [e.visibleCommands.length > 0 ? (k(), l(t, { key: 0 }, [u("div", Br,
|
|
1786
|
+
}, [e.visibleCommands.length > 0 ? (k(), l(t, { key: 0 }, [u("div", Br, R(B(r)("chat.commands.title")), 1), (k(!0), l(t, null, P(e.visibleCommands, (t, r) => (k(), l("button", {
|
|
1780
1787
|
key: t.id,
|
|
1781
1788
|
class: C(["chat-composer-slash-menu__item", { "chat-composer-slash-menu__item--active": r === e.activeIndex }]),
|
|
1782
1789
|
role: "option",
|
|
1783
1790
|
type: "button",
|
|
1784
|
-
onMousedown:
|
|
1785
|
-
}, [u("span", Hr, [m(
|
|
1791
|
+
onMousedown: K((e) => n.$emit("selectCommand", t), ["prevent"])
|
|
1792
|
+
}, [u("span", Hr, [m(B(We))]), u("span", Ur, [u("span", Wr, R(t.name), 1), u("span", Gr, R(B(zr)(t)), 1)])], 42, Vr))), 128))], 64)) : c("", !0), e.visibleSkills.length > 0 ? (k(), l(t, { key: 1 }, [u("div", Kr, R(B(r)("chat.skills.title")), 1), (k(!0), l(t, null, P(e.visibleSkills, (t, r) => (k(), l("button", {
|
|
1786
1793
|
key: t.path,
|
|
1787
1794
|
class: C(["chat-composer-slash-menu__item", { "chat-composer-slash-menu__item--active": e.visibleCommands.length + r === e.activeIndex }]),
|
|
1788
1795
|
role: "option",
|
|
1789
1796
|
type: "button",
|
|
1790
|
-
onMousedown:
|
|
1791
|
-
}, [u("span", Jr, [m(
|
|
1797
|
+
onMousedown: K((e) => n.$emit("selectSkill", t), ["prevent"])
|
|
1798
|
+
}, [u("span", Jr, [m(B(Le))]), u("span", Yr, [u("span", Xr, R(t.name), 1), u("span", Zr, R(B(Tr)(t)), 1)])], 42, qr))), 128))], 64)) : c("", !0)], 512));
|
|
1792
1799
|
}
|
|
1793
1800
|
}), [["__scopeId", "data-v-7ac08005"]]), $r = { class: "chat-mention-chip" }, ei = ["src"], ti = { class: "chat-mention-chip__label" }, ni = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
1794
1801
|
__name: "ChatMentionChip",
|
|
@@ -1803,19 +1810,19 @@ var Br = { class: "chat-composer-slash-menu__section" }, Vr = ["onMousedown"], H
|
|
|
1803
1810
|
class: "chat-mention-chip__icon",
|
|
1804
1811
|
src: e.iconUrl,
|
|
1805
1812
|
alt: ""
|
|
1806
|
-
}, null, 8, ei)) : e.kind === "file" ? (k(), s(
|
|
1813
|
+
}, null, 8, ei)) : e.kind === "file" ? (k(), s(B(ye), {
|
|
1807
1814
|
key: 1,
|
|
1808
1815
|
class: "chat-mention-chip__icon",
|
|
1809
1816
|
"aria-hidden": "true"
|
|
1810
|
-
})) : e.kind === "skill" ? (k(), s(
|
|
1817
|
+
})) : e.kind === "skill" ? (k(), s(B(Le), {
|
|
1811
1818
|
key: 2,
|
|
1812
1819
|
class: "chat-mention-chip__icon",
|
|
1813
1820
|
"aria-hidden": "true"
|
|
1814
|
-
})) : (k(), s(
|
|
1821
|
+
})) : (k(), s(B(je), {
|
|
1815
1822
|
key: 3,
|
|
1816
1823
|
class: "chat-mention-chip__icon",
|
|
1817
1824
|
"aria-hidden": "true"
|
|
1818
|
-
})), u("span", ti,
|
|
1825
|
+
})), u("span", ti, R(e.name), 1)]));
|
|
1819
1826
|
}
|
|
1820
1827
|
}), [["__scopeId", "data-v-77c8c796"]]);
|
|
1821
1828
|
//#endregion
|
|
@@ -1872,8 +1879,8 @@ var ai = [
|
|
|
1872
1879
|
"update:modelValue"
|
|
1873
1880
|
],
|
|
1874
1881
|
setup(e, { expose: n, emit: r }) {
|
|
1875
|
-
let i = e, a =
|
|
1876
|
-
|
|
1882
|
+
let i = e, a = V(), o = r, s = M(null), c = M(0), u = M(0), d = /(`[^`]+`)|(^|[^\w.%+-])([@$/])([^\s@$]+)/g;
|
|
1883
|
+
U(() => [
|
|
1877
1884
|
i.files,
|
|
1878
1885
|
i.mentionGroups,
|
|
1879
1886
|
i.plugins,
|
|
@@ -1883,12 +1890,12 @@ var ai = [
|
|
|
1883
1890
|
}, {
|
|
1884
1891
|
deep: !0,
|
|
1885
1892
|
flush: "sync"
|
|
1886
|
-
}),
|
|
1893
|
+
}), U(() => [i.modelValue, u.value], ([e, t], n) => {
|
|
1887
1894
|
!s.value || t === n[1] && _() === e || F(e, Math.min(c.value, e.length));
|
|
1888
1895
|
}), D(() => {
|
|
1889
1896
|
F(i.modelValue, i.modelValue.length, { focus: !1 }), document.addEventListener("selectionchange", f);
|
|
1890
1897
|
}), E(() => {
|
|
1891
|
-
document.removeEventListener("selectionchange", f),
|
|
1898
|
+
document.removeEventListener("selectionchange", f), ie();
|
|
1892
1899
|
});
|
|
1893
1900
|
function f() {
|
|
1894
1901
|
let e = x();
|
|
@@ -2050,7 +2057,7 @@ var ai = [
|
|
|
2050
2057
|
if (typeof document.execCommand == "function") {
|
|
2051
2058
|
ee(t.start, t.end);
|
|
2052
2059
|
let n = document.createElement("span");
|
|
2053
|
-
if (
|
|
2060
|
+
if (te(n, e), e.endsWith("\n") && t.end === _().length) {
|
|
2054
2061
|
let e = document.createElement("br");
|
|
2055
2062
|
e.dataset.trailingLineBreak = "", n.append(e);
|
|
2056
2063
|
}
|
|
@@ -2071,43 +2078,43 @@ var ai = [
|
|
|
2071
2078
|
let i = n.focus ?? document.activeElement === r, a = document.createDocumentFragment(), o = 0, l;
|
|
2072
2079
|
for (d.lastIndex = 0; (l = d.exec(e)) !== null;) {
|
|
2073
2080
|
if (l[1]) continue;
|
|
2074
|
-
let t = l[2], n = l[3], r = l[4], i = l.index + t.length, s = i + r.length + 1, c = n === "$" ?
|
|
2081
|
+
let t = l[2], n = l[3], r = l[4], i = l.index + t.length, s = i + r.length + 1, c = n === "$" ? R(r) : n === "@" ? ne(r) : void 0;
|
|
2075
2082
|
if (c) {
|
|
2076
|
-
if (
|
|
2083
|
+
if (te(a, e.slice(o, i)), n === "$") a.append(re(r, c));
|
|
2077
2084
|
else {
|
|
2078
2085
|
let e = c;
|
|
2079
|
-
a.append(e.kind === "plugin" ?
|
|
2086
|
+
a.append(e.kind === "plugin" ? B(r, e.value) : e.kind === "file" ? H(r, e.value) : W(r, e.group, e.item));
|
|
2080
2087
|
}
|
|
2081
2088
|
o = s;
|
|
2082
2089
|
}
|
|
2083
2090
|
}
|
|
2084
|
-
if (
|
|
2091
|
+
if (te(a, e.slice(o)), e.endsWith("\n")) {
|
|
2085
2092
|
let e = document.createElement("br");
|
|
2086
2093
|
e.dataset.trailingLineBreak = "", a.append(e);
|
|
2087
2094
|
}
|
|
2088
|
-
|
|
2095
|
+
ie(), r.replaceChildren(a), O(Math.min(t, e.length), { focus: i }), h(), g(r);
|
|
2089
2096
|
}
|
|
2090
|
-
function
|
|
2097
|
+
function te(e, t) {
|
|
2091
2098
|
let n = t.split("\n");
|
|
2092
2099
|
n.forEach((t, r) => {
|
|
2093
2100
|
t && e.appendChild(document.createTextNode(t)), r < n.length - 1 && e.appendChild(document.createElement("br"));
|
|
2094
2101
|
});
|
|
2095
2102
|
}
|
|
2096
|
-
function
|
|
2103
|
+
function I(e) {
|
|
2097
2104
|
return i.plugins.find((t) => ur(t, e));
|
|
2098
2105
|
}
|
|
2099
|
-
function
|
|
2106
|
+
function ne(e) {
|
|
2100
2107
|
let t = ii(i.mentionGroups.filter((e) => e.placement !== "after"), e);
|
|
2101
2108
|
if (t) return {
|
|
2102
2109
|
kind: "custom",
|
|
2103
2110
|
...t
|
|
2104
2111
|
};
|
|
2105
|
-
let n =
|
|
2112
|
+
let n = I(e);
|
|
2106
2113
|
if (n) return {
|
|
2107
2114
|
kind: "plugin",
|
|
2108
2115
|
value: n
|
|
2109
2116
|
};
|
|
2110
|
-
let r =
|
|
2117
|
+
let r = L(e);
|
|
2111
2118
|
if (r) return {
|
|
2112
2119
|
kind: "file",
|
|
2113
2120
|
value: r
|
|
@@ -2118,31 +2125,31 @@ var ai = [
|
|
|
2118
2125
|
...a
|
|
2119
2126
|
} : void 0;
|
|
2120
2127
|
}
|
|
2121
|
-
function
|
|
2128
|
+
function L(e) {
|
|
2122
2129
|
return i.files.find((t) => t.path === e || t.name === e);
|
|
2123
2130
|
}
|
|
2124
|
-
function
|
|
2131
|
+
function R(e) {
|
|
2125
2132
|
return i.skills.find((t) => Dr(t, e));
|
|
2126
2133
|
}
|
|
2127
|
-
function
|
|
2134
|
+
function z(e, t) {
|
|
2128
2135
|
let n = document.createElement("span");
|
|
2129
2136
|
return n.className = "chat-rich-text-editor__chip-token-host", n.contentEditable = "false", Object.assign(n.dataset, e), n.setAttribute("aria-label", t.name), N(v(ni, t), n), n;
|
|
2130
2137
|
}
|
|
2131
|
-
function
|
|
2132
|
-
return
|
|
2138
|
+
function B(e, t) {
|
|
2139
|
+
return z({ pluginName: e }, {
|
|
2133
2140
|
iconUrl: t.iconUrl,
|
|
2134
2141
|
kind: "plugin",
|
|
2135
2142
|
name: t.displayName || t.name
|
|
2136
2143
|
});
|
|
2137
2144
|
}
|
|
2138
|
-
function
|
|
2139
|
-
return
|
|
2145
|
+
function H(e, t) {
|
|
2146
|
+
return z({ fileMention: e }, {
|
|
2140
2147
|
kind: "file",
|
|
2141
2148
|
name: t.name
|
|
2142
2149
|
});
|
|
2143
2150
|
}
|
|
2144
|
-
function
|
|
2145
|
-
return
|
|
2151
|
+
function re(e, t) {
|
|
2152
|
+
return z({
|
|
2146
2153
|
skillName: e,
|
|
2147
2154
|
skillTrigger: "$"
|
|
2148
2155
|
}, {
|
|
@@ -2151,7 +2158,7 @@ var ai = [
|
|
|
2151
2158
|
name: t.displayName || t.name
|
|
2152
2159
|
});
|
|
2153
2160
|
}
|
|
2154
|
-
function
|
|
2161
|
+
function W(e, n, r) {
|
|
2155
2162
|
let i = document.createElement("span");
|
|
2156
2163
|
return i.className = "chat-rich-text-editor__chip-token-host", i.contentEditable = "false", i.dataset.mentionGroup = n.id, i.dataset.mentionValue = e, i.setAttribute("aria-label", r.label), N(a.mention ? v(t, null, a.mention({
|
|
2157
2164
|
group: n,
|
|
@@ -2162,7 +2169,7 @@ var ai = [
|
|
|
2162
2169
|
name: r.label
|
|
2163
2170
|
}), i), i;
|
|
2164
2171
|
}
|
|
2165
|
-
function
|
|
2172
|
+
function ie() {
|
|
2166
2173
|
if (s.value) for (let e of s.value.querySelectorAll(".chat-rich-text-editor__chip-token-host")) N(null, e);
|
|
2167
2174
|
}
|
|
2168
2175
|
return n({
|
|
@@ -2233,26 +2240,26 @@ function di(e) {
|
|
|
2233
2240
|
let t = M(null), n = M(0), r = M(0), i = M(0), a = M(0), s = M(0), c = null, l = !1, u = o(() => ci(e.prompt.value, e.caretPosition.value)), d = o(() => {
|
|
2234
2241
|
let t = u.value;
|
|
2235
2242
|
return t?.query ? li([...e.files()], t.query, 5) : [];
|
|
2236
|
-
}), f = o(() => u.value !== null && !u.value.query && e.files().length > 0), p = o(() => t.value === "at" && u.value !== null && e.files().length > 0 && !
|
|
2243
|
+
}), f = o(() => u.value !== null && !u.value.query && e.files().length > 0), p = o(() => t.value === "at" && u.value !== null && e.files().length > 0 && !G()), m = o(() => Sr(e.prompt.value, e.caretPosition.value, "$")), h = o(() => si(e.prompt.value, e.caretPosition.value)), g = o(() => Cr([...e.skills()], m.value?.query ?? "", -1, e.plugins?.() ?? [])), _ = o(() => t.value === "skill" && e.skillsEnabled() && m.value !== null && e.skills().length > 0 && !G()), v = o(() => or([...e.plugins?.() ?? []], h.value?.query ?? "")), y = o(() => ri(e.mentionGroups?.() ?? [], u.value?.query ?? "")), b = o(() => y.value.filter((e) => e.placement !== "after").flatMap((e) => e.items.map((t) => ({
|
|
2237
2244
|
group: e,
|
|
2238
2245
|
item: t
|
|
2239
2246
|
})))), x = o(() => y.value.filter((e) => e.placement === "after").flatMap((e) => e.items.map((t) => ({
|
|
2240
2247
|
group: e,
|
|
2241
2248
|
item: t
|
|
2242
|
-
})))), S = o(() => !1), C = o(() => b.value.length + v.value.length + d.value.length + x.value.length), w = o(() => t.value === "at" && u.value !== null && (C.value > 0 || f.value) && !
|
|
2243
|
-
|
|
2249
|
+
})))), S = o(() => !1), C = o(() => b.value.length + v.value.length + d.value.length + x.value.length), w = o(() => t.value === "at" && u.value !== null && (C.value > 0 || f.value) && !G()), T = o(() => Lr(e.prompt.value, e.caretPosition.value)), E = o(() => Rr([...e.commands()], T.value?.query ?? "")), D = o(() => (e.skillsEnabled(), [])), O = o(() => E.value.length + D.value.length), k = o(() => t.value === "slash" && T.value !== null && O.value > 0 && !G());
|
|
2250
|
+
U([g, m], () => {
|
|
2244
2251
|
r.value = 0;
|
|
2245
|
-
}),
|
|
2252
|
+
}), U([v, h], () => {
|
|
2246
2253
|
i.value = 0, a.value = 0;
|
|
2247
|
-
}),
|
|
2254
|
+
}), U(y, () => {
|
|
2248
2255
|
a.value = 0;
|
|
2249
|
-
}),
|
|
2256
|
+
}), U([
|
|
2250
2257
|
E,
|
|
2251
2258
|
D,
|
|
2252
2259
|
T
|
|
2253
2260
|
], () => {
|
|
2254
2261
|
s.value = 0;
|
|
2255
|
-
}),
|
|
2262
|
+
}), U([d, u], () => {
|
|
2256
2263
|
n.value = 0;
|
|
2257
2264
|
});
|
|
2258
2265
|
function ee(e) {
|
|
@@ -2276,89 +2283,89 @@ function di(e) {
|
|
|
2276
2283
|
}) || A(e, _.value, g.value.length, r, () => {
|
|
2277
2284
|
let e = g.value[r.value];
|
|
2278
2285
|
e && N(e);
|
|
2279
|
-
}) ? !0 : k.value && O.value > 0 && e.key === "Tab" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey ? (e.preventDefault(),
|
|
2286
|
+
}) ? !0 : k.value && O.value > 0 && e.key === "Tab" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey ? (e.preventDefault(), L("complete"), !0) : !!A(e, k.value, O.value, s, () => L("execute"));
|
|
2280
2287
|
}
|
|
2281
2288
|
function A(e, t, n, r, i) {
|
|
2282
|
-
return t ? e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), n > 0 && (r.value = (r.value + (e.key === "ArrowDown" ? 1 : -1) + n) % n), !0) : e.key === "Escape" ? (e.preventDefault(), c =
|
|
2289
|
+
return t ? e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), n > 0 && (r.value = (r.value + (e.key === "ArrowDown" ? 1 : -1) + n) % n), !0) : e.key === "Escape" ? (e.preventDefault(), c = ie(), V(), !0) : e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && n > 0 ? (e.preventDefault(), i(), !0) : !1 : !1;
|
|
2283
2290
|
}
|
|
2284
2291
|
function j(t) {
|
|
2285
2292
|
let n = u.value;
|
|
2286
|
-
!n || !e.editor.value ||
|
|
2293
|
+
!n || !e.editor.value || R(`@${t.path} `, n.start, n.end);
|
|
2287
2294
|
}
|
|
2288
2295
|
function N(e) {
|
|
2289
2296
|
let t = m.value;
|
|
2290
|
-
t &&
|
|
2297
|
+
t && R(`$${Er(e)} `, t.start, t.end);
|
|
2291
2298
|
}
|
|
2292
2299
|
function P(e) {
|
|
2293
2300
|
let t = h.value;
|
|
2294
|
-
t &&
|
|
2301
|
+
t && R(`@${e.name || e.id} `, t.start, t.end);
|
|
2295
2302
|
}
|
|
2296
2303
|
function F(t, n) {
|
|
2297
2304
|
let r = u.value;
|
|
2298
2305
|
if (!r) return;
|
|
2299
|
-
|
|
2306
|
+
R(`@${t.value} `, r.start, r.end);
|
|
2300
2307
|
let i = e.mentionGroups?.().find((e) => e.id === n.id) ?? n;
|
|
2301
2308
|
e.onMentionSelected?.(t, i);
|
|
2302
2309
|
}
|
|
2303
|
-
function
|
|
2310
|
+
function te(e) {
|
|
2304
2311
|
let t = T.value;
|
|
2305
|
-
t &&
|
|
2312
|
+
t && R(`/${Er(e)} `, t.start, t.end);
|
|
2306
2313
|
}
|
|
2307
|
-
function
|
|
2308
|
-
|
|
2314
|
+
function I(e) {
|
|
2315
|
+
ne(e, "default");
|
|
2309
2316
|
}
|
|
2310
|
-
function
|
|
2317
|
+
function ne(t, n) {
|
|
2311
2318
|
let r = T.value;
|
|
2312
2319
|
if (!r || !e.editor.value) return;
|
|
2313
2320
|
let i = `/${t.slashName ?? t.name}`;
|
|
2314
2321
|
if (t.composerMode) {
|
|
2315
|
-
e.prompt.value = `${e.prompt.value.slice(0, r.start)}${e.prompt.value.slice(r.end)}`, e.caretPosition.value = r.start,
|
|
2322
|
+
e.prompt.value = `${e.prompt.value.slice(0, r.start)}${e.prompt.value.slice(r.end)}`, e.caretPosition.value = r.start, V(), e.onCommandActivated?.(t), e.onTextInserted(r.start);
|
|
2316
2323
|
return;
|
|
2317
2324
|
}
|
|
2318
2325
|
if (n === "execute" || n === "default" && t.submitOnSelect) {
|
|
2319
|
-
e.prompt.value = "", e.caretPosition.value = 0,
|
|
2326
|
+
e.prompt.value = "", e.caretPosition.value = 0, V(), e.onCommandSubmitted(i);
|
|
2320
2327
|
return;
|
|
2321
2328
|
}
|
|
2322
|
-
|
|
2329
|
+
R(`${i} `, r.start, r.end);
|
|
2323
2330
|
}
|
|
2324
|
-
function
|
|
2331
|
+
function L(e) {
|
|
2325
2332
|
let t = E.value[s.value];
|
|
2326
2333
|
if (t) {
|
|
2327
|
-
|
|
2334
|
+
ne(t, e);
|
|
2328
2335
|
return;
|
|
2329
2336
|
}
|
|
2330
2337
|
let n = D.value[s.value - E.value.length];
|
|
2331
|
-
n &&
|
|
2338
|
+
n && te(n);
|
|
2332
2339
|
}
|
|
2333
|
-
function
|
|
2340
|
+
function R(t, n, r) {
|
|
2334
2341
|
e.prompt.value = `${e.prompt.value.slice(0, n)}${t}${e.prompt.value.slice(r)}`;
|
|
2335
2342
|
let i = n + t.length;
|
|
2336
|
-
e.caretPosition.value = i,
|
|
2343
|
+
e.caretPosition.value = i, V(), e.onTextInserted(i);
|
|
2337
2344
|
}
|
|
2338
|
-
function
|
|
2339
|
-
e.caretPosition.value = t?.end ?? e.editor.value?.getSelectionRange().end ?? e.prompt.value.length,
|
|
2345
|
+
function z(t) {
|
|
2346
|
+
e.caretPosition.value = t?.end ?? e.editor.value?.getSelectionRange().end ?? e.prompt.value.length, W();
|
|
2340
2347
|
}
|
|
2341
|
-
function
|
|
2342
|
-
window.setTimeout(
|
|
2348
|
+
function B() {
|
|
2349
|
+
window.setTimeout(V, 120);
|
|
2343
2350
|
}
|
|
2344
|
-
function
|
|
2351
|
+
function V() {
|
|
2345
2352
|
t.value = null;
|
|
2346
2353
|
}
|
|
2347
|
-
function
|
|
2348
|
-
l = !0,
|
|
2354
|
+
function H() {
|
|
2355
|
+
l = !0, V();
|
|
2349
2356
|
}
|
|
2350
|
-
function
|
|
2357
|
+
function re() {
|
|
2351
2358
|
l = !1;
|
|
2352
2359
|
}
|
|
2353
|
-
function
|
|
2360
|
+
function W() {
|
|
2354
2361
|
if (l) {
|
|
2355
|
-
|
|
2362
|
+
V();
|
|
2356
2363
|
return;
|
|
2357
2364
|
}
|
|
2358
|
-
let e =
|
|
2365
|
+
let e = ie();
|
|
2359
2366
|
if (c !== null) {
|
|
2360
2367
|
if (e === c) {
|
|
2361
|
-
|
|
2368
|
+
V();
|
|
2362
2369
|
return;
|
|
2363
2370
|
}
|
|
2364
2371
|
c = null;
|
|
@@ -2375,12 +2382,12 @@ function di(e) {
|
|
|
2375
2382
|
t.value = "slash";
|
|
2376
2383
|
return;
|
|
2377
2384
|
}
|
|
2378
|
-
|
|
2385
|
+
V();
|
|
2379
2386
|
}
|
|
2380
|
-
function
|
|
2387
|
+
function ie() {
|
|
2381
2388
|
return `${e.prompt.value}\u0000${e.caretPosition.value}`;
|
|
2382
2389
|
}
|
|
2383
|
-
function
|
|
2390
|
+
function G() {
|
|
2384
2391
|
return e.disabled() && !e.isSending();
|
|
2385
2392
|
}
|
|
2386
2393
|
return {
|
|
@@ -2390,24 +2397,24 @@ function di(e) {
|
|
|
2390
2397
|
activePluginIndex: i,
|
|
2391
2398
|
activeSlashIndex: s,
|
|
2392
2399
|
atMenuVisible: w,
|
|
2393
|
-
close:
|
|
2394
|
-
closeSoon:
|
|
2395
|
-
resume:
|
|
2400
|
+
close: V,
|
|
2401
|
+
closeSoon: B,
|
|
2402
|
+
resume: re,
|
|
2396
2403
|
fileMenuShowsHint: f,
|
|
2397
2404
|
fileMenuVisible: p,
|
|
2398
2405
|
handleKeydown: ee,
|
|
2399
|
-
selectCommand:
|
|
2406
|
+
selectCommand: I,
|
|
2400
2407
|
selectFile: j,
|
|
2401
2408
|
selectSkill: N,
|
|
2402
2409
|
selectPlugin: P,
|
|
2403
2410
|
selectMention: F,
|
|
2404
|
-
selectSlashSkill:
|
|
2411
|
+
selectSlashSkill: te,
|
|
2405
2412
|
skillMenuVisible: _,
|
|
2406
2413
|
pluginMenuVisible: S,
|
|
2407
2414
|
slashMenuVisible: k,
|
|
2408
|
-
suspend:
|
|
2409
|
-
sync:
|
|
2410
|
-
updateCaretPosition:
|
|
2415
|
+
suspend: H,
|
|
2416
|
+
sync: W,
|
|
2417
|
+
updateCaretPosition: z,
|
|
2411
2418
|
visibleFiles: d,
|
|
2412
2419
|
visibleSkills: g,
|
|
2413
2420
|
visiblePlugins: v,
|
|
@@ -2822,42 +2829,42 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
2822
2829
|
let r = e, i = n, a = Ti(), f = M(""), p = M(null), h = M(!1), g = M(null), v = M(0), y = M(0), b = M(0), { exit: T, recall: E, remember: O, seed: ee } = At({
|
|
2823
2830
|
apply: mt,
|
|
2824
2831
|
currentPrompt: () => f.value
|
|
2825
|
-
}), A = !1, j = null, N = 0, P = o(() => r.capabilities ?? Ot),
|
|
2832
|
+
}), A = !1, j = null, N = 0, P = o(() => r.capabilities ?? Ot), te = o(() => Dt(r.presentation)), I = o(() => (r.commands ?? kt).find((e) => e.id === p.value) ?? null), ne = o(() => (r.commands ?? kt).find((e) => e.id === "codex.goal" && e.composerMode) ?? null), L = o(() => !!(ne.value && p.value === ne.value.id)), R = o(() => !!(P.value.planMode && r.planMode && !L.value)), z = o(() => I.value?.composerMode?.placeholder ?? r.placeholder ?? "Ask Codex…"), V = o(() => te.value.composer.voice && !!(r.transcribeAudio || a?.capabilities.transcription)), H = o(() => !!f.value.trim()), re = o(() => r.emptySendPrompt?.trim() ?? ""), ie = o(() => !!((I.value ? H.value : H.value || r.hasAttachments || r.hasExternalContent) && !r.disabled)), ae = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), oe = o(() => !!(re.value && !r.isSending && !r.disabled && !H.value && !r.hasAttachments && !r.hasExternalContent && !I.value && !ae.value)), q = null, se = o(() => !!(r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !_e.value && !ye.value)), ce = o(() => se.value), le = o(() => r.followUpBehavior === "steer" && P.value.steerPrompt), ue = o(() => r.interruptArmed ? !1 : ve.value || ye.value ? !0 : _e.value && !r.disabled ? !1 : !ie.value && !se.value && !ae.value), de = o(() => ae.value ? "Continue" : oe.value ? "Send default prompt" : r.isSending ? le.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), fe = o(() => {
|
|
2826
2833
|
if (r.interruptArmed) return "Press Escape again or click to stop generation";
|
|
2827
|
-
if (
|
|
2828
|
-
let e = `${
|
|
2829
|
-
return !r.isSending || !P.value.steerPrompt ? e : `${e}. ${
|
|
2830
|
-
}), { buttonDisabled:
|
|
2834
|
+
if (se.value) return "Interrupt";
|
|
2835
|
+
let e = `${de.value} (Enter)`;
|
|
2836
|
+
return !r.isSending || !P.value.steerPrompt ? e : `${e}. ${le.value ? "Queue" : "Steer"} prompt (Cmd/Ctrl+Enter)`;
|
|
2837
|
+
}), { buttonDisabled: pe, buttonLabel: me, buttonTitle: he, error: ge, isRecording: _e, isStarting: ve, isTranscribing: ye, transcript: be, audioLevel: xe, cancel: J, stop: Se, toggle: Ce } = Ni({
|
|
2831
2838
|
isDisabled: () => r.disabled,
|
|
2832
2839
|
isSending: () => r.isSending,
|
|
2833
2840
|
onTranscript: nt,
|
|
2834
2841
|
transcribeAudio: r.transcribeAudio
|
|
2835
|
-
}),
|
|
2842
|
+
}), we = o(() => {
|
|
2836
2843
|
let e = f.value.slice(0, y.value);
|
|
2837
2844
|
return e && !/\s$/.test(e) ? `${e} ` : e;
|
|
2838
|
-
}),
|
|
2845
|
+
}), Te = o(() => {
|
|
2839
2846
|
let e = f.value.slice(b.value);
|
|
2840
2847
|
return e && !/^\s/.test(e) ? ` ${e}` : e;
|
|
2841
2848
|
});
|
|
2842
|
-
|
|
2843
|
-
function
|
|
2844
|
-
!
|
|
2845
|
-
}
|
|
2846
|
-
|
|
2847
|
-
if (e ||
|
|
2848
|
-
let t =
|
|
2849
|
-
|
|
2849
|
+
U(ge, (e) => i("error", e));
|
|
2850
|
+
function Ee(e) {
|
|
2851
|
+
!ve.value && !_e.value && !ye.value || (e.preventDefault(), e.stopPropagation(), J());
|
|
2852
|
+
}
|
|
2853
|
+
U(ye, (e) => {
|
|
2854
|
+
if (e || q === null) return;
|
|
2855
|
+
let t = q;
|
|
2856
|
+
q = null, S(() => {
|
|
2850
2857
|
g.value?.setCaret(t);
|
|
2851
2858
|
});
|
|
2852
2859
|
});
|
|
2853
|
-
let
|
|
2854
|
-
|
|
2855
|
-
if (ee(e ?? []), t ||
|
|
2856
|
-
let n =
|
|
2857
|
-
|
|
2860
|
+
let De = 0;
|
|
2861
|
+
U(() => [r.promptHistory, r.promptHistoryLoading], ([e, t]) => {
|
|
2862
|
+
if (ee(e ?? []), t || De === 0) return;
|
|
2863
|
+
let n = De;
|
|
2864
|
+
De = 0;
|
|
2858
2865
|
for (let e = 0; e < n; e += 1) E("ArrowUp");
|
|
2859
2866
|
}, { immediate: !0 });
|
|
2860
|
-
let { activeAtIndex:
|
|
2867
|
+
let { activeAtIndex: Oe, activeSkillIndex: Y, activeSlashIndex: ke, close: Ae, closeSoon: je, resume: Me, fileMenuShowsHint: Ne, atMenuVisible: Pe, handleKeydown: Fe, selectCommand: Ie, selectFile: Le, selectPlugin: Re, selectMention: ze, selectSkill: Be, selectSlashSkill: Ve, skillMenuVisible: He, slashMenuVisible: Ue, suspend: We, updateCaretPosition: Ge, visibleFiles: Ke, visiblePlugins: qe, visibleMentionGroups: Je, visibleSkills: Ye, visibleSlashCommands: Xe, visibleSlashSkills: Ze } = di({
|
|
2861
2868
|
caretPosition: v,
|
|
2862
2869
|
commands: () => r.commands ?? kt,
|
|
2863
2870
|
disabled: () => r.disabled,
|
|
@@ -2869,7 +2876,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
2869
2876
|
ot(e);
|
|
2870
2877
|
},
|
|
2871
2878
|
onCommandSubmitted: (e) => {
|
|
2872
|
-
e === "/plan" &&
|
|
2879
|
+
e === "/plan" && L.value && at(), O(e), i("send", e);
|
|
2873
2880
|
},
|
|
2874
2881
|
onTextInserted: vt,
|
|
2875
2882
|
onMentionSelected: (e, t) => i("mentionSelect", e, t),
|
|
@@ -2878,27 +2885,27 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
2878
2885
|
skillsEnabled: () => P.value.skills,
|
|
2879
2886
|
editor: g
|
|
2880
2887
|
});
|
|
2881
|
-
|
|
2888
|
+
U(() => r.composerState, (e) => {
|
|
2882
2889
|
e && lt(e);
|
|
2883
2890
|
}, {
|
|
2884
2891
|
deep: !0,
|
|
2885
2892
|
immediate: !0
|
|
2886
|
-
}),
|
|
2893
|
+
}), U(() => r.draftRevision, () => {
|
|
2887
2894
|
r.composerState || rt(r.draft ?? "");
|
|
2888
|
-
}, { immediate: r.draftRevision !== void 0 }),
|
|
2895
|
+
}, { immediate: r.draftRevision !== void 0 }), U(f, () => gt()), D(() => {
|
|
2889
2896
|
r.autofocus && g.value?.focusEnd();
|
|
2890
2897
|
});
|
|
2891
2898
|
function Qe() {
|
|
2892
|
-
if (!(
|
|
2893
|
-
if (
|
|
2899
|
+
if (!(ve.value || _e.value || ye.value)) {
|
|
2900
|
+
if (ae.value) {
|
|
2894
2901
|
i("continueInterruptedTurn");
|
|
2895
2902
|
return;
|
|
2896
2903
|
}
|
|
2897
|
-
if (
|
|
2898
|
-
i("send",
|
|
2904
|
+
if (oe.value) {
|
|
2905
|
+
i("send", re.value);
|
|
2899
2906
|
return;
|
|
2900
2907
|
}
|
|
2901
|
-
r.isSending &&
|
|
2908
|
+
r.isSending && le.value ? et() : tt("send");
|
|
2902
2909
|
}
|
|
2903
2910
|
}
|
|
2904
2911
|
async function $e() {
|
|
@@ -2906,18 +2913,18 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
2906
2913
|
i("interrupt");
|
|
2907
2914
|
return;
|
|
2908
2915
|
}
|
|
2909
|
-
if (
|
|
2910
|
-
await
|
|
2916
|
+
if (_e.value) {
|
|
2917
|
+
await Se() && Qe();
|
|
2911
2918
|
return;
|
|
2912
2919
|
}
|
|
2913
|
-
if (
|
|
2920
|
+
if (se.value) {
|
|
2914
2921
|
i("interrupt");
|
|
2915
2922
|
return;
|
|
2916
2923
|
}
|
|
2917
2924
|
Qe();
|
|
2918
2925
|
}
|
|
2919
2926
|
function et() {
|
|
2920
|
-
if (!(
|
|
2927
|
+
if (!(ve.value || _e.value || ye.value)) {
|
|
2921
2928
|
if (!P.value.steerPrompt) {
|
|
2922
2929
|
tt("send");
|
|
2923
2930
|
return;
|
|
@@ -2931,15 +2938,15 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
2931
2938
|
}
|
|
2932
2939
|
function tt(e) {
|
|
2933
2940
|
let t = f.value.trim();
|
|
2934
|
-
if (!
|
|
2935
|
-
let n =
|
|
2941
|
+
if (!ie.value || e === "steer" && !t && !r.hasAttachments) return;
|
|
2942
|
+
let n = I.value ? `/${I.value.slashName ?? I.value.name}` : null, a = n && t ? `${n} ${t}` : t || (r.hasAttachments ? "(no user instructions)" : ""), o = h.value ? { inputMethod: "dictated" } : void 0;
|
|
2936
2943
|
t && O(a), f.value = "", p.value = null, h.value = !1, y.value = 0, b.value = 0, v.value = 0, Ae(), e === "send" ? o ? i("send", a, o) : i("send", a) : o ? i("steer", a, o) : i("steer", a);
|
|
2937
2944
|
}
|
|
2938
2945
|
async function nt(e) {
|
|
2939
2946
|
let t = e.trim();
|
|
2940
2947
|
if (!t) return;
|
|
2941
2948
|
let n = g.value?.getSelectionRange(), r = n?.start ?? y.value, i = n?.end ?? b.value, a = f.value.slice(0, r), o = f.value.slice(i), s = `${a && !/\s$/.test(a) ? " " : ""}${t}${o && !/^\s/.test(o) ? " " : ""}`, c = a.length + s.length;
|
|
2942
|
-
f.value = `${a}${s}${o}`, h.value = !0, v.value = c, y.value = c, b.value = c,
|
|
2949
|
+
f.value = `${a}${s}${o}`, h.value = !0, v.value = c, y.value = c, b.value = c, q = c, Ae();
|
|
2943
2950
|
}
|
|
2944
2951
|
function rt(e) {
|
|
2945
2952
|
T(), lt({
|
|
@@ -2955,16 +2962,16 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
2955
2962
|
p.value = null, gt();
|
|
2956
2963
|
}
|
|
2957
2964
|
function ot(e) {
|
|
2958
|
-
e.id ===
|
|
2965
|
+
e.id === ne.value?.id && r.planMode && i("update:planMode", !1), p.value = e.id, gt();
|
|
2959
2966
|
}
|
|
2960
2967
|
function st(e) {
|
|
2961
2968
|
if (e) {
|
|
2962
|
-
if (!
|
|
2963
|
-
ot(
|
|
2964
|
-
} else
|
|
2969
|
+
if (!ne.value) return;
|
|
2970
|
+
ot(ne.value);
|
|
2971
|
+
} else L.value && at();
|
|
2965
2972
|
}
|
|
2966
2973
|
function ct(e) {
|
|
2967
|
-
e &&
|
|
2974
|
+
e && L.value && at(), i("update:planMode", e);
|
|
2968
2975
|
}
|
|
2969
2976
|
function lt(e) {
|
|
2970
2977
|
let t = Ii(e);
|
|
@@ -2993,7 +3000,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
2993
3000
|
"Tab",
|
|
2994
3001
|
"ArrowRight",
|
|
2995
3002
|
" "
|
|
2996
|
-
].includes(e.key) && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && !e.isComposing && !r.disabled && !
|
|
3003
|
+
].includes(e.key) && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && !e.isComposing && !r.disabled && !I.value && r.placeholder?.trim() && (g.value?.readText() ?? f.value) === "") {
|
|
2997
3004
|
e.preventDefault(), g.value?.insertTextAtSelection(r.placeholder);
|
|
2998
3005
|
return;
|
|
2999
3006
|
}
|
|
@@ -3003,12 +3010,12 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3003
3010
|
return;
|
|
3004
3011
|
}
|
|
3005
3012
|
if (e.key === "ArrowUp" && r.promptHistoryLoading && f.value === "") {
|
|
3006
|
-
|
|
3013
|
+
De += 1, e.preventDefault();
|
|
3007
3014
|
return;
|
|
3008
3015
|
}
|
|
3009
3016
|
}
|
|
3010
3017
|
if (e.key === "Tab" && e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
|
3011
|
-
e.preventDefault(), P.value.planMode && ct(!
|
|
3018
|
+
e.preventDefault(), P.value.planMode && ct(!R.value);
|
|
3012
3019
|
return;
|
|
3013
3020
|
}
|
|
3014
3021
|
if (e.key === "Enter") {
|
|
@@ -3017,7 +3024,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3017
3024
|
return;
|
|
3018
3025
|
}
|
|
3019
3026
|
if (e.preventDefault(), e.metaKey !== e.ctrlKey && !e.altKey) {
|
|
3020
|
-
r.isSending ?
|
|
3027
|
+
r.isSending ? le.value ? tt("send") : et() : Qe();
|
|
3021
3028
|
return;
|
|
3022
3029
|
}
|
|
3023
3030
|
!e.metaKey && !e.ctrlKey && !e.altKey && Qe();
|
|
@@ -3029,7 +3036,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3029
3036
|
return e?.valid ? e.start === e.end && e.end === f.value.length : y.value === b.value && b.value === f.value.length;
|
|
3030
3037
|
}
|
|
3031
3038
|
function pt() {
|
|
3032
|
-
|
|
3039
|
+
De = 0, T(), Me(), Ge(), yt();
|
|
3033
3040
|
}
|
|
3034
3041
|
function mt(e) {
|
|
3035
3042
|
let t = e.length;
|
|
@@ -3070,23 +3077,23 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3070
3077
|
return t({ focus: bt }), (t, n) => (k(), l("form", {
|
|
3071
3078
|
class: C(["codex-chat-theme chat-composer", { "chat-composer--disabled": e.disabled && !e.isSending }]),
|
|
3072
3079
|
"aria-label": "Prompt composer",
|
|
3073
|
-
onSubmit:
|
|
3074
|
-
onKeydown:
|
|
3080
|
+
onSubmit: K(Qe, ["prevent"]),
|
|
3081
|
+
onKeydown: G(Ee, ["esc"])
|
|
3075
3082
|
}, [
|
|
3076
3083
|
F(t.$slots, "before", {}, void 0, !0),
|
|
3077
|
-
|
|
3084
|
+
B(Pe) ? (k(), s(xr, {
|
|
3078
3085
|
key: 0,
|
|
3079
|
-
"active-index":
|
|
3080
|
-
"show-file-hint":
|
|
3081
|
-
"mention-groups":
|
|
3082
|
-
"visible-files":
|
|
3083
|
-
"visible-plugins":
|
|
3084
|
-
onSelectFile:
|
|
3085
|
-
onSelectPlugin:
|
|
3086
|
-
onSelectMention:
|
|
3086
|
+
"active-index": B(Oe),
|
|
3087
|
+
"show-file-hint": B(Ne),
|
|
3088
|
+
"mention-groups": B(Je),
|
|
3089
|
+
"visible-files": B(Ke),
|
|
3090
|
+
"visible-plugins": B(qe),
|
|
3091
|
+
onSelectFile: B(Le),
|
|
3092
|
+
onSelectPlugin: B(Re),
|
|
3093
|
+
onSelectMention: B(ze)
|
|
3087
3094
|
}, d({ _: 2 }, [t.$slots["suggestion-item"] ? {
|
|
3088
3095
|
name: "mention",
|
|
3089
|
-
fn:
|
|
3096
|
+
fn: W((e) => [F(t.$slots, "suggestion-item", x(e, { surface: "menu" }), void 0, !0)]),
|
|
3090
3097
|
key: "0"
|
|
3091
3098
|
} : void 0]), 1032, [
|
|
3092
3099
|
"active-index",
|
|
@@ -3098,25 +3105,25 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3098
3105
|
"onSelectPlugin",
|
|
3099
3106
|
"onSelectMention"
|
|
3100
3107
|
])) : c("", !0),
|
|
3101
|
-
|
|
3108
|
+
B(He) ? (k(), s(Ir, {
|
|
3102
3109
|
key: 1,
|
|
3103
|
-
"active-index":
|
|
3110
|
+
"active-index": B(Y),
|
|
3104
3111
|
plugins: e.plugins,
|
|
3105
|
-
"visible-skills":
|
|
3106
|
-
onSelect:
|
|
3112
|
+
"visible-skills": B(Ye),
|
|
3113
|
+
onSelect: B(Be)
|
|
3107
3114
|
}, null, 8, [
|
|
3108
3115
|
"active-index",
|
|
3109
3116
|
"plugins",
|
|
3110
3117
|
"visible-skills",
|
|
3111
3118
|
"onSelect"
|
|
3112
3119
|
])) : c("", !0),
|
|
3113
|
-
|
|
3120
|
+
B(Ue) ? (k(), s(Qr, {
|
|
3114
3121
|
key: 2,
|
|
3115
|
-
"active-index":
|
|
3116
|
-
"visible-commands":
|
|
3117
|
-
"visible-skills":
|
|
3118
|
-
onSelectCommand:
|
|
3119
|
-
onSelectSkill:
|
|
3122
|
+
"active-index": B(ke),
|
|
3123
|
+
"visible-commands": B(Xe),
|
|
3124
|
+
"visible-skills": B(Ze),
|
|
3125
|
+
onSelectCommand: B(Ie),
|
|
3126
|
+
onSelectSkill: B(Ve)
|
|
3120
3127
|
}, null, 8, [
|
|
3121
3128
|
"active-index",
|
|
3122
3129
|
"visible-commands",
|
|
@@ -3124,15 +3131,15 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3124
3131
|
"onSelectCommand",
|
|
3125
3132
|
"onSelectSkill"
|
|
3126
3133
|
])) : c("", !0),
|
|
3127
|
-
u("div", Li, [
|
|
3134
|
+
u("div", Li, [V.value && (B(ve) || B(_e) || B(ye)) ? (k(), s(dn, {
|
|
3128
3135
|
key: 0,
|
|
3129
3136
|
class: "chat-composer__input",
|
|
3130
|
-
recording:
|
|
3131
|
-
starting:
|
|
3132
|
-
transcript:
|
|
3133
|
-
"audio-level":
|
|
3134
|
-
before:
|
|
3135
|
-
after:
|
|
3137
|
+
recording: B(_e),
|
|
3138
|
+
starting: B(ve),
|
|
3139
|
+
transcript: B(be),
|
|
3140
|
+
"audio-level": B(xe),
|
|
3141
|
+
before: we.value,
|
|
3142
|
+
after: Te.value
|
|
3136
3143
|
}, null, 8, [
|
|
3137
3144
|
"recording",
|
|
3138
3145
|
"starting",
|
|
@@ -3147,22 +3154,22 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3147
3154
|
modelValue: f.value,
|
|
3148
3155
|
"onUpdate:modelValue": n[0] ||= (e) => f.value = e,
|
|
3149
3156
|
class: "chat-composer__input",
|
|
3150
|
-
placeholder:
|
|
3157
|
+
placeholder: z.value,
|
|
3151
3158
|
disabled: e.disabled && !e.isSending,
|
|
3152
3159
|
files: e.files,
|
|
3153
3160
|
"mention-groups": e.mentionGroups,
|
|
3154
3161
|
plugins: e.plugins,
|
|
3155
3162
|
skills: e.skills,
|
|
3156
|
-
onBlur:
|
|
3157
|
-
onClick:
|
|
3163
|
+
onBlur: B(je),
|
|
3164
|
+
onClick: B(Ge),
|
|
3158
3165
|
onCaretChange: ht,
|
|
3159
3166
|
onInput: pt,
|
|
3160
3167
|
onKeydown: dt,
|
|
3161
|
-
onKeyup:
|
|
3168
|
+
onKeyup: B(Ge),
|
|
3162
3169
|
onPaste: _t
|
|
3163
3170
|
}, d({ _: 2 }, [t.$slots.mention ? {
|
|
3164
3171
|
name: "mention",
|
|
3165
|
-
fn:
|
|
3172
|
+
fn: W((e) => [F(t.$slots, "mention", x(e, { surface: "composer" }), void 0, !0)]),
|
|
3166
3173
|
key: "0"
|
|
3167
3174
|
} : void 0]), 1032, [
|
|
3168
3175
|
"modelValue",
|
|
@@ -3177,7 +3184,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3177
3184
|
"onKeyup"
|
|
3178
3185
|
])), F(t.$slots, "after-input", {}, void 0, !0)]),
|
|
3179
3186
|
u("div", Ri, [u("div", zi, [
|
|
3180
|
-
|
|
3187
|
+
te.value.composer.actionMenu ? (k(), s(nn, {
|
|
3181
3188
|
key: 0,
|
|
3182
3189
|
"attach-enabled": e.attachEnabled,
|
|
3183
3190
|
disabled: e.disabled,
|
|
@@ -3185,10 +3192,10 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3185
3192
|
items: e.menuItems,
|
|
3186
3193
|
"approval-preset": e.approvalPreset,
|
|
3187
3194
|
"approval-presets": P.value.approvalPresets ?? [],
|
|
3188
|
-
"goal-mode":
|
|
3189
|
-
"plan-mode":
|
|
3195
|
+
"goal-mode": L.value,
|
|
3196
|
+
"plan-mode": R.value,
|
|
3190
3197
|
"show-approval-menu": P.value.approvals && !!e.approvalPreset && (P.value.approvalPresets?.length ?? 0) > 0,
|
|
3191
|
-
"show-goal-mode": P.value.goals && !!
|
|
3198
|
+
"show-goal-mode": P.value.goals && !!ne.value,
|
|
3192
3199
|
"show-plan-mode": P.value.planMode,
|
|
3193
3200
|
onAttach: n[1] ||= (e) => t.$emit("attach"),
|
|
3194
3201
|
onSelect: n[2] ||= (e) => t.$emit("menuSelect", e),
|
|
@@ -3197,11 +3204,11 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3197
3204
|
"onUpdate:planMode": ct
|
|
3198
3205
|
}, d({ _: 2 }, [t.$slots["menu-icon"] ? {
|
|
3199
3206
|
name: "icon",
|
|
3200
|
-
fn:
|
|
3207
|
+
fn: W((e) => [F(t.$slots, "menu-icon", w(_(e)), void 0, !0)]),
|
|
3201
3208
|
key: "0"
|
|
3202
3209
|
} : void 0, t.$slots["menu-item"] ? {
|
|
3203
3210
|
name: "item",
|
|
3204
|
-
fn:
|
|
3211
|
+
fn: W((e) => [F(t.$slots, "menu-item", w(_(e)), void 0, !0)]),
|
|
3205
3212
|
key: "1"
|
|
3206
3213
|
} : void 0]), 1032, [
|
|
3207
3214
|
"attach-enabled",
|
|
@@ -3218,13 +3225,13 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3218
3225
|
])) : c("", !0),
|
|
3219
3226
|
F(t.$slots, "before-meta", {}, void 0, !0),
|
|
3220
3227
|
m(zt, {
|
|
3221
|
-
"plan-mode":
|
|
3222
|
-
command:
|
|
3228
|
+
"plan-mode": R.value,
|
|
3229
|
+
command: I.value,
|
|
3223
3230
|
onDisablePlanMode: n[4] ||= (e) => ct(!1),
|
|
3224
3231
|
onRemoveCommand: it
|
|
3225
3232
|
}, null, 8, ["plan-mode", "command"])
|
|
3226
3233
|
]), u("div", Bi, [
|
|
3227
|
-
|
|
3234
|
+
te.value.composer.contextUsage ? (k(), s(Yn, {
|
|
3228
3235
|
key: 0,
|
|
3229
3236
|
"context-usage": e.contextUsage
|
|
3230
3237
|
}, null, 8, ["context-usage"])) : c("", !0),
|
|
@@ -3254,13 +3261,13 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3254
3261
|
"show-service-tier",
|
|
3255
3262
|
"show-reasoning"
|
|
3256
3263
|
])) : c("", !0),
|
|
3257
|
-
|
|
3264
|
+
V.value ? (k(), s(an, {
|
|
3258
3265
|
key: 2,
|
|
3259
|
-
disabled:
|
|
3260
|
-
label:
|
|
3261
|
-
recording:
|
|
3262
|
-
title:
|
|
3263
|
-
onToggle:
|
|
3266
|
+
disabled: B(pe),
|
|
3267
|
+
label: B(me),
|
|
3268
|
+
recording: B(_e),
|
|
3269
|
+
title: B(he),
|
|
3270
|
+
onToggle: B(Ce)
|
|
3264
3271
|
}, null, 8, [
|
|
3265
3272
|
"disabled",
|
|
3266
3273
|
"label",
|
|
@@ -3270,12 +3277,12 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3270
3277
|
])) : c("", !0),
|
|
3271
3278
|
m(Ft, {
|
|
3272
3279
|
class: "chat-composer__send",
|
|
3273
|
-
disabled:
|
|
3274
|
-
"hover-to-enable":
|
|
3275
|
-
busy:
|
|
3280
|
+
disabled: ue.value,
|
|
3281
|
+
"hover-to-enable": oe.value,
|
|
3282
|
+
busy: ce.value,
|
|
3276
3283
|
"interrupt-armed": e.interruptArmed,
|
|
3277
|
-
"submit-label":
|
|
3278
|
-
title:
|
|
3284
|
+
"submit-label": de.value,
|
|
3285
|
+
title: fe.value,
|
|
3279
3286
|
"interrupt-label": "Codex is working",
|
|
3280
3287
|
onClick: $e
|
|
3281
3288
|
}, null, 8, [
|
|
@@ -3308,13 +3315,13 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3308
3315
|
emits: ["decide"],
|
|
3309
3316
|
setup(e) {
|
|
3310
3317
|
return (n, r) => (k(), l("section", Hi, [
|
|
3311
|
-
u("header", Ui, [u("span", Wi, [m(
|
|
3318
|
+
u("header", Ui, [u("span", Wi, [m(B(Ie), {
|
|
3312
3319
|
size: 16,
|
|
3313
3320
|
"aria-hidden": "true"
|
|
3314
3321
|
}), r[0] ||= p(" Approve tool call ", -1)])]),
|
|
3315
|
-
u("span", Gi,
|
|
3316
|
-
e.description ? (k(), l("p", Ki,
|
|
3317
|
-
e.details || n.$slots.details ? (k(), l("details", qi, [r[1] ||= u("summary", { class: "chat-tool-confirmation__details-summary" }, "Details", -1), u("div", Ji, [F(n.$slots, "details", {}, () => [u("pre", null,
|
|
3322
|
+
u("span", Gi, R(e.summary), 1),
|
|
3323
|
+
e.description ? (k(), l("p", Ki, R(e.description), 1)) : c("", !0),
|
|
3324
|
+
e.details || n.$slots.details ? (k(), l("details", qi, [r[1] ||= u("summary", { class: "chat-tool-confirmation__details-summary" }, "Details", -1), u("div", Ji, [F(n.$slots, "details", {}, () => [u("pre", null, R(e.details), 1)], !0)])])) : c("", !0),
|
|
3318
3325
|
u("footer", Yi, [(k(!0), l(t, null, P(e.actions, (t) => (k(), l("button", {
|
|
3319
3326
|
key: t.id,
|
|
3320
3327
|
class: C(["codex-request-button chat-tool-confirmation__button", {
|
|
@@ -3324,7 +3331,7 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3324
3331
|
type: "button",
|
|
3325
3332
|
disabled: e.disabled,
|
|
3326
3333
|
onClick: (e) => n.$emit("decide", t.id)
|
|
3327
|
-
},
|
|
3334
|
+
}, R(t.label), 11, Xi))), 128))])
|
|
3328
3335
|
]));
|
|
3329
3336
|
}
|
|
3330
3337
|
}), [["__scopeId", "data-v-d39db1b1"]]), Qi = { class: "codex-approval-prompt__details" }, $i = { key: 0 }, ea = { key: 1 }, ta = {
|
|
@@ -3372,10 +3379,10 @@ var Li = { class: "chat-composer__input-row" }, Ri = { class: "chat-composer__me
|
|
|
3372
3379
|
onDecide: m
|
|
3373
3380
|
}, d({ _: 2 }, [e.approval.command || e.approval.cwd || e.approval.requestedPermissions?.length ? {
|
|
3374
3381
|
name: "details",
|
|
3375
|
-
fn:
|
|
3376
|
-
e.approval.command ? (k(), l("code", $i,
|
|
3377
|
-
e.approval.cwd ? (k(), l("small", ea,
|
|
3378
|
-
e.approval.requestedPermissions?.length ? (k(), l("ul", ta, [(k(!0), l(t, null, P(e.approval.requestedPermissions, (e, t) => (k(), l("li", { key: t },
|
|
3382
|
+
fn: W(() => [u("div", Qi, [
|
|
3383
|
+
e.approval.command ? (k(), l("code", $i, R(e.approval.command), 1)) : c("", !0),
|
|
3384
|
+
e.approval.cwd ? (k(), l("small", ea, R(e.approval.cwd), 1)) : c("", !0),
|
|
3385
|
+
e.approval.requestedPermissions?.length ? (k(), l("ul", ta, [(k(!0), l(t, null, P(e.approval.requestedPermissions, (e, t) => (k(), l("li", { key: t }, R(h(e)), 1))), 128))])) : c("", !0)
|
|
3379
3386
|
])]),
|
|
3380
3387
|
key: "0"
|
|
3381
3388
|
} : void 0]), 1032, [
|
|
@@ -3947,7 +3954,7 @@ function eo(e) {
|
|
|
3947
3954
|
//#region src/chat/use-conversation-escape-interrupt.ts
|
|
3948
3955
|
function to(e) {
|
|
3949
3956
|
let t = M(!1), n = null, r = !1;
|
|
3950
|
-
|
|
3957
|
+
U([e.busy, e.enabled], () => {
|
|
3951
3958
|
c(), i();
|
|
3952
3959
|
}), D(i), E(() => {
|
|
3953
3960
|
c(), a();
|
|
@@ -4003,14 +4010,14 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4003
4010
|
return (n, a) => (k(), l("span", {
|
|
4004
4011
|
class: C(["codex-chat-theme chat-animated-diff-stat", `chat-animated-diff-stat--${e.kind}`]),
|
|
4005
4012
|
"aria-label": c.value
|
|
4006
|
-
}, [u("span", oo,
|
|
4013
|
+
}, [u("span", oo, R(r.value), 1), u("span", so, [(k(!0), l(t, null, P(s.value, (e) => (k(), l("span", {
|
|
4007
4014
|
key: e.place,
|
|
4008
4015
|
class: "chat-animated-diff-stat__digit-column"
|
|
4009
4016
|
}, [m(i, { name: "chat-animated-diff-stat__digit" }, {
|
|
4010
|
-
default:
|
|
4017
|
+
default: W(() => [(k(), l("span", {
|
|
4011
4018
|
key: `${e.place}-${e.digit}`,
|
|
4012
4019
|
class: "chat-animated-diff-stat__digit"
|
|
4013
|
-
},
|
|
4020
|
+
}, R(e.digit), 1))]),
|
|
4014
4021
|
_: 2
|
|
4015
4022
|
}, 1024)]))), 128))])], 10, ao));
|
|
4016
4023
|
}
|
|
@@ -4028,13 +4035,13 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4028
4035
|
if (t.toolCall.kind === "webSearch") return Je;
|
|
4029
4036
|
let e = Q(t.toolCall.status);
|
|
4030
4037
|
if (e) switch (e.action) {
|
|
4031
|
-
case "create": return
|
|
4038
|
+
case "create": return Y;
|
|
4032
4039
|
case "delete": return qe;
|
|
4033
|
-
case "edit": return
|
|
4040
|
+
case "edit": return Y;
|
|
4034
4041
|
case "explore":
|
|
4035
|
-
case "list": return
|
|
4036
|
-
case "plan": return
|
|
4037
|
-
case "read": return
|
|
4042
|
+
case "list": return be;
|
|
4043
|
+
case "plan": return Ce;
|
|
4044
|
+
case "read": return ye;
|
|
4038
4045
|
case "run": return Ge;
|
|
4039
4046
|
case "search": return Fe;
|
|
4040
4047
|
}
|
|
@@ -4046,7 +4053,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4046
4053
|
function i(e) {
|
|
4047
4054
|
return typeof e == "object" && !!e;
|
|
4048
4055
|
}
|
|
4049
|
-
return (e, t) => n.value ? (k(), s(
|
|
4056
|
+
return (e, t) => n.value ? (k(), s(I(n.value), {
|
|
4050
4057
|
key: 0,
|
|
4051
4058
|
class: "chat-tool-icon",
|
|
4052
4059
|
"aria-hidden": "true"
|
|
@@ -4098,31 +4105,31 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4098
4105
|
"codex-text-shimmer": e.running
|
|
4099
4106
|
}]),
|
|
4100
4107
|
"data-label": e.title
|
|
4101
|
-
}, [e.icon ? (k(), s(
|
|
4108
|
+
}, [e.icon ? (k(), s(I(e.icon), { key: 0 })) : e.toolCall ? (k(), s(lo, {
|
|
4102
4109
|
key: 1,
|
|
4103
4110
|
presentation: e.toolPresentation,
|
|
4104
4111
|
"tool-call": e.toolCall
|
|
4105
4112
|
}, null, 8, ["presentation", "tool-call"])) : c("", !0), e.titlePrefix && e.titleTarget ? (k(), l("span", fo, [
|
|
4106
|
-
u("span", null,
|
|
4107
|
-
i[3] ||= p(
|
|
4113
|
+
u("span", null, R(e.titlePrefix), 1),
|
|
4114
|
+
i[3] ||= p(R(" "), -1),
|
|
4108
4115
|
u("span", po, [e.titleTargetParts?.length ? (k(!0), l(t, { key: 0 }, P(e.titleTargetParts, (e, n) => (k(), l(t, { key: `${e.label}-${n}` }, [
|
|
4109
|
-
e.separator ? (k(), l("span", mo,
|
|
4116
|
+
e.separator ? (k(), l("span", mo, R(e.separator), 1)) : c("", !0),
|
|
4110
4117
|
e.link ? (k(), l("a", {
|
|
4111
4118
|
key: 1,
|
|
4112
4119
|
class: "chat-tool-call__title-target chat-tool-call__title-target--link",
|
|
4113
4120
|
href: e.link.href,
|
|
4114
|
-
onClick:
|
|
4115
|
-
onKeydown: [K(
|
|
4116
|
-
},
|
|
4117
|
-
e.suffix ? (k(), l("span", _o,
|
|
4121
|
+
onClick: K((t) => r("open-link", e.link), ["stop", "prevent"]),
|
|
4122
|
+
onKeydown: [G(K((t) => r("open-link", e.link), ["stop", "prevent"]), ["enter"]), G(K((t) => r("open-link", e.link), ["stop", "prevent"]), ["space"])]
|
|
4123
|
+
}, R(e.label), 41, ho)) : (k(), l("span", go, R(e.label), 1)),
|
|
4124
|
+
e.suffix ? (k(), l("span", _o, R(e.suffix), 1)) : c("", !0)
|
|
4118
4125
|
], 64))), 128)) : e.titleTargetLink ? (k(), l("a", {
|
|
4119
4126
|
key: 1,
|
|
4120
4127
|
class: "chat-tool-call__title-target chat-tool-call__title-target--link",
|
|
4121
4128
|
href: e.titleTargetLink.href,
|
|
4122
|
-
onClick: i[0] ||=
|
|
4123
|
-
onKeydown: [i[1] ||= K(
|
|
4124
|
-
},
|
|
4125
|
-
])) : (k(), l("span", bo,
|
|
4129
|
+
onClick: i[0] ||= K((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]),
|
|
4130
|
+
onKeydown: [i[1] ||= G(K((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["enter"]), i[2] ||= G(K((t) => r("open-link", e.titleTargetLink), ["stop", "prevent"]), ["space"])]
|
|
4131
|
+
}, R(e.titleTarget), 41, vo)) : (k(), l("span", yo, R(e.titleTarget), 1))])
|
|
4132
|
+
])) : (k(), l("span", bo, R(e.title), 1))], 10, uo), e.lineDiff ? (k(), l("span", xo, [e.lineDiff.addedLines ? (k(), s(co, {
|
|
4126
4133
|
key: 0,
|
|
4127
4134
|
kind: "added",
|
|
4128
4135
|
label: "Added lines",
|
|
@@ -4180,47 +4187,47 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4180
4187
|
let r = e, i = n, a = M(0), d = M(!1), f = M(!1), h = A({}), g = M(), _ = M(), v = A({}), y = o(() => Q(r.toolCall.status)), b = o(() => y.value?.params && typeof y.value.params == "object" ? y.value.params : {}), x = o(() => {
|
|
4181
4188
|
let e = b.value.requestId;
|
|
4182
4189
|
return typeof e == "string" ? e : void 0;
|
|
4183
|
-
}), w = o(() =>
|
|
4190
|
+
}), w = o(() => ve(b.value.questions)), T = o(() => w.value[a.value]), E = o(() => a.value === w.value.length - 1), O = o(() => {
|
|
4184
4191
|
let e = r.toolCall.result;
|
|
4185
4192
|
return e?.answers && typeof e.answers == "object" ? e.answers : {};
|
|
4186
4193
|
}), ee = o(() => x.value ? r.answeredClientRequestIds?.has(x.value) === !0 : !1), j = o(() => d.value || Object.keys(O.value).length > 0 || ee.value && !f.value), N = o(() => f.value || r.toolCall.state === "canceled"), F = o(() => {
|
|
4187
4194
|
let e = {};
|
|
4188
|
-
for (let t of w.value) e[t.id] =
|
|
4195
|
+
for (let t of w.value) e[t.id] = _e(O.value[t.id] ?? ge(t));
|
|
4189
4196
|
return e;
|
|
4190
|
-
}),
|
|
4197
|
+
}), te = o(() => !N.value && !j.value && !r.historical && !!T.value), ne = o(() => T.value?.options ?? []), L = o(() => {
|
|
4191
4198
|
let e = T.value;
|
|
4192
|
-
return !!e && (
|
|
4193
|
-
}),
|
|
4199
|
+
return !!e && (W(e) || e.isOther === !0);
|
|
4200
|
+
}), z = o(() => {
|
|
4194
4201
|
let e = T.value;
|
|
4195
4202
|
return e && e.header.trim() !== e.question.trim() ? e.header : "Question";
|
|
4196
|
-
}),
|
|
4203
|
+
}), V = o(() => {
|
|
4197
4204
|
let e = T.value;
|
|
4198
|
-
return e?.isSecret ? "Enter private answer" : e &&
|
|
4199
|
-
}),
|
|
4205
|
+
return e?.isSecret ? "Enter private answer" : e && W(e) ? "Type your answer..." : "Or write your own answer...";
|
|
4206
|
+
}), H = o(() => {
|
|
4200
4207
|
let e = T.value;
|
|
4201
|
-
return !e || !
|
|
4208
|
+
return !e || !se(e) ? !1 : !E.value || w.value.every((e) => se(e));
|
|
4202
4209
|
});
|
|
4203
|
-
function
|
|
4210
|
+
function re() {
|
|
4204
4211
|
S(() => window.setTimeout(() => {
|
|
4205
4212
|
let e = T.value;
|
|
4206
|
-
!
|
|
4213
|
+
!te.value || !e || (W(e) ? _.value?.focus() : (!document.activeElement || document.activeElement === document.body) && g.value?.focus());
|
|
4207
4214
|
}, 0));
|
|
4208
4215
|
}
|
|
4209
|
-
D(
|
|
4210
|
-
function
|
|
4216
|
+
D(re), U(a, re);
|
|
4217
|
+
function W(e) {
|
|
4211
4218
|
return e.options === null;
|
|
4212
4219
|
}
|
|
4213
|
-
let
|
|
4214
|
-
function
|
|
4215
|
-
return e.replace(
|
|
4220
|
+
let ie = /\s*\(recommended\)\s*$/i;
|
|
4221
|
+
function G(e) {
|
|
4222
|
+
return e.replace(ie, "").trim() || e;
|
|
4216
4223
|
}
|
|
4217
|
-
function
|
|
4218
|
-
return
|
|
4224
|
+
function K(e) {
|
|
4225
|
+
return ie.test(e);
|
|
4219
4226
|
}
|
|
4220
|
-
function
|
|
4227
|
+
function ae(e, t) {
|
|
4221
4228
|
return h[e]?.includes(t) ?? !1;
|
|
4222
4229
|
}
|
|
4223
|
-
function
|
|
4230
|
+
function oe(e, t) {
|
|
4224
4231
|
if (j.value || N.value) return;
|
|
4225
4232
|
let n = e.id;
|
|
4226
4233
|
if (h[n] ??= [], e.multiSelect) {
|
|
@@ -4228,47 +4235,47 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4228
4235
|
e >= 0 ? h[n].splice(e, 1) : h[n].push(t);
|
|
4229
4236
|
return;
|
|
4230
4237
|
}
|
|
4231
|
-
h[n] = [t], v[n] = "",
|
|
4238
|
+
h[n] = [t], v[n] = "", de();
|
|
4232
4239
|
}
|
|
4233
|
-
function
|
|
4240
|
+
function q(e, t) {
|
|
4234
4241
|
if (j.value || N.value) return;
|
|
4235
4242
|
let n = t.target.value;
|
|
4236
4243
|
v[e.id] = n, !e.multiSelect && n.trim() && (h[e.id] = []);
|
|
4237
4244
|
}
|
|
4238
|
-
function
|
|
4245
|
+
function se(e) {
|
|
4239
4246
|
return (h[e.id]?.length ?? 0) > 0 || !!v[e.id]?.trim();
|
|
4240
4247
|
}
|
|
4241
|
-
function
|
|
4242
|
-
if (e.isComposing || e.metaKey || e.ctrlKey || e.altKey || !
|
|
4248
|
+
function le(e) {
|
|
4249
|
+
if (e.isComposing || e.metaKey || e.ctrlKey || e.altKey || !te.value) return;
|
|
4243
4250
|
let t = T.value;
|
|
4244
4251
|
if (t && /^[1-9]$/.test(e.key)) {
|
|
4245
4252
|
let n = t.options?.[Number(e.key) - 1];
|
|
4246
|
-
n && (e.preventDefault(),
|
|
4253
|
+
n && (e.preventDefault(), oe(t, n.label));
|
|
4247
4254
|
return;
|
|
4248
4255
|
}
|
|
4249
|
-
e.key === "Enter" && e.target === g.value &&
|
|
4256
|
+
e.key === "Enter" && e.target === g.value && H.value && (e.preventDefault(), de());
|
|
4250
4257
|
}
|
|
4251
|
-
function
|
|
4252
|
-
e.stopPropagation(), !(e.key !== "Enter" || e.isComposing || e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && (e.preventDefault(),
|
|
4258
|
+
function ue(e) {
|
|
4259
|
+
e.stopPropagation(), !(e.key !== "Enter" || e.isComposing || e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && (e.preventDefault(), H.value && de());
|
|
4253
4260
|
}
|
|
4254
|
-
function
|
|
4255
|
-
E.value ?
|
|
4261
|
+
function de() {
|
|
4262
|
+
E.value ? me() : fe();
|
|
4256
4263
|
}
|
|
4257
|
-
function
|
|
4258
|
-
|
|
4264
|
+
function fe() {
|
|
4265
|
+
H.value && (a.value += 1);
|
|
4259
4266
|
}
|
|
4260
|
-
function
|
|
4267
|
+
function pe() {
|
|
4261
4268
|
a.value > 0 && --a.value;
|
|
4262
4269
|
}
|
|
4263
|
-
function
|
|
4264
|
-
if (!x.value || j.value || N.value || !
|
|
4265
|
-
let e = w.value.reduce((e, t) => (e[t.id] =
|
|
4270
|
+
function me() {
|
|
4271
|
+
if (!x.value || j.value || N.value || !H.value) return;
|
|
4272
|
+
let e = w.value.reduce((e, t) => (e[t.id] = ge(t), e), {});
|
|
4266
4273
|
d.value = !0, i("client-response", {
|
|
4267
4274
|
id: x.value,
|
|
4268
4275
|
payload: { answers: e }
|
|
4269
4276
|
});
|
|
4270
4277
|
}
|
|
4271
|
-
function
|
|
4278
|
+
function he() {
|
|
4272
4279
|
!x.value || j.value || N.value || (f.value = !0, i("client-response", {
|
|
4273
4280
|
id: x.value,
|
|
4274
4281
|
payload: {
|
|
@@ -4277,14 +4284,14 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4277
4284
|
}
|
|
4278
4285
|
}));
|
|
4279
4286
|
}
|
|
4280
|
-
function
|
|
4287
|
+
function ge(e) {
|
|
4281
4288
|
let t = [...h[e.id] ?? []], n = v[e.id]?.trim();
|
|
4282
|
-
return (
|
|
4289
|
+
return (W(e) || e.isOther) && n && t.push(n), { answers: t };
|
|
4283
4290
|
}
|
|
4284
|
-
function
|
|
4291
|
+
function _e(e) {
|
|
4285
4292
|
return e.answers.filter(Boolean).join(", ") || "-";
|
|
4286
4293
|
}
|
|
4287
|
-
function
|
|
4294
|
+
function ve(e) {
|
|
4288
4295
|
return Array.isArray(e) ? e.filter((e) => !!(e && typeof e == "object" && "id" in e && typeof e.id == "string" && "question" in e && typeof e.question == "string")).map((e) => ({
|
|
4289
4296
|
...e,
|
|
4290
4297
|
header: e.header || e.question,
|
|
@@ -4293,72 +4300,72 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4293
4300
|
options: Array.isArray(e.options) ? e.options : null
|
|
4294
4301
|
})) : [];
|
|
4295
4302
|
}
|
|
4296
|
-
return (n, r) => w.value.length === 0 ? (k(), l("span", Co, [m(
|
|
4303
|
+
return (n, r) => w.value.length === 0 ? (k(), l("span", Co, [m(B(Be), { size: 15 }), r[1] ||= p(" Preparing question... ", -1)])) : (k(), l("section", {
|
|
4297
4304
|
key: 1,
|
|
4298
4305
|
ref_key: "root",
|
|
4299
4306
|
ref: g,
|
|
4300
4307
|
class: C(["codex-chat-theme codex-request-card chat-tool-user-input", { "chat-tool-user-input--resolved": N.value || j.value || e.historical }]),
|
|
4301
|
-
tabindex:
|
|
4302
|
-
onKeydown:
|
|
4308
|
+
tabindex: te.value ? -1 : void 0,
|
|
4309
|
+
onKeydown: le
|
|
4303
4310
|
}, [N.value ? (k(), l("div", To, [m(So, {
|
|
4304
4311
|
title: "Cancelled user question",
|
|
4305
|
-
icon:
|
|
4312
|
+
icon: B(Ve)
|
|
4306
4313
|
}, null, 8, ["icon"])])) : j.value ? (k(), l("div", Eo, [m(So, {
|
|
4307
4314
|
title: "Answered user question",
|
|
4308
|
-
icon:
|
|
4315
|
+
icon: B(ze)
|
|
4309
4316
|
}, null, 8, ["icon"]), (k(!0), l(t, null, P(w.value, (e) => (k(), l("div", {
|
|
4310
4317
|
key: e.id,
|
|
4311
4318
|
class: "chat-tool-user-input__answer"
|
|
4312
|
-
}, [u("span", Do,
|
|
4319
|
+
}, [u("span", Do, R(e.header), 1), u("span", Oo, R(F.value[e.id]), 1)]))), 128))])) : e.historical ? (k(!0), l(t, { key: 2 }, P(w.value, (e) => (k(), l("p", {
|
|
4313
4320
|
key: e.id,
|
|
4314
4321
|
class: "chat-tool-user-input__historical-question"
|
|
4315
|
-
},
|
|
4316
|
-
u("header", ko, [u("span", Ao, [m(
|
|
4322
|
+
}, R(e.question), 1))), 128)) : T.value ? (k(), l(t, { key: 3 }, [
|
|
4323
|
+
u("header", ko, [u("span", Ao, [m(B(Ee), {
|
|
4317
4324
|
size: 16,
|
|
4318
4325
|
"aria-hidden": "true"
|
|
4319
|
-
}), u("span", jo, z
|
|
4326
|
+
}), u("span", jo, R(z.value), 1)]), u("div", Mo, [w.value.length > 1 ? (k(), l("span", No, R(a.value + 1) + " / " + R(w.value.length), 1)) : c("", !0), u("button", {
|
|
4320
4327
|
class: "chat-tool-user-input__dismiss",
|
|
4321
4328
|
type: "button",
|
|
4322
4329
|
"aria-label": "Cancel question",
|
|
4323
4330
|
title: "Cancel question",
|
|
4324
|
-
onClick:
|
|
4325
|
-
}, [m(
|
|
4326
|
-
u("p", Po,
|
|
4327
|
-
T.value.multiSelect &&
|
|
4328
|
-
|
|
4331
|
+
onClick: he
|
|
4332
|
+
}, [m(B(Ye), { size: 17 })])])]),
|
|
4333
|
+
u("p", Po, R(T.value.question), 1),
|
|
4334
|
+
T.value.multiSelect && ne.value.length > 0 ? (k(), l("p", Fo, " Select all that apply ")) : c("", !0),
|
|
4335
|
+
ne.value.length > 0 ? (k(), l("div", {
|
|
4329
4336
|
key: 1,
|
|
4330
4337
|
class: "chat-tool-user-input__options",
|
|
4331
4338
|
role: "group",
|
|
4332
4339
|
"aria-label": T.value.question
|
|
4333
|
-
}, [(k(!0), l(t, null, P(
|
|
4340
|
+
}, [(k(!0), l(t, null, P(ne.value, (e, n) => (k(), l("button", {
|
|
4334
4341
|
key: e.label,
|
|
4335
4342
|
"aria-keyshortcuts": n < 9 ? String(n + 1) : void 0,
|
|
4336
4343
|
"aria-label": e.label,
|
|
4337
|
-
"aria-pressed":
|
|
4338
|
-
class: C(["chat-tool-user-input__option", { "chat-tool-user-input__option--selected":
|
|
4344
|
+
"aria-pressed": ae(T.value.id, e.label),
|
|
4345
|
+
class: C(["chat-tool-user-input__option", { "chat-tool-user-input__option--selected": ae(T.value.id, e.label) }]),
|
|
4339
4346
|
type: "button",
|
|
4340
|
-
onClick: (t) =>
|
|
4341
|
-
}, [u("span", Ro, [
|
|
4347
|
+
onClick: (t) => oe(T.value, e.label)
|
|
4348
|
+
}, [u("span", Ro, [ae(T.value.id, e.label) ? (k(), s(B(ce), {
|
|
4342
4349
|
key: 0,
|
|
4343
4350
|
size: 14,
|
|
4344
4351
|
"stroke-width": "3"
|
|
4345
|
-
})) : (k(), l(t, { key: 1 }, [p(
|
|
4346
|
-
u("footer", { class: C(["chat-tool-user-input__footer", { "chat-tool-user-input__footer--divided":
|
|
4352
|
+
})) : (k(), l(t, { key: 1 }, [p(R(n + 1), 1)], 64))]), u("span", zo, [u("span", Bo, [u("span", Vo, R(G(e.label)), 1), K(e.label) ? (k(), l("span", Ho, "Recommended")) : c("", !0)]), e.description ? (k(), l("span", Uo, R(e.description), 1)) : c("", !0)])], 10, Lo))), 128))], 8, Io)) : c("", !0),
|
|
4353
|
+
u("footer", { class: C(["chat-tool-user-input__footer", { "chat-tool-user-input__footer--divided": ne.value.length > 0 }]) }, [L.value ? (k(), l("div", Wo, [m(B(Y), {
|
|
4347
4354
|
class: "chat-tool-user-input__write-icon",
|
|
4348
4355
|
size: 16,
|
|
4349
4356
|
"aria-hidden": "true"
|
|
4350
|
-
}), (k(), s(
|
|
4357
|
+
}), (k(), s(I(T.value.isSecret ? "input" : "textarea"), {
|
|
4351
4358
|
ref_key: "answerField",
|
|
4352
4359
|
ref: _,
|
|
4353
|
-
class: C(["chat-tool-user-input__other-input", { "chat-tool-user-input__other-input--direct":
|
|
4354
|
-
"aria-label":
|
|
4360
|
+
class: C(["chat-tool-user-input__other-input", { "chat-tool-user-input__other-input--direct": W(T.value) }]),
|
|
4361
|
+
"aria-label": W(T.value) ? T.value.question : "Other answer",
|
|
4355
4362
|
autocomplete: T.value.isSecret ? "off" : void 0,
|
|
4356
|
-
placeholder:
|
|
4363
|
+
placeholder: V.value,
|
|
4357
4364
|
rows: T.value.isSecret ? void 0 : 1,
|
|
4358
4365
|
type: T.value.isSecret ? "password" : void 0,
|
|
4359
4366
|
value: v[T.value.id] ?? "",
|
|
4360
|
-
onInput: r[0] ||= (e) =>
|
|
4361
|
-
onKeydown:
|
|
4367
|
+
onInput: r[0] ||= (e) => q(T.value, e),
|
|
4368
|
+
onKeydown: ue
|
|
4362
4369
|
}, null, 40, [
|
|
4363
4370
|
"class",
|
|
4364
4371
|
"aria-label",
|
|
@@ -4371,13 +4378,13 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4371
4378
|
key: 0,
|
|
4372
4379
|
class: "codex-request-button chat-tool-user-input__button",
|
|
4373
4380
|
type: "button",
|
|
4374
|
-
onClick:
|
|
4381
|
+
onClick: pe
|
|
4375
4382
|
}, " Back ")) : c("", !0), u("button", {
|
|
4376
4383
|
class: "codex-request-button codex-request-button--primary chat-tool-user-input__button chat-tool-user-input__button--primary",
|
|
4377
|
-
disabled: !
|
|
4384
|
+
disabled: !H.value,
|
|
4378
4385
|
type: "button",
|
|
4379
|
-
onClick:
|
|
4380
|
-
},
|
|
4386
|
+
onClick: de
|
|
4387
|
+
}, R(E.value ? "Send" : "Next"), 9, Ko)])], 2)
|
|
4381
4388
|
], 64)) : c("", !0)], 42, wo));
|
|
4382
4389
|
}
|
|
4383
4390
|
}), [["__scopeId", "data-v-d031e6da"]]), Jo = /* @__PURE__ */ h({
|
|
@@ -4527,24 +4534,24 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4527
4534
|
setup(e, { emit: t }) {
|
|
4528
4535
|
let n = t;
|
|
4529
4536
|
return (t, r) => e.goal ? (k(), l("div", Qo, [
|
|
4530
|
-
m(
|
|
4537
|
+
m(B(Ue), {
|
|
4531
4538
|
class: "chat-goal__icon",
|
|
4532
4539
|
"aria-hidden": "true"
|
|
4533
4540
|
}),
|
|
4534
|
-
u("div", $o, [r[2] ||= u("span", { class: "chat-goal__label" }, "Goal", -1), u("span", es,
|
|
4541
|
+
u("div", $o, [r[2] ||= u("span", { class: "chat-goal__label" }, "Goal", -1), u("span", es, R(e.goal.objective), 1)]),
|
|
4535
4542
|
u("div", ts, [u("button", {
|
|
4536
4543
|
class: "chat-goal__action",
|
|
4537
4544
|
type: "button",
|
|
4538
4545
|
"aria-label": "Edit goal",
|
|
4539
4546
|
title: "Edit goal",
|
|
4540
4547
|
onClick: r[0] ||= (e) => n("edit")
|
|
4541
|
-
}, [m(
|
|
4548
|
+
}, [m(B(Y), { "aria-hidden": "true" }), r[3] ||= u("span", null, "Edit", -1)]), u("button", {
|
|
4542
4549
|
class: "chat-goal__action",
|
|
4543
4550
|
type: "button",
|
|
4544
4551
|
"aria-label": "Clear goal",
|
|
4545
4552
|
title: "Clear goal",
|
|
4546
4553
|
onClick: r[1] ||= (e) => n("clear")
|
|
4547
|
-
}, [m(
|
|
4554
|
+
}, [m(B(qe), { "aria-hidden": "true" })])])
|
|
4548
4555
|
])) : c("", !0);
|
|
4549
4556
|
}
|
|
4550
4557
|
}), [["__scopeId", "data-v-1318cd28"]]), rs = {
|
|
@@ -4565,11 +4572,11 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4565
4572
|
setup(e, { emit: t }) {
|
|
4566
4573
|
let n = t;
|
|
4567
4574
|
return (t, r) => (k(), l("div", rs, [
|
|
4568
|
-
m(
|
|
4575
|
+
m(B(We), {
|
|
4569
4576
|
class: "chat-queued-prompt__icon",
|
|
4570
4577
|
"aria-hidden": "true"
|
|
4571
4578
|
}),
|
|
4572
|
-
u("span", is,
|
|
4579
|
+
u("span", is, R(e.prompt.text), 1),
|
|
4573
4580
|
u("div", as, [
|
|
4574
4581
|
u("button", {
|
|
4575
4582
|
class: "chat-queued-prompt__action",
|
|
@@ -4578,7 +4585,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4578
4585
|
title: "Steer now",
|
|
4579
4586
|
disabled: e.steerDisabled,
|
|
4580
4587
|
onClick: r[0] ||= (t) => n("steer", e.prompt.id)
|
|
4581
|
-
}, [m(
|
|
4588
|
+
}, [m(B(He), { "aria-hidden": "true" }), r[3] ||= u("span", null, "Steer", -1)], 8, os),
|
|
4582
4589
|
u("button", {
|
|
4583
4590
|
class: "chat-queued-prompt__action",
|
|
4584
4591
|
type: "button",
|
|
@@ -4586,14 +4593,14 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4586
4593
|
title: "Edit",
|
|
4587
4594
|
disabled: e.editDisabled,
|
|
4588
4595
|
onClick: r[1] ||= (t) => n("edit", e.prompt.id)
|
|
4589
|
-
}, [m(
|
|
4596
|
+
}, [m(B(Y), { "aria-hidden": "true" })], 8, ss),
|
|
4590
4597
|
u("button", {
|
|
4591
4598
|
class: "chat-queued-prompt__action",
|
|
4592
4599
|
type: "button",
|
|
4593
4600
|
"aria-label": "Delete queued prompt",
|
|
4594
4601
|
title: "Delete",
|
|
4595
4602
|
onClick: r[2] ||= (t) => n("delete", e.prompt.id)
|
|
4596
|
-
}, [m(
|
|
4603
|
+
}, [m(B(qe), { "aria-hidden": "true" })])
|
|
4597
4604
|
])
|
|
4598
4605
|
]));
|
|
4599
4606
|
}
|
|
@@ -4671,7 +4678,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4671
4678
|
"steerQueuedPrompt"
|
|
4672
4679
|
],
|
|
4673
4680
|
setup(n) {
|
|
4674
|
-
let i = n, a =
|
|
4681
|
+
let i = n, a = V(), u = o(() => i.presentation?.goal !== !1 && !!i.goal && i.goal?.status !== "complete"), d = o(() => i.presentation?.queuedPrompts !== !1 && i.queuedPrompts.length > 0), f = o(() => i.presentation?.turnGitDiff === !1 ? null : i.turnGitDiff ?? null), p = o(() => i.disabled ?? !1), m = o(() => g(a.actions?.({ disabled: p.value }))), h = o(() => u.value || d.value || !!f.value || m.value);
|
|
4675
4682
|
function g(n) {
|
|
4676
4683
|
return (Array.isArray(n) ? n : [n]).some((n) => {
|
|
4677
4684
|
if (n == null || typeof n == "boolean") return !1;
|
|
@@ -4747,7 +4754,7 @@ var Ss = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
|
4747
4754
|
title: {}
|
|
4748
4755
|
},
|
|
4749
4756
|
setup(e) {
|
|
4750
|
-
return (t, n) => (k(), s(
|
|
4757
|
+
return (t, n) => (k(), s(I(e.href ? "a" : "button"), {
|
|
4751
4758
|
class: C(["codex-chat-theme chat-icon-button", {
|
|
4752
4759
|
"chat-icon-button--bordered": e.bordered,
|
|
4753
4760
|
"chat-icon-button--danger": e.danger,
|
|
@@ -4763,7 +4770,7 @@ var Ss = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
|
4763
4770
|
"aria-label": e.label,
|
|
4764
4771
|
title: e.title || e.label
|
|
4765
4772
|
}, {
|
|
4766
|
-
default:
|
|
4773
|
+
default: W(() => [F(t.$slots, "default", {}, void 0, !0)]),
|
|
4767
4774
|
_: 3
|
|
4768
4775
|
}, 8, [
|
|
4769
4776
|
"class",
|
|
@@ -4812,7 +4819,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4812
4819
|
mode: "light",
|
|
4813
4820
|
style: {}
|
|
4814
4821
|
});
|
|
4815
|
-
|
|
4822
|
+
U(() => r.open, (e) => {
|
|
4816
4823
|
e ? (a.value = ws(r.themeSource), window.addEventListener("keydown", o)) : window.removeEventListener("keydown", o);
|
|
4817
4824
|
}, { immediate: !0 }), E(() => {
|
|
4818
4825
|
window.removeEventListener("keydown", o);
|
|
@@ -4828,14 +4835,14 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4828
4835
|
role: "dialog",
|
|
4829
4836
|
"aria-modal": "true",
|
|
4830
4837
|
"aria-label": e.label,
|
|
4831
|
-
onClick: r[1] ||=
|
|
4838
|
+
onClick: r[1] ||= K((e) => i("close"), ["self"])
|
|
4832
4839
|
}, [m(Ss, {
|
|
4833
4840
|
bordered: "",
|
|
4834
4841
|
class: "chat-image-lightbox__close chat-media-block__fullscreen-close",
|
|
4835
4842
|
label: e.closeLabel,
|
|
4836
4843
|
onClick: r[0] ||= (e) => i("close")
|
|
4837
4844
|
}, {
|
|
4838
|
-
default:
|
|
4845
|
+
default: W(() => [m(B(Ye))]),
|
|
4839
4846
|
_: 1
|
|
4840
4847
|
}, 8, ["label"]), u("img", {
|
|
4841
4848
|
class: "chat-image-lightbox__image chat-media-block__fullscreen-image",
|
|
@@ -4851,11 +4858,11 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4851
4858
|
},
|
|
4852
4859
|
setup(e) {
|
|
4853
4860
|
let t = e, n = Ti(), r = M(!1), i = M(), a = M(!1), c = M(null), d = o(() => t.attachment.kind === "image" && g(t.attachment.url) ? t.attachment.url : i.value), f = o(() => v(t.attachment.path) || _(t.attachment.url));
|
|
4854
|
-
|
|
4861
|
+
U(d, () => {
|
|
4855
4862
|
r.value = !1;
|
|
4856
4863
|
});
|
|
4857
4864
|
let p = 0;
|
|
4858
|
-
|
|
4865
|
+
U([
|
|
4859
4866
|
() => t.attachment.kind,
|
|
4860
4867
|
() => t.attachment.path,
|
|
4861
4868
|
() => t.attachment.url
|
|
@@ -4924,19 +4931,19 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4924
4931
|
"open",
|
|
4925
4932
|
"src",
|
|
4926
4933
|
"theme-source"
|
|
4927
|
-
])], 8, Os)) : (k(), s(
|
|
4934
|
+
])], 8, Os)) : (k(), s(I(f.value ? "a" : "span"), {
|
|
4928
4935
|
key: 1,
|
|
4929
4936
|
class: "codex-chat-theme chat-attachment-block chat-attachment-block--chip",
|
|
4930
4937
|
href: f.value,
|
|
4931
4938
|
title: e.attachment.path || e.attachment.url || e.attachment.name
|
|
4932
4939
|
}, {
|
|
4933
|
-
default:
|
|
4940
|
+
default: W(() => [e.attachment.kind === "image" ? (k(), s(B(ke), {
|
|
4934
4941
|
key: 0,
|
|
4935
4942
|
"aria-hidden": "true"
|
|
4936
|
-
})) : (k(), s(
|
|
4943
|
+
})) : (k(), s(B(Oe), {
|
|
4937
4944
|
key: 1,
|
|
4938
4945
|
"aria-hidden": "true"
|
|
4939
|
-
})), u("span", js,
|
|
4946
|
+
})), u("span", js, R(e.attachment.name), 1)]),
|
|
4940
4947
|
_: 1
|
|
4941
4948
|
}, 8, ["href", "title"]));
|
|
4942
4949
|
}
|
|
@@ -4955,7 +4962,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4955
4962
|
disabled: e.disabled,
|
|
4956
4963
|
type: "button",
|
|
4957
4964
|
onClick: (e) => r("send-follow-up", t)
|
|
4958
|
-
},
|
|
4965
|
+
}, R(t), 9, Ps))), 128))]));
|
|
4959
4966
|
}
|
|
4960
4967
|
}), [["__scopeId", "data-v-97d3281c"]]), Is = /* @__PURE__ */ h({
|
|
4961
4968
|
__name: "ChatCopyButton",
|
|
@@ -4979,7 +4986,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4979
4986
|
label: n.value ? e.copiedLabel : e.label,
|
|
4980
4987
|
onClick: i
|
|
4981
4988
|
}, {
|
|
4982
|
-
default:
|
|
4989
|
+
default: W(() => [n.value ? (k(), s(B(le), { key: 0 })) : (k(), s(B(he), { key: 1 }))]),
|
|
4983
4990
|
_: 1
|
|
4984
4991
|
}, 8, ["disabled", "label"]));
|
|
4985
4992
|
}
|
|
@@ -4999,8 +5006,8 @@ function Bs(e) {
|
|
|
4999
5006
|
return /^(?:https?:|blob:|data:image\/(?:avif|bmp|gif|heic|heif|jpe?g|png|webp);base64,)/i.test(e);
|
|
5000
5007
|
}
|
|
5001
5008
|
function Vs(e) {
|
|
5002
|
-
let t = Ti(), n =
|
|
5003
|
-
return
|
|
5009
|
+
let t = Ti(), n = L();
|
|
5010
|
+
return U(e, async (e, r, i) => {
|
|
5004
5011
|
let a = !0;
|
|
5005
5012
|
if (i(() => {
|
|
5006
5013
|
a = !1;
|
|
@@ -5070,14 +5077,14 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
|
|
|
5070
5077
|
}, [u("img", {
|
|
5071
5078
|
class: "chat-media-block__image",
|
|
5072
5079
|
alt: e.media.alt || $s,
|
|
5073
|
-
src:
|
|
5080
|
+
src: B(r)
|
|
5074
5081
|
}, null, 8, Us)], 8, Hs),
|
|
5075
|
-
u("figcaption", Ws, [u("span", Gs,
|
|
5082
|
+
u("figcaption", Ws, [u("span", Gs, R(e.media.title || ec), 1), u("span", Ks, [
|
|
5076
5083
|
m(Ss, {
|
|
5077
5084
|
label: Qs,
|
|
5078
5085
|
onClick: o[1] ||= (e) => p("fullscreen")
|
|
5079
5086
|
}, {
|
|
5080
|
-
default:
|
|
5087
|
+
default: W(() => [m(B(Te))]),
|
|
5081
5088
|
_: 1
|
|
5082
5089
|
}),
|
|
5083
5090
|
m(Is, {
|
|
@@ -5087,11 +5094,11 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
|
|
|
5087
5094
|
}),
|
|
5088
5095
|
m(Ss, {
|
|
5089
5096
|
download: f.value,
|
|
5090
|
-
href:
|
|
5097
|
+
href: B(r),
|
|
5091
5098
|
label: Ys,
|
|
5092
|
-
onClick: o[2] ||=
|
|
5099
|
+
onClick: o[2] ||= K(() => {}, ["stop"])
|
|
5093
5100
|
}, {
|
|
5094
|
-
default:
|
|
5101
|
+
default: W(() => [m(B(ge))]),
|
|
5095
5102
|
_: 1
|
|
5096
5103
|
}, 8, ["download", "href"]),
|
|
5097
5104
|
e.media.prompt ? (k(), s(Ss, {
|
|
@@ -5099,7 +5106,7 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
|
|
|
5099
5106
|
label: tc,
|
|
5100
5107
|
onClick: _
|
|
5101
5108
|
}, {
|
|
5102
|
-
default:
|
|
5109
|
+
default: W(() => [m(B(J))]),
|
|
5103
5110
|
_: 1
|
|
5104
5111
|
})) : c("", !0)
|
|
5105
5112
|
])]),
|
|
@@ -5107,14 +5114,14 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
|
|
|
5107
5114
|
key: 0,
|
|
5108
5115
|
open: i.value
|
|
5109
5116
|
}, {
|
|
5110
|
-
default:
|
|
5117
|
+
default: W(() => [u("div", qs, [u("div", { class: "chat-media-block__details-title" }, R(tc)), u("p", Js, R(e.media.prompt), 1)])]),
|
|
5111
5118
|
_: 1
|
|
5112
5119
|
}, 8, ["open"])) : c("", !0),
|
|
5113
5120
|
m(Ds, {
|
|
5114
5121
|
alt: e.media.alt || $s,
|
|
5115
5122
|
label: e.media.title || ec,
|
|
5116
5123
|
open: a.value,
|
|
5117
|
-
src:
|
|
5124
|
+
src: B(r) || e.media.url,
|
|
5118
5125
|
"theme-source": d.value,
|
|
5119
5126
|
onClose: h
|
|
5120
5127
|
}, null, 8, [
|
|
@@ -5179,7 +5186,7 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
|
|
|
5179
5186
|
function b(e) {
|
|
5180
5187
|
e.key === "Escape" && y();
|
|
5181
5188
|
}
|
|
5182
|
-
return
|
|
5189
|
+
return U(r, (e) => {
|
|
5183
5190
|
e ? window.addEventListener("keydown", b) : window.removeEventListener("keydown", b);
|
|
5184
5191
|
}), E(() => {
|
|
5185
5192
|
window.removeEventListener("keydown", b);
|
|
@@ -5193,21 +5200,21 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
|
|
|
5193
5200
|
label: h.value,
|
|
5194
5201
|
onClick: _
|
|
5195
5202
|
}, {
|
|
5196
|
-
default:
|
|
5203
|
+
default: W(() => [i.value ? (k(), s(B(ve), { key: 0 })) : (k(), s(B(me), { key: 1 }))]),
|
|
5197
5204
|
_: 1
|
|
5198
5205
|
}, 8, ["label"]), m(Ss, {
|
|
5199
5206
|
bordered: "",
|
|
5200
5207
|
label: mc,
|
|
5201
5208
|
onClick: v
|
|
5202
5209
|
}, {
|
|
5203
|
-
default:
|
|
5210
|
+
default: W(() => [m(B(Te))]),
|
|
5204
5211
|
_: 1
|
|
5205
5212
|
})]),
|
|
5206
|
-
i.value ? (k(), l("pre", ic, [u("code", null,
|
|
5213
|
+
i.value ? (k(), l("pre", ic, [u("code", null, R(t.code), 1)])) : g.value.svg ? (k(), l("div", {
|
|
5207
5214
|
key: 1,
|
|
5208
5215
|
class: "chat-mermaid-block__diagram",
|
|
5209
5216
|
innerHTML: g.value.svg
|
|
5210
|
-
}, null, 8, ac)) : (k(), l("pre", oc, [u("code", null,
|
|
5217
|
+
}, null, 8, ac)) : (k(), l("pre", oc, [u("code", null, R(g.value.error), 1)])),
|
|
5211
5218
|
(k(), s(n, { to: "body" }, [r.value ? (k(), l("div", {
|
|
5212
5219
|
key: 0,
|
|
5213
5220
|
class: "codex-chat-theme chat-mermaid-block__fullscreen",
|
|
@@ -5216,26 +5223,26 @@ var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__f
|
|
|
5216
5223
|
role: "dialog",
|
|
5217
5224
|
"aria-modal": "true",
|
|
5218
5225
|
"aria-label": mc,
|
|
5219
|
-
onClick:
|
|
5226
|
+
onClick: K(y, ["self"])
|
|
5220
5227
|
}, [u("div", cc, [u("div", lc, [m(Ss, {
|
|
5221
5228
|
bordered: "",
|
|
5222
5229
|
label: h.value,
|
|
5223
5230
|
onClick: _
|
|
5224
5231
|
}, {
|
|
5225
|
-
default:
|
|
5232
|
+
default: W(() => [i.value ? (k(), s(B(ve), { key: 0 })) : (k(), s(B(me), { key: 1 }))]),
|
|
5226
5233
|
_: 1
|
|
5227
5234
|
}, 8, ["label"]), m(Ss, {
|
|
5228
5235
|
bordered: "",
|
|
5229
5236
|
label: pc,
|
|
5230
5237
|
onClick: y
|
|
5231
5238
|
}, {
|
|
5232
|
-
default:
|
|
5239
|
+
default: W(() => [m(B(Ye))]),
|
|
5233
5240
|
_: 1
|
|
5234
|
-
})]), i.value ? (k(), l("pre", uc, [u("code", null,
|
|
5241
|
+
})]), i.value ? (k(), l("pre", uc, [u("code", null, R(t.code), 1)])) : g.value.svg ? (k(), l("div", {
|
|
5235
5242
|
key: 1,
|
|
5236
5243
|
class: "chat-mermaid-block__diagram chat-mermaid-block__diagram--fullscreen",
|
|
5237
5244
|
innerHTML: g.value.svg
|
|
5238
|
-
}, null, 8, dc)) : (k(), l("pre", fc, [u("code", null,
|
|
5245
|
+
}, null, 8, dc)) : (k(), l("pre", fc, [u("code", null, R(g.value.error), 1)]))])], 12, sc)) : c("", !0)]))
|
|
5239
5246
|
], 512));
|
|
5240
5247
|
}
|
|
5241
5248
|
}), [["__scopeId", "data-v-2356f49d"]]);
|
|
@@ -5587,42 +5594,42 @@ var Qc = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
|
|
|
5587
5594
|
URL.revokeObjectURL(e), g.delete(e);
|
|
5588
5595
|
}, 1e3));
|
|
5589
5596
|
}
|
|
5590
|
-
return
|
|
5597
|
+
return U(() => [t.source, t.complete], v), D(() => window.addEventListener("message", y)), E(() => {
|
|
5591
5598
|
window.removeEventListener("message", y), _();
|
|
5592
5599
|
for (let [e, t] of g) clearTimeout(t), URL.revokeObjectURL(e);
|
|
5593
5600
|
}), (t, r) => (k(), l("section", $c, [u("header", el, [
|
|
5594
|
-
u("span", tl,
|
|
5595
|
-
e.complete ? c("", !0) : (k(), l("span", nl,
|
|
5601
|
+
u("span", tl, R(e.title || B(n)("chat.html.title")), 1),
|
|
5602
|
+
e.complete ? c("", !0) : (k(), l("span", nl, R(B(n)("chat.html.streaming")), 1)),
|
|
5596
5603
|
u("div", rl, [
|
|
5597
5604
|
m(Ss, {
|
|
5598
|
-
label:
|
|
5605
|
+
label: B(n)(a.value ? "chat.html.preview" : "chat.html.source"),
|
|
5599
5606
|
onClick: r[0] ||= (e) => a.value = !a.value
|
|
5600
5607
|
}, {
|
|
5601
|
-
default:
|
|
5608
|
+
default: W(() => [a.value ? (k(), s(B(ve), { key: 0 })) : (k(), s(B(me), { key: 1 }))]),
|
|
5602
5609
|
_: 1
|
|
5603
5610
|
}, 8, ["label"]),
|
|
5604
5611
|
m(Is, {
|
|
5605
5612
|
action: b,
|
|
5606
|
-
label:
|
|
5607
|
-
"copied-label":
|
|
5613
|
+
label: B(n)("chat.code.copy"),
|
|
5614
|
+
"copied-label": B(n)("chat.code.copied")
|
|
5608
5615
|
}, null, 8, ["label", "copied-label"]),
|
|
5609
5616
|
m(Ss, {
|
|
5610
|
-
label:
|
|
5617
|
+
label: B(n)("chat.html.download"),
|
|
5611
5618
|
onClick: x
|
|
5612
5619
|
}, {
|
|
5613
|
-
default:
|
|
5620
|
+
default: W(() => [m(B(ge))]),
|
|
5614
5621
|
_: 1
|
|
5615
5622
|
}, 8, ["label"])
|
|
5616
5623
|
])
|
|
5617
|
-
]), u("div", il, [
|
|
5624
|
+
]), u("div", il, [ie((k(), l("iframe", {
|
|
5618
5625
|
key: o.value,
|
|
5619
5626
|
ref_key: "frame",
|
|
5620
5627
|
ref: i,
|
|
5621
|
-
srcdoc:
|
|
5622
|
-
title: e.title ||
|
|
5628
|
+
srcdoc: B(Qc),
|
|
5629
|
+
title: e.title || B(n)("chat.html.title"),
|
|
5623
5630
|
sandbox: "allow-scripts",
|
|
5624
5631
|
referrerpolicy: "no-referrer"
|
|
5625
|
-
}, null, 8, al)), [[
|
|
5632
|
+
}, null, 8, al)), [[re, !a.value]]), a.value ? (k(), l("pre", ol, [u("code", null, R(e.source), 1)])) : c("", !0)])]));
|
|
5626
5633
|
}
|
|
5627
5634
|
}), [["__scopeId", "data-v-f327ab9d"]]), cl = () => void 0, ll = Symbol("codex-app-sdk-tool-presentation");
|
|
5628
5635
|
function ul(e) {
|
|
@@ -5639,7 +5646,7 @@ function pl(e) {
|
|
|
5639
5646
|
}
|
|
5640
5647
|
function ml() {
|
|
5641
5648
|
let e = b(fl, !1);
|
|
5642
|
-
return o(() => !!
|
|
5649
|
+
return o(() => !!z(e));
|
|
5643
5650
|
}
|
|
5644
5651
|
//#endregion
|
|
5645
5652
|
//#region src/chat/ChatToolCall.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -5740,7 +5747,7 @@ var hl = {
|
|
|
5740
5747
|
"title-target-parts",
|
|
5741
5748
|
"tool-call",
|
|
5742
5749
|
"tool-presentation"
|
|
5743
|
-
]), e.expandable === !1 ? c("", !0) : (k(), s(
|
|
5750
|
+
]), e.expandable === !1 ? c("", !0) : (k(), s(I(d.value ? B(fe) : B(ue)), {
|
|
5744
5751
|
key: 0,
|
|
5745
5752
|
class: "chat-tool-group__chevron",
|
|
5746
5753
|
size: 15
|
|
@@ -5768,7 +5775,7 @@ var hl = {
|
|
|
5768
5775
|
"title-target-parts",
|
|
5769
5776
|
"tool-call",
|
|
5770
5777
|
"tool-presentation"
|
|
5771
|
-
]), (k(), s(
|
|
5778
|
+
]), (k(), s(I(d.value ? B(fe) : B(ue)), {
|
|
5772
5779
|
class: "chat-tool-call__chevron",
|
|
5773
5780
|
size: 15
|
|
5774
5781
|
}))])) : (k(), l("div", gl, [m(So, {
|
|
@@ -5790,11 +5797,11 @@ var hl = {
|
|
|
5790
5797
|
"title-target-parts",
|
|
5791
5798
|
"tool-call",
|
|
5792
5799
|
"tool-presentation"
|
|
5793
|
-
])])), e.headerless && D.value ? (k(), l("div", _l, [T.value ? (k(), l("div", vl, [n[5] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", yl,
|
|
5800
|
+
])])), e.headerless && D.value ? (k(), l("div", _l, [T.value ? (k(), l("div", vl, [n[5] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", yl, R(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", bl, [n[6] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", xl, R(A(e.toolCall.result)), 1)])) : c("", !0)])) : O.value ? (k(), s(Rs, {
|
|
5794
5801
|
key: 4,
|
|
5795
5802
|
open: d.value
|
|
5796
5803
|
}, {
|
|
5797
|
-
default:
|
|
5804
|
+
default: W(() => [u("div", Sl, [T.value ? (k(), l("div", Cl, [n[7] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", wl, R(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", Tl, [n[8] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", El, R(A(e.toolCall.result)), 1)])) : c("", !0)])]),
|
|
5798
5805
|
_: 1
|
|
5799
5806
|
}, 8, ["open"])) : c("", !0)], 2));
|
|
5800
5807
|
}
|
|
@@ -5822,25 +5829,25 @@ var hl = {
|
|
|
5822
5829
|
"open-link"
|
|
5823
5830
|
],
|
|
5824
5831
|
setup(e, { emit: n }) {
|
|
5825
|
-
let r = e, i = n, d = M(!1), f = M(/* @__PURE__ */ new Set()), p = /* @__PURE__ */ new Map(), h = new Set(r.toolCalls.filter(
|
|
5826
|
-
if (!(!v.value || !r.toolCalls[0] || !
|
|
5827
|
-
}), b = o(() => r.toolCalls.filter((e) => !
|
|
5832
|
+
let r = e, i = n, d = M(!1), f = M(/* @__PURE__ */ new Set()), p = /* @__PURE__ */ new Map(), h = new Set(r.toolCalls.filter(te).map((e) => e.id)), g = ml(), _ = o(() => r.showToolDetails ?? g.value), v = o(() => r.toolCalls.length === 1), y = o(() => {
|
|
5833
|
+
if (!(!v.value || !r.toolCalls[0] || !ne(r.toolCalls[0]))) return r.toolCalls[0];
|
|
5834
|
+
}), b = o(() => r.toolCalls.filter((e) => !te(e))), x = o(() => !r.activityTitle && v.value && b.value.length === 1 ? r.toolCalls[0] : void 0), S = o(() => r.toolCalls.filter((e) => te(e) || !d.value && f.value.has(e.id) && x.value?.id !== e.id)), w = M(S.value.length > 0), T = o(() => Sn(r.toolCalls)), D = o(() => !!r.activityTitle || r.toolCalls.length > 1 || _.value && r.toolCalls.some(L)), O = o(() => {
|
|
5828
5835
|
if (b.value.length > 0) {
|
|
5829
5836
|
let e = `${A(b.value.length)} done`;
|
|
5830
5837
|
return r.activityTitle ? `${r.activityTitle} · ${e}` : e;
|
|
5831
5838
|
}
|
|
5832
5839
|
return r.activityTitle ?? "No actions";
|
|
5833
5840
|
});
|
|
5834
|
-
|
|
5841
|
+
U(() => r.toolCalls.map((e) => ({
|
|
5835
5842
|
id: e.id,
|
|
5836
|
-
active:
|
|
5843
|
+
active: te(e)
|
|
5837
5844
|
})), (e) => {
|
|
5838
5845
|
let t = new Set(e.map((e) => e.id)), n = new Set(e.filter((e) => e.active).map((e) => e.id));
|
|
5839
5846
|
for (let e of h) !n.has(e) && t.has(e) && j(e);
|
|
5840
5847
|
for (let e of n) N(e);
|
|
5841
5848
|
for (let e of f.value) t.has(e) || N(e);
|
|
5842
5849
|
h = n;
|
|
5843
|
-
}, { flush: "sync" }),
|
|
5850
|
+
}, { flush: "sync" }), U([
|
|
5844
5851
|
() => S.value.length,
|
|
5845
5852
|
d,
|
|
5846
5853
|
() => x.value?.id
|
|
@@ -5868,14 +5875,14 @@ var hl = {
|
|
|
5868
5875
|
function F() {
|
|
5869
5876
|
S.value.length === 0 && (w.value = !1);
|
|
5870
5877
|
}
|
|
5871
|
-
function
|
|
5878
|
+
function te(e) {
|
|
5872
5879
|
return !e.done && e.state !== "completed";
|
|
5873
5880
|
}
|
|
5874
|
-
function
|
|
5881
|
+
function ne(e) {
|
|
5875
5882
|
let t = Q(e.status);
|
|
5876
5883
|
return (t?.source === "mcp" || t?.source === "home") && typeof t.params?.requestId == "string" && e.state === "running";
|
|
5877
5884
|
}
|
|
5878
|
-
function
|
|
5885
|
+
function L(e) {
|
|
5879
5886
|
return yn(e) !== void 0 || e.result !== void 0 && e.result !== null;
|
|
5880
5887
|
}
|
|
5881
5888
|
return (n, o) => y.value ? (k(), s(Dl, {
|
|
@@ -5886,13 +5893,13 @@ var hl = {
|
|
|
5886
5893
|
onClientResponse: o[1] ||= (e) => i("client-response", e),
|
|
5887
5894
|
onOpenLink: o[2] ||= (e) => i("open-link", e)
|
|
5888
5895
|
}, null, 8, ["answered-client-request-ids", "tool-call"])) : (k(), l("section", Ol, [
|
|
5889
|
-
r.toolCalls.length === 0 || x.value || b.value.length > 0 ? (k(), s(
|
|
5896
|
+
r.toolCalls.length === 0 || x.value || b.value.length > 0 ? (k(), s(I(D.value ? "button" : "div"), {
|
|
5890
5897
|
key: 0,
|
|
5891
5898
|
class: C(["chat-tool-group__header", { "chat-tool-group__header--static": !D.value }]),
|
|
5892
5899
|
type: D.value ? "button" : void 0,
|
|
5893
5900
|
onClick: ee
|
|
5894
5901
|
}, {
|
|
5895
|
-
default:
|
|
5902
|
+
default: W(() => [x.value ? (k(), s(Dl, {
|
|
5896
5903
|
key: 0,
|
|
5897
5904
|
class: "chat-tool-group__active",
|
|
5898
5905
|
"summary-only": "",
|
|
@@ -5912,7 +5919,7 @@ var hl = {
|
|
|
5912
5919
|
u("span", {
|
|
5913
5920
|
class: "chat-tool-group__title",
|
|
5914
5921
|
"data-label": O.value
|
|
5915
|
-
},
|
|
5922
|
+
}, R(O.value), 9, kl),
|
|
5916
5923
|
T.value ? (k(), l("span", Al, [T.value.addedLines ? (k(), s(co, {
|
|
5917
5924
|
key: 0,
|
|
5918
5925
|
kind: "added",
|
|
@@ -5924,7 +5931,7 @@ var hl = {
|
|
|
5924
5931
|
label: "Total removed lines",
|
|
5925
5932
|
value: T.value.removedLines
|
|
5926
5933
|
}, null, 8, ["value"])) : c("", !0)])) : c("", !0),
|
|
5927
|
-
D.value ? (k(), s(
|
|
5934
|
+
D.value ? (k(), s(I(d.value ? B(fe) : B(ue)), {
|
|
5928
5935
|
key: 1,
|
|
5929
5936
|
class: "chat-tool-group__chevron",
|
|
5930
5937
|
size: 15
|
|
@@ -5933,7 +5940,7 @@ var hl = {
|
|
|
5933
5940
|
_: 1
|
|
5934
5941
|
}, 8, ["class", "type"])) : c("", !0),
|
|
5935
5942
|
m(Rs, { open: d.value }, {
|
|
5936
|
-
default:
|
|
5943
|
+
default: W(() => [u("div", jl, [(k(!0), l(t, null, P(b.value, (t) => (k(), s(Dl, {
|
|
5937
5944
|
key: t.id,
|
|
5938
5945
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
5939
5946
|
headerless: v.value,
|
|
@@ -5958,7 +5965,7 @@ var hl = {
|
|
|
5958
5965
|
"aria-live": "polite",
|
|
5959
5966
|
onAfterLeave: F
|
|
5960
5967
|
}, {
|
|
5961
|
-
default:
|
|
5968
|
+
default: W(() => [(k(!0), l(t, null, P(S.value, (t) => (k(), l("div", {
|
|
5962
5969
|
key: t.id,
|
|
5963
5970
|
class: "chat-tool-group__running-item"
|
|
5964
5971
|
}, [u("div", Ml, [m(Dl, {
|
|
@@ -6137,7 +6144,7 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6137
6144
|
function h(e) {
|
|
6138
6145
|
return !!(e && /^#[\da-f]{3,8}$/i.test(e));
|
|
6139
6146
|
}
|
|
6140
|
-
return (e, n) => (k(), l("div", Wl, [u("p", null, [(k(!0), l(t, null, P(i.value, (i, o) => (k(), l(t, { key: `${i.type}-${o}` }, [i.type === "text" ? (k(), l("span", Gl,
|
|
6147
|
+
return (e, n) => (k(), l("div", Wl, [u("p", null, [(k(!0), l(t, null, P(i.value, (i, o) => (k(), l(t, { key: `${i.type}-${o}` }, [i.type === "text" ? (k(), l("span", Gl, R(i.text), 1)) : i.type === "code" ? (k(), l("code", Kl, R(i.text), 1)) : i.type === "line-break" ? (k(), l("br", ql)) : i.type === "custom-mention" ? F(e.$slots, "mention", {
|
|
6141
6148
|
group: i.group,
|
|
6142
6149
|
item: i.item,
|
|
6143
6150
|
token: i,
|
|
@@ -6145,10 +6152,10 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6145
6152
|
}, () => [u("span", {
|
|
6146
6153
|
class: "chat-user-text__mention chat-user-text__mention--custom",
|
|
6147
6154
|
title: i.item.description || i.displayName
|
|
6148
|
-
}, [m(
|
|
6155
|
+
}, [m(B(Le), {
|
|
6149
6156
|
class: "chat-user-text__mention-icon",
|
|
6150
6157
|
"aria-hidden": "true"
|
|
6151
|
-
}), u("span", Yl,
|
|
6158
|
+
}), u("span", Yl, R(i.displayName), 1)], 8, Jl)], !0, 3) : (k(), l("span", {
|
|
6152
6159
|
key: 4,
|
|
6153
6160
|
class: C(["chat-user-text__mention", `chat-user-text__mention--${i.type === "plugin-mention" ? "plugin" : "skill"}`]),
|
|
6154
6161
|
style: T(d(i)),
|
|
@@ -6179,12 +6186,12 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6179
6186
|
referrerpolicy: "no-referrer",
|
|
6180
6187
|
onError: (e) => r.add(a(i, "dark"))
|
|
6181
6188
|
}, null, 40, Ql)) : c("", !0),
|
|
6182
|
-
i.type === "plugin-mention" ? (k(), l("svg", $l, [...n[0] ||= [f("<path d=\"M8 3v4\" data-v-cd57e1c4></path><path d=\"M16 3v4\" data-v-cd57e1c4></path><path d=\"M6 7h12v3a6 6 0 0 1-12 0V7\" data-v-cd57e1c4></path><path d=\"M12 16v5\" data-v-cd57e1c4></path><path d=\"M9 21h6\" data-v-cd57e1c4></path>", 5)]])) : (k(), s(
|
|
6189
|
+
i.type === "plugin-mention" ? (k(), l("svg", $l, [...n[0] ||= [f("<path d=\"M8 3v4\" data-v-cd57e1c4></path><path d=\"M16 3v4\" data-v-cd57e1c4></path><path d=\"M6 7h12v3a6 6 0 0 1-12 0V7\" data-v-cd57e1c4></path><path d=\"M12 16v5\" data-v-cd57e1c4></path><path d=\"M9 21h6\" data-v-cd57e1c4></path>", 5)]])) : (k(), s(B(Le), {
|
|
6183
6190
|
key: 3,
|
|
6184
6191
|
class: "chat-user-text__mention-icon",
|
|
6185
6192
|
"aria-hidden": "true"
|
|
6186
6193
|
}))
|
|
6187
|
-
], 2), u("span", eu,
|
|
6194
|
+
], 2), u("span", eu, R(i.displayName), 1)], 14, Xl))], 64))), 128))])]));
|
|
6188
6195
|
}
|
|
6189
6196
|
}), [["__scopeId", "data-v-cd57e1c4"]]), nu = {
|
|
6190
6197
|
key: 1,
|
|
@@ -6210,15 +6217,25 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6210
6217
|
type: "button",
|
|
6211
6218
|
onClick: i
|
|
6212
6219
|
}, [
|
|
6213
|
-
m(
|
|
6214
|
-
u("span", null,
|
|
6215
|
-
m(
|
|
6216
|
-
])) : (k(), l("div", nu, [m(
|
|
6220
|
+
m(B(Se), { class: "chat-visualization-block__icon" }),
|
|
6221
|
+
u("span", null, R(e.title), 1),
|
|
6222
|
+
m(B(_e), { class: "chat-visualization-block__open" })
|
|
6223
|
+
])) : (k(), l("div", nu, [m(B(Se), { class: "chat-visualization-block__icon" }), u("span", null, R(e.title), 1)]));
|
|
6217
6224
|
}
|
|
6218
|
-
}), [["__scopeId", "data-v-6aa2f6f0"]])
|
|
6225
|
+
}), [["__scopeId", "data-v-6aa2f6f0"]]);
|
|
6226
|
+
//#endregion
|
|
6227
|
+
//#region src/chat/work-duration.ts
|
|
6228
|
+
function iu(e) {
|
|
6229
|
+
if (e == null || !Number.isFinite(e) || e < 1e3) return "";
|
|
6230
|
+
let t = Math.floor(e / 1e3), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
6231
|
+
return n > 0 ? r > 0 ? `${n}h ${r}m` : `${n}h` : r > 0 ? i > 0 ? `${r}m ${i}s` : `${r}m` : `${i}s`;
|
|
6232
|
+
}
|
|
6233
|
+
//#endregion
|
|
6234
|
+
//#region src/chat/ChatWorkGroup.vue?vue&type=script&setup=true&lang.ts
|
|
6235
|
+
var au = ["aria-expanded", "disabled"], ou = ["data-label"], su = { class: "chat-work-group__body" }, cu = {
|
|
6219
6236
|
key: 2,
|
|
6220
6237
|
class: "chat-work-group__body chat-work-group__body--continuation"
|
|
6221
|
-
},
|
|
6238
|
+
}, lu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6222
6239
|
__name: "ChatWorkGroup",
|
|
6223
6240
|
props: {
|
|
6224
6241
|
active: { type: Boolean },
|
|
@@ -6226,13 +6243,29 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6226
6243
|
finalStarted: { type: Boolean }
|
|
6227
6244
|
},
|
|
6228
6245
|
setup(e) {
|
|
6229
|
-
let t = e, n = Wn(), r = b(ro, void 0), i = b(io, void 0), a = o(() => r?.enabled.value === !0 && i !== void 0), d = o(() => a.value ? r.completedWithoutFinal.value : !t.active && !t.finalStarted), f = M(t.active && !t.finalStarted), p = M(!1), m = o(() => a.value ? r.active.value : t.active && !t.finalStarted), h = o(() => m.value || d.value ? !0 : a.value ? r.expanded.value : f.value), g = o(() => !t.continuation && !d.value && (!a.value || r.headerMessageIndex.value === i.value)), _ =
|
|
6230
|
-
|
|
6246
|
+
let t = e, n = Wn(), r = b(ro, void 0), i = b(io, void 0), a = o(() => r?.enabled.value === !0 && i !== void 0), d = o(() => a.value ? r.completedWithoutFinal.value : !t.active && !t.finalStarted), f = M(t.active && !t.finalStarted), p = M(!1), m = o(() => a.value ? r.active.value : t.active && !t.finalStarted), h = o(() => m.value || d.value ? !0 : a.value ? r.expanded.value : f.value), g = o(() => !t.continuation && !d.value && (!a.value || r.headerMessageIndex.value === i.value)), _ = M(Date.now()), v;
|
|
6247
|
+
U(m, (e) => {
|
|
6248
|
+
clearInterval(v), v = void 0, e && (_.value = Date.now(), v = setInterval(() => {
|
|
6249
|
+
_.value = Date.now();
|
|
6250
|
+
}, 1e3));
|
|
6251
|
+
}, { immediate: !0 }), O(() => clearInterval(v));
|
|
6252
|
+
let y = o(() => {
|
|
6253
|
+
if (!a.value) return "";
|
|
6254
|
+
if (!m.value) return iu(r.durationMs?.value);
|
|
6255
|
+
let e = r.startedAt?.value;
|
|
6256
|
+
return e ? iu(_.value - Date.parse(e)) : "";
|
|
6257
|
+
}), x = o(() => {
|
|
6258
|
+
let e = { duration: y.value }, t = y.value !== "", i = m.value ? "working" : r?.status.value === "interrupted" ? "stopped" : r?.status.value === "failed" ? "failed" : "done";
|
|
6259
|
+
if (i === "working") return n(t ? "chat.work.workingFor" : "chat.work.working", e);
|
|
6260
|
+
let a = h.value ? "HideDetails" : "ViewDetails";
|
|
6261
|
+
return n(`chat.work.${i}${a}${t ? "For" : ""}`, e);
|
|
6262
|
+
});
|
|
6263
|
+
U(() => t.finalStarted, (e, t) => {
|
|
6231
6264
|
!a.value && e && !t && (f.value = !1);
|
|
6232
|
-
}),
|
|
6265
|
+
}), U(() => t.active, (e) => {
|
|
6233
6266
|
!a.value && !p.value && (f.value = e && !t.finalStarted);
|
|
6234
6267
|
});
|
|
6235
|
-
function
|
|
6268
|
+
function S() {
|
|
6236
6269
|
if (!m.value) {
|
|
6237
6270
|
if (a.value) {
|
|
6238
6271
|
r.toggle();
|
|
@@ -6250,22 +6283,22 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6250
6283
|
class: "chat-work-group__header",
|
|
6251
6284
|
"aria-expanded": h.value,
|
|
6252
6285
|
disabled: m.value,
|
|
6253
|
-
onClick:
|
|
6286
|
+
onClick: S
|
|
6254
6287
|
}, [u("span", {
|
|
6255
6288
|
class: C(["chat-work-group__title", { "codex-text-shimmer": m.value }]),
|
|
6256
|
-
"data-label":
|
|
6257
|
-
},
|
|
6289
|
+
"data-label": x.value
|
|
6290
|
+
}, R(x.value), 11, ou), m.value ? c("", !0) : (k(), s(I(h.value ? B(ue) : B(de)), {
|
|
6258
6291
|
key: 0,
|
|
6259
6292
|
size: 15
|
|
6260
|
-
}))], 8,
|
|
6293
|
+
}))], 8, au)) : c("", !0), g.value ? (k(), s(Rs, {
|
|
6261
6294
|
key: 1,
|
|
6262
6295
|
open: h.value
|
|
6263
6296
|
}, {
|
|
6264
|
-
default:
|
|
6297
|
+
default: W(() => [u("div", su, [F(e.$slots, "default", {}, void 0, !0)])]),
|
|
6265
6298
|
_: 3
|
|
6266
|
-
}, 8, ["open"])) : (k(), l("div",
|
|
6299
|
+
}, 8, ["open"])) : (k(), l("div", cu, [F(e.$slots, "default", {}, void 0, !0)]))], 2)) : c("", !0);
|
|
6267
6300
|
}
|
|
6268
|
-
}), [["__scopeId", "data-v-
|
|
6301
|
+
}), [["__scopeId", "data-v-0c35c769"]]), uu = ["innerHTML"], du = ["innerHTML"], fu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6269
6302
|
__name: "ChatMessageBlock",
|
|
6270
6303
|
props: {
|
|
6271
6304
|
block: {},
|
|
@@ -6304,7 +6337,7 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6304
6337
|
for (let e of h.values()) clearTimeout(e);
|
|
6305
6338
|
h.clear();
|
|
6306
6339
|
}), (n, r) => {
|
|
6307
|
-
let a =
|
|
6340
|
+
let a = te("ChatMessageBlock", !0);
|
|
6308
6341
|
return e.block.type === "user-text" ? F(n.$slots, "text", {
|
|
6309
6342
|
block: e.block,
|
|
6310
6343
|
content: e.block.content
|
|
@@ -6316,7 +6349,7 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6316
6349
|
skills: e.skills
|
|
6317
6350
|
}, d({ _: 2 }, [n.$slots.mention ? {
|
|
6318
6351
|
name: "mention",
|
|
6319
|
-
fn:
|
|
6352
|
+
fn: W((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
|
|
6320
6353
|
key: "0"
|
|
6321
6354
|
} : void 0]), 1032, [
|
|
6322
6355
|
"content",
|
|
@@ -6331,12 +6364,12 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6331
6364
|
class: "codex-chat-theme chat-message-block chat-message-block--text codex-markdown",
|
|
6332
6365
|
innerHTML: p.value,
|
|
6333
6366
|
onClick: g
|
|
6334
|
-
}, null, 8,
|
|
6367
|
+
}, null, 8, uu)], !0, 1) : e.block.type === "reasoning" ? (k(), l("div", {
|
|
6335
6368
|
key: 2,
|
|
6336
6369
|
class: "codex-chat-theme chat-message-block chat-message-block--reasoning codex-markdown",
|
|
6337
6370
|
innerHTML: p.value,
|
|
6338
6371
|
onClick: g
|
|
6339
|
-
}, null, 8,
|
|
6372
|
+
}, null, 8, du)) : e.block.type === "html" ? (k(), s(sl, {
|
|
6340
6373
|
key: 3,
|
|
6341
6374
|
source: e.block.source,
|
|
6342
6375
|
title: e.block.title,
|
|
@@ -6404,13 +6437,13 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6404
6437
|
"answered-client-request-ids",
|
|
6405
6438
|
"show-tool-details",
|
|
6406
6439
|
"tool-calls"
|
|
6407
|
-
])], !0, 10) : e.block.type === "work-group" ? (k(), s(
|
|
6440
|
+
])], !0, 10) : e.block.type === "work-group" ? (k(), s(lu, {
|
|
6408
6441
|
key: 11,
|
|
6409
6442
|
active: e.block.active,
|
|
6410
6443
|
continuation: e.block.continuation,
|
|
6411
6444
|
"final-started": e.block.finalStarted
|
|
6412
6445
|
}, {
|
|
6413
|
-
default:
|
|
6446
|
+
default: W(() => [(k(!0), l(t, null, P(e.block.blocks, (t, o) => F(n.$slots, "block", {
|
|
6414
6447
|
block: t,
|
|
6415
6448
|
blockIndex: o
|
|
6416
6449
|
}, () => [m(a, {
|
|
@@ -6430,17 +6463,17 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6430
6463
|
}, d({ _: 2 }, [
|
|
6431
6464
|
n.$slots.block ? {
|
|
6432
6465
|
name: "block",
|
|
6433
|
-
fn:
|
|
6466
|
+
fn: W((e) => [F(n.$slots, "block", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
6434
6467
|
key: "0"
|
|
6435
6468
|
} : void 0,
|
|
6436
6469
|
n.$slots.text ? {
|
|
6437
6470
|
name: "text",
|
|
6438
|
-
fn:
|
|
6471
|
+
fn: W((e) => [F(n.$slots, "text", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
6439
6472
|
key: "1"
|
|
6440
6473
|
} : void 0,
|
|
6441
6474
|
n.$slots.tool ? {
|
|
6442
6475
|
name: "tool",
|
|
6443
|
-
fn:
|
|
6476
|
+
fn: W((e) => [F(n.$slots, "tool", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
6444
6477
|
key: "2"
|
|
6445
6478
|
} : void 0
|
|
6446
6479
|
]), 1032, [
|
|
@@ -6466,15 +6499,15 @@ var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key
|
|
|
6466
6499
|
}, null, 8, ["disabled", "prompts"])) : c("", !0);
|
|
6467
6500
|
};
|
|
6468
6501
|
}
|
|
6469
|
-
}), [["__scopeId", "data-v-9351ce41"]]),
|
|
6470
|
-
function
|
|
6502
|
+
}), [["__scopeId", "data-v-9351ce41"]]), pu = 1440 * 60 * 1e3;
|
|
6503
|
+
function mu(e, t = /* @__PURE__ */ new Date()) {
|
|
6471
6504
|
let n = new Date(e);
|
|
6472
6505
|
if (Number.isNaN(n.getTime())) return "";
|
|
6473
6506
|
let r = {
|
|
6474
6507
|
hour: "numeric",
|
|
6475
6508
|
minute: "2-digit"
|
|
6476
6509
|
};
|
|
6477
|
-
return
|
|
6510
|
+
return gu(n, t) ? new Intl.DateTimeFormat(void 0, r).format(n) : n.getTime() < t.getTime() && t.getTime() - n.getTime() < 7 * pu ? new Intl.DateTimeFormat(void 0, {
|
|
6478
6511
|
weekday: "short",
|
|
6479
6512
|
...r
|
|
6480
6513
|
}).format(n) : new Intl.DateTimeFormat(void 0, {
|
|
@@ -6482,19 +6515,19 @@ function pu(e, t = /* @__PURE__ */ new Date()) {
|
|
|
6482
6515
|
timeStyle: "short"
|
|
6483
6516
|
}).format(n);
|
|
6484
6517
|
}
|
|
6485
|
-
function
|
|
6518
|
+
function hu(e) {
|
|
6486
6519
|
let t = new Date(e);
|
|
6487
6520
|
return Number.isNaN(t.getTime()) ? "" : new Intl.DateTimeFormat(void 0, {
|
|
6488
6521
|
dateStyle: "full",
|
|
6489
6522
|
timeStyle: "short"
|
|
6490
6523
|
}).format(t);
|
|
6491
6524
|
}
|
|
6492
|
-
function
|
|
6525
|
+
function gu(e, t) {
|
|
6493
6526
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
6494
6527
|
}
|
|
6495
6528
|
//#endregion
|
|
6496
6529
|
//#region src/chat/ChatMessageActions.vue?vue&type=script&setup=true&lang.ts
|
|
6497
|
-
var
|
|
6530
|
+
var _u = ["aria-busy", "aria-label"], vu = ["title"], yu = ["title"], bu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6498
6531
|
__name: "ChatMessageActions",
|
|
6499
6532
|
props: {
|
|
6500
6533
|
canDelete: {
|
|
@@ -6528,26 +6561,26 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6528
6561
|
"retry"
|
|
6529
6562
|
],
|
|
6530
6563
|
setup(e, { emit: t }) {
|
|
6531
|
-
let n = e, r = t, i = Wn(), a = o(() => n.presentation?.copy !== !1), u = o(() => n.presentation?.delete !== !1), d = o(() => n.presentation?.edit !== !1), f = o(() => n.presentation?.fork !== !1), p = o(() => n.presentation?.quote !== !1), h = o(() => n.presentation?.retry !== !1), g = o(() => n.message.createdAt ?
|
|
6564
|
+
let n = e, r = t, i = Wn(), a = o(() => n.presentation?.copy !== !1), u = o(() => n.presentation?.delete !== !1), d = o(() => n.presentation?.edit !== !1), f = o(() => n.presentation?.fork !== !1), p = o(() => n.presentation?.quote !== !1), h = o(() => n.presentation?.retry !== !1), g = o(() => n.message.createdAt ? mu(n.message.createdAt) : ""), _ = o(() => n.message.createdAt ? hu(n.message.createdAt) : void 0);
|
|
6532
6565
|
async function v() {
|
|
6533
6566
|
await n.copyAction?.(), r("copy");
|
|
6534
6567
|
}
|
|
6535
6568
|
return (t, n) => (k(), l("div", {
|
|
6536
6569
|
class: C(["codex-chat-theme chat-message-actions", `chat-message-actions--${e.message.role}`]),
|
|
6537
6570
|
"aria-busy": e.deleting ? "true" : void 0,
|
|
6538
|
-
"aria-label":
|
|
6571
|
+
"aria-label": B(i)("chat.actions.label")
|
|
6539
6572
|
}, [
|
|
6540
6573
|
g.value && e.message.role === "user" ? (k(), l("span", {
|
|
6541
6574
|
key: 0,
|
|
6542
6575
|
class: "chat-message-actions__sent-at",
|
|
6543
6576
|
title: _.value
|
|
6544
|
-
},
|
|
6577
|
+
}, R(g.value), 9, vu)) : c("", !0),
|
|
6545
6578
|
a.value ? (k(), s(Is, {
|
|
6546
6579
|
key: 1,
|
|
6547
6580
|
action: v,
|
|
6548
|
-
"copied-label":
|
|
6581
|
+
"copied-label": B(i)("chat.actions.copied"),
|
|
6549
6582
|
disabled: e.deleting,
|
|
6550
|
-
label:
|
|
6583
|
+
label: B(i)("chat.actions.copy")
|
|
6551
6584
|
}, null, 8, [
|
|
6552
6585
|
"copied-label",
|
|
6553
6586
|
"disabled",
|
|
@@ -6556,60 +6589,60 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6556
6589
|
e.message.role === "user" && e.canEdit && d.value ? (k(), s(Ss, {
|
|
6557
6590
|
key: 2,
|
|
6558
6591
|
disabled: e.deleting,
|
|
6559
|
-
label:
|
|
6592
|
+
label: B(i)("chat.actions.edit"),
|
|
6560
6593
|
onClick: n[0] ||= (e) => r("edit")
|
|
6561
6594
|
}, {
|
|
6562
|
-
default:
|
|
6595
|
+
default: W(() => [m(B(Y))]),
|
|
6563
6596
|
_: 1
|
|
6564
6597
|
}, 8, ["disabled", "label"])) : c("", !0),
|
|
6565
6598
|
e.message.role === "user" && p.value ? (k(), s(Ss, {
|
|
6566
6599
|
key: 3,
|
|
6567
6600
|
disabled: e.deleting,
|
|
6568
|
-
label:
|
|
6601
|
+
label: B(i)("chat.actions.quote"),
|
|
6569
6602
|
onClick: n[1] ||= (e) => r("quote")
|
|
6570
6603
|
}, {
|
|
6571
|
-
default:
|
|
6604
|
+
default: W(() => [m(B(Ne))]),
|
|
6572
6605
|
_: 1
|
|
6573
6606
|
}, 8, ["disabled", "label"])) : c("", !0),
|
|
6574
6607
|
e.message.role === "assistant" && e.canRetry && h.value ? (k(), s(Ss, {
|
|
6575
6608
|
key: 4,
|
|
6576
6609
|
disabled: e.mutationDisabled || e.deleting,
|
|
6577
|
-
label:
|
|
6610
|
+
label: B(i)("chat.actions.retry"),
|
|
6578
6611
|
onClick: n[2] ||= (e) => r("retry")
|
|
6579
6612
|
}, {
|
|
6580
|
-
default:
|
|
6613
|
+
default: W(() => [m(B(Pe))]),
|
|
6581
6614
|
_: 1
|
|
6582
6615
|
}, 8, ["disabled", "label"])) : c("", !0),
|
|
6583
6616
|
e.canFork && f.value ? (k(), s(Ss, {
|
|
6584
6617
|
key: 5,
|
|
6585
6618
|
disabled: e.mutationDisabled || e.deleting,
|
|
6586
|
-
label:
|
|
6619
|
+
label: B(i)("chat.actions.fork"),
|
|
6587
6620
|
onClick: n[3] ||= (e) => r("fork")
|
|
6588
6621
|
}, {
|
|
6589
|
-
default:
|
|
6622
|
+
default: W(() => [m(B(oe), { class: "chat-message-actions__fork-icon" })]),
|
|
6590
6623
|
_: 1
|
|
6591
6624
|
}, 8, ["disabled", "label"])) : c("", !0),
|
|
6592
6625
|
e.canDelete && u.value ? (k(), s(Ss, {
|
|
6593
6626
|
key: 6,
|
|
6594
6627
|
danger: "",
|
|
6595
6628
|
disabled: e.mutationDisabled || e.deleting,
|
|
6596
|
-
label: e.deleting ?
|
|
6629
|
+
label: e.deleting ? B(i)("chat.actions.deleting") : B(i)("chat.actions.delete"),
|
|
6597
6630
|
onClick: n[4] ||= (e) => r("delete")
|
|
6598
6631
|
}, {
|
|
6599
|
-
default:
|
|
6632
|
+
default: W(() => [e.deleting ? (k(), s(B(we), {
|
|
6600
6633
|
key: 0,
|
|
6601
6634
|
class: "chat-message-actions__spinner"
|
|
6602
|
-
})) : (k(), s(
|
|
6635
|
+
})) : (k(), s(B(qe), { key: 1 }))]),
|
|
6603
6636
|
_: 1
|
|
6604
6637
|
}, 8, ["disabled", "label"])) : c("", !0),
|
|
6605
6638
|
g.value && e.message.role === "assistant" ? (k(), l("span", {
|
|
6606
6639
|
key: 7,
|
|
6607
6640
|
class: "chat-message-actions__sent-at",
|
|
6608
6641
|
title: _.value
|
|
6609
|
-
},
|
|
6610
|
-
], 10,
|
|
6642
|
+
}, R(g.value), 9, yu)) : c("", !0)
|
|
6643
|
+
], 10, _u));
|
|
6611
6644
|
}
|
|
6612
|
-
}), [["__scopeId", "data-v-704b28cf"]]),
|
|
6645
|
+
}), [["__scopeId", "data-v-704b28cf"]]), xu = ["data-label"], Su = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6613
6646
|
__name: "ChatCompactionMessage",
|
|
6614
6647
|
props: {
|
|
6615
6648
|
completedTitle: {},
|
|
@@ -6621,9 +6654,9 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6621
6654
|
return (e, t) => (k(), l("div", { class: C(["codex-chat-theme chat-message chat-message--compaction", { "chat-message--compaction-running": n.value }]) }, [t[0] ||= u("div", { class: "chat-message__compaction-line" }, null, -1), u("span", {
|
|
6622
6655
|
class: "chat-message__compaction-title",
|
|
6623
6656
|
"data-label": r.value
|
|
6624
|
-
}, [u("span", { class: C(["chat-message__compaction-label", { "codex-text-shimmer": n.value }]) },
|
|
6657
|
+
}, [u("span", { class: C(["chat-message__compaction-label", { "codex-text-shimmer": n.value }]) }, R(r.value), 3)], 8, xu)], 2));
|
|
6625
6658
|
}
|
|
6626
|
-
}), [["__scopeId", "data-v-49449489"]]),
|
|
6659
|
+
}), [["__scopeId", "data-v-49449489"]]), Cu = { class: "codex-chat-theme chat-message__edit-card" }, wu = ["aria-label", "onKeydown"], Tu = { class: "chat-message__edit-actions" }, Eu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6627
6660
|
__name: "ChatMessageEditor",
|
|
6628
6661
|
props: {
|
|
6629
6662
|
cancelLabel: {},
|
|
@@ -6634,7 +6667,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6634
6667
|
emits: ["cancel", "save"],
|
|
6635
6668
|
setup(e, { emit: t }) {
|
|
6636
6669
|
let n = e, r = t, i = M(n.content), a = M(null), o = null;
|
|
6637
|
-
|
|
6670
|
+
U(() => n.content, (e) => {
|
|
6638
6671
|
i.value = e;
|
|
6639
6672
|
}), D(() => {
|
|
6640
6673
|
o = requestAnimationFrame(() => {
|
|
@@ -6651,44 +6684,44 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6651
6684
|
let e = i.value.trim();
|
|
6652
6685
|
e && r("save", e);
|
|
6653
6686
|
}
|
|
6654
|
-
return (t, n) => (k(), l("div",
|
|
6687
|
+
return (t, n) => (k(), l("div", Cu, [ie(u("textarea", {
|
|
6655
6688
|
ref_key: "input",
|
|
6656
6689
|
ref: a,
|
|
6657
6690
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
6658
6691
|
class: "chat-message__edit-input",
|
|
6659
6692
|
"aria-label": e.inputLabel,
|
|
6660
6693
|
onKeydown: [
|
|
6661
|
-
K(
|
|
6662
|
-
K(
|
|
6663
|
-
K(
|
|
6694
|
+
G(K(s, ["prevent"]), ["escape"]),
|
|
6695
|
+
G(K(c, ["meta", "prevent"]), ["enter"]),
|
|
6696
|
+
G(K(c, ["ctrl", "prevent"]), ["enter"])
|
|
6664
6697
|
]
|
|
6665
|
-
}, null, 40,
|
|
6698
|
+
}, null, 40, wu), [[H, i.value]]), u("div", Tu, [u("button", {
|
|
6666
6699
|
type: "button",
|
|
6667
6700
|
class: "chat-message__edit-button",
|
|
6668
6701
|
onClick: s
|
|
6669
|
-
},
|
|
6702
|
+
}, R(e.cancelLabel), 1), u("button", {
|
|
6670
6703
|
type: "button",
|
|
6671
6704
|
class: "chat-message__edit-button chat-message__edit-button--primary",
|
|
6672
6705
|
onClick: c
|
|
6673
|
-
},
|
|
6706
|
+
}, R(e.saveLabel), 1)])]));
|
|
6674
6707
|
}
|
|
6675
|
-
}), [["__scopeId", "data-v-181e3239"]]),
|
|
6708
|
+
}), [["__scopeId", "data-v-181e3239"]]), Du = { class: "chat-message__body" }, Ou = {
|
|
6676
6709
|
key: 0,
|
|
6677
6710
|
class: "chat-message--steer chat-message--steer-above"
|
|
6678
|
-
},
|
|
6711
|
+
}, ku = {
|
|
6679
6712
|
key: 1,
|
|
6680
6713
|
class: "chat-message__attachments",
|
|
6681
6714
|
"aria-label": "Message attachments"
|
|
6682
|
-
},
|
|
6715
|
+
}, Au = {
|
|
6683
6716
|
key: 2,
|
|
6684
6717
|
class: "chat-message__stack"
|
|
6685
|
-
},
|
|
6718
|
+
}, ju = {
|
|
6686
6719
|
key: 0,
|
|
6687
6720
|
class: "chat-message__empty-response"
|
|
6688
|
-
},
|
|
6721
|
+
}, Mu = ["data-label"], Nu = {
|
|
6689
6722
|
key: 4,
|
|
6690
6723
|
class: "chat-message--steer chat-message--steer-below"
|
|
6691
|
-
},
|
|
6724
|
+
}, Pu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6692
6725
|
__name: "CodexMessage",
|
|
6693
6726
|
props: {
|
|
6694
6727
|
activityState: {},
|
|
@@ -6744,7 +6777,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6744
6777
|
let r = e, i = n, a = Ti(), f = Wn(), p = o(() => r.activityState === "working" ? f("chat.work.working") : "Thinking"), h = o(() => $(r.message)), g = b(ro, void 0);
|
|
6745
6778
|
ee(io, o(() => r.index));
|
|
6746
6779
|
let _ = o(() => h.value.turnId === g?.turnId.value ? g : void 0), v = o(() => _.value?.enabled.value ? _.value : void 0), y = o(() => v.value?.active.value), S = o(() => Dt(r.presentation));
|
|
6747
|
-
ee(no, b(no, void 0) ??
|
|
6780
|
+
ee(no, b(no, void 0) ?? ne(/* @__PURE__ */ new Map()));
|
|
6748
6781
|
let w = o(() => ga(h.value)), T = o(() => w.value.filter((e) => (e.type !== "question" || !r.hiddenClientRequestIds?.has(e.request.id)) && (S.value.messages.toolBlocks || e.type !== "tool" && e.type !== "tool-group"))), E = o(() => {
|
|
6749
6782
|
let e = v.value;
|
|
6750
6783
|
if (!e) return;
|
|
@@ -6760,53 +6793,53 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6760
6793
|
}))), N = o(() => w.value.map((e, t) => ({
|
|
6761
6794
|
block: e,
|
|
6762
6795
|
blockIndex: t
|
|
6763
|
-
}))),
|
|
6764
|
-
function
|
|
6765
|
-
h.value.role !== "user" || !
|
|
6796
|
+
}))), te = o(() => h.value.role === "user" ? N.value.filter(({ block: e }) => e.type === "attachment") : []), I = o(() => h.value.role === "user" ? N.value.filter(({ block: e }) => e.type !== "attachment") : j.value), L = o(() => Ca(h.value.content)), z = M(!1), V = o(() => h.value.type !== "compaction" && h.value.type !== "steer" && !O.value && !z.value), H = o(() => r.actionsDisabled || h.value.role === "assistant" && h.value.streaming === !0), re = o(() => V.value), U = o(() => !!h.value.turnId && r.canDeleteTurn && S.value.messages.actions.delete), ie = o(() => !!h.value.turnId && r.canEditTurn && S.value.messages.actions.edit), G = o(() => !!h.value.turnId && r.canForkTurn && S.value.messages.actions.fork), K = o(() => !!h.value.turnId && r.canRetryTurn && S.value.messages.actions.retry), ae = o(() => D.value.some(_e)), oe = o(() => _.value?.latestStreamingAssistantIndex.value === void 0 || _.value.latestStreamingAssistantIndex.value === r.index), q = o(() => h.value.role === "assistant" && h.value.streaming !== !0 && w.value.length === 0), se = o(() => h.value.role === "assistant" && h.value.streaming === !0 && oe.value && !ae.value), ce = o(() => h.value.role === "assistant" && h.value.streaming === !0 && oe.value && ae.value);
|
|
6797
|
+
function le() {
|
|
6798
|
+
h.value.role !== "user" || !ie.value || (z.value = !0);
|
|
6766
6799
|
}
|
|
6767
|
-
function
|
|
6768
|
-
|
|
6800
|
+
function ue() {
|
|
6801
|
+
z.value = !1;
|
|
6769
6802
|
}
|
|
6770
|
-
function
|
|
6803
|
+
function de(e) {
|
|
6771
6804
|
let t = h.value.turnId;
|
|
6772
6805
|
t && (i("edit-turn", {
|
|
6773
6806
|
content: e,
|
|
6774
6807
|
turnId: t
|
|
6775
|
-
}),
|
|
6808
|
+
}), ue());
|
|
6776
6809
|
}
|
|
6777
|
-
function
|
|
6778
|
-
if (!
|
|
6810
|
+
function fe() {
|
|
6811
|
+
if (!U.value || r.threadActionsDisabled) return;
|
|
6779
6812
|
let e = h.value.turnId;
|
|
6780
6813
|
e && i("delete-turn", e);
|
|
6781
6814
|
}
|
|
6782
|
-
function
|
|
6783
|
-
if (!
|
|
6815
|
+
function pe() {
|
|
6816
|
+
if (!G.value || r.threadActionsDisabled) return;
|
|
6784
6817
|
let e = h.value.turnId;
|
|
6785
6818
|
e && i("fork-turn", e);
|
|
6786
6819
|
}
|
|
6787
|
-
function
|
|
6788
|
-
if (!
|
|
6820
|
+
function me() {
|
|
6821
|
+
if (!K.value || r.threadActionsDisabled) return;
|
|
6789
6822
|
let e = h.value.turnId;
|
|
6790
6823
|
e && i("retry-turn", e);
|
|
6791
6824
|
}
|
|
6792
|
-
function
|
|
6825
|
+
function he(e, t) {
|
|
6793
6826
|
return r.openImage?.(e, {
|
|
6794
6827
|
index: r.index,
|
|
6795
6828
|
intent: t?.intent ?? "open",
|
|
6796
6829
|
message: h.value
|
|
6797
6830
|
});
|
|
6798
6831
|
}
|
|
6799
|
-
async function
|
|
6832
|
+
async function ge() {
|
|
6800
6833
|
await Kc(h.value.content, a);
|
|
6801
6834
|
}
|
|
6802
|
-
function
|
|
6835
|
+
function _e(e) {
|
|
6803
6836
|
return e.type === "text" ? e.content.trim().length > 0 : e.type === "attachment" || e.type === "media" || e.type === "mermaid" || e.type === "html" || e.type === "reasoning" || e.type === "tool" || e.type === "tool-group" || e.type === "visualization" || e.type === "work-group";
|
|
6804
6837
|
}
|
|
6805
|
-
return (n, r) => h.value.type === "compaction" ? (k(), s(
|
|
6838
|
+
return (n, r) => h.value.type === "compaction" ? (k(), s(Su, {
|
|
6806
6839
|
key: 0,
|
|
6807
6840
|
class: "codex-chat-theme",
|
|
6808
|
-
"completed-title":
|
|
6809
|
-
"running-title":
|
|
6841
|
+
"completed-title": B(f)("chat.compaction.completed"),
|
|
6842
|
+
"running-title": B(f)("chat.compaction.running"),
|
|
6810
6843
|
status: h.value.compactionStatus
|
|
6811
6844
|
}, null, 8, [
|
|
6812
6845
|
"completed-title",
|
|
@@ -6815,52 +6848,52 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6815
6848
|
])) : A.value ? c("", !0) : (k(), l("div", {
|
|
6816
6849
|
key: 1,
|
|
6817
6850
|
class: C(["codex-chat-theme chat-message", [`chat-message--${h.value.role}`, {
|
|
6818
|
-
"chat-message--actions-visible": e.actionsAlwaysVisible && !
|
|
6819
|
-
"chat-message--editing":
|
|
6851
|
+
"chat-message--actions-visible": e.actionsAlwaysVisible && !H.value,
|
|
6852
|
+
"chat-message--editing": z.value
|
|
6820
6853
|
}]])
|
|
6821
|
-
}, [u("div",
|
|
6822
|
-
n.$slots.header ? (k(), l("div",
|
|
6854
|
+
}, [u("div", Du, [
|
|
6855
|
+
n.$slots.header ? (k(), l("div", Ou, [F(n.$slots, "header", {
|
|
6823
6856
|
index: e.index,
|
|
6824
6857
|
message: h.value
|
|
6825
6858
|
}, void 0, !0)])) : c("", !0),
|
|
6826
|
-
|
|
6859
|
+
te.value.length > 0 ? (k(), l("div", ku, [(k(!0), l(t, null, P(te.value, ({ block: t, blockIndex: r }) => F(n.$slots, "block", {
|
|
6827
6860
|
block: t,
|
|
6828
6861
|
blockIndex: r,
|
|
6829
6862
|
index: e.index,
|
|
6830
6863
|
message: h.value
|
|
6831
|
-
}, () => [m(
|
|
6864
|
+
}, () => [m(fu, {
|
|
6832
6865
|
block: t,
|
|
6833
|
-
"open-image":
|
|
6866
|
+
"open-image": he
|
|
6834
6867
|
}, d({ _: 2 }, [n.$slots.attachment ? {
|
|
6835
6868
|
name: "attachment",
|
|
6836
|
-
fn:
|
|
6869
|
+
fn: W((t) => [F(n.$slots, "attachment", x({ ref_for: !0 }, t, {
|
|
6837
6870
|
index: e.index,
|
|
6838
6871
|
message: h.value
|
|
6839
6872
|
}), void 0, !0)]),
|
|
6840
6873
|
key: "0"
|
|
6841
6874
|
} : void 0]), 1032, ["block"])], !0, `attachment-${r}`)), 128))])) : c("", !0),
|
|
6842
|
-
|
|
6875
|
+
z.value || I.value.length > 0 || q.value || se.value || ce.value ? (k(), l("div", Au, [z.value ? (k(), s(Eu, {
|
|
6843
6876
|
key: 0,
|
|
6844
|
-
"cancel-label":
|
|
6845
|
-
content:
|
|
6846
|
-
"input-label":
|
|
6847
|
-
"save-label":
|
|
6848
|
-
onCancel:
|
|
6849
|
-
onSave:
|
|
6877
|
+
"cancel-label": B(f)("chat.actions.cancel"),
|
|
6878
|
+
content: L.value,
|
|
6879
|
+
"input-label": B(f)("chat.actions.editPrompt"),
|
|
6880
|
+
"save-label": B(f)("chat.actions.resubmit"),
|
|
6881
|
+
onCancel: ue,
|
|
6882
|
+
onSave: de
|
|
6850
6883
|
}, null, 8, [
|
|
6851
6884
|
"cancel-label",
|
|
6852
6885
|
"content",
|
|
6853
6886
|
"input-label",
|
|
6854
6887
|
"save-label"
|
|
6855
6888
|
])) : (k(), l(t, { key: 1 }, [
|
|
6856
|
-
(k(!0), l(t, null, P(
|
|
6889
|
+
(k(!0), l(t, null, P(I.value, ({ block: a, blockIndex: o }) => (k(), l(t, { key: a.type === "tool" ? a.toolCall.id : `${a.type}-${o}` }, [a.type === "work-group" ? (k(), s(fu, {
|
|
6857
6890
|
key: 0,
|
|
6858
6891
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
6859
6892
|
block: a,
|
|
6860
6893
|
"follow-ups-disabled": e.followUpsDisabled,
|
|
6861
6894
|
"mention-groups": e.mentionGroups,
|
|
6862
6895
|
plugins: e.plugins,
|
|
6863
|
-
"open-image":
|
|
6896
|
+
"open-image": he,
|
|
6864
6897
|
"show-tool-details": e.showToolDetails,
|
|
6865
6898
|
skills: e.skills,
|
|
6866
6899
|
onCancel: r[0] ||= (e) => i("cancel"),
|
|
@@ -6871,7 +6904,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6871
6904
|
}, d({ _: 2 }, [
|
|
6872
6905
|
n.$slots.block ? {
|
|
6873
6906
|
name: "block",
|
|
6874
|
-
fn:
|
|
6907
|
+
fn: W((t) => [F(n.$slots, "block", x({ ref_for: !0 }, t, {
|
|
6875
6908
|
index: e.index,
|
|
6876
6909
|
message: h.value
|
|
6877
6910
|
}), void 0, !0)]),
|
|
@@ -6879,7 +6912,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6879
6912
|
} : void 0,
|
|
6880
6913
|
n.$slots.text ? {
|
|
6881
6914
|
name: "text",
|
|
6882
|
-
fn:
|
|
6915
|
+
fn: W((t) => [F(n.$slots, "text", x({ ref_for: !0 }, t, {
|
|
6883
6916
|
index: e.index,
|
|
6884
6917
|
message: h.value
|
|
6885
6918
|
}), void 0, !0)]),
|
|
@@ -6887,7 +6920,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6887
6920
|
} : void 0,
|
|
6888
6921
|
n.$slots.tool ? {
|
|
6889
6922
|
name: "tool",
|
|
6890
|
-
fn:
|
|
6923
|
+
fn: W((t) => [F(n.$slots, "tool", x({ ref_for: !0 }, t, {
|
|
6891
6924
|
index: e.index,
|
|
6892
6925
|
message: h.value
|
|
6893
6926
|
}), void 0, !0)]),
|
|
@@ -6906,13 +6939,13 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6906
6939
|
blockIndex: o,
|
|
6907
6940
|
index: e.index,
|
|
6908
6941
|
message: h.value
|
|
6909
|
-
}, () => [m(
|
|
6942
|
+
}, () => [m(fu, {
|
|
6910
6943
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
6911
6944
|
block: a,
|
|
6912
6945
|
"follow-ups-disabled": e.followUpsDisabled,
|
|
6913
6946
|
"mention-groups": e.mentionGroups,
|
|
6914
6947
|
plugins: e.plugins,
|
|
6915
|
-
"open-image":
|
|
6948
|
+
"open-image": he,
|
|
6916
6949
|
"show-tool-details": e.showToolDetails,
|
|
6917
6950
|
skills: e.skills,
|
|
6918
6951
|
onCancel: r[5] ||= (e) => i("cancel"),
|
|
@@ -6923,7 +6956,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6923
6956
|
}, d({ _: 2 }, [
|
|
6924
6957
|
n.$slots.attachment ? {
|
|
6925
6958
|
name: "attachment",
|
|
6926
|
-
fn:
|
|
6959
|
+
fn: W((t) => [F(n.$slots, "attachment", x({ ref_for: !0 }, t, {
|
|
6927
6960
|
index: e.index,
|
|
6928
6961
|
message: h.value
|
|
6929
6962
|
}), void 0, !0)]),
|
|
@@ -6931,7 +6964,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6931
6964
|
} : void 0,
|
|
6932
6965
|
n.$slots.text ? {
|
|
6933
6966
|
name: "text",
|
|
6934
|
-
fn:
|
|
6967
|
+
fn: W((t) => [F(n.$slots, "text", x({ ref_for: !0 }, t, {
|
|
6935
6968
|
index: e.index,
|
|
6936
6969
|
message: h.value
|
|
6937
6970
|
}), void 0, !0)]),
|
|
@@ -6939,7 +6972,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6939
6972
|
} : void 0,
|
|
6940
6973
|
n.$slots.mention ? {
|
|
6941
6974
|
name: "mention",
|
|
6942
|
-
fn:
|
|
6975
|
+
fn: W((t) => [F(n.$slots, "mention", x({ ref_for: !0 }, t, {
|
|
6943
6976
|
index: e.index,
|
|
6944
6977
|
message: h.value
|
|
6945
6978
|
}), void 0, !0)]),
|
|
@@ -6947,7 +6980,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6947
6980
|
} : void 0,
|
|
6948
6981
|
n.$slots.tool ? {
|
|
6949
6982
|
name: "tool",
|
|
6950
|
-
fn:
|
|
6983
|
+
fn: W((t) => [F(n.$slots, "tool", x({ ref_for: !0 }, t, {
|
|
6951
6984
|
index: e.index,
|
|
6952
6985
|
message: h.value
|
|
6953
6986
|
}), void 0, !0)]),
|
|
@@ -6962,14 +6995,14 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6962
6995
|
"show-tool-details",
|
|
6963
6996
|
"skills"
|
|
6964
6997
|
])], !0, 1)], 64))), 128)),
|
|
6965
|
-
|
|
6966
|
-
|
|
6998
|
+
q.value ? (k(), l("span", ju, R(B(f)("chat.message.emptyResponse")), 1)) : c("", !0),
|
|
6999
|
+
se.value ? F(n.$slots, "thinking", {
|
|
6967
7000
|
index: e.index,
|
|
6968
7001
|
message: h.value
|
|
6969
7002
|
}, () => [u("span", {
|
|
6970
7003
|
class: "chat-message__thinking codex-text-shimmer",
|
|
6971
7004
|
"data-label": p.value
|
|
6972
|
-
},
|
|
7005
|
+
}, R(p.value), 9, Mu)], !0, 1) : ce.value ? F(n.$slots, "status", {
|
|
6973
7006
|
index: e.index,
|
|
6974
7007
|
message: h.value,
|
|
6975
7008
|
status: "streaming"
|
|
@@ -6978,29 +7011,29 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
6978
7011
|
"aria-label": "Streaming"
|
|
6979
7012
|
}, null, -1)], !0, 2) : c("", !0)
|
|
6980
7013
|
], 64))])) : c("", !0),
|
|
6981
|
-
|
|
6982
|
-
disabled:
|
|
7014
|
+
re.value ? F(n.$slots, "actions", {
|
|
7015
|
+
disabled: H.value,
|
|
6983
7016
|
index: e.index,
|
|
6984
7017
|
message: h.value
|
|
6985
|
-
}, () => [m(
|
|
6986
|
-
class: C(["chat-message__actions", { "chat-message__actions--reserved":
|
|
6987
|
-
"aria-hidden":
|
|
6988
|
-
inert:
|
|
6989
|
-
"can-delete":
|
|
6990
|
-
"can-edit":
|
|
6991
|
-
"can-fork":
|
|
6992
|
-
"can-retry":
|
|
6993
|
-
"copy-action":
|
|
7018
|
+
}, () => [m(bu, {
|
|
7019
|
+
class: C(["chat-message__actions", { "chat-message__actions--reserved": H.value }]),
|
|
7020
|
+
"aria-hidden": H.value ? "true" : void 0,
|
|
7021
|
+
inert: H.value ? "" : void 0,
|
|
7022
|
+
"can-delete": U.value,
|
|
7023
|
+
"can-edit": ie.value,
|
|
7024
|
+
"can-fork": G.value,
|
|
7025
|
+
"can-retry": K.value,
|
|
7026
|
+
"copy-action": ge,
|
|
6994
7027
|
deleting: e.deletingTurn,
|
|
6995
7028
|
message: h.value,
|
|
6996
7029
|
"mutation-disabled": e.threadActionsDisabled,
|
|
6997
7030
|
presentation: S.value.messages.actions,
|
|
6998
7031
|
onCopy: r[10] ||= (t) => i("copy-message", e.index),
|
|
6999
|
-
onDelete:
|
|
7000
|
-
onEdit:
|
|
7001
|
-
onFork:
|
|
7032
|
+
onDelete: fe,
|
|
7033
|
+
onEdit: le,
|
|
7034
|
+
onFork: pe,
|
|
7002
7035
|
onQuote: r[11] ||= (t) => i("quote-message", e.index),
|
|
7003
|
-
onRetry:
|
|
7036
|
+
onRetry: me
|
|
7004
7037
|
}, null, 8, [
|
|
7005
7038
|
"class",
|
|
7006
7039
|
"aria-hidden",
|
|
@@ -7014,51 +7047,55 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7014
7047
|
"mutation-disabled",
|
|
7015
7048
|
"presentation"
|
|
7016
7049
|
])], !0, 3) : c("", !0),
|
|
7017
|
-
h.value.type === "steer" ? (k(), l("div",
|
|
7050
|
+
h.value.type === "steer" ? (k(), l("div", Nu, " Steered conversation ")) : c("", !0)
|
|
7018
7051
|
])], 2));
|
|
7019
7052
|
}
|
|
7020
|
-
}), [["__scopeId", "data-v-ba9ff3ff"]]),
|
|
7053
|
+
}), [["__scopeId", "data-v-ba9ff3ff"]]), Fu = { class: "codex-message-turn" }, Iu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7021
7054
|
__name: "CodexMessageTurn",
|
|
7022
7055
|
props: {
|
|
7023
7056
|
active: { type: Boolean },
|
|
7024
7057
|
answeredClientRequestIds: {},
|
|
7058
|
+
durationMs: {},
|
|
7025
7059
|
entries: {},
|
|
7026
7060
|
showToolBlocks: { type: Boolean },
|
|
7061
|
+
startedAt: {},
|
|
7027
7062
|
status: {},
|
|
7028
7063
|
turnId: {}
|
|
7029
7064
|
},
|
|
7030
7065
|
setup(e) {
|
|
7031
|
-
ee(no, b(no, void 0) ??
|
|
7066
|
+
ee(no, b(no, void 0) ?? ne(/* @__PURE__ */ new Map()));
|
|
7032
7067
|
let t = e, n = o(() => t.entries.map((e) => ({
|
|
7033
7068
|
entry: e,
|
|
7034
7069
|
message: $(e.message)
|
|
7035
|
-
}))), r = o(() => t.turnId), i = o(() => n.value.some(({ message: e }) => e.role === "assistant" && ka(e))), a = o(() => [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0)?.entry.index), s = o(() => t.active === !1 ? void 0 : [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0 && (e.parts?.length ?? 0) > 0)?.entry.index), c = o(() => n.value.some(({ entry: e, message: t }) => t.role === "assistant" && (s.value === void 0 || e.index >= s.value) && (t.parts?.some((e) => e.type === "text" && e.phase === "final_answer" && e.content.trim().length > 0) ?? !1))), u = o(() => !c.value && (t.active ?? n.value.some(({ message: e }) => e.role === "assistant" && e.streaming === !0))), d = o(() => t.status), f = o(() => !u.value && !c.value && (d.value === "interrupted" || d.value === "failed")),
|
|
7036
|
-
|
|
7037
|
-
e && !t && (
|
|
7038
|
-
}),
|
|
7039
|
-
|
|
7070
|
+
}))), r = o(() => t.turnId), i = o(() => n.value.some(({ message: e }) => e.role === "assistant" && ka(e))), a = o(() => [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0)?.entry.index), s = o(() => t.active === !1 ? void 0 : [...n.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0 && (e.parts?.length ?? 0) > 0)?.entry.index), c = o(() => n.value.some(({ entry: e, message: t }) => t.role === "assistant" && (s.value === void 0 || e.index >= s.value) && (t.parts?.some((e) => e.type === "text" && e.phase === "final_answer" && e.content.trim().length > 0) ?? !1))), u = o(() => !c.value && (t.active ?? n.value.some(({ message: e }) => e.role === "assistant" && e.streaming === !0))), d = o(() => t.status), f = o(() => t.startedAt), p = o(() => t.durationMs), m = o(() => !u.value && !c.value && (d.value === "interrupted" || d.value === "failed")), h = o(() => i.value && !u.value && !c.value && (d.value === void 0 || d.value === "completed")), g = o(() => n.value.find(({ message: e }) => e.role === "assistant" && x(e))?.entry.index), _ = o(() => !!(r.value && g.value !== void 0)), v = M(u.value && !c.value || m.value), y = M(!1);
|
|
7071
|
+
U(c, (e, t) => {
|
|
7072
|
+
e && !t && (v.value = !1);
|
|
7073
|
+
}), U([u, m], ([e, t]) => {
|
|
7074
|
+
y.value || (v.value = e && !c.value || t);
|
|
7040
7075
|
}), ee(ro, {
|
|
7041
7076
|
active: u,
|
|
7042
|
-
completedWithoutFinal:
|
|
7043
|
-
enabled:
|
|
7044
|
-
expanded:
|
|
7077
|
+
completedWithoutFinal: h,
|
|
7078
|
+
enabled: _,
|
|
7079
|
+
expanded: v,
|
|
7045
7080
|
finalStarted: c,
|
|
7046
|
-
headerMessageIndex:
|
|
7081
|
+
headerMessageIndex: g,
|
|
7047
7082
|
latestStreamingAssistantIndex: a,
|
|
7048
7083
|
phased: i,
|
|
7084
|
+
startedAt: f,
|
|
7085
|
+
durationMs: p,
|
|
7049
7086
|
status: d,
|
|
7050
7087
|
turnId: r,
|
|
7051
7088
|
toggle() {
|
|
7052
|
-
|
|
7089
|
+
y.value = !0, v.value = !v.value;
|
|
7053
7090
|
}
|
|
7054
7091
|
});
|
|
7055
|
-
function
|
|
7092
|
+
function x(e) {
|
|
7056
7093
|
let n = ga(e).filter((e) => t.showToolBlocks || e.type !== "tool" && e.type !== "tool-group");
|
|
7057
7094
|
return n.length === 0 ? !1 : i.value ? n.some((e) => Aa(e, t.answeredClientRequestIds)) : u.value && n.every((e) => e.type === "tool" || e.type === "tool-group");
|
|
7058
7095
|
}
|
|
7059
|
-
return (e, t) => (k(), l("div",
|
|
7096
|
+
return (e, t) => (k(), l("div", Fu, [F(e.$slots, "default", {}, void 0, !0)]));
|
|
7060
7097
|
}
|
|
7061
|
-
}), [["__scopeId", "data-v-
|
|
7098
|
+
}), [["__scopeId", "data-v-140530d7"]]), Lu = ["aria-label", "title"], Ru = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7062
7099
|
__name: "CodexScrollToBottom",
|
|
7063
7100
|
props: { label: { default: "Scroll to bottom" } },
|
|
7064
7101
|
emits: ["click"],
|
|
@@ -7070,13 +7107,13 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7070
7107
|
"aria-label": e.label,
|
|
7071
7108
|
title: e.label,
|
|
7072
7109
|
onClick: r[0] ||= (e) => n("click")
|
|
7073
|
-
}, [m(
|
|
7110
|
+
}, [m(B(ae), {
|
|
7074
7111
|
"aria-hidden": "true",
|
|
7075
7112
|
size: 24,
|
|
7076
7113
|
"stroke-width": 1.75
|
|
7077
|
-
})], 8,
|
|
7114
|
+
})], 8, Lu));
|
|
7078
7115
|
}
|
|
7079
|
-
}), [["__scopeId", "data-v-5a75ce89"]]),
|
|
7116
|
+
}), [["__scopeId", "data-v-5a75ce89"]]), zu = ["aria-label"], Bu = { class: "codex-message-list__content" }, Vu = { class: "codex-message-list__empty" }, Hu = ["data-codex-message-index"], Uu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7080
7117
|
__name: "CodexMessageList",
|
|
7081
7118
|
props: {
|
|
7082
7119
|
actionsDisabled: { type: Boolean },
|
|
@@ -7162,8 +7199,8 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7162
7199
|
role: "assistant",
|
|
7163
7200
|
status: "streaming",
|
|
7164
7201
|
parts: []
|
|
7165
|
-
}, p = b(no, void 0) ??
|
|
7166
|
-
ee(no, p),
|
|
7202
|
+
}, p = b(no, void 0) ?? ne(/* @__PURE__ */ new Map());
|
|
7203
|
+
ee(no, p), U(() => i.messages, (e) => {
|
|
7167
7204
|
let t = {}, n = /* @__PURE__ */ new Set();
|
|
7168
7205
|
for (let n of e) {
|
|
7169
7206
|
if (!("metadata" in n)) continue;
|
|
@@ -7178,7 +7215,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7178
7215
|
}
|
|
7179
7216
|
for (let e of p.keys()) n.has(e) || p.delete(e);
|
|
7180
7217
|
}, { immediate: !0 });
|
|
7181
|
-
let m = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), h = o(() => i.initialMessageBatchSize ?? i.messageBatchSize ?? 50), g = o(() => i.messageBatchSize ?? 25), _ = M(
|
|
7218
|
+
let m = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), h = o(() => i.initialMessageBatchSize ?? i.messageBatchSize ?? 50), g = o(() => i.messageBatchSize ?? 25), _ = M(Me(i.messages, h.value)), v = /* @__PURE__ */ new Map(), y = Y(i.messages, _.value), C = i.messages.length, w = Y(i.messages, 0), T = Y(i.messages, i.messages.length - 1), O = M(!1), A = !1, j = o(() => m.value === "lazy" ? i.messages.slice(_.value) : i.messages), N = o(() => {
|
|
7182
7219
|
let e = -1;
|
|
7183
7220
|
for (let t = i.messages.length - 1; t >= 0; t--) if (i.messages[t]?.role === "user") {
|
|
7184
7221
|
e = t;
|
|
@@ -7205,7 +7242,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7205
7242
|
});
|
|
7206
7243
|
}
|
|
7207
7244
|
return n;
|
|
7208
|
-
}),
|
|
7245
|
+
}), te = o(() => Dt(i.presentation)), I = o(() => {
|
|
7209
7246
|
let e = [];
|
|
7210
7247
|
for (let t of N.value) {
|
|
7211
7248
|
let n = $(t.message).turnId?.trim() || void 0, r = e.at(-1);
|
|
@@ -7221,7 +7258,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7221
7258
|
}
|
|
7222
7259
|
let t = new Set(j.value.filter((e) => e.role === "assistant").map((e) => $(e).turnId?.trim()));
|
|
7223
7260
|
for (let [n, r] of e.entries()) {
|
|
7224
|
-
if (!r.turnId || r.turnId ===
|
|
7261
|
+
if (!r.turnId || r.turnId === z.value || V.value.get(r.turnId) !== "completed" || t.has(r.turnId) || !r.entries.some((e) => e.message.role === "user")) continue;
|
|
7225
7262
|
let e = `codex-empty-response:${r.turnId}`;
|
|
7226
7263
|
r.entries.push({
|
|
7227
7264
|
index: i.messages.length + n + 1,
|
|
@@ -7237,17 +7274,25 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7237
7274
|
}
|
|
7238
7275
|
return e;
|
|
7239
7276
|
});
|
|
7240
|
-
function
|
|
7277
|
+
function L(e) {
|
|
7241
7278
|
if (i.busy && e.entries.some(({ index: e, message: t }) => e < i.messages.length && t.role === "assistant" && $(t).streaming === !0)) return !0;
|
|
7242
7279
|
if (i.activeTurnId !== void 0) return e.turnId !== void 0 && e.turnId === i.activeTurnId;
|
|
7243
7280
|
}
|
|
7244
|
-
let
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
}
|
|
7248
|
-
function
|
|
7249
|
-
|
|
7250
|
-
|
|
7281
|
+
let z = o(() => i.activeTurnId !== void 0 && i.activeTurnId !== null ? i.activeTurnId : (i.busy ? [...i.messages].reverse().map($).find((e) => e.role === "assistant" && e.streaming)?.turnId?.trim() : void 0) || null), V = o(() => new Map(i.turns?.map((e) => [e.id, e.status]) ?? [])), H = o(() => new Map(i.turns?.map((e) => [e.id, {
|
|
7282
|
+
startedAt: e.startedAt,
|
|
7283
|
+
durationMs: e.durationMs ?? re(e.startedAt, e.completedAt)
|
|
7284
|
+
}]) ?? []));
|
|
7285
|
+
function re(e, t) {
|
|
7286
|
+
if (!e || !t) return null;
|
|
7287
|
+
let n = Date.parse(t) - Date.parse(e);
|
|
7288
|
+
return Number.isFinite(n) && n >= 0 ? n : null;
|
|
7289
|
+
}
|
|
7290
|
+
function ie(e) {
|
|
7291
|
+
return !e || e === z.value ? !1 : V.value.get(e) !== "inProgress";
|
|
7292
|
+
}
|
|
7293
|
+
function G(e, t) {
|
|
7294
|
+
let n = t ? V.value.get(t) : void 0;
|
|
7295
|
+
return !n || n === "inProgress" || t === z.value ? e : "content" in e ? e.streaming ? {
|
|
7251
7296
|
...e,
|
|
7252
7297
|
streaming: !1
|
|
7253
7298
|
} : e : e.status === "streaming" ? {
|
|
@@ -7255,95 +7300,95 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7255
7300
|
status: "complete"
|
|
7256
7301
|
} : e;
|
|
7257
7302
|
}
|
|
7258
|
-
function
|
|
7259
|
-
if (!
|
|
7260
|
-
let t =
|
|
7303
|
+
function K(e) {
|
|
7304
|
+
if (!ie(e)) return !1;
|
|
7305
|
+
let t = V.value.get(e);
|
|
7261
7306
|
return t === void 0 || t === "completed";
|
|
7262
7307
|
}
|
|
7263
|
-
let
|
|
7264
|
-
function
|
|
7265
|
-
return e ===
|
|
7308
|
+
let ae = o(() => [...N.value].reverse().find((e) => e.message.role === "assistant")?.index);
|
|
7309
|
+
function oe(e) {
|
|
7310
|
+
return e === ae.value;
|
|
7266
7311
|
}
|
|
7267
|
-
let
|
|
7312
|
+
let q = M(null), se = M(!0), ce = M(!1), le = null, ue = null, de = 0, fe = !1, pe = null;
|
|
7268
7313
|
D(async () => {
|
|
7269
|
-
document.addEventListener("pointerup",
|
|
7270
|
-
let e =
|
|
7271
|
-
e && typeof ResizeObserver < "u" && (
|
|
7272
|
-
|
|
7273
|
-
}),
|
|
7274
|
-
}),
|
|
7275
|
-
let t = C, n =
|
|
7314
|
+
document.addEventListener("pointerup", ve), document.addEventListener("selectionchange", ye), await S(), Re();
|
|
7315
|
+
let e = q.value?.querySelector(".codex-message-list__content");
|
|
7316
|
+
e && typeof ResizeObserver < "u" && (le = new ResizeObserver(() => {
|
|
7317
|
+
se.value ? ze() : Ie();
|
|
7318
|
+
}), le.observe(e)), ze();
|
|
7319
|
+
}), U(() => i.messages.length, async (e) => {
|
|
7320
|
+
let t = C, n = q.value, r = n.scrollHeight, i = n.scrollTop;
|
|
7276
7321
|
C = e;
|
|
7277
|
-
let a = m.value === "lazy" &&
|
|
7278
|
-
|
|
7279
|
-
let o = !a &&
|
|
7280
|
-
await S(), a && n ? n.scrollTop = i + n.scrollHeight - r : o &&
|
|
7281
|
-
}),
|
|
7322
|
+
let a = m.value === "lazy" && Ee(e, t);
|
|
7323
|
+
Oe();
|
|
7324
|
+
let o = !a && se.value && Le();
|
|
7325
|
+
await S(), a && n ? n.scrollTop = i + n.scrollHeight - r : o && Re();
|
|
7326
|
+
}), U([
|
|
7282
7327
|
() => i.resetKey,
|
|
7283
7328
|
() => i.messages.length,
|
|
7284
7329
|
() => i.messages.at(-1)
|
|
7285
7330
|
], ([e, t, n], [r, i, a]) => {
|
|
7286
|
-
e !== r || t !== i || !n || !a || n.id && a.id && n.id !== a.id ||
|
|
7287
|
-
}),
|
|
7288
|
-
e ||
|
|
7289
|
-
}),
|
|
7290
|
-
|
|
7291
|
-
let n =
|
|
7331
|
+
e !== r || t !== i || !n || !a || n.id && a.id && n.id !== a.id || he();
|
|
7332
|
+
}), U(() => i.messageTextSelection, (e) => {
|
|
7333
|
+
e || J();
|
|
7334
|
+
}), U(() => i.resetKey, async (e, t) => {
|
|
7335
|
+
J();
|
|
7336
|
+
let n = q.value;
|
|
7292
7337
|
n && t != null && v.set(t, {
|
|
7293
7338
|
renderedAnchor: y,
|
|
7294
7339
|
scrollTop: n.scrollTop,
|
|
7295
|
-
stickToBottom:
|
|
7340
|
+
stickToBottom: Le()
|
|
7296
7341
|
});
|
|
7297
|
-
let r = e == null ? void 0 : v.get(e), a = r ?
|
|
7298
|
-
|
|
7299
|
-
}),
|
|
7342
|
+
let r = e == null ? void 0 : v.get(e), a = r ? Ae(i.messages, r.renderedAnchor) : -1;
|
|
7343
|
+
De(a >= 0 ? a : Me(i.messages, h.value)), O.value = !1, A = !1, Fe(r?.stickToBottom ?? !0), Oe(), await S(), r && n ? (n.scrollTop = r.stickToBottom ? n.scrollHeight : r.scrollTop, Ie()) : Re();
|
|
7344
|
+
}), U(() => [i.loadingOlderMessages, i.hasOlderMessages], () => {
|
|
7300
7345
|
A = !1;
|
|
7301
|
-
}),
|
|
7346
|
+
}), U(() => [
|
|
7302
7347
|
m.value,
|
|
7303
7348
|
h.value,
|
|
7304
7349
|
g.value
|
|
7305
7350
|
], async () => {
|
|
7306
|
-
m.value === "lazy" && (
|
|
7351
|
+
m.value === "lazy" && (De(Me(i.messages, h.value)), Oe(), await S(), se.value && Re());
|
|
7307
7352
|
});
|
|
7308
|
-
function
|
|
7309
|
-
|
|
7310
|
-
let e =
|
|
7311
|
-
e && (
|
|
7353
|
+
function me() {
|
|
7354
|
+
J();
|
|
7355
|
+
let e = q.value, t = e !== null && e.scrollTop < de;
|
|
7356
|
+
e && (de = e.scrollTop), Ie(), ce.value ? t && Fe(!1) : Fe(!0), m.value === "lazy" && we() && _.value <= 0 && i.hasOlderMessages && !i.loadingOlderMessages ? Ce() : m.value === "lazy" && we() && Te();
|
|
7312
7357
|
}
|
|
7313
|
-
function
|
|
7314
|
-
|
|
7358
|
+
function he() {
|
|
7359
|
+
se.value ? ze() : S(Ie);
|
|
7315
7360
|
}
|
|
7316
|
-
function
|
|
7361
|
+
function ge(e) {
|
|
7317
7362
|
let t = e.target;
|
|
7318
|
-
!(t instanceof Element) || !t.closest(".chat-work-group__header") ||
|
|
7363
|
+
!(t instanceof Element) || !t.closest(".chat-work-group__header") || Fe(!1);
|
|
7319
7364
|
}
|
|
7320
|
-
function
|
|
7321
|
-
i.messageTextSelection && (
|
|
7365
|
+
function _e() {
|
|
7366
|
+
i.messageTextSelection && (fe = !0);
|
|
7322
7367
|
}
|
|
7323
|
-
function
|
|
7324
|
-
|
|
7368
|
+
function ve() {
|
|
7369
|
+
fe && (fe = !1, be());
|
|
7325
7370
|
}
|
|
7326
|
-
function
|
|
7327
|
-
!i.messageTextSelection ||
|
|
7371
|
+
function ye() {
|
|
7372
|
+
!i.messageTextSelection || fe || be();
|
|
7328
7373
|
}
|
|
7329
|
-
function
|
|
7374
|
+
function be() {
|
|
7330
7375
|
if (!i.messageTextSelection) {
|
|
7331
|
-
|
|
7376
|
+
J();
|
|
7332
7377
|
return;
|
|
7333
7378
|
}
|
|
7334
7379
|
let e = window.getSelection();
|
|
7335
7380
|
if (!e || e.isCollapsed || e.rangeCount === 0) {
|
|
7336
|
-
|
|
7381
|
+
J();
|
|
7337
7382
|
return;
|
|
7338
7383
|
}
|
|
7339
|
-
let t = e.toString().trim(), n = e.getRangeAt(0), r =
|
|
7384
|
+
let t = e.toString().trim(), n = e.getRangeAt(0), r = xe(n.startContainer), o = xe(n.endContainer);
|
|
7340
7385
|
if (!t || !r || r !== o) {
|
|
7341
|
-
|
|
7386
|
+
J();
|
|
7342
7387
|
return;
|
|
7343
7388
|
}
|
|
7344
7389
|
let s = Number.parseInt(r.dataset.codexMessageIndex ?? "", 10), c = N.value.find((e) => e.index === s);
|
|
7345
7390
|
if (!c) {
|
|
7346
|
-
|
|
7391
|
+
J();
|
|
7347
7392
|
return;
|
|
7348
7393
|
}
|
|
7349
7394
|
let l = n.getBoundingClientRect(), u = $(c.message), d = {
|
|
@@ -7359,67 +7404,67 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7359
7404
|
...u.id ? { messageId: u.id } : {},
|
|
7360
7405
|
...u.turnId ? { turnId: u.turnId } : {}
|
|
7361
7406
|
};
|
|
7362
|
-
|
|
7407
|
+
Se(pe, d) || (pe = d, a("message-text-selection-change", d));
|
|
7363
7408
|
}
|
|
7364
|
-
function
|
|
7409
|
+
function xe(e) {
|
|
7365
7410
|
let t = (e instanceof Element ? e : e.parentElement)?.closest("[data-codex-message-index]") ?? null;
|
|
7366
|
-
return t &&
|
|
7411
|
+
return t && q.value?.contains(t) ? t : null;
|
|
7367
7412
|
}
|
|
7368
|
-
function
|
|
7369
|
-
|
|
7413
|
+
function J() {
|
|
7414
|
+
fe = !1, pe && (pe = null, a("message-text-selection-change", null));
|
|
7370
7415
|
}
|
|
7371
|
-
function
|
|
7416
|
+
function Se(e, t) {
|
|
7372
7417
|
return !!(e && e.text === t.text && e.messageIndex === t.messageIndex && e.anchor.x === t.anchor.x && e.anchor.y === t.anchor.y && e.anchor.width === t.anchor.width && e.anchor.height === t.anchor.height);
|
|
7373
7418
|
}
|
|
7374
|
-
function
|
|
7419
|
+
function Ce() {
|
|
7375
7420
|
!i.hasOlderMessages || i.loadingOlderMessages || A || (A = !0, a("load-older-messages"));
|
|
7376
7421
|
}
|
|
7377
|
-
function
|
|
7378
|
-
let e =
|
|
7422
|
+
function we() {
|
|
7423
|
+
let e = q.value;
|
|
7379
7424
|
return e !== null && e.scrollTop <= e.clientHeight;
|
|
7380
7425
|
}
|
|
7381
|
-
async function
|
|
7426
|
+
async function Te() {
|
|
7382
7427
|
if (O.value || _.value <= 0) return;
|
|
7383
|
-
let e =
|
|
7384
|
-
O.value = !0,
|
|
7385
|
-
}
|
|
7386
|
-
function
|
|
7387
|
-
let n =
|
|
7388
|
-
if (e < t) return
|
|
7389
|
-
let o =
|
|
7390
|
-
if (o >= 0 && !
|
|
7391
|
-
let t = _.value <= 0 &&
|
|
7392
|
-
return
|
|
7428
|
+
let e = q.value, t = e.scrollHeight, n = e.scrollTop;
|
|
7429
|
+
O.value = !0, De(Math.max(0, _.value - je(g.value))), await S(), e.scrollTop = n + e.scrollHeight - t, O.value = !1, _.value <= 0 && Ce();
|
|
7430
|
+
}
|
|
7431
|
+
function Ee(e, t) {
|
|
7432
|
+
let n = je(h.value), r = Pe(i.messages.slice(0, t), Math.max(0, t - n)), a = _.value === r;
|
|
7433
|
+
if (e < t) return De(Me(i.messages, h.value)), !1;
|
|
7434
|
+
let o = Ae(i.messages, y);
|
|
7435
|
+
if (o >= 0 && !ke(Y(i.messages, 0), w)) {
|
|
7436
|
+
let t = _.value <= 0 && we();
|
|
7437
|
+
return De(t ? Math.max(0, o - je(g.value)) : Le() ? Math.max(0, e - n) : o), t;
|
|
7393
7438
|
}
|
|
7394
|
-
return
|
|
7439
|
+
return ke(Y(i.messages, 0), w) && !ke(Y(i.messages, e - 1), T) && Le() && a && De(Math.max(0, e - n)), !1;
|
|
7395
7440
|
}
|
|
7396
|
-
function
|
|
7397
|
-
let t =
|
|
7398
|
-
_.value = t, y =
|
|
7441
|
+
function De(e) {
|
|
7442
|
+
let t = Pe(i.messages, e);
|
|
7443
|
+
_.value = t, y = Y(i.messages, t);
|
|
7399
7444
|
}
|
|
7400
|
-
function
|
|
7401
|
-
C = i.messages.length, w =
|
|
7445
|
+
function Oe() {
|
|
7446
|
+
C = i.messages.length, w = Y(i.messages, 0), T = Y(i.messages, i.messages.length - 1);
|
|
7402
7447
|
}
|
|
7403
|
-
function
|
|
7448
|
+
function Y(e, t) {
|
|
7404
7449
|
let n = e[t];
|
|
7405
7450
|
return n ? n.id ?? n : null;
|
|
7406
7451
|
}
|
|
7407
|
-
function
|
|
7452
|
+
function ke(e, t) {
|
|
7408
7453
|
return e === t;
|
|
7409
7454
|
}
|
|
7410
|
-
function
|
|
7411
|
-
return e.findIndex((e) =>
|
|
7455
|
+
function Ae(e, t) {
|
|
7456
|
+
return e.findIndex((e) => ke(e.id ?? e, t));
|
|
7412
7457
|
}
|
|
7413
|
-
function
|
|
7458
|
+
function je(e) {
|
|
7414
7459
|
return Math.max(1, Math.floor(e ?? 25));
|
|
7415
7460
|
}
|
|
7416
|
-
function
|
|
7417
|
-
return
|
|
7461
|
+
function Me(e, t) {
|
|
7462
|
+
return Ne(e, je(t));
|
|
7418
7463
|
}
|
|
7419
|
-
function
|
|
7420
|
-
return
|
|
7464
|
+
function Ne(e, t) {
|
|
7465
|
+
return Pe(e, Math.max(0, e.length - t));
|
|
7421
7466
|
}
|
|
7422
|
-
function
|
|
7467
|
+
function Pe(e, t) {
|
|
7423
7468
|
let n = Math.max(0, Math.min(e.length, t));
|
|
7424
7469
|
if (n >= e.length) return n;
|
|
7425
7470
|
let r = $(e[n]).turnId?.trim();
|
|
@@ -7427,69 +7472,71 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7427
7472
|
for (; n > 0 && $(e[n - 1]).turnId?.trim() === r;) --n;
|
|
7428
7473
|
return n;
|
|
7429
7474
|
}
|
|
7430
|
-
function
|
|
7431
|
-
|
|
7432
|
-
}
|
|
7433
|
-
function Pe() {
|
|
7434
|
-
ie.value = !Fe();
|
|
7435
|
-
}
|
|
7436
|
-
function Fe() {
|
|
7437
|
-
let e = J.value;
|
|
7438
|
-
return e ? e.scrollHeight - e.scrollTop - e.clientHeight <= i.bottomThreshold : Y.value;
|
|
7475
|
+
function Fe(e) {
|
|
7476
|
+
se.value !== e && (se.value = e, a("stickiness-change", e));
|
|
7439
7477
|
}
|
|
7440
7478
|
function Ie() {
|
|
7441
|
-
|
|
7479
|
+
ce.value = !Le();
|
|
7442
7480
|
}
|
|
7443
7481
|
function Le() {
|
|
7444
|
-
|
|
7482
|
+
let e = q.value;
|
|
7483
|
+
return e ? e.scrollHeight - e.scrollTop - e.clientHeight <= i.bottomThreshold : se.value;
|
|
7484
|
+
}
|
|
7485
|
+
function Re() {
|
|
7486
|
+
q.value && (q.value.scrollTop = q.value.scrollHeight, de = q.value.scrollTop, Fe(!0), Ie());
|
|
7487
|
+
}
|
|
7488
|
+
function ze() {
|
|
7489
|
+
if (ue !== null) return;
|
|
7445
7490
|
let e = () => {
|
|
7446
|
-
|
|
7491
|
+
ue = null, se.value && Re();
|
|
7447
7492
|
};
|
|
7448
|
-
|
|
7493
|
+
ue = typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : setTimeout(e, 0);
|
|
7449
7494
|
}
|
|
7450
7495
|
return E(() => {
|
|
7451
|
-
document.removeEventListener("pointerup",
|
|
7452
|
-
}), n({ scrollToBottom:
|
|
7496
|
+
document.removeEventListener("pointerup", ve), document.removeEventListener("selectionchange", ye), le?.disconnect(), le = null, ue !== null && (typeof ue == "number" && typeof cancelAnimationFrame == "function" ? cancelAnimationFrame(ue) : clearTimeout(ue));
|
|
7497
|
+
}), n({ scrollToBottom: Re }), (n, r) => (k(), l("div", {
|
|
7453
7498
|
class: "codex-chat-theme codex-message-list",
|
|
7454
7499
|
"aria-label": e.ariaLabel
|
|
7455
7500
|
}, [u("div", {
|
|
7456
7501
|
ref_key: "scrollElement",
|
|
7457
|
-
ref:
|
|
7502
|
+
ref: q,
|
|
7458
7503
|
class: "codex-message-list__viewport message-list",
|
|
7459
|
-
onClickCapture:
|
|
7460
|
-
onPointerdown:
|
|
7461
|
-
onScroll:
|
|
7462
|
-
}, [u("div",
|
|
7504
|
+
onClickCapture: ge,
|
|
7505
|
+
onPointerdown: _e,
|
|
7506
|
+
onScroll: me
|
|
7507
|
+
}, [u("div", Bu, [N.value.length === 0 ? F(n.$slots, "empty", {}, () => [u("p", Vu, R(e.emptyLabel), 1)], !0, 0) : (k(!0), l(t, { key: 1 }, P(I.value, (i) => (k(), s(Iu, {
|
|
7463
7508
|
key: i.key,
|
|
7464
7509
|
entries: i.entries,
|
|
7465
7510
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
7466
|
-
active:
|
|
7467
|
-
"show-tool-blocks":
|
|
7468
|
-
status: i.turnId ?
|
|
7511
|
+
active: L(i),
|
|
7512
|
+
"show-tool-blocks": te.value.messages.toolBlocks,
|
|
7513
|
+
status: i.turnId ? V.value.get(i.turnId) : void 0,
|
|
7514
|
+
"started-at": i.turnId ? H.value.get(i.turnId)?.startedAt : void 0,
|
|
7515
|
+
"duration-ms": i.turnId ? H.value.get(i.turnId)?.durationMs : void 0,
|
|
7469
7516
|
"turn-id": i.turnId
|
|
7470
7517
|
}, {
|
|
7471
|
-
default:
|
|
7518
|
+
default: W(() => [(k(!0), l(t, null, P(i.entries, (t) => (k(), l("div", {
|
|
7472
7519
|
key: t.key,
|
|
7473
7520
|
class: "codex-message-list__entry",
|
|
7474
7521
|
"data-codex-message-index": t.index
|
|
7475
7522
|
}, [n.$slots.message ? F(n.$slots, "message", {
|
|
7476
|
-
message:
|
|
7523
|
+
message: B($)(G(t.message, i.turnId)),
|
|
7477
7524
|
index: t.index
|
|
7478
|
-
}, void 0, !0, 0) : (k(), s(
|
|
7525
|
+
}, void 0, !0, 0) : (k(), s(Pu, {
|
|
7479
7526
|
key: 1,
|
|
7480
7527
|
"activity-state": t.activityState,
|
|
7481
7528
|
"actions-disabled": e.actionsDisabled,
|
|
7482
|
-
"actions-always-visible":
|
|
7529
|
+
"actions-always-visible": oe(t.index),
|
|
7483
7530
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
7484
|
-
"can-delete-turn": e.canDeleteTurn &&
|
|
7485
|
-
"can-edit-turn": e.canEditTurn &&
|
|
7486
|
-
"can-fork-turn": e.canForkTurn &&
|
|
7487
|
-
"can-retry-turn": e.canRetryTurn &&
|
|
7531
|
+
"can-delete-turn": e.canDeleteTurn && ie(i.turnId),
|
|
7532
|
+
"can-edit-turn": e.canEditTurn && ie(i.turnId),
|
|
7533
|
+
"can-fork-turn": e.canForkTurn && K(i.turnId),
|
|
7534
|
+
"can-retry-turn": e.canRetryTurn && ie(i.turnId),
|
|
7488
7535
|
"deleting-turn": i.turnId === e.deletingTurnId,
|
|
7489
7536
|
"follow-ups-disabled": e.followUpsDisabled,
|
|
7490
7537
|
"hidden-client-request-ids": e.hiddenClientRequestIds,
|
|
7491
7538
|
index: t.index,
|
|
7492
|
-
message:
|
|
7539
|
+
message: G(t.message, i.turnId),
|
|
7493
7540
|
"mention-groups": e.mentionGroups,
|
|
7494
7541
|
"open-image": e.openImage,
|
|
7495
7542
|
plugins: e.plugins,
|
|
@@ -7511,47 +7558,47 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7511
7558
|
}, d({ _: 2 }, [
|
|
7512
7559
|
n.$slots.actions ? {
|
|
7513
7560
|
name: "actions",
|
|
7514
|
-
fn:
|
|
7561
|
+
fn: W((e) => [F(n.$slots, "actions", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7515
7562
|
key: "0"
|
|
7516
7563
|
} : void 0,
|
|
7517
7564
|
n.$slots.attachment ? {
|
|
7518
7565
|
name: "attachment",
|
|
7519
|
-
fn:
|
|
7566
|
+
fn: W((e) => [F(n.$slots, "attachment", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7520
7567
|
key: "1"
|
|
7521
7568
|
} : void 0,
|
|
7522
7569
|
n.$slots.block ? {
|
|
7523
7570
|
name: "block",
|
|
7524
|
-
fn:
|
|
7571
|
+
fn: W((e) => [F(n.$slots, "block", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7525
7572
|
key: "2"
|
|
7526
7573
|
} : void 0,
|
|
7527
7574
|
n.$slots.header ? {
|
|
7528
7575
|
name: "header",
|
|
7529
|
-
fn:
|
|
7576
|
+
fn: W((e) => [F(n.$slots, "header", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7530
7577
|
key: "3"
|
|
7531
7578
|
} : void 0,
|
|
7532
7579
|
n.$slots.mention ? {
|
|
7533
7580
|
name: "mention",
|
|
7534
|
-
fn:
|
|
7581
|
+
fn: W((e) => [F(n.$slots, "mention", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7535
7582
|
key: "4"
|
|
7536
7583
|
} : void 0,
|
|
7537
7584
|
n.$slots.status ? {
|
|
7538
7585
|
name: "status",
|
|
7539
|
-
fn:
|
|
7586
|
+
fn: W((e) => [F(n.$slots, "status", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7540
7587
|
key: "5"
|
|
7541
7588
|
} : void 0,
|
|
7542
7589
|
n.$slots.text ? {
|
|
7543
7590
|
name: "text",
|
|
7544
|
-
fn:
|
|
7591
|
+
fn: W((e) => [F(n.$slots, "text", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7545
7592
|
key: "6"
|
|
7546
7593
|
} : void 0,
|
|
7547
7594
|
n.$slots.thinking ? {
|
|
7548
7595
|
name: "thinking",
|
|
7549
|
-
fn:
|
|
7596
|
+
fn: W((e) => [F(n.$slots, "thinking", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7550
7597
|
key: "7"
|
|
7551
7598
|
} : void 0,
|
|
7552
7599
|
n.$slots.tool ? {
|
|
7553
7600
|
name: "tool",
|
|
7554
|
-
fn:
|
|
7601
|
+
fn: W((e) => [F(n.$slots, "tool", x({ ref_for: !0 }, e), void 0, !0)]),
|
|
7555
7602
|
key: "8"
|
|
7556
7603
|
} : void 0
|
|
7557
7604
|
]), 1032, [
|
|
@@ -7575,7 +7622,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7575
7622
|
"show-tool-details",
|
|
7576
7623
|
"skills",
|
|
7577
7624
|
"thread-actions-disabled"
|
|
7578
|
-
]))], 8,
|
|
7625
|
+
]))], 8, Hu))), 128))]),
|
|
7579
7626
|
_: 2
|
|
7580
7627
|
}, 1032, [
|
|
7581
7628
|
"entries",
|
|
@@ -7583,21 +7630,23 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7583
7630
|
"active",
|
|
7584
7631
|
"show-tool-blocks",
|
|
7585
7632
|
"status",
|
|
7633
|
+
"started-at",
|
|
7634
|
+
"duration-ms",
|
|
7586
7635
|
"turn-id"
|
|
7587
|
-
]))), 128))])], 544),
|
|
7636
|
+
]))), 128))])], 544), ce.value ? (k(), s(Ru, {
|
|
7588
7637
|
key: 0,
|
|
7589
7638
|
class: "codex-message-list__scroll-to-bottom",
|
|
7590
7639
|
label: e.scrollToBottomLabel,
|
|
7591
|
-
onClick:
|
|
7592
|
-
}, null, 8, ["label"])) : c("", !0)], 8,
|
|
7640
|
+
onClick: Re
|
|
7641
|
+
}, null, 8, ["label"])) : c("", !0)], 8, zu));
|
|
7593
7642
|
}
|
|
7594
|
-
}), [["__scopeId", "data-v-
|
|
7643
|
+
}), [["__scopeId", "data-v-238e8027"]]), Wu = {
|
|
7595
7644
|
key: 0,
|
|
7596
7645
|
class: "codex-workbench-layout__body codex-workbench-layout__body--scroll"
|
|
7597
|
-
},
|
|
7646
|
+
}, Gu = { class: "codex-workbench-layout__body-content" }, Ku = {
|
|
7598
7647
|
key: 1,
|
|
7599
7648
|
class: "codex-workbench-layout__body codex-workbench-layout__body--child"
|
|
7600
|
-
},
|
|
7649
|
+
}, qu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7601
7650
|
__name: "CodexWorkbenchLayout",
|
|
7602
7651
|
props: { scrollMode: { default: "body" } },
|
|
7603
7652
|
setup(e) {
|
|
@@ -7623,7 +7672,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7623
7672
|
class: C(["codex-chat-theme codex-workbench-layout", `codex-workbench-layout--${e.scrollMode}`]),
|
|
7624
7673
|
style: T(a.value)
|
|
7625
7674
|
}, [
|
|
7626
|
-
e.scrollMode === "body" ? (k(), l("div",
|
|
7675
|
+
e.scrollMode === "body" ? (k(), l("div", Wu, [u("div", Gu, [F(r.$slots, "default", {}, void 0, !0)])])) : (k(), l("div", Ku, [F(r.$slots, "default", {}, void 0, !0)])),
|
|
7627
7676
|
r.$slots.header ? (k(), l("div", {
|
|
7628
7677
|
key: 2,
|
|
7629
7678
|
ref_key: "headerEl",
|
|
@@ -7638,36 +7687,36 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7638
7687
|
}, [F(r.$slots, "footer", {}, void 0, !0)], 512)) : c("", !0)
|
|
7639
7688
|
], 6));
|
|
7640
7689
|
}
|
|
7641
|
-
}), [["__scopeId", "data-v-18471407"]]),
|
|
7690
|
+
}), [["__scopeId", "data-v-18471407"]]), Ju = [
|
|
7642
7691
|
"aria-busy",
|
|
7643
7692
|
"aria-label",
|
|
7644
7693
|
"data-codex-generating"
|
|
7645
|
-
],
|
|
7694
|
+
], Yu = {
|
|
7646
7695
|
key: 1,
|
|
7647
7696
|
class: "codex-conversation-pane__hero"
|
|
7648
|
-
},
|
|
7697
|
+
}, Xu = { class: "codex-conversation-pane__hero-copy" }, Zu = { key: 0 }, Qu = {
|
|
7649
7698
|
key: 0,
|
|
7650
7699
|
class: "codex-conversation-pane__error",
|
|
7651
7700
|
role: "alert"
|
|
7652
|
-
},
|
|
7701
|
+
}, $u = {
|
|
7653
7702
|
key: 1,
|
|
7654
7703
|
class: "codex-conversation-pane__approvals"
|
|
7655
|
-
},
|
|
7704
|
+
}, ed = {
|
|
7656
7705
|
key: 0,
|
|
7657
7706
|
class: "codex-conversation-pane__pending-question"
|
|
7658
|
-
},
|
|
7707
|
+
}, td = ["aria-label"], nd = {
|
|
7659
7708
|
key: 0,
|
|
7660
7709
|
class: "codex-conversation-pane__attachments",
|
|
7661
7710
|
"aria-label": "Prompt attachments"
|
|
7662
|
-
},
|
|
7711
|
+
}, rd = ["src", "alt"], id = {
|
|
7663
7712
|
key: 1,
|
|
7664
7713
|
class: "codex-conversation-pane__attachment-file",
|
|
7665
7714
|
"aria-hidden": "true"
|
|
7666
|
-
},
|
|
7715
|
+
}, ad = ["title"], od = { class: "codex-conversation-pane__attachment-actions" }, sd = [
|
|
7667
7716
|
"aria-label",
|
|
7668
7717
|
"disabled",
|
|
7669
7718
|
"onClick"
|
|
7670
|
-
],
|
|
7719
|
+
], cd = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7671
7720
|
__name: "CodexConversationPane",
|
|
7672
7721
|
props: {
|
|
7673
7722
|
ariaLabel: { default: "Conversation" },
|
|
@@ -7785,7 +7834,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7785
7834
|
},
|
|
7786
7835
|
emits: /* @__PURE__ */ "attach.attachmentsChange.cancel.clientResponse.copyMessage.clearGoal.continueInterruptedTurn.deleteTurn.deleteQueuedPrompt.updateQueuedPrompt.editGoal.editTurn.forkTurn.loadOlderHistory.error.interrupt.menuSelect.messageTextSelectionChange.mentionSelect.openLink.openVisualization.resolveApproval.quoteMessage.retryTurn.selectApprovalPreset.sendFollowUp.submit.steer.steerQueuedPrompt.update:modelId.update:composerState.update:modelValue.update:planMode.update:reasoningEffort.update:serviceTier".split("."),
|
|
7787
7836
|
setup(e, { expose: n, emit: r }) {
|
|
7788
|
-
let i = e, a = r, f = Ti(), p =
|
|
7837
|
+
let i = e, a = r, f = Ti(), p = ne(/* @__PURE__ */ new Map());
|
|
7789
7838
|
ee(no, p);
|
|
7790
7839
|
let h = M(null), g = M(/* @__PURE__ */ new Set()), v = M(null), y = M(null), b = M(null), x = M(null), C = o(() => ra(i.controller)), T = o(() => {
|
|
7791
7840
|
let e = C.value;
|
|
@@ -7798,7 +7847,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7798
7847
|
let n = T.value;
|
|
7799
7848
|
return n ? e(n) : t();
|
|
7800
7849
|
}
|
|
7801
|
-
let j = o(() => A((e) => e.composer?.state, () => i.composerState)), N = o(() => A((e) => e.composer?.attachments ?? [], () => i.attachments)),
|
|
7850
|
+
let j = o(() => A((e) => e.composer?.state, () => i.composerState)), N = o(() => A((e) => e.composer?.attachments ?? [], () => i.attachments)), te = Ii(j.value ?? (T.value ? {
|
|
7802
7851
|
text: "",
|
|
7803
7852
|
selectionStart: 0,
|
|
7804
7853
|
selectionEnd: 0
|
|
@@ -7806,16 +7855,16 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7806
7855
|
text: i.modelValue,
|
|
7807
7856
|
selectionStart: i.modelValue.length,
|
|
7808
7857
|
selectionEnd: i.modelValue.length
|
|
7809
|
-
})),
|
|
7810
|
-
let e =
|
|
7858
|
+
})), I = M(te), L = M(te.text), z = M(null), V = M(null), H = M(null), re = 0, ie = 0, G = M(null), K = M([...N.value]), ae = /* @__PURE__ */ new Map(), oe = M([]), q = M(!1), se = 0, ce = o(() => A((e) => e.identity.messages, () => i.messages ?? O.value?.messages ?? [])), le = o(() => {
|
|
7859
|
+
let e = ce.value, t = H.value;
|
|
7811
7860
|
return !t || e.some((e) => At(e, t)) ? e : [...e, t.message];
|
|
7812
|
-
}),
|
|
7861
|
+
}), ue = o(() => A((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? O.value?.activeTurnId : i.activeTurnId)), de = o(() => A((e) => e.identity.turns, () => i.turns ?? O.value?.turns ?? [])), fe = o(() => !ke.value && ue.value == null && (de.value ?? []).at(-1)?.status === "interrupted"), me = o(() => le.value.flatMap((e) => {
|
|
7813
7862
|
let t = $(e);
|
|
7814
7863
|
if (t.role !== "user") return [];
|
|
7815
7864
|
let n = Ca(t.content);
|
|
7816
7865
|
return n && n !== "(no user instructions)" ? [n] : [];
|
|
7817
|
-
})),
|
|
7818
|
-
let e = /* @__PURE__ */ new Set(), t = new Map((
|
|
7866
|
+
})), he = o(() => A((e) => e.composer?.promptHistory, () => i.promptHistory)), ge = o(() => xt(he.value ?? oe.value, me.value)), _e = o(() => A((e) => e.thread?.answeredClientRequestIds, () => i.answeredClientRequestIds ?? i.surface?.answeredClientRequestIds)), ve = o(() => /* @__PURE__ */ new Set([..._e.value ?? [], ...p.keys()])), ye = o(() => A((e) => e.thread?.clientRequests ?? [], () => i.clientRequests ?? O.value?.clientRequests ?? [])), be = o(() => {
|
|
7867
|
+
let e = /* @__PURE__ */ new Set(), t = new Map((de.value ?? []).map((e, t) => [e.id, t])), n = ce.value.map($);
|
|
7819
7868
|
for (let [r, i] of n.entries()) for (let a of i.parts ?? []) {
|
|
7820
7869
|
if (a.type !== "question" || a.request.payload.request.delivery !== "async") continue;
|
|
7821
7870
|
let o = a.request.turnId ?? i.turnId, s = o ? t.get(o) : void 0;
|
|
@@ -7826,65 +7875,65 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7826
7875
|
}) && e.add(a.request.id);
|
|
7827
7876
|
}
|
|
7828
7877
|
return e;
|
|
7829
|
-
}),
|
|
7878
|
+
}), xe = o(() => /* @__PURE__ */ new Set([...g.value, ...be.value])), J = o(() => {
|
|
7830
7879
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
7831
|
-
for (let n of
|
|
7832
|
-
for (let n of
|
|
7880
|
+
for (let n of ye.value) n.kind !== "ask_user" || n.payload.request.delivery !== "tool" || n.payload.request.questions.length === 0 || ve.value.has(n.id) || (t.add(n.id), e.push(n));
|
|
7881
|
+
for (let n of le.value) for (let r of $(n).parts ?? []) r.type !== "question" || r.historical === !0 || r.request.payload.request.questions.length === 0 || t.has(r.request.id) || ve.value.has(r.request.id) || xe.value.has(r.request.id) || (t.add(r.request.id), e.push(r.request));
|
|
7833
7882
|
return e;
|
|
7834
|
-
}),
|
|
7883
|
+
}), Se = o(() => J.value.find((e) => e.payload.request.delivery === "tool") ?? J.value.find((e) => e.id === h.value) ?? J.value.find((e) => {
|
|
7835
7884
|
if (e.payload.request.delivery !== "async") return !0;
|
|
7836
|
-
let t =
|
|
7837
|
-
return t ? t.status === "inProgress" : e.turnId ===
|
|
7838
|
-
})),
|
|
7839
|
-
function
|
|
7840
|
-
let n = i.transformMessage?.(e, t) ?? e, r = $(n), a = (e) =>
|
|
7841
|
-
return !r.parts?.some((e) => e.type === "question" &&
|
|
7885
|
+
let t = de.value?.find((t) => t.id === e.turnId);
|
|
7886
|
+
return t ? t.status === "inProgress" : e.turnId === ue.value;
|
|
7887
|
+
})), Ce = o(() => new Set(J.value.map((e) => e.id))), we = o(() => ye.value.find((e) => e.kind === "confirm_tool" && !ve.value.has(e.id))), Te = o(() => new Set(ye.value.filter((e) => e.kind === "confirm_tool" ? !ve.value.has(e.id) : e.payload.request.delivery === "tool").map((e) => e.itemId)));
|
|
7888
|
+
function De(e, t) {
|
|
7889
|
+
let n = i.transformMessage?.(e, t) ?? e, r = $(n), a = (e) => Te.value.has(e.itemId ?? e.id);
|
|
7890
|
+
return !r.parts?.some((e) => e.type === "question" && xe.value.has(e.request.id) || e.type === "tool" && a(e.toolCall)) && !r.toolCalls?.some(a) ? n : {
|
|
7842
7891
|
...r,
|
|
7843
|
-
parts: r.parts?.filter((e) => e.type !== "tool" || !a(e.toolCall)).map((e) => e.type === "question" &&
|
|
7892
|
+
parts: r.parts?.filter((e) => e.type !== "tool" || !a(e.toolCall)).map((e) => e.type === "question" && xe.value.has(e.request.id) ? {
|
|
7844
7893
|
...e,
|
|
7845
7894
|
historical: !0
|
|
7846
7895
|
} : e),
|
|
7847
7896
|
toolCalls: r.toolCalls?.filter((e) => !a(e))
|
|
7848
7897
|
};
|
|
7849
7898
|
}
|
|
7850
|
-
let
|
|
7899
|
+
let Oe = o(() => A((e) => e.thread?.approvals ?? [], () => i.approvals ?? O.value?.approvals ?? [])), Y = o(() => Oe.value[0]), ke = o(() => A((e) => e.identity.busy ?? !1, () => i.busy ?? O.value?.busy ?? !1)), Ae = o(() => ke.value || H.value !== null), { armed: je, clear: Me } = to({
|
|
7851
7900
|
root: x,
|
|
7852
7901
|
busy: () => ke.value,
|
|
7853
7902
|
enabled: () => i.escapeInterrupt,
|
|
7854
7903
|
onInterrupt: un
|
|
7855
|
-
}), Ne = o(() => A((e) => e.identity.conversationKey, () => i.conversationKey === void 0 ? O.value?.activeConversationId : i.conversationKey)), Pe = o(() => A((e) => e.thread?.contextUsage, () => i.contextUsage === void 0 ? O.value?.contextUsage : i.contextUsage)), Fe = o(() => A((e) => e.identity.disabled ?? !1, () => i.disabled ?? (O.value ? O.value.status !== "ready" : !1))), Ie = o(() =>
|
|
7904
|
+
}), Ne = o(() => A((e) => e.identity.conversationKey, () => i.conversationKey === void 0 ? O.value?.activeConversationId : i.conversationKey)), Pe = o(() => A((e) => e.thread?.contextUsage, () => i.contextUsage === void 0 ? O.value?.contextUsage : i.contextUsage)), Fe = o(() => A((e) => e.identity.disabled ?? !1, () => i.disabled ?? (O.value ? O.value.status !== "ready" : !1))), Ie = o(() => G.value ?? A((e) => e.identity.error, () => i.error ?? O.value?.error ?? null) ?? null), Le = o(() => A((e) => e.thread?.goal ?? null, () => i.goal === void 0 ? O.value?.goal ?? null : i.goal)), Re = o(() => A((e) => e.history?.loading ?? !1, () => i.historyLoading ?? O.value?.historyLoading ?? !1)), ze = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), Be = o(() => A((e) => e.history?.hasOlder ?? !1, () => i.hasOlderHistory ?? O.value?.historyState?.hasOlder ?? !1)), Ve = o(() => A((e) => e.history?.loadingOlder ?? !1, () => i.loadingOlderHistory ?? O.value?.historyState?.loadingOlder ?? !1)), He = o(() => A((e) => e.catalogs?.modelCatalogStatus, () => i.modelCatalogStatus ?? O.value?.modelCatalogStatus)), Ue = o(() => A((e) => e.catalogs?.models, () => i.models ?? O.value?.models)), We = o(() => A((e) => e.composer?.approvalPreset, () => i.approvalPreset === void 0 ? O.value?.approvalPreset : i.approvalPreset)), Ge = o(() => A((e) => e.composer?.planMode, () => i.planMode ?? O.value?.planMode)), Ke = o(() => A((e) => e.catalogs?.plugins, () => i.plugins ?? O.value?.plugins)), qe = o(() => A((e) => e.catalogs?.mentionGroups, () => i.mentionGroups)), Je = o(() => Dt(i.presentation)), Xe = o(() => A((e) => e.thread?.queuedPrompts ?? [], () => i.queuedPrompts ?? O.value?.queuedPrompts ?? [])), Ze = o(() => A((e) => e.composer?.selectedModelId, () => i.selectedModelId === void 0 ? O.value?.selectedModelId : i.selectedModelId)), Qe = o(() => A((e) => e.composer?.selectedReasoningEffort, () => i.selectedReasoningEffort === void 0 ? O.value?.selectedReasoningEffort : i.selectedReasoningEffort)), $e = o(() => A((e) => e.composer?.selectedServiceTier, () => i.selectedServiceTier === void 0 ? O.value?.selectedServiceTier : i.selectedServiceTier)), et = o(() => A((e) => e.catalogs?.skillCatalogStatus, () => i.skillCatalogStatus ?? O.value?.skillCatalogStatus)), tt = o(() => A((e) => e.catalogs?.skills, () => i.skills ?? O.value?.skills)), nt = o(() => A((e) => e.thread?.turnGitDiff, () => i.turnGitDiff === void 0 ? O.value?.turnGitDiff : i.turnGitDiff)), rt = o(() => A((e) => e.policy?.attachEnabled ?? !0, () => i.attachEnabled !== !1)), it = o(() => ({
|
|
7856
7905
|
...Ot,
|
|
7857
7906
|
...T.value ? T.value.capabilities : i.capabilities,
|
|
7858
7907
|
approvalPresets: T.value?.capabilities?.approvalPresets ?? (T.value ? Ot.approvalPresets : i.approvalPresets ?? O.value?.approvalPresets ?? i.capabilities?.approvalPresets) ?? Ot.approvalPresets
|
|
7859
|
-
})), at = o(() => A((e) => e.catalogs?.commands ?? [], () => i.commands ?? kt)), ot = o(() => A((e) => e.catalogs?.files ?? [], () => i.files)), st = o(() => A((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), ct = o(() => A((e) => e.composer?.menuItems ?? [], () => i.menuItems)), lt = o(() => A((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), ut = o(() => A((e) => e.composer?.placeholder, () => i.placeholder)), dt = o(() => A((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), ft = o(() => A((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), pt = o(() => A((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), mt = o(() => A((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), ht = o(() => A((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), gt = o(() => A((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), _t = o(() => ke.value || A((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), vt = o(() => Re.value), yt = o(() =>
|
|
7860
|
-
|
|
7908
|
+
})), at = o(() => A((e) => e.catalogs?.commands ?? [], () => i.commands ?? kt)), ot = o(() => A((e) => e.catalogs?.files ?? [], () => i.files)), st = o(() => A((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), ct = o(() => A((e) => e.composer?.menuItems ?? [], () => i.menuItems)), lt = o(() => A((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), ut = o(() => A((e) => e.composer?.placeholder, () => i.placeholder)), dt = o(() => A((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), ft = o(() => A((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), pt = o(() => A((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), mt = o(() => A((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), ht = o(() => A((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), gt = o(() => A((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), _t = o(() => ke.value || A((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), vt = o(() => Re.value), yt = o(() => le.value.length > 0 || ke.value || Oe.value.length > 0);
|
|
7909
|
+
U(() => !!(Y.value || we.value || Se.value), async (e, t) => {
|
|
7861
7910
|
if (e || !t) return;
|
|
7862
7911
|
let n = document.activeElement;
|
|
7863
7912
|
if (!n || !y.value?.contains(n)) return;
|
|
7864
7913
|
let r = Ne.value;
|
|
7865
7914
|
await S(), Ne.value === r && (document.activeElement === n || document.activeElement === document.body) && v.value?.focus({ preserveSelection: !0 });
|
|
7866
|
-
}),
|
|
7867
|
-
C.value || i.composerState || i.modelValue !==
|
|
7915
|
+
}), U(() => i.modelValue, () => {
|
|
7916
|
+
C.value || i.composerState || i.modelValue !== L.value && (L.value = i.modelValue, I.value = {
|
|
7868
7917
|
text: i.modelValue,
|
|
7869
7918
|
selectionStart: i.modelValue.length,
|
|
7870
7919
|
selectionEnd: i.modelValue.length
|
|
7871
7920
|
});
|
|
7872
|
-
}),
|
|
7921
|
+
}), U(j, (e) => {
|
|
7873
7922
|
if (!e) return;
|
|
7874
7923
|
let t = Ii(e);
|
|
7875
|
-
|
|
7876
|
-
}, { deep: !0 }),
|
|
7877
|
-
|
|
7878
|
-
}),
|
|
7879
|
-
!e &&
|
|
7880
|
-
}),
|
|
7924
|
+
I.value = t, L.value = t.text;
|
|
7925
|
+
}, { deep: !0 }), U(N, (e) => {
|
|
7926
|
+
K.value = [...e];
|
|
7927
|
+
}), U(rt, (e) => {
|
|
7928
|
+
!e && K.value.length > 0 && Kt([]);
|
|
7929
|
+
}), U(Ne, (e, t) => {
|
|
7881
7930
|
h.value = null, g.value = /* @__PURE__ */ new Set();
|
|
7882
|
-
let n =
|
|
7883
|
-
n && (!n.hasAdoptedConversationKey && (t ?? null) === n.originConversationKey ?
|
|
7931
|
+
let n = H.value;
|
|
7932
|
+
n && (!n.hasAdoptedConversationKey && (t ?? null) === n.originConversationKey ? H.value = {
|
|
7884
7933
|
...n,
|
|
7885
7934
|
adoptedConversationKey: e ?? null,
|
|
7886
7935
|
hasAdoptedConversationKey: !0
|
|
7887
|
-
} : (e ?? null) !== n.originConversationKey && (e ?? null) !== n.adoptedConversationKey && (
|
|
7936
|
+
} : (e ?? null) !== n.originConversationKey && (e ?? null) !== n.adoptedConversationKey && (H.value = null)), ie += 1, V.value = null, Me(), z.value = null, G.value = null;
|
|
7888
7937
|
let r = Ii(j.value ?? (C.value ? {
|
|
7889
7938
|
text: "",
|
|
7890
7939
|
selectionStart: 0,
|
|
@@ -7894,52 +7943,52 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7894
7943
|
selectionStart: i.modelValue.length,
|
|
7895
7944
|
selectionEnd: i.modelValue.length
|
|
7896
7945
|
}));
|
|
7897
|
-
|
|
7898
|
-
}),
|
|
7899
|
-
let t =
|
|
7946
|
+
I.value = r, L.value = r.text;
|
|
7947
|
+
}), U(ce, (e) => {
|
|
7948
|
+
let t = H.value;
|
|
7900
7949
|
if (t) {
|
|
7901
7950
|
if (e.some((e) => At(e, t))) {
|
|
7902
|
-
|
|
7951
|
+
H.value = null;
|
|
7903
7952
|
return;
|
|
7904
7953
|
}
|
|
7905
|
-
t.hasAdoptedConversationKey && e.length > 0 && (
|
|
7954
|
+
t.hasAdoptedConversationKey && e.length > 0 && (H.value = null);
|
|
7906
7955
|
}
|
|
7907
|
-
}),
|
|
7908
|
-
let e =
|
|
7909
|
-
e && (
|
|
7910
|
-
}),
|
|
7911
|
-
let t =
|
|
7912
|
-
t && !e.some((e) => e.id === t) && (
|
|
7913
|
-
}),
|
|
7956
|
+
}), U([le, de], () => {
|
|
7957
|
+
let e = V.value;
|
|
7958
|
+
e && (de.value?.some((t) => t.id === e) || le.value.some((t) => $(t).turnId === e) || (ie += 1, V.value = null));
|
|
7959
|
+
}), U(Xe, (e) => {
|
|
7960
|
+
let t = z.value;
|
|
7961
|
+
t && !e.some((e) => e.id === t) && (z.value = null);
|
|
7962
|
+
}), U([
|
|
7914
7963
|
Ne,
|
|
7915
7964
|
() => O.value?.activeConversationId,
|
|
7916
7965
|
() => E.value?.readPromptHistory,
|
|
7917
|
-
|
|
7966
|
+
he
|
|
7918
7967
|
], () => {
|
|
7919
7968
|
bt();
|
|
7920
|
-
}, { immediate: !0 }),
|
|
7921
|
-
e === "ready" && t == null && (
|
|
7969
|
+
}, { immediate: !0 }), U(() => [O.value?.status, O.value?.error], ([e, t]) => {
|
|
7970
|
+
e === "ready" && t == null && (G.value = null);
|
|
7922
7971
|
}), D(() => {
|
|
7923
7972
|
i.surface && i.surface.state.status === "idle" && Q(() => i.surface.connect());
|
|
7924
7973
|
});
|
|
7925
7974
|
async function bt() {
|
|
7926
|
-
let e = ++
|
|
7927
|
-
if (
|
|
7928
|
-
let n =
|
|
7975
|
+
let e = ++se, t = Ne.value;
|
|
7976
|
+
if (q.value = !1, oe.value = [], t == null || he.value !== void 0) return;
|
|
7977
|
+
let n = ae.get(t);
|
|
7929
7978
|
if (n) {
|
|
7930
|
-
|
|
7979
|
+
oe.value = n;
|
|
7931
7980
|
return;
|
|
7932
7981
|
}
|
|
7933
7982
|
let r = E.value?.readPromptHistory, a = i.surface, o = O.value?.activeConversationId;
|
|
7934
7983
|
if (!(!r && !o)) {
|
|
7935
|
-
|
|
7984
|
+
q.value = !0;
|
|
7936
7985
|
try {
|
|
7937
7986
|
let n = r ? await r() : (await a.readConversationPromptHistory(o)).prompts;
|
|
7938
|
-
if (e !==
|
|
7987
|
+
if (e !== se || Ne.value !== t) return;
|
|
7939
7988
|
let i = [...n].slice(-100);
|
|
7940
|
-
|
|
7989
|
+
ae.set(t, i), oe.value = i;
|
|
7941
7990
|
} catch {} finally {
|
|
7942
|
-
e ===
|
|
7991
|
+
e === se && (q.value = !1);
|
|
7943
7992
|
}
|
|
7944
7993
|
}
|
|
7945
7994
|
}
|
|
@@ -7954,16 +8003,16 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7954
8003
|
}
|
|
7955
8004
|
function St(e, t) {
|
|
7956
8005
|
Jt("");
|
|
7957
|
-
let n =
|
|
8006
|
+
let n = z.value;
|
|
7958
8007
|
if (n) {
|
|
7959
|
-
|
|
8008
|
+
z.value = null, cn(n, e), Kt([]);
|
|
7960
8009
|
return;
|
|
7961
8010
|
}
|
|
7962
|
-
let r = qt(
|
|
8011
|
+
let r = qt(K.value, t), o = Ct();
|
|
7963
8012
|
if (b.value?.scrollToBottom(), S(() => b.value?.scrollToBottom()), C.value) {
|
|
7964
8013
|
let t = E.value?.submit;
|
|
7965
8014
|
if (t) {
|
|
7966
|
-
let n = Et(e,
|
|
8015
|
+
let n = Et(e, K.value);
|
|
7967
8016
|
Q(() => Promise.resolve(t(e, r)), () => {
|
|
7968
8017
|
jt(n), g.value = o;
|
|
7969
8018
|
});
|
|
@@ -7977,10 +8026,10 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7977
8026
|
}
|
|
7978
8027
|
function Ct() {
|
|
7979
8028
|
let e = g.value;
|
|
7980
|
-
return g.value = /* @__PURE__ */ new Set([...e, ...
|
|
8029
|
+
return g.value = /* @__PURE__ */ new Set([...e, ...J.value.filter((e) => e.payload.request.delivery === "async").map((e) => e.id)]), h.value = null, e;
|
|
7981
8030
|
}
|
|
7982
8031
|
function wt(e) {
|
|
7983
|
-
if (!
|
|
8032
|
+
if (!J.value.some((t) => t.id === e)) return;
|
|
7984
8033
|
let t = {
|
|
7985
8034
|
id: e,
|
|
7986
8035
|
payload: {
|
|
@@ -7994,9 +8043,9 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
7994
8043
|
Z("continueInterruptedTurn") || C.value || (a("continueInterruptedTurn"), i.surface && Q(() => i.surface.continueInterruptedTurn()));
|
|
7995
8044
|
}
|
|
7996
8045
|
function Et(e, t) {
|
|
7997
|
-
if (ke.value ||
|
|
7998
|
-
let n = `codex-optimistic-user-${++
|
|
7999
|
-
return
|
|
8046
|
+
if (ke.value || ce.value.length > 0) return null;
|
|
8047
|
+
let n = `codex-optimistic-user-${++re}`;
|
|
8048
|
+
return H.value = {
|
|
8000
8049
|
adoptedConversationKey: null,
|
|
8001
8050
|
hasAdoptedConversationKey: !1,
|
|
8002
8051
|
originConversationKey: Ne.value ?? null,
|
|
@@ -8026,7 +8075,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8026
8075
|
return n.role === "user" && Ca(n.content) === t.prompt;
|
|
8027
8076
|
}
|
|
8028
8077
|
function jt(e) {
|
|
8029
|
-
e &&
|
|
8078
|
+
e && H.value?.message.id === e && (H.value = null);
|
|
8030
8079
|
}
|
|
8031
8080
|
function Mt() {
|
|
8032
8081
|
if (!Z("loadOlderHistory") && !C.value) {
|
|
@@ -8038,7 +8087,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8038
8087
|
}
|
|
8039
8088
|
}
|
|
8040
8089
|
function Nt(e) {
|
|
8041
|
-
let t =
|
|
8090
|
+
let t = le.value[e];
|
|
8042
8091
|
if (!t) return;
|
|
8043
8092
|
let n = $(t), r = Ca(n.content);
|
|
8044
8093
|
n.role !== "user" || !r || (Jt(r), !Z("quoteMessage", e) && (C.value || a("quoteMessage", e)));
|
|
@@ -8077,7 +8126,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8077
8126
|
async function Lt(e, t) {
|
|
8078
8127
|
let n = C.value ? E.value?.openImage : i.openImage;
|
|
8079
8128
|
if (!n) return !1;
|
|
8080
|
-
|
|
8129
|
+
G.value = null;
|
|
8081
8130
|
try {
|
|
8082
8131
|
return await n(e, t) !== !1;
|
|
8083
8132
|
} catch (e) {
|
|
@@ -8117,15 +8166,15 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8117
8166
|
}
|
|
8118
8167
|
}
|
|
8119
8168
|
function Wt(e) {
|
|
8120
|
-
let t = new Map(
|
|
8169
|
+
let t = new Map(K.value.map((e) => [e.reference, e]));
|
|
8121
8170
|
for (let n of e) t.set(n.reference, n);
|
|
8122
8171
|
Kt([...t.values()].slice(0, 20));
|
|
8123
8172
|
}
|
|
8124
8173
|
function Gt(e) {
|
|
8125
|
-
Kt(
|
|
8174
|
+
Kt(K.value.filter((t) => t.id !== e));
|
|
8126
8175
|
}
|
|
8127
8176
|
function Kt(e) {
|
|
8128
|
-
|
|
8177
|
+
K.value = e, !Z("updateAttachments", e) && (C.value || a("attachmentsChange", e));
|
|
8129
8178
|
}
|
|
8130
8179
|
function qt(e, t) {
|
|
8131
8180
|
if (e.length === 0) return t;
|
|
@@ -8150,7 +8199,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8150
8199
|
}
|
|
8151
8200
|
function Yt(e) {
|
|
8152
8201
|
let t = Ii(e);
|
|
8153
|
-
|
|
8202
|
+
I.value = t, L.value = t.text, !Z("updateComposerState", t) && (C.value || (a("update:modelValue", t.text), a("update:composerState", t)));
|
|
8154
8203
|
}
|
|
8155
8204
|
function Xt() {
|
|
8156
8205
|
Z("cancel") || C.value || (a("cancel"), i.surface && Q(() => i.surface.interrupt()));
|
|
@@ -8162,14 +8211,14 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8162
8211
|
Z("onMessageCopied", e) || C.value || a("copyMessage", e);
|
|
8163
8212
|
}
|
|
8164
8213
|
async function $t(e) {
|
|
8165
|
-
if (
|
|
8214
|
+
if (V.value !== null) return;
|
|
8166
8215
|
let t = E.value?.deleteTurn;
|
|
8167
8216
|
if (C.value && !t) return;
|
|
8168
|
-
let n = ++
|
|
8169
|
-
|
|
8217
|
+
let n = ++ie, r = !1;
|
|
8218
|
+
V.value = e;
|
|
8170
8219
|
try {
|
|
8171
8220
|
if (t) {
|
|
8172
|
-
|
|
8221
|
+
G.value = null;
|
|
8173
8222
|
let n;
|
|
8174
8223
|
try {
|
|
8175
8224
|
n = t(e);
|
|
@@ -8186,7 +8235,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8186
8235
|
}
|
|
8187
8236
|
a("deleteTurn", e), i.surface && await Q(() => i.surface.deleteTurn(e));
|
|
8188
8237
|
} finally {
|
|
8189
|
-
!r &&
|
|
8238
|
+
!r && ie === n && (V.value = null);
|
|
8190
8239
|
}
|
|
8191
8240
|
}
|
|
8192
8241
|
function en(e) {
|
|
@@ -8205,18 +8254,18 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8205
8254
|
Z("clearGoal") || C.value || (a("clearGoal"), i.surface && Q(() => i.surface.clearGoal()));
|
|
8206
8255
|
}
|
|
8207
8256
|
function on(e) {
|
|
8208
|
-
|
|
8257
|
+
z.value === e && (z.value = null), !Z("deleteQueuedPrompt", e) && (C.value || (a("deleteQueuedPrompt", e), i.surface && Q(() => i.surface.deleteQueuedPrompt(e))));
|
|
8209
8258
|
}
|
|
8210
8259
|
function sn(e) {
|
|
8211
|
-
if (
|
|
8260
|
+
if (L.value.length > 0) return;
|
|
8212
8261
|
let t = Xe.value.find((t) => t.id === e);
|
|
8213
|
-
t && (
|
|
8262
|
+
t && (z.value = e, Jt(t.text), v.value?.focus());
|
|
8214
8263
|
}
|
|
8215
8264
|
function cn(e, t) {
|
|
8216
8265
|
Z("updateQueuedPrompt", e, t) || C.value || (a("updateQueuedPrompt", e, t), i.surface && Q(() => i.surface.updateQueuedPrompt(e, t)));
|
|
8217
8266
|
}
|
|
8218
8267
|
function ln(e, t) {
|
|
8219
|
-
it.value.steerPrompt && (
|
|
8268
|
+
it.value.steerPrompt && (z.value === e && (z.value = null), t === void 0 ? Z("steerQueuedPrompt", e) : Z("steerQueuedPrompt", e, t), !C.value && (t === void 0 ? a("steerQueuedPrompt", e) : a("steerQueuedPrompt", e, t), i.surface && Q(() => t === void 0 ? i.surface.steerQueuedPrompt(e) : i.surface.steerQueuedPrompt(e, t))));
|
|
8220
8269
|
}
|
|
8221
8270
|
function un() {
|
|
8222
8271
|
Me(), !Z("interrupt") && (C.value || (a("interrupt"), i.surface && Q(() => i.surface.interrupt())));
|
|
@@ -8226,12 +8275,12 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8226
8275
|
St(e, t);
|
|
8227
8276
|
return;
|
|
8228
8277
|
}
|
|
8229
|
-
let n =
|
|
8278
|
+
let n = z.value;
|
|
8230
8279
|
if (n) {
|
|
8231
|
-
|
|
8280
|
+
z.value = null, ln(n, e), Kt([]);
|
|
8232
8281
|
return;
|
|
8233
8282
|
}
|
|
8234
|
-
let r = qt(
|
|
8283
|
+
let r = qt(K.value, t);
|
|
8235
8284
|
if (C.value) {
|
|
8236
8285
|
let t = E.value?.steer;
|
|
8237
8286
|
if (t) {
|
|
@@ -8283,7 +8332,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8283
8332
|
return n ? (Q(() => Promise.resolve(n(...t))), !0) : !1;
|
|
8284
8333
|
}
|
|
8285
8334
|
async function Q(e, t) {
|
|
8286
|
-
|
|
8335
|
+
G.value = null;
|
|
8287
8336
|
try {
|
|
8288
8337
|
await e();
|
|
8289
8338
|
} catch (e) {
|
|
@@ -8291,10 +8340,10 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8291
8340
|
}
|
|
8292
8341
|
}
|
|
8293
8342
|
function xn(e) {
|
|
8294
|
-
|
|
8343
|
+
G.value = e instanceof Error ? e.message : String(e);
|
|
8295
8344
|
}
|
|
8296
8345
|
function Sn(e) {
|
|
8297
|
-
|
|
8346
|
+
G.value = e, a("error", e);
|
|
8298
8347
|
}
|
|
8299
8348
|
function Cn() {
|
|
8300
8349
|
v.value?.focus();
|
|
@@ -8313,30 +8362,30 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8313
8362
|
}, [vt.value ? (k(), s(bs, {
|
|
8314
8363
|
key: 0,
|
|
8315
8364
|
class: "codex-conversation-pane__history-loader"
|
|
8316
|
-
})) : (k(), s(
|
|
8365
|
+
})) : (k(), s(qu, {
|
|
8317
8366
|
key: 1,
|
|
8318
8367
|
class: "codex-conversation-pane__layout",
|
|
8319
8368
|
"scroll-mode": "child"
|
|
8320
8369
|
}, {
|
|
8321
|
-
footer:
|
|
8370
|
+
footer: W(() => [u("footer", {
|
|
8322
8371
|
ref_key: "footerElement",
|
|
8323
8372
|
ref: y,
|
|
8324
8373
|
class: "codex-conversation-pane__footer"
|
|
8325
|
-
}, [Ie.value ? (k(), l("p",
|
|
8326
|
-
key:
|
|
8327
|
-
approval:
|
|
8374
|
+
}, [Ie.value ? (k(), l("p", Qu, R(Ie.value), 1)) : c("", !0), Y.value ? (k(), l("div", $u, [F(n.$slots, "approval", { approval: Y.value }, () => [(k(), s(na, {
|
|
8375
|
+
key: Y.value.id,
|
|
8376
|
+
approval: Y.value,
|
|
8328
8377
|
disabled: Fe.value,
|
|
8329
|
-
onResolve: r[1] ||= (e, t) => mn(
|
|
8330
|
-
}, null, 8, ["approval", "disabled"]))], !0)])) :
|
|
8331
|
-
key:
|
|
8378
|
+
onResolve: r[1] ||= (e, t) => mn(Y.value.id, e, t)
|
|
8379
|
+
}, null, 8, ["approval", "disabled"]))], !0)])) : we.value ? (k(), s(Zo, {
|
|
8380
|
+
key: we.value.id,
|
|
8332
8381
|
class: "codex-conversation-pane__confirmation-composer",
|
|
8333
|
-
request:
|
|
8382
|
+
request: we.value,
|
|
8334
8383
|
onClientResponse: Zt
|
|
8335
|
-
}, null, 8, ["request"])) :
|
|
8336
|
-
key:
|
|
8384
|
+
}, null, 8, ["request"])) : Se.value ? (k(), s(Jo, {
|
|
8385
|
+
key: Se.value.id,
|
|
8337
8386
|
class: "codex-conversation-pane__question-composer",
|
|
8338
|
-
"answered-client-request-ids":
|
|
8339
|
-
request:
|
|
8387
|
+
"answered-client-request-ids": ve.value,
|
|
8388
|
+
request: Se.value,
|
|
8340
8389
|
onClientResponse: Zt
|
|
8341
8390
|
}, null, 8, ["answered-client-request-ids", "request"])) : (k(), l(t, { key: 4 }, [
|
|
8342
8391
|
F(n.$slots, "before-composer", {}, void 0, !0),
|
|
@@ -8346,7 +8395,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8346
8395
|
goal: Le.value,
|
|
8347
8396
|
presentation: Je.value.shelf,
|
|
8348
8397
|
"queued-prompts": Xe.value,
|
|
8349
|
-
"queued-prompt-edit-disabled":
|
|
8398
|
+
"queued-prompt-edit-disabled": L.value.length > 0,
|
|
8350
8399
|
"queued-prompt-steer-disabled": !it.value.steerPrompt,
|
|
8351
8400
|
"turn-git-diff": nt.value,
|
|
8352
8401
|
onClearGoal: an,
|
|
@@ -8356,7 +8405,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8356
8405
|
onSteerQueuedPrompt: ln
|
|
8357
8406
|
}, d({ _: 2 }, [n.$slots["composer-shelf-actions"] ? {
|
|
8358
8407
|
name: "actions",
|
|
8359
|
-
fn:
|
|
8408
|
+
fn: W((e) => [F(n.$slots, "composer-shelf-actions", w(_(e)), void 0, !0)]),
|
|
8360
8409
|
key: "0"
|
|
8361
8410
|
} : void 0]), 1032, [
|
|
8362
8411
|
"disabled",
|
|
@@ -8375,21 +8424,21 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8375
8424
|
autofocus: e.autofocus,
|
|
8376
8425
|
"attach-enabled": rt.value,
|
|
8377
8426
|
capabilities: it.value,
|
|
8378
|
-
"can-continue-interrupted-turn":
|
|
8427
|
+
"can-continue-interrupted-turn": fe.value,
|
|
8379
8428
|
commands: at.value,
|
|
8380
|
-
"composer-state":
|
|
8429
|
+
"composer-state": I.value,
|
|
8381
8430
|
"context-usage": Pe.value,
|
|
8382
8431
|
disabled: Fe.value,
|
|
8383
|
-
draft:
|
|
8432
|
+
draft: L.value,
|
|
8384
8433
|
"empty-send-prompt": e.emptySendPrompt,
|
|
8385
8434
|
"follow-up-behavior": dt.value,
|
|
8386
8435
|
files: ot.value,
|
|
8387
|
-
"has-attachments":
|
|
8436
|
+
"has-attachments": K.value.length > 0,
|
|
8388
8437
|
"has-external-content": e.hasComposerContext,
|
|
8389
|
-
"interrupt-armed":
|
|
8438
|
+
"interrupt-armed": B(je),
|
|
8390
8439
|
plugins: Ke.value,
|
|
8391
|
-
"prompt-history":
|
|
8392
|
-
"prompt-history-loading":
|
|
8440
|
+
"prompt-history": ge.value,
|
|
8441
|
+
"prompt-history-loading": q.value,
|
|
8393
8442
|
"queued-prompt-id": Xe.value[0]?.id ?? null,
|
|
8394
8443
|
"is-sending": ke.value,
|
|
8395
8444
|
"leading-menu-items": st.value,
|
|
@@ -8424,24 +8473,24 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8424
8473
|
"onUpdate:reasoningEffort": _n,
|
|
8425
8474
|
"onUpdate:serviceTier": vn
|
|
8426
8475
|
}, d({
|
|
8427
|
-
"before-meta":
|
|
8476
|
+
"before-meta": W(() => [J.value.length > 0 ? (k(), l("span", ed, [u("button", {
|
|
8428
8477
|
class: "codex-conversation-pane__pending-question-cancel",
|
|
8429
8478
|
type: "button",
|
|
8430
8479
|
"aria-label": "Cancel pending question",
|
|
8431
|
-
onClick: r[2] ||= (e) => wt(
|
|
8432
|
-
}, [m(
|
|
8480
|
+
onClick: r[2] ||= (e) => wt(J.value[0].id)
|
|
8481
|
+
}, [m(B(Ee), {
|
|
8433
8482
|
class: "codex-conversation-pane__pending-question-icon",
|
|
8434
8483
|
"aria-hidden": "true"
|
|
8435
|
-
}), m(
|
|
8484
|
+
}), m(B(pe), {
|
|
8436
8485
|
class: "codex-conversation-pane__pending-question-remove",
|
|
8437
8486
|
"aria-hidden": "true"
|
|
8438
8487
|
})]), u("button", {
|
|
8439
8488
|
class: "codex-conversation-pane__pending-question-open",
|
|
8440
8489
|
type: "button",
|
|
8441
|
-
"aria-label":
|
|
8442
|
-
onClick: r[3] ||= (e) => h.value =
|
|
8443
|
-
},
|
|
8444
|
-
before:
|
|
8490
|
+
"aria-label": J.value.length === 1 ? "Pending question" : `${J.value.length} pending questions`,
|
|
8491
|
+
onClick: r[3] ||= (e) => h.value = J.value[0].id
|
|
8492
|
+
}, R(J.value.length === 1 ? "Pending question" : `${J.value.length} pending questions`), 9, td)])) : c("", !0)]),
|
|
8493
|
+
before: W(() => [K.value.length > 0 ? (k(), l("div", nd, [(k(!0), l(t, null, P(K.value, (e, t) => (k(), l("div", {
|
|
8445
8494
|
key: e.id,
|
|
8446
8495
|
class: "codex-conversation-pane__attachment"
|
|
8447
8496
|
}, [
|
|
@@ -8450,13 +8499,13 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8450
8499
|
class: "codex-conversation-pane__attachment-preview",
|
|
8451
8500
|
src: e.previewUrl,
|
|
8452
8501
|
alt: e.name
|
|
8453
|
-
}, null, 8,
|
|
8502
|
+
}, null, 8, rd)) : (k(), l("span", id, "📎")),
|
|
8454
8503
|
u("span", {
|
|
8455
8504
|
class: "codex-conversation-pane__attachment-name",
|
|
8456
8505
|
title: e.name
|
|
8457
|
-
},
|
|
8458
|
-
u("span",
|
|
8459
|
-
attachments:
|
|
8506
|
+
}, R(e.name), 9, ad),
|
|
8507
|
+
u("span", od, [F(n.$slots, "composer-attachment-actions", {
|
|
8508
|
+
attachments: K.value,
|
|
8460
8509
|
index: t,
|
|
8461
8510
|
disabled: Fe.value
|
|
8462
8511
|
}, void 0, !0), u("button", {
|
|
@@ -8465,68 +8514,68 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8465
8514
|
"aria-label": `Remove ${e.name}`,
|
|
8466
8515
|
disabled: Fe.value,
|
|
8467
8516
|
onClick: (t) => Gt(e.id)
|
|
8468
|
-
}, [m(
|
|
8517
|
+
}, [m(B(Ye), { "aria-hidden": "true" })], 8, sd)])
|
|
8469
8518
|
]))), 128))])) : c("", !0), F(n.$slots, "composer-context", { disabled: Fe.value }, void 0, !0)]),
|
|
8470
8519
|
_: 2
|
|
8471
8520
|
}, [
|
|
8472
8521
|
n.$slots["menu-icon"] ? {
|
|
8473
8522
|
name: "menu-icon",
|
|
8474
|
-
fn:
|
|
8523
|
+
fn: W((e) => [F(n.$slots, "menu-icon", w(_(e)), void 0, !0)]),
|
|
8475
8524
|
key: "0"
|
|
8476
8525
|
} : void 0,
|
|
8477
8526
|
n.$slots["menu-item"] ? {
|
|
8478
8527
|
name: "menu-item",
|
|
8479
|
-
fn:
|
|
8528
|
+
fn: W((e) => [F(n.$slots, "menu-item", w(_(e)), void 0, !0)]),
|
|
8480
8529
|
key: "1"
|
|
8481
8530
|
} : void 0,
|
|
8482
8531
|
n.$slots["suggestion-item"] ? {
|
|
8483
8532
|
name: "suggestion-item",
|
|
8484
|
-
fn:
|
|
8533
|
+
fn: W((e) => [F(n.$slots, "suggestion-item", w(_(e)), void 0, !0)]),
|
|
8485
8534
|
key: "2"
|
|
8486
8535
|
} : void 0,
|
|
8487
8536
|
n.$slots.mention ? {
|
|
8488
8537
|
name: "mention",
|
|
8489
|
-
fn:
|
|
8538
|
+
fn: W((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
|
|
8490
8539
|
key: "3"
|
|
8491
8540
|
} : void 0,
|
|
8492
8541
|
n.$slots["composer-after-input"] ? {
|
|
8493
8542
|
name: "after-input",
|
|
8494
|
-
fn:
|
|
8543
|
+
fn: W(() => [F(n.$slots, "composer-after-input", {}, void 0, !0)]),
|
|
8495
8544
|
key: "4"
|
|
8496
8545
|
} : void 0,
|
|
8497
8546
|
n.$slots["composer-after"] ? {
|
|
8498
8547
|
name: "after",
|
|
8499
|
-
fn:
|
|
8548
|
+
fn: W(() => [F(n.$slots, "composer-after", {}, void 0, !0)]),
|
|
8500
8549
|
key: "5"
|
|
8501
8550
|
} : void 0
|
|
8502
8551
|
]), 1032, /* @__PURE__ */ "autofocus.attach-enabled.capabilities.can-continue-interrupted-turn.commands.composer-state.context-usage.disabled.draft.empty-send-prompt.follow-up-behavior.files.has-attachments.has-external-content.interrupt-armed.plugins.prompt-history.prompt-history-loading.queued-prompt-id.is-sending.leading-menu-items.menu-items.model-menu-items.mention-groups.model-catalog-status.models.placeholder.approval-preset.plan-mode.presentation.selected-model-id.selected-reasoning-effort.selected-service-tier.skill-catalog-status.skills.transcribe-audio".split("."))),
|
|
8503
8552
|
F(n.$slots, "after-composer", {}, void 0, !0)
|
|
8504
8553
|
], 64))], 512)]),
|
|
8505
|
-
default:
|
|
8554
|
+
default: W(() => [yt.value ? (k(), s(Uu, {
|
|
8506
8555
|
key: 0,
|
|
8507
8556
|
ref_key: "messageList",
|
|
8508
8557
|
ref: b,
|
|
8509
8558
|
class: "codex-conversation-pane__messages",
|
|
8510
8559
|
"actions-disabled": gt.value,
|
|
8511
|
-
"active-turn-id":
|
|
8512
|
-
"answered-client-request-ids":
|
|
8560
|
+
"active-turn-id": ue.value,
|
|
8561
|
+
"answered-client-request-ids": ve.value,
|
|
8513
8562
|
"aria-label": e.ariaLabel,
|
|
8514
8563
|
busy: Ae.value,
|
|
8515
8564
|
"can-delete-turn": ft.value,
|
|
8516
8565
|
"can-edit-turn": pt.value,
|
|
8517
8566
|
"can-fork-turn": mt.value,
|
|
8518
8567
|
"can-retry-turn": ht.value,
|
|
8519
|
-
"deleting-turn-id":
|
|
8568
|
+
"deleting-turn-id": V.value,
|
|
8520
8569
|
"empty-label": e.emptyTitle,
|
|
8521
8570
|
"follow-ups-disabled": _t.value,
|
|
8522
8571
|
"has-older-messages": Be.value,
|
|
8523
|
-
"hidden-client-request-ids":
|
|
8572
|
+
"hidden-client-request-ids": Ce.value,
|
|
8524
8573
|
"render-strategy": ze.value,
|
|
8525
8574
|
"loading-older-messages": Ve.value,
|
|
8526
8575
|
"initial-message-batch-size": e.initialMessageBatchSize,
|
|
8527
8576
|
"message-batch-size": e.messageBatchSize,
|
|
8528
8577
|
"message-text-selection": e.messageTextSelection,
|
|
8529
|
-
messages:
|
|
8578
|
+
messages: le.value,
|
|
8530
8579
|
"mention-groups": qe.value,
|
|
8531
8580
|
"open-image": Lt,
|
|
8532
8581
|
plugins: Ke.value,
|
|
@@ -8536,8 +8585,8 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8536
8585
|
"show-tool-details": e.showToolDetails,
|
|
8537
8586
|
skills: tt.value,
|
|
8538
8587
|
"tool-visibility": e.toolVisibility,
|
|
8539
|
-
"transform-message":
|
|
8540
|
-
turns:
|
|
8588
|
+
"transform-message": xe.value.size > 0 || Te.value.size > 0 ? De : e.transformMessage,
|
|
8589
|
+
turns: de.value,
|
|
8541
8590
|
onCancel: Xt,
|
|
8542
8591
|
onClientResponse: Zt,
|
|
8543
8592
|
onCopyMessage: Qt,
|
|
@@ -8554,71 +8603,71 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8554
8603
|
}, d({ _: 2 }, [
|
|
8555
8604
|
n.$slots.message ? {
|
|
8556
8605
|
name: "message",
|
|
8557
|
-
fn:
|
|
8606
|
+
fn: W((e) => [F(n.$slots, "message", w(_(e)), void 0, !0)]),
|
|
8558
8607
|
key: "0"
|
|
8559
8608
|
} : void 0,
|
|
8560
8609
|
n.$slots["message-actions"] ? {
|
|
8561
8610
|
name: "actions",
|
|
8562
|
-
fn:
|
|
8611
|
+
fn: W((e) => [F(n.$slots, "message-actions", w(_(e)), void 0, !0)]),
|
|
8563
8612
|
key: "1"
|
|
8564
8613
|
} : void 0,
|
|
8565
8614
|
n.$slots["message-attachment"] ? {
|
|
8566
8615
|
name: "attachment",
|
|
8567
|
-
fn:
|
|
8616
|
+
fn: W((e) => [F(n.$slots, "message-attachment", w(_(e)), void 0, !0)]),
|
|
8568
8617
|
key: "2"
|
|
8569
8618
|
} : void 0,
|
|
8570
8619
|
n.$slots["message-block"] ? {
|
|
8571
8620
|
name: "block",
|
|
8572
|
-
fn:
|
|
8621
|
+
fn: W((e) => [F(n.$slots, "message-block", w(_(e)), void 0, !0)]),
|
|
8573
8622
|
key: "3"
|
|
8574
8623
|
} : void 0,
|
|
8575
8624
|
n.$slots["message-header"] ? {
|
|
8576
8625
|
name: "header",
|
|
8577
|
-
fn:
|
|
8626
|
+
fn: W((e) => [F(n.$slots, "message-header", w(_(e)), void 0, !0)]),
|
|
8578
8627
|
key: "4"
|
|
8579
8628
|
} : void 0,
|
|
8580
8629
|
n.$slots.mention ? {
|
|
8581
8630
|
name: "mention",
|
|
8582
|
-
fn:
|
|
8631
|
+
fn: W((e) => [F(n.$slots, "mention", w(_(e)), void 0, !0)]),
|
|
8583
8632
|
key: "5"
|
|
8584
8633
|
} : void 0,
|
|
8585
8634
|
n.$slots["message-status"] ? {
|
|
8586
8635
|
name: "status",
|
|
8587
|
-
fn:
|
|
8636
|
+
fn: W((e) => [F(n.$slots, "message-status", w(_(e)), void 0, !0)]),
|
|
8588
8637
|
key: "6"
|
|
8589
8638
|
} : void 0,
|
|
8590
8639
|
n.$slots["message-text"] ? {
|
|
8591
8640
|
name: "text",
|
|
8592
|
-
fn:
|
|
8641
|
+
fn: W((e) => [F(n.$slots, "message-text", w(_(e)), void 0, !0)]),
|
|
8593
8642
|
key: "7"
|
|
8594
8643
|
} : void 0,
|
|
8595
8644
|
n.$slots["message-thinking"] ? {
|
|
8596
8645
|
name: "thinking",
|
|
8597
|
-
fn:
|
|
8646
|
+
fn: W((e) => [F(n.$slots, "message-thinking", w(_(e)), void 0, !0)]),
|
|
8598
8647
|
key: "8"
|
|
8599
8648
|
} : void 0,
|
|
8600
8649
|
n.$slots["message-tool"] ? {
|
|
8601
8650
|
name: "tool",
|
|
8602
|
-
fn:
|
|
8651
|
+
fn: W((e) => [F(n.$slots, "message-tool", w(_(e)), void 0, !0)]),
|
|
8603
8652
|
key: "9"
|
|
8604
8653
|
} : void 0
|
|
8605
|
-
]), 1032, /* @__PURE__ */ "actions-disabled.active-turn-id.answered-client-request-ids.aria-label.busy.can-delete-turn.can-edit-turn.can-fork-turn.can-retry-turn.deleting-turn-id.empty-label.follow-ups-disabled.has-older-messages.hidden-client-request-ids.render-strategy.loading-older-messages.initial-message-batch-size.message-batch-size.message-text-selection.messages.mention-groups.plugins.presentation.reset-key.scroll-to-bottom-label.show-tool-details.skills.tool-visibility.transform-message.turns".split("."))) : (k(), l("div",
|
|
8654
|
+
]), 1032, /* @__PURE__ */ "actions-disabled.active-turn-id.answered-client-request-ids.aria-label.busy.can-delete-turn.can-edit-turn.can-fork-turn.can-retry-turn.deleting-turn-id.empty-label.follow-ups-disabled.has-older-messages.hidden-client-request-ids.render-strategy.loading-older-messages.initial-message-batch-size.message-batch-size.message-text-selection.messages.mention-groups.plugins.presentation.reset-key.scroll-to-bottom-label.show-tool-details.skills.tool-visibility.transform-message.turns".split("."))) : (k(), l("div", Yu, [F(n.$slots, "empty", {
|
|
8606
8655
|
title: e.emptyTitle,
|
|
8607
8656
|
description: e.emptyDescription
|
|
8608
|
-
}, () => [u("div",
|
|
8657
|
+
}, () => [u("div", Xu, [u("h1", null, R(e.emptyTitle), 1), e.emptyDescription ? (k(), l("p", Zu, R(e.emptyDescription), 1)) : c("", !0)])], !0)]))]),
|
|
8609
8658
|
_: 3
|
|
8610
|
-
}))], 40,
|
|
8659
|
+
}))], 40, Ju));
|
|
8611
8660
|
}
|
|
8612
|
-
}), [["__scopeId", "data-v-c7008843"]]),
|
|
8661
|
+
}), [["__scopeId", "data-v-c7008843"]]), ld = {
|
|
8613
8662
|
class: "codex-conversation-sidebar",
|
|
8614
8663
|
"aria-label": "Conversations"
|
|
8615
|
-
},
|
|
8664
|
+
}, ud = { class: "codex-conversation-sidebar__header" }, dd = { class: "codex-conversation-sidebar__brand" }, fd = ["disabled"], pd = {
|
|
8616
8665
|
key: 0,
|
|
8617
8666
|
class: "codex-conversation-sidebar__empty"
|
|
8618
|
-
},
|
|
8667
|
+
}, md = {
|
|
8619
8668
|
key: 1,
|
|
8620
8669
|
class: "codex-conversation-sidebar__list"
|
|
8621
|
-
},
|
|
8670
|
+
}, hd = ["aria-current", "onClick"], gd = ["aria-label", "title"], _d = { class: "codex-conversation-sidebar__title" }, vd = { class: "codex-conversation-sidebar__time" }, yd = ["aria-label", "onClick"], bd = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
8622
8671
|
__name: "CodexConversationSidebar",
|
|
8623
8672
|
props: {
|
|
8624
8673
|
activeConversationId: { default: null },
|
|
@@ -8650,12 +8699,12 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8650
8699
|
let n = Math.floor(t / 60);
|
|
8651
8700
|
return n < 24 ? `${n}h` : `${Math.floor(n / 24)}d`;
|
|
8652
8701
|
}
|
|
8653
|
-
return (n, o) => (k(), l("aside",
|
|
8702
|
+
return (n, o) => (k(), l("aside", ld, [u("div", ud, [u("span", dd, R(e.brand), 1), u("button", {
|
|
8654
8703
|
class: "codex-conversation-sidebar__new",
|
|
8655
8704
|
type: "button",
|
|
8656
8705
|
disabled: e.createDisabled,
|
|
8657
8706
|
onClick: o[0] ||= (e) => r("create")
|
|
8658
|
-
}, [...o[1] ||= [u("span", { "aria-hidden": "true" }, "+", -1), p(" New thread ", -1)]], 8,
|
|
8707
|
+
}, [...o[1] ||= [u("span", { "aria-hidden": "true" }, "+", -1), p(" New thread ", -1)]], 8, fd)]), e.conversations.length === 0 ? (k(), l("p", pd, R(e.loading ? "Loading threads…" : "No conversations yet"), 1)) : (k(), l("nav", md, [(k(!0), l(t, null, P(e.conversations, (t) => (k(), l("div", {
|
|
8659
8708
|
key: t.id,
|
|
8660
8709
|
class: C(["codex-conversation-sidebar__item", { "codex-conversation-sidebar__item--active": t.id === e.activeConversationId }])
|
|
8661
8710
|
}, [u("button", {
|
|
@@ -8668,10 +8717,10 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8668
8717
|
class: C(["codex-conversation-sidebar__status", `codex-conversation-sidebar__status--${t.status}`]),
|
|
8669
8718
|
"aria-label": `Status: ${t.status}`,
|
|
8670
8719
|
title: t.status
|
|
8671
|
-
}, null, 10,
|
|
8672
|
-
u("span",
|
|
8673
|
-
u("span",
|
|
8674
|
-
], 8,
|
|
8720
|
+
}, null, 10, gd),
|
|
8721
|
+
u("span", _d, R(t.title), 1),
|
|
8722
|
+
u("span", vd, R(a(t.updatedAt)), 1)
|
|
8723
|
+
], 8, hd), u("button", {
|
|
8675
8724
|
class: "codex-conversation-sidebar__delete",
|
|
8676
8725
|
type: "button",
|
|
8677
8726
|
"aria-label": `Delete ${t.title}`,
|
|
@@ -8681,15 +8730,15 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8681
8730
|
"aria-hidden": "true",
|
|
8682
8731
|
fill: "none",
|
|
8683
8732
|
viewBox: "0 0 24 24"
|
|
8684
|
-
}, [u("path", { d: "M4 7h16M10 11v6m4-6v6M9 7l1-2h4l1 2m2 0-1 12H8L7 7" })], -1)]], 8,
|
|
8733
|
+
}, [u("path", { d: "M4 7h16M10 11v6m4-6v6M9 7l1-2h4l1 2m2 0-1 12H8L7 7" })], -1)]], 8, yd)], 2))), 128))]))]));
|
|
8685
8734
|
}
|
|
8686
|
-
}), [["__scopeId", "data-v-97c47314"]]),
|
|
8735
|
+
}), [["__scopeId", "data-v-97c47314"]]), xd = { class: "chat-composer-file-menu__section" }, Sd = ["onMousedown"], Cd = { class: "chat-composer-file-menu__name" }, wd = { class: "chat-composer-file-menu__path" }, Td = {
|
|
8687
8736
|
key: 0,
|
|
8688
8737
|
class: "chat-composer-file-menu__hint"
|
|
8689
|
-
},
|
|
8738
|
+
}, Ed = {
|
|
8690
8739
|
key: 1,
|
|
8691
8740
|
class: "chat-composer-file-menu__empty"
|
|
8692
|
-
},
|
|
8741
|
+
}, Dd = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
8693
8742
|
__name: "ChatComposerFileMentionMenu",
|
|
8694
8743
|
props: {
|
|
8695
8744
|
activeIndex: {},
|
|
@@ -8699,7 +8748,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8699
8748
|
emits: ["select"],
|
|
8700
8749
|
setup(e) {
|
|
8701
8750
|
let n = e, r = Wn(), i = M(null);
|
|
8702
|
-
return
|
|
8751
|
+
return U(() => [n.activeIndex, n.visibleFiles], async () => {
|
|
8703
8752
|
await S();
|
|
8704
8753
|
let e = i.value?.querySelectorAll(".chat-composer-file-menu__item").item(n.activeIndex);
|
|
8705
8754
|
typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
|
|
@@ -8710,28 +8759,28 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8710
8759
|
role: "listbox",
|
|
8711
8760
|
"aria-label": "Files"
|
|
8712
8761
|
}, [
|
|
8713
|
-
u("div",
|
|
8762
|
+
u("div", xd, R(B(r)("chat.files.title")), 1),
|
|
8714
8763
|
(k(!0), l(t, null, P(e.visibleFiles, (t, r) => (k(), l("button", {
|
|
8715
8764
|
key: t.path,
|
|
8716
8765
|
class: C(["chat-composer-file-menu__item", { "chat-composer-file-menu__item--active": r === e.activeIndex }]),
|
|
8717
8766
|
role: "option",
|
|
8718
8767
|
type: "button",
|
|
8719
|
-
onMousedown:
|
|
8768
|
+
onMousedown: K((e) => n.$emit("select", t), ["prevent"])
|
|
8720
8769
|
}, [
|
|
8721
|
-
m(
|
|
8770
|
+
m(B(ye), {
|
|
8722
8771
|
class: "chat-composer-file-menu__icon",
|
|
8723
8772
|
"aria-hidden": "true"
|
|
8724
8773
|
}),
|
|
8725
|
-
u("span",
|
|
8726
|
-
u("span",
|
|
8727
|
-
], 42,
|
|
8728
|
-
e.showHint ? (k(), l("div",
|
|
8774
|
+
u("span", Cd, R(t.name), 1),
|
|
8775
|
+
u("span", wd, R(t.path), 1)
|
|
8776
|
+
], 42, Sd))), 128)),
|
|
8777
|
+
e.showHint ? (k(), l("div", Td, R(B(r)("chat.files.hint")), 1)) : e.visibleFiles.length === 0 ? (k(), l("div", Ed, R(B(r)("chat.files.empty")), 1)) : c("", !0)
|
|
8729
8778
|
], 512));
|
|
8730
8779
|
}
|
|
8731
|
-
}), [["__scopeId", "data-v-122fc71c"]]),
|
|
8780
|
+
}), [["__scopeId", "data-v-122fc71c"]]), Od = ["onMousedown"], kd = ["src"], Ad = { class: "chat-composer-plugin-menu__main" }, jd = { class: "chat-composer-plugin-menu__name" }, Md = { class: "chat-composer-plugin-menu__description" }, Nd = {
|
|
8732
8781
|
key: 0,
|
|
8733
8782
|
class: "chat-composer-plugin-menu__empty"
|
|
8734
|
-
},
|
|
8783
|
+
}, Pd = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
8735
8784
|
__name: "ChatComposerPluginMenu",
|
|
8736
8785
|
props: {
|
|
8737
8786
|
activeIndex: {},
|
|
@@ -8740,7 +8789,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8740
8789
|
emits: ["select"],
|
|
8741
8790
|
setup(e) {
|
|
8742
8791
|
let n = e, r = M(null);
|
|
8743
|
-
return
|
|
8792
|
+
return U(() => [n.activeIndex, n.visiblePlugins], async () => {
|
|
8744
8793
|
await S();
|
|
8745
8794
|
let e = r.value?.querySelectorAll(".chat-composer-plugin-menu__item").item(n.activeIndex);
|
|
8746
8795
|
typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
|
|
@@ -8757,7 +8806,7 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8757
8806
|
class: C(["chat-composer-plugin-menu__item", { "chat-composer-plugin-menu__item--active": r === e.activeIndex }]),
|
|
8758
8807
|
role: "option",
|
|
8759
8808
|
type: "button",
|
|
8760
|
-
onMousedown:
|
|
8809
|
+
onMousedown: K((e) => n.$emit("select", t), ["prevent"])
|
|
8761
8810
|
}, [t.iconUrl ? (k(), l("img", {
|
|
8762
8811
|
key: 0,
|
|
8763
8812
|
class: "chat-composer-plugin-menu__icon chat-composer-plugin-menu__icon-image",
|
|
@@ -8765,24 +8814,24 @@ var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__
|
|
|
8765
8814
|
alt: "",
|
|
8766
8815
|
"aria-hidden": "true",
|
|
8767
8816
|
referrerpolicy: "no-referrer"
|
|
8768
|
-
}, null, 8,
|
|
8817
|
+
}, null, 8, kd)) : (k(), s(B(je), {
|
|
8769
8818
|
key: 1,
|
|
8770
8819
|
class: "chat-composer-plugin-menu__icon",
|
|
8771
8820
|
"aria-hidden": "true"
|
|
8772
|
-
})), u("span",
|
|
8773
|
-
e.visiblePlugins.length === 0 ? (k(), l("div",
|
|
8821
|
+
})), u("span", Ad, [u("span", jd, R(B(sr)(t)), 1), u("span", Md, R(B(cr)(t)), 1)])], 42, Od))), 128)),
|
|
8822
|
+
e.visiblePlugins.length === 0 ? (k(), l("div", Nd, "No matching plugins")) : c("", !0)
|
|
8774
8823
|
], 512));
|
|
8775
8824
|
}
|
|
8776
|
-
}), [["__scopeId", "data-v-336657b0"]]),
|
|
8777
|
-
function
|
|
8778
|
-
return
|
|
8779
|
-
id: `queued-prompt-${
|
|
8825
|
+
}), [["__scopeId", "data-v-336657b0"]]), Fd = 0;
|
|
8826
|
+
function Id(e) {
|
|
8827
|
+
return Fd += 1, {
|
|
8828
|
+
id: `queued-prompt-${Fd}`,
|
|
8780
8829
|
text: e
|
|
8781
8830
|
};
|
|
8782
8831
|
}
|
|
8783
8832
|
//#endregion
|
|
8784
8833
|
//#region src/use-codex-surface.ts
|
|
8785
|
-
var
|
|
8834
|
+
var Ld = {
|
|
8786
8835
|
status: "idle",
|
|
8787
8836
|
authentication: {
|
|
8788
8837
|
status: "notLoaded",
|
|
@@ -8827,8 +8876,8 @@ var Id = {
|
|
|
8827
8876
|
historyLoading: !1,
|
|
8828
8877
|
error: null
|
|
8829
8878
|
};
|
|
8830
|
-
function
|
|
8831
|
-
let t = A(structuredClone(
|
|
8879
|
+
function Rd(e) {
|
|
8880
|
+
let t = A(structuredClone(Ld)), n = A(/* @__PURE__ */ new Set()), r = j(n), i = L(null), a = /* @__PURE__ */ new Set(), o = 0, s = (e) => {
|
|
8832
8881
|
Object.assign(t, e), n.clear();
|
|
8833
8882
|
for (let t of e.answeredClientRequestIds) n.add(t);
|
|
8834
8883
|
}, c = Tt(e, (e) => {
|
|
@@ -8889,7 +8938,7 @@ function Ld(e) {
|
|
|
8889
8938
|
}
|
|
8890
8939
|
//#endregion
|
|
8891
8940
|
//#region src/use-codex-live-chat.ts
|
|
8892
|
-
function
|
|
8941
|
+
function zd(e) {
|
|
8893
8942
|
let t = M("idle"), n = M(null), r = M(!1), i = M([]), a, o = !1;
|
|
8894
8943
|
function s(t) {
|
|
8895
8944
|
if (!(!("conversationId" in t) || t.conversationId !== e.conversationId)) {
|
|
@@ -8950,7 +8999,7 @@ function Rd(e) {
|
|
|
8950
8999
|
let a = new Audio();
|
|
8951
9000
|
if (a.autoplay = !0, u.audio = a, i.ontrack = (e) => {
|
|
8952
9001
|
a.srcObject = e.streams[0] ?? new MediaStream([e.track]), a.play().catch((e) => {
|
|
8953
|
-
u.cancelled || (n.value =
|
|
9002
|
+
u.cancelled || (n.value = Bd(e), d().catch(() => void 0));
|
|
8954
9003
|
});
|
|
8955
9004
|
}, i.onconnectionstatechange = () => {
|
|
8956
9005
|
u.cancelled || (i.connectionState === "connected" && (clearTimeout(u.timer), t.value = "connected"), (i.connectionState === "failed" || i.connectionState === "closed") && (n.value = "Live chat connection ended", d().catch(() => void 0)));
|
|
@@ -8970,7 +9019,7 @@ function Rd(e) {
|
|
|
8970
9019
|
n.value = "Timed out connecting live chat", d().catch(() => void 0);
|
|
8971
9020
|
}, 3e4));
|
|
8972
9021
|
} catch (e) {
|
|
8973
|
-
if (!u.cancelled) throw n.value =
|
|
9022
|
+
if (!u.cancelled) throw n.value = Bd(e), t.value = "error", c(u), await l(u).catch(() => void 0), a === u && (a = void 0), e;
|
|
8974
9023
|
} finally {
|
|
8975
9024
|
u.cancelled && c(u);
|
|
8976
9025
|
}
|
|
@@ -8982,7 +9031,7 @@ function Rd(e) {
|
|
|
8982
9031
|
try {
|
|
8983
9032
|
e.requested && await e.done?.catch(() => void 0), await l(e);
|
|
8984
9033
|
} catch (e) {
|
|
8985
|
-
throw n.value =
|
|
9034
|
+
throw n.value = Bd(e), e;
|
|
8986
9035
|
} finally {
|
|
8987
9036
|
a === e && (a = void 0), t.value = n.value ? "error" : "idle";
|
|
8988
9037
|
}
|
|
@@ -9005,16 +9054,16 @@ function Rd(e) {
|
|
|
9005
9054
|
setMuted: f
|
|
9006
9055
|
};
|
|
9007
9056
|
}
|
|
9008
|
-
function
|
|
9057
|
+
function Bd(e) {
|
|
9009
9058
|
return e instanceof Error ? e.message : String(e);
|
|
9010
9059
|
}
|
|
9011
9060
|
//#endregion
|
|
9012
9061
|
//#region src/codex-theme.ts
|
|
9013
|
-
function
|
|
9062
|
+
function Vd(e, t = {}) {
|
|
9014
9063
|
let n = e.getAttribute("data-codex-theme"), r = /* @__PURE__ */ new Map(), i = t.mode ?? "system";
|
|
9015
9064
|
e.setAttribute("data-codex-theme", i);
|
|
9016
9065
|
for (let [n, i] of Object.entries(t.tokens ?? {})) {
|
|
9017
|
-
let t =
|
|
9066
|
+
let t = Hd(n);
|
|
9018
9067
|
r.has(t) || r.set(t, e.style.getPropertyValue(t)), i == null || !i.trim() ? e.style.removeProperty(t) : e.style.setProperty(t, i);
|
|
9019
9068
|
}
|
|
9020
9069
|
return () => {
|
|
@@ -9022,7 +9071,7 @@ function Bd(e, t = {}) {
|
|
|
9022
9071
|
for (let [t, n] of r) n ? e.style.setProperty(t, n) : e.style.removeProperty(t);
|
|
9023
9072
|
};
|
|
9024
9073
|
}
|
|
9025
|
-
function
|
|
9074
|
+
function Hd(e) {
|
|
9026
9075
|
let t = e.trim();
|
|
9027
9076
|
if (t.startsWith("--codex-")) return t;
|
|
9028
9077
|
let n = t.replace(/^--/, "").replace(/([a-z\d])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z\d-]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
|
|
@@ -9030,6 +9079,6 @@ function Vd(e) {
|
|
|
9030
9079
|
return `--codex-${n}`;
|
|
9031
9080
|
}
|
|
9032
9081
|
//#endregion
|
|
9033
|
-
export { co as CodexAnimatedDiffStat, na as CodexApprovalPrompt, Ms as CodexAttachmentBlock,
|
|
9082
|
+
export { co as CodexAnimatedDiffStat, na as CodexApprovalPrompt, Ms as CodexAttachmentBlock, Su as CodexCompactionMessage, Vi as CodexComposer, nn as CodexComposerActionMenu, zt as CodexComposerActiveModes, xr as CodexComposerAtMentionMenu, Dd as CodexComposerFileMentionMenu, en as CodexComposerMenu, Qt as CodexComposerMenuList, Pd as CodexComposerPluginMenu, Ft as CodexComposerSendButton, gs as CodexComposerShelf, Ir as CodexComposerSkillMenu, Qr as CodexComposerSlashMenu, an as CodexComposerVoiceButton, dn as CodexComposerVoiceField, Yn as CodexContextUsageIndicator, bs as CodexConversationHistoryLoader, cd as CodexConversationPane, bd as CodexConversationSidebar, Rs as CodexFoldTransition, Fs as CodexFollowUps, ns as CodexGoal, Ss as CodexIconButton, Ds as CodexImageLightbox, nc as CodexMediaBlock, ni as CodexMentionChip, _c as CodexMermaidBlock, Pu as CodexMessage, bu as CodexMessageActions, fu as CodexMessageBlock, Eu as CodexMessageEditor, Uu as CodexMessageList, Iu as CodexMessageTurn, tr as CodexModelReasoningSelector, Jo as CodexQuestionRequest, cs as CodexQueuedPrompt, us as CodexQueuedPrompts, oi as CodexRichTextEditor, Ru as CodexScrollToBottom, Dl as CodexToolCall, So as CodexToolCallTitle, Xo as CodexToolConfirmation, Pl as CodexToolGroup, lo as CodexToolIcon, qo as CodexToolUserInputRequest, ps as CodexTurnGitInfo, tu as CodexUserText, ru as CodexVisualizationBlock, lu as CodexWorkGroup, qu as CodexWorkbenchLayout, Vd as applyCodexTheme, Vt as approvalPresetOptions, Ot as codexCapabilities, kt as codexCommands, pn as codexConversationLinkFromHref, zr as commandDescription, ia as createCodexConversationPaneController, Id as createQueuedChatPrompt, Bt as defaultApprovalPreset, Gn as defaultCodexChatTranslate, Et as defaultCodexConversationPresentation, Rr as filterComposerCommands, ri as filterComposerMentionGroups, or as filterComposerPlugins, Cr as filterComposerSkills, ii as findComposerMention, Ei as getCodexGlobalHostCapabilities, Di as getCodexNativeRendererApi, Vl as humanizeMentionName, ki as ingestCodexAttachments, Ht as isApprovalPreset, Cc as languageForFilePath, fn as parseCodexEditorFileReference, Fl as parseCodexUserText, Oi as pickCodexAttachments, cr as pluginDescription, sr as pluginDisplayName, lr as pluginInsertText, ur as pluginMatchesMention, Or as promptSkillInputsFromText, Un as provideCodexChatTranslate, wi as provideCodexHostCapabilities, pl as provideCodexToolCallDetails, ul as provideCodexToolPresentation, Z as registerCodexToolTitlePresenter, Sc as renderCodeBlock, kc as renderMarkdown, ra as resolveCodexConversationPaneValue, Dt as resolveCodexConversationPresentation, Tr as skillDescription, wr as skillDisplayName, Er as skillInsertText, Dr as skillMatchesMention, qa as surfaceMessageToChatMessage, $ as toCodexChatMessage, Ka as toCodexChatMessages, Wn as useCodexChatTranslate, Pi as useCodexComposerVoice, Ti as useCodexHostCapabilities, zd as useCodexLiveChat, Rd as useCodexSurface, ml as useCodexToolCallDetails, dl as useCodexToolPresentation };
|
|
9034
9083
|
|
|
9035
9084
|
//# sourceMappingURL=index.js.map
|