@codex-app-sdk/vue 0.19.4 → 0.19.6
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/components/CodexComposer.vue.d.ts +1 -0
- package/dist/components/CodexComposer.vue.d.ts.map +1 -1
- package/dist/components/CodexConversationPane.vue.d.ts +1 -0
- package/dist/components/CodexConversationPane.vue.d.ts.map +1 -1
- package/dist/conversation-pane-controller.d.ts +2 -0
- package/dist/conversation-pane-controller.d.ts.map +1 -1
- package/dist/index.js +172 -168
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -896,10 +896,10 @@ function xn(e) {
|
|
|
896
896
|
if (/^[a-z]:[\\/]/i.test(t)) return {
|
|
897
897
|
href: t,
|
|
898
898
|
kind: "file",
|
|
899
|
-
path:
|
|
899
|
+
path: $(Q(t))
|
|
900
900
|
};
|
|
901
|
-
let n =
|
|
902
|
-
if (r) return
|
|
901
|
+
let n = $(Q(t)), r = bn(n);
|
|
902
|
+
if (r) return Sn(t, r);
|
|
903
903
|
try {
|
|
904
904
|
let e = new URL(t);
|
|
905
905
|
if (e.protocol === "http:" || e.protocol === "https:" || e.protocol === "mailto:" || e.protocol === "tel:") return {
|
|
@@ -907,8 +907,8 @@ function xn(e) {
|
|
|
907
907
|
kind: "external"
|
|
908
908
|
};
|
|
909
909
|
if (e.protocol === "file:") {
|
|
910
|
-
let n =
|
|
911
|
-
return r ?
|
|
910
|
+
let n = $(e.pathname), r = bn(n);
|
|
911
|
+
return r ? Sn(t, r) : {
|
|
912
912
|
href: t,
|
|
913
913
|
kind: "file",
|
|
914
914
|
path: n
|
|
@@ -923,7 +923,7 @@ function xn(e) {
|
|
|
923
923
|
} : null;
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Sn(e, t) {
|
|
927
927
|
return {
|
|
928
928
|
href: e,
|
|
929
929
|
kind: "file",
|
|
@@ -932,10 +932,10 @@ function Q(e, t) {
|
|
|
932
932
|
...t.column === void 0 ? {} : { column: t.column }
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Q(e) {
|
|
936
936
|
return e.split("#", 1)[0].split("?", 1)[0].trim();
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function $(e) {
|
|
939
939
|
try {
|
|
940
940
|
return decodeURIComponent(e);
|
|
941
941
|
} catch {
|
|
@@ -3085,6 +3085,7 @@ var Zi = { class: "chat-composer__input-row" }, Qi = { class: "chat-composer__me
|
|
|
3085
3085
|
models: {},
|
|
3086
3086
|
modelMenuItems: {},
|
|
3087
3087
|
placeholder: {},
|
|
3088
|
+
suggestedPrompt: {},
|
|
3088
3089
|
queuedPromptId: {},
|
|
3089
3090
|
approvalPreset: {},
|
|
3090
3091
|
planMode: { type: Boolean },
|
|
@@ -3117,7 +3118,7 @@ var Zi = { class: "chat-composer__input-row" }, Qi = { class: "chat-composer__me
|
|
|
3117
3118
|
let r = e, i = n, a = zi(), f = N(""), p = N([]), h = N(null), g = N(!1), v = N(null), y = N(0), b = N(0), T = N(0), E = N(0), { exit: O, recall: A, remember: j, seed: M } = Lt({
|
|
3118
3119
|
apply: yt,
|
|
3119
3120
|
currentPrompt: () => f.value
|
|
3120
|
-
}), P = !1, F = null, L = 0, R = o(() => r.capabilities ?? Pt), ee = o(() => Nt(r.presentation)), z = o(() => It(r.commands ?? Ft, R.value.goals)), B = o(() => z.value.find((e) => e.id === h.value) ?? null), V = o(() => z.value.find((e) => (e.slashName ?? e.name) === "goal" && e.composerMode) ?? null), te = o(() => !!(V.value && h.value === V.value.id)), U = o(() => !!(R.value.planMode && r.planMode && !te.value)), ne = o(() => B.value?.composerMode?.placeholder ?? r.placeholder ?? "Ask Codex…"), re = o(() => ee.value.composer.voice && !!(r.transcribeAudio || a?.capabilities.transcription)), J = o(() => !!f.value.trim()), oe = o(() => r.emptySendPrompt?.trim() ?? ""), Y = o(() => !!((B.value ? J.value : J.value || r.hasAttachments || r.hasExternalContent) && !r.disabled)), ce = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !J.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), le = o(() => !!(oe.value && !r.isSending && !r.disabled && !J.value && !r.hasAttachments && !r.hasExternalContent && !B.value && !ce.value)), ue = null, de = o(() => !!(r.isSending && !J.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !be.value && !Se.value)), fe = o(() => de.value), X = o(() => r.followUpBehavior === "steer" && R.value.steerPrompt), pe = o(() => r.interruptArmed ? !1 : xe.value || Se.value ? !0 : be.value && !r.disabled ? !1 : !Y.value && !de.value && !ce.value), me = o(() => ce.value ? "Continue" : le.value ? "Send default prompt" : r.isSending ? X.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), he = o(() => {
|
|
3121
|
+
}), P = !1, F = null, L = 0, R = o(() => r.capabilities ?? Pt), ee = o(() => Nt(r.presentation)), z = o(() => It(r.commands ?? Ft, R.value.goals)), B = o(() => z.value.find((e) => e.id === h.value) ?? null), V = o(() => z.value.find((e) => (e.slashName ?? e.name) === "goal" && e.composerMode) ?? null), te = o(() => !!(V.value && h.value === V.value.id)), U = o(() => !!(R.value.planMode && r.planMode && !te.value)), ne = o(() => B.value?.composerMode?.placeholder ?? (r.suggestedPrompt?.trim() ? r.suggestedPrompt : r.placeholder ?? "Ask Codex…")), re = o(() => ee.value.composer.voice && !!(r.transcribeAudio || a?.capabilities.transcription)), J = o(() => !!f.value.trim()), oe = o(() => r.emptySendPrompt?.trim() ?? ""), Y = o(() => !!((B.value ? J.value : J.value || r.hasAttachments || r.hasExternalContent) && !r.disabled)), ce = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !J.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), le = o(() => !!(oe.value && !r.isSending && !r.disabled && !J.value && !r.hasAttachments && !r.hasExternalContent && !B.value && !ce.value)), ue = null, de = o(() => !!(r.isSending && !J.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !be.value && !Se.value)), fe = o(() => de.value), X = o(() => r.followUpBehavior === "steer" && R.value.steerPrompt), pe = o(() => r.interruptArmed ? !1 : xe.value || Se.value ? !0 : be.value && !r.disabled ? !1 : !Y.value && !de.value && !ce.value), me = o(() => ce.value ? "Continue" : le.value ? "Send default prompt" : r.isSending ? X.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), he = o(() => {
|
|
3121
3122
|
if (r.interruptArmed) return "Press Escape again or click to stop generation";
|
|
3122
3123
|
if (de.value) return "Interrupt";
|
|
3123
3124
|
let e = `${me.value} (Enter)`;
|
|
@@ -3312,8 +3313,8 @@ var Zi = { class: "chat-composer__input-row" }, Qi = { class: "chat-composer__me
|
|
|
3312
3313
|
"ArrowRight",
|
|
3313
3314
|
" ",
|
|
3314
3315
|
"Enter"
|
|
3315
|
-
].includes(e.key) && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && !e.isComposing && !r.disabled && !B.value && r.
|
|
3316
|
-
e.preventDefault(), v.value?.insertTextAtSelection(r.
|
|
3316
|
+
].includes(e.key) && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && !e.isComposing && !r.disabled && !B.value && r.suggestedPrompt?.trim() && (v.value?.readText() ?? f.value) === "") {
|
|
3317
|
+
e.preventDefault(), v.value?.insertTextAtSelection(r.suggestedPrompt);
|
|
3317
3318
|
return;
|
|
3318
3319
|
}
|
|
3319
3320
|
if (!e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && (e.key === "ArrowUp" || e.key === "ArrowDown") && _t()) {
|
|
@@ -3613,7 +3614,7 @@ var Zi = { class: "chat-composer__input-row" }, Qi = { class: "chat-composer__me
|
|
|
3613
3614
|
])])
|
|
3614
3615
|
], 34));
|
|
3615
3616
|
}
|
|
3616
|
-
}), [["__scopeId", "data-v-
|
|
3617
|
+
}), [["__scopeId", "data-v-8f906d09"]]), na = { class: "codex-chat-theme codex-request-card chat-tool-confirmation" }, ra = { class: "codex-request-header chat-tool-confirmation__header" }, ia = { class: "codex-request-eyebrow chat-tool-confirmation__tag" }, aa = { class: "codex-request-title chat-tool-confirmation__question" }, oa = {
|
|
3617
3618
|
key: 0,
|
|
3618
3619
|
class: "codex-request-description chat-tool-confirmation__description"
|
|
3619
3620
|
}, sa = {
|
|
@@ -7847,7 +7848,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
7847
7848
|
let n = e, r = t, i = o(() => n.entries.map((e) => ({
|
|
7848
7849
|
entry: e,
|
|
7849
7850
|
message: Ca(e.message)
|
|
7850
|
-
}))), a = o(() => n.turnId), s = o(() => i.value.some(({ message: e }) => e.role === "assistant" && eo(e))), c = o(() => [...i.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0)?.entry.index), u = o(() => n.active === !1 ? void 0 : [...i.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0 && (e.parts?.length ?? 0) > 0)?.entry.index), d = o(() => i.value.some(({ entry: e, message: t }) => t.role === "assistant" && (u.value === void 0 || e.index >= u.value) && (t.parts?.some((e) => e.type === "text" && e.phase === "final_answer" && e.content.trim().length > 0) ?? !1))), f = o(() => !d.value && (n.active ?? i.value.some(({ message: e }) => e.role === "assistant" && e.streaming === !0))), p = o(() => n.status), m = o(() => n.startedAt), h = o(() => n.durationMs), g = o(() => !f.value && !d.value && (p.value === "interrupted" || p.value === "failed")), _ = o(() => n.itemsView === void 0 && s.value && !f.value && !d.value && (p.value === void 0 || p.value === "completed")), v = o(() => i.value.find(({ message: e }) => e.role === "assistant" && (n.itemsView !== void 0 || T(e)))?.entry.index), y = o(() => n.itemsView === "summary" || i.value.some(({ message: e }) => e.type === "steer" && Va(e).length > 0 || e.role === "assistant" && Va(e).some((e) => (n.showToolBlocks || e.type !== "tool" && e.type !== "tool-group") && to(e, n.answeredClientRequestIds)))), x = o(() => !!(a.value && v.value !== void 0)), S = N(f.value && !d.value || g.value), C = N(!1), w = o(() => n.detailsLoading || S.value && n.itemsView === "summary" && !n.detailsError);
|
|
7851
|
+
}))), a = o(() => n.turnId), s = o(() => i.value.some(({ message: e }) => e.role === "assistant" && eo(e))), c = o(() => [...i.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0)?.entry.index), u = o(() => n.active === !1 ? void 0 : [...i.value].reverse().find(({ message: e }) => e.role === "assistant" && e.streaming === !0 && (e.parts?.length ?? 0) > 0)?.entry.index), d = o(() => i.value.some(({ entry: e, message: t }) => t.role === "assistant" && (u.value === void 0 || e.index >= u.value) && (t.parts?.some((e) => e.type === "text" && e.phase === "final_answer" && e.content.trim().length > 0) ?? !1))), f = o(() => !d.value && (n.active ?? i.value.some(({ message: e }) => e.role === "assistant" && e.streaming === !0))), p = o(() => n.status), m = o(() => n.startedAt), h = o(() => n.durationMs), g = o(() => !f.value && !d.value && (p.value === "interrupted" || p.value === "failed")), _ = o(() => n.itemsView === void 0 && s.value && !f.value && !d.value && (p.value === void 0 || p.value === "completed")), v = o(() => i.value.find(({ message: e }) => e.role === "assistant" && (n.itemsView !== void 0 || T(e)))?.entry.index), y = o(() => n.itemsView === "summary" || i.value.some(({ message: e }) => e.type === "steer" && Va(e).length > 0 || e.role === "assistant" && Va(e).some((e) => (n.showToolBlocks || e.type !== "tool" && e.type !== "tool-group") && to(e, n.answeredClientRequestIds)))), x = o(() => !!(a.value && v.value !== void 0)), S = N(f.value && !d.value || g.value), C = N(!1), w = o(() => !f.value && (n.detailsLoading || S.value && n.itemsView === "summary" && !n.detailsError));
|
|
7851
7852
|
W(d, (e, t) => {
|
|
7852
7853
|
e && !t && !C.value && (S.value = !1);
|
|
7853
7854
|
}), W([f, g], ([e, t]) => {
|
|
@@ -7856,7 +7857,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
7856
7857
|
active: f,
|
|
7857
7858
|
completedWithoutFinal: _,
|
|
7858
7859
|
enabled: x,
|
|
7859
|
-
expanded: o(() => S.value && !w.value && (n.itemsView !== "summary" || !!n.detailsError)),
|
|
7860
|
+
expanded: o(() => S.value && !w.value && (f.value || n.itemsView !== "summary" || !!n.detailsError)),
|
|
7860
7861
|
finalStarted: d,
|
|
7861
7862
|
headerMessageIndex: v,
|
|
7862
7863
|
latestStreamingAssistantIndex: c,
|
|
@@ -7876,12 +7877,13 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
7876
7877
|
C.value = !0, S.value = !S.value;
|
|
7877
7878
|
}
|
|
7878
7879
|
}), W([
|
|
7880
|
+
f,
|
|
7879
7881
|
S,
|
|
7880
7882
|
() => n.itemsView,
|
|
7881
7883
|
() => n.detailsLoading,
|
|
7882
7884
|
() => n.detailsError
|
|
7883
7885
|
], () => {
|
|
7884
|
-
S.value && n.itemsView === "summary" && !n.detailsLoading && !n.detailsError && n.turnId && r("loadTurnHistory", n.turnId);
|
|
7886
|
+
!f.value && S.value && n.itemsView === "summary" && !n.detailsLoading && !n.detailsError && n.turnId && r("loadTurnHistory", n.turnId);
|
|
7885
7887
|
}, { immediate: !0 });
|
|
7886
7888
|
function T(e) {
|
|
7887
7889
|
let t = Va(e).filter((e) => n.showToolBlocks || e.type !== "tool" && e.type !== "tool-group");
|
|
@@ -7889,7 +7891,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
7889
7891
|
}
|
|
7890
7892
|
return (e, t) => (k(), l("div", kd, [I(e.$slots, "default", {}, void 0, !0)]));
|
|
7891
7893
|
}
|
|
7892
|
-
}), [["__scopeId", "data-v-
|
|
7894
|
+
}), [["__scopeId", "data-v-964be11a"]]), jd = ["aria-label", "title"], Md = /*#__PURE__*/ Z(/* @__PURE__ */ h({
|
|
7893
7895
|
__name: "CodexScrollToBottom",
|
|
7894
7896
|
props: { label: { default: "Scroll to bottom" } },
|
|
7895
7897
|
emits: ["click"],
|
|
@@ -8611,6 +8613,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8611
8613
|
pickAttachments: {},
|
|
8612
8614
|
ingestAttachments: {},
|
|
8613
8615
|
placeholder: {},
|
|
8616
|
+
suggestedPrompt: {},
|
|
8614
8617
|
promptHistory: {},
|
|
8615
8618
|
approvalPreset: {},
|
|
8616
8619
|
planMode: {
|
|
@@ -8661,13 +8664,13 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8661
8664
|
selectionEnd: i.modelValue.length
|
|
8662
8665
|
})), R = N(L), z = N(L.text), V = N(null), te = N(null), U = N(null), ne = 0, re = 0, K = N(null), q = N([...P.value]), J = /* @__PURE__ */ new Map(), ie = N([]), ae = N(!1), oe = 0, se = o(() => j((e) => e.identity.messages, () => i.messages ?? O.value?.messages ?? [])), Y = o(() => {
|
|
8663
8666
|
let e = se.value, t = U.value;
|
|
8664
|
-
return !t || e.some((e) =>
|
|
8667
|
+
return !t || e.some((e) => Dt(e, t)) ? e : [...e, t.message];
|
|
8665
8668
|
}), ce = o(() => j((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? O.value?.activeTurnId : i.activeTurnId)), le = o(() => j((e) => e.identity.turns, () => i.turns ?? O.value?.turns ?? [])), ue = o(() => !De.value && ce.value == null && (le.value ?? []).at(-1)?.status === "interrupted"), de = o(() => Y.value.flatMap((e) => {
|
|
8666
8669
|
let t = Ca(e);
|
|
8667
8670
|
if (t.role !== "user") return [];
|
|
8668
8671
|
let n = Ja(t.content);
|
|
8669
8672
|
return n && n !== "(no user instructions)" ? [n] : [];
|
|
8670
|
-
})), fe = o(() => j((e) => e.composer?.promptHistory, () => i.promptHistory)), X = o(() =>
|
|
8673
|
+
})), fe = o(() => j((e) => e.composer?.promptHistory, () => i.promptHistory)), X = o(() => xt(fe.value ?? ie.value, de.value)), pe = o(() => j((e) => e.thread?.answeredClientRequestIds, () => i.answeredClientRequestIds ?? i.surface?.answeredClientRequestIds)), me = o(() => /* @__PURE__ */ new Set([...pe.value ?? [], ...p.keys()])), he = o(() => j((e) => e.thread?.clientRequests ?? [], () => i.clientRequests ?? O.value?.clientRequests ?? [])), _e = o(() => {
|
|
8671
8674
|
let e = /* @__PURE__ */ new Set(), t = new Map((le.value ?? []).map((e, t) => [e.id, t])), n = se.value.map(Ca);
|
|
8672
8675
|
for (let [r, i] of n.entries()) for (let a of i.parts ?? []) {
|
|
8673
8676
|
if (a.type !== "question" || a.request.payload.request.delivery !== "async") continue;
|
|
@@ -8704,12 +8707,12 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8704
8707
|
root: x,
|
|
8705
8708
|
busy: () => De.value,
|
|
8706
8709
|
enabled: () => i.escapeInterrupt,
|
|
8707
|
-
onInterrupt:
|
|
8710
|
+
onInterrupt: fn
|
|
8708
8711
|
}), Me = o(() => j((e) => e.identity.conversationKey, () => i.conversationKey === void 0 ? O.value?.activeConversationId : i.conversationKey)), Ne = o(() => j((e) => e.thread?.contextUsage, () => i.contextUsage === void 0 ? O.value?.contextUsage : i.contextUsage)), Pe = o(() => j((e) => e.identity.disabled ?? !1, () => i.disabled ?? (O.value ? O.value.status !== "ready" : !1))), Fe = o(() => K.value ?? j((e) => e.identity.error, () => i.error ?? O.value?.error ?? null) ?? null), Ie = o(() => j((e) => e.thread?.goal ?? null, () => i.goal === void 0 ? O.value?.goal ?? null : i.goal)), Le = o(() => j((e) => e.history?.loading ?? !1, () => i.historyLoading ?? O.value?.historyLoading ?? !1)), Re = o(() => i.renderStrategy ?? (i.lazyMessages === !1 ? "eager" : "lazy")), ze = o(() => j((e) => e.history?.hasOlder ?? !1, () => i.hasOlderHistory ?? O.value?.historyState?.hasOlder ?? !1)), Be = o(() => j((e) => e.history?.loadingOlder ?? !1, () => i.loadingOlderHistory ?? O.value?.historyState?.loadingOlder ?? !1)), Ve = o(() => j((e) => e.catalogs?.modelCatalogStatus, () => i.modelCatalogStatus ?? O.value?.modelCatalogStatus)), He = o(() => j((e) => e.catalogs?.models, () => i.models ?? O.value?.models)), Ue = o(() => j((e) => e.composer?.approvalPreset, () => i.approvalPreset === void 0 ? O.value?.approvalPreset : i.approvalPreset)), We = o(() => j((e) => e.composer?.planMode, () => i.planMode ?? O.value?.planMode)), Ge = o(() => j((e) => e.catalogs?.plugins, () => i.plugins ?? O.value?.plugins)), Ke = o(() => j((e) => e.catalogs?.mentionGroups, () => i.mentionGroups)), qe = o(() => Nt(i.presentation)), Je = o(() => j((e) => e.thread?.queuedPrompts ?? [], () => i.queuedPrompts ?? O.value?.queuedPrompts ?? [])), Ye = o(() => j((e) => e.composer?.selectedModelId, () => i.selectedModelId === void 0 ? O.value?.selectedModelId : i.selectedModelId)), Xe = o(() => j((e) => e.composer?.selectedReasoningEffort, () => i.selectedReasoningEffort === void 0 ? O.value?.selectedReasoningEffort : i.selectedReasoningEffort)), Ze = o(() => j((e) => e.composer?.selectedServiceTier, () => i.selectedServiceTier === void 0 ? O.value?.selectedServiceTier : i.selectedServiceTier)), Qe = o(() => j((e) => e.catalogs?.skillCatalogStatus, () => i.skillCatalogStatus ?? O.value?.skillCatalogStatus)), $e = o(() => j((e) => e.catalogs?.skills, () => i.skills ?? O.value?.skills)), et = o(() => j((e) => e.thread?.turnGitDiff, () => i.turnGitDiff === void 0 ? O.value?.turnGitDiff : i.turnGitDiff)), nt = o(() => j((e) => e.policy?.attachEnabled ?? !0, () => i.attachEnabled !== !1)), rt = o(() => ({
|
|
8709
8712
|
...Pt,
|
|
8710
8713
|
...T.value ? T.value.capabilities : i.capabilities,
|
|
8711
8714
|
approvalPresets: T.value?.capabilities?.approvalPresets ?? (T.value ? Pt.approvalPresets : i.approvalPresets ?? O.value?.approvalPresets ?? i.capabilities?.approvalPresets) ?? Pt.approvalPresets
|
|
8712
|
-
})), it = o(() => j((e) => e.catalogs?.commands ?? [], () => i.commands ?? Ft)), at = o(() => j((e) => e.catalogs?.files ?? [], () => i.files)), ot = o(() => j((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), st = o(() => j((e) => e.composer?.menuItems ?? [], () => i.menuItems)), ct = o(() => j((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), lt = o(() => j((e) => e.composer?.placeholder, () => i.placeholder)), ut = o(() => j((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")),
|
|
8715
|
+
})), it = o(() => j((e) => e.catalogs?.commands ?? [], () => i.commands ?? Ft)), at = o(() => j((e) => e.catalogs?.files ?? [], () => i.files)), ot = o(() => j((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), st = o(() => j((e) => e.composer?.menuItems ?? [], () => i.menuItems)), ct = o(() => j((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), lt = o(() => j((e) => e.composer?.placeholder, () => i.placeholder)), ut = o(() => j((e) => e.composer?.suggestedPrompt, () => i.suggestedPrompt)), dt = o(() => j((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), ft = o(() => j((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), pt = o(() => j((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), mt = o(() => j((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), ht = o(() => j((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), gt = o(() => j((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), _t = o(() => De.value || j((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), vt = o(() => Le.value), yt = o(() => Y.value.length > 0 || De.value || Te.value.length > 0);
|
|
8713
8716
|
W(() => !!(Ee.value || Se.value || be.value), async (e, t) => {
|
|
8714
8717
|
if (e || !t) return;
|
|
8715
8718
|
let n = document.activeElement;
|
|
@@ -8729,7 +8732,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8729
8732
|
}, { deep: !0 }), W(P, (e) => {
|
|
8730
8733
|
q.value = [...e];
|
|
8731
8734
|
}), W(nt, (e) => {
|
|
8732
|
-
!e && q.value.length > 0 &&
|
|
8735
|
+
!e && q.value.length > 0 && Jt([]);
|
|
8733
8736
|
}), W(Me, (e, t) => {
|
|
8734
8737
|
h.value = null, g.value = /* @__PURE__ */ new Set();
|
|
8735
8738
|
let n = U.value;
|
|
@@ -8751,7 +8754,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8751
8754
|
}), W(se, (e) => {
|
|
8752
8755
|
let t = U.value;
|
|
8753
8756
|
if (t) {
|
|
8754
|
-
if (e.some((e) =>
|
|
8757
|
+
if (e.some((e) => Dt(e, t))) {
|
|
8755
8758
|
U.value = null;
|
|
8756
8759
|
return;
|
|
8757
8760
|
}
|
|
@@ -8769,13 +8772,13 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8769
8772
|
() => E.value?.readPromptHistory,
|
|
8770
8773
|
fe
|
|
8771
8774
|
], () => {
|
|
8772
|
-
|
|
8775
|
+
bt();
|
|
8773
8776
|
}, { immediate: !0 }), W(() => [O.value?.status, O.value?.error], ([e, t]) => {
|
|
8774
8777
|
e === "ready" && t == null && (K.value = null);
|
|
8775
8778
|
}), D(() => {
|
|
8776
8779
|
i.surface && i.surface.state.status === "idle" && $(() => i.surface.connect());
|
|
8777
8780
|
});
|
|
8778
|
-
async function
|
|
8781
|
+
async function bt() {
|
|
8779
8782
|
let e = ++oe, t = Me.value;
|
|
8780
8783
|
if (ae.value = !1, ie.value = [], t == null || fe.value !== void 0) return;
|
|
8781
8784
|
let n = J.get(t);
|
|
@@ -8796,7 +8799,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8796
8799
|
}
|
|
8797
8800
|
}
|
|
8798
8801
|
}
|
|
8799
|
-
function
|
|
8802
|
+
function xt(e, t) {
|
|
8800
8803
|
let n = Math.min(e.length, t.length);
|
|
8801
8804
|
for (; n > 0;) {
|
|
8802
8805
|
let r = e.length - n;
|
|
@@ -8805,34 +8808,34 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8805
8808
|
}
|
|
8806
8809
|
return [...e, ...t.slice(n)].slice(-100);
|
|
8807
8810
|
}
|
|
8808
|
-
function
|
|
8809
|
-
|
|
8811
|
+
function St(e, t) {
|
|
8812
|
+
Xt("");
|
|
8810
8813
|
let n = V.value;
|
|
8811
8814
|
if (n) {
|
|
8812
|
-
V.value = null,
|
|
8815
|
+
V.value = null, un(n, e, t), Jt([]);
|
|
8813
8816
|
return;
|
|
8814
8817
|
}
|
|
8815
|
-
let r =
|
|
8818
|
+
let r = Yt(q.value, t), o = Ct();
|
|
8816
8819
|
if (b.value?.scrollToBottom(), S(() => b.value?.scrollToBottom()), C.value) {
|
|
8817
8820
|
let t = E.value?.submit;
|
|
8818
8821
|
if (t) {
|
|
8819
|
-
let n =
|
|
8822
|
+
let n = Et(e, q.value, r?.content);
|
|
8820
8823
|
$(() => Promise.resolve(t(e, r)), () => {
|
|
8821
|
-
|
|
8824
|
+
Ot(n), g.value = o;
|
|
8822
8825
|
});
|
|
8823
8826
|
}
|
|
8824
|
-
|
|
8827
|
+
Jt([]);
|
|
8825
8828
|
return;
|
|
8826
8829
|
}
|
|
8827
8830
|
r ? a("submit", e, r) : a("submit", e), i.surface && $(() => i.surface.sendMessage(e, r), () => {
|
|
8828
8831
|
g.value = o;
|
|
8829
|
-
}),
|
|
8832
|
+
}), Jt([]);
|
|
8830
8833
|
}
|
|
8831
|
-
function
|
|
8834
|
+
function Ct() {
|
|
8832
8835
|
let e = g.value;
|
|
8833
8836
|
return g.value = /* @__PURE__ */ new Set([...e, ...ye.value.filter((e) => e.payload.request.delivery === "async").map((e) => e.id)]), h.value = null, e;
|
|
8834
8837
|
}
|
|
8835
|
-
function
|
|
8838
|
+
function wt(e) {
|
|
8836
8839
|
if (!ye.value.some((t) => t.id === e)) return;
|
|
8837
8840
|
let t = {
|
|
8838
8841
|
id: e,
|
|
@@ -8841,12 +8844,12 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8841
8844
|
cancelled: !0
|
|
8842
8845
|
}
|
|
8843
8846
|
};
|
|
8844
|
-
p.set(e, t.payload), g.value = /* @__PURE__ */ new Set([...g.value, e]), h.value = null,
|
|
8847
|
+
p.set(e, t.payload), g.value = /* @__PURE__ */ new Set([...g.value, e]), h.value = null, $t(t);
|
|
8845
8848
|
}
|
|
8846
|
-
function
|
|
8849
|
+
function Tt() {
|
|
8847
8850
|
Q("continueInterruptedTurn") || C.value || (a("continueInterruptedTurn"), i.surface && $(() => i.surface.continueInterruptedTurn()));
|
|
8848
8851
|
}
|
|
8849
|
-
function
|
|
8852
|
+
function Et(e, t, n) {
|
|
8850
8853
|
if (De.value || se.value.length > 0) return null;
|
|
8851
8854
|
let r = `codex-optimistic-user-${++ne}`;
|
|
8852
8855
|
return U.value = {
|
|
@@ -8875,14 +8878,14 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8875
8878
|
}
|
|
8876
8879
|
}, r;
|
|
8877
8880
|
}
|
|
8878
|
-
function
|
|
8881
|
+
function Dt(e, t) {
|
|
8879
8882
|
let n = Ca(e);
|
|
8880
8883
|
return n.role === "user" && Ja(n.content) === t.prompt;
|
|
8881
8884
|
}
|
|
8882
|
-
function
|
|
8885
|
+
function Ot(e) {
|
|
8883
8886
|
e && U.value?.message.id === e && (U.value = null);
|
|
8884
8887
|
}
|
|
8885
|
-
function
|
|
8888
|
+
function kt(e) {
|
|
8886
8889
|
if (!Q("loadTurnHistory", e) && !C.value) {
|
|
8887
8890
|
if (i.surface?.loadTurnHistory && Me.value) {
|
|
8888
8891
|
$(() => i.surface.loadTurnHistory(e, String(Me.value)));
|
|
@@ -8891,7 +8894,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8891
8894
|
a("loadTurnHistory", e);
|
|
8892
8895
|
}
|
|
8893
8896
|
}
|
|
8894
|
-
function
|
|
8897
|
+
function At() {
|
|
8895
8898
|
if (!Q("loadOlderHistory") && !C.value) {
|
|
8896
8899
|
if (i.surface && Me.value) {
|
|
8897
8900
|
$(() => i.surface.loadOlderConversationHistory(String(Me.value)));
|
|
@@ -8900,99 +8903,99 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
8900
8903
|
a("loadOlderHistory");
|
|
8901
8904
|
}
|
|
8902
8905
|
}
|
|
8903
|
-
function
|
|
8906
|
+
function jt(e) {
|
|
8904
8907
|
let t = Y.value[e];
|
|
8905
8908
|
if (!t) return;
|
|
8906
8909
|
let n = Ca(t), r = Ja(n.content);
|
|
8907
|
-
n.role !== "user" || !r || (
|
|
8910
|
+
n.role !== "user" || !r || (Xt(r), !Q("quoteMessage", e) && (C.value || a("quoteMessage", e)));
|
|
8908
8911
|
}
|
|
8909
|
-
function
|
|
8912
|
+
function Mt() {
|
|
8910
8913
|
if (!Ie.value?.objective.trim()) return;
|
|
8911
8914
|
let e = It(it.value, rt.value.goals).find((e) => (e.slashName ?? e.name) === "goal" && e.composerMode);
|
|
8912
8915
|
if (!e) return;
|
|
8913
8916
|
let t = Ie.value.objective;
|
|
8914
|
-
|
|
8917
|
+
Zt({
|
|
8915
8918
|
text: t,
|
|
8916
8919
|
selectionStart: t.length,
|
|
8917
8920
|
selectionEnd: t.length,
|
|
8918
8921
|
activeCommandId: e.id
|
|
8919
8922
|
}), !Q("editGoal") && (C.value || a("editGoal"));
|
|
8920
8923
|
}
|
|
8921
|
-
function
|
|
8924
|
+
function Lt(e) {
|
|
8922
8925
|
let t = (e.target instanceof Element ? e.target : null)?.closest("a[href]");
|
|
8923
8926
|
if (!t) return;
|
|
8924
8927
|
let n = t.getAttribute("href")?.trim() ?? "";
|
|
8925
8928
|
if (!n || n.startsWith("#")) return;
|
|
8926
8929
|
e.preventDefault();
|
|
8927
8930
|
let r = xn(n);
|
|
8928
|
-
r &&
|
|
8931
|
+
r && Rt(r);
|
|
8929
8932
|
}
|
|
8930
|
-
function
|
|
8933
|
+
function Rt(e) {
|
|
8931
8934
|
if (!Q("openLink", e) && !C.value) {
|
|
8932
8935
|
if (a("openLink", e), i.openConversationLink) {
|
|
8933
|
-
Promise.resolve(i.openConversationLink(e)).catch(
|
|
8936
|
+
Promise.resolve(i.openConversationLink(e)).catch(Cn);
|
|
8934
8937
|
return;
|
|
8935
8938
|
}
|
|
8936
|
-
e.kind === "external" && (f ? f.openExternal(e.href).catch(
|
|
8939
|
+
e.kind === "external" && (f ? f.openExternal(e.href).catch(Cn) : window.open(e.href, "_blank", "noopener,noreferrer"));
|
|
8937
8940
|
}
|
|
8938
8941
|
}
|
|
8939
|
-
function
|
|
8940
|
-
Q("openVisualization", e) || C.value || (a("openVisualization", e), i.openVisualization && Promise.resolve(i.openVisualization(e)).catch(
|
|
8942
|
+
function zt(e) {
|
|
8943
|
+
Q("openVisualization", e) || C.value || (a("openVisualization", e), i.openVisualization && Promise.resolve(i.openVisualization(e)).catch(Cn));
|
|
8941
8944
|
}
|
|
8942
|
-
async function
|
|
8945
|
+
async function Bt(e, t) {
|
|
8943
8946
|
let n = C.value ? E.value?.openImage : i.openImage;
|
|
8944
8947
|
if (!n) return !1;
|
|
8945
8948
|
K.value = null;
|
|
8946
8949
|
try {
|
|
8947
8950
|
return await n(e, t) !== !1;
|
|
8948
8951
|
} catch (e) {
|
|
8949
|
-
return
|
|
8952
|
+
return Cn(e), !0;
|
|
8950
8953
|
}
|
|
8951
8954
|
}
|
|
8952
|
-
async function
|
|
8955
|
+
async function Vt() {
|
|
8953
8956
|
if (!Q("attach") && (C.value || a("attach"), nt.value)) try {
|
|
8954
|
-
|
|
8957
|
+
Kt(await Hi(i.pickAttachments, f));
|
|
8955
8958
|
} catch (e) {
|
|
8956
|
-
|
|
8959
|
+
Cn(e);
|
|
8957
8960
|
}
|
|
8958
8961
|
}
|
|
8959
|
-
function
|
|
8962
|
+
function Z(e) {
|
|
8960
8963
|
nt.value && e.dataTransfer?.types.includes("Files") && e.preventDefault();
|
|
8961
8964
|
}
|
|
8962
|
-
function
|
|
8965
|
+
function Ht(e) {
|
|
8963
8966
|
if (!nt.value) return;
|
|
8964
8967
|
let t = [...e.dataTransfer?.files ?? []];
|
|
8965
|
-
t.length !== 0 && (e.preventDefault(),
|
|
8966
|
-
}
|
|
8967
|
-
function Ht(e) {
|
|
8968
|
-
let t = Ut(e).filter((e) => e.type.startsWith("image/"));
|
|
8969
|
-
t.length !== 0 && (e.preventDefault(), nt.value && Wt(t));
|
|
8968
|
+
t.length !== 0 && (e.preventDefault(), Gt(t));
|
|
8970
8969
|
}
|
|
8971
8970
|
function Ut(e) {
|
|
8971
|
+
let t = Wt(e).filter((e) => e.type.startsWith("image/"));
|
|
8972
|
+
t.length !== 0 && (e.preventDefault(), nt.value && Gt(t));
|
|
8973
|
+
}
|
|
8974
|
+
function Wt(e) {
|
|
8972
8975
|
let t = e.clipboardData;
|
|
8973
8976
|
if (!t) return [];
|
|
8974
8977
|
let n = [...t.files];
|
|
8975
8978
|
return n.length > 0 ? n : [...t.items ?? []].filter((e) => e.kind === "file").map((e) => e.getAsFile()).filter((e) => e !== null);
|
|
8976
8979
|
}
|
|
8977
|
-
async function
|
|
8980
|
+
async function Gt(e) {
|
|
8978
8981
|
try {
|
|
8979
|
-
|
|
8982
|
+
Kt(await Ui(e, i.ingestAttachments, f));
|
|
8980
8983
|
} catch (e) {
|
|
8981
|
-
|
|
8984
|
+
Cn(e);
|
|
8982
8985
|
}
|
|
8983
8986
|
}
|
|
8984
|
-
function
|
|
8987
|
+
function Kt(e) {
|
|
8985
8988
|
let t = new Map(q.value.map((e) => [e.reference, e]));
|
|
8986
8989
|
for (let n of e) t.set(n.reference, n);
|
|
8987
|
-
|
|
8988
|
-
}
|
|
8989
|
-
function Kt(e) {
|
|
8990
|
-
qt(q.value.filter((t) => t.id !== e));
|
|
8990
|
+
Jt([...t.values()].slice(0, 20));
|
|
8991
8991
|
}
|
|
8992
8992
|
function qt(e) {
|
|
8993
|
+
Jt(q.value.filter((t) => t.id !== e));
|
|
8994
|
+
}
|
|
8995
|
+
function Jt(e) {
|
|
8993
8996
|
q.value = e, !Q("updateAttachments", e) && (C.value || a("attachmentsChange", e));
|
|
8994
8997
|
}
|
|
8995
|
-
function
|
|
8998
|
+
function Yt(e, t) {
|
|
8996
8999
|
if (e.length === 0) return t;
|
|
8997
9000
|
let n = e.map((e) => e.type === "image" ? {
|
|
8998
9001
|
type: "image",
|
|
@@ -9006,27 +9009,27 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9006
9009
|
attachments: n
|
|
9007
9010
|
};
|
|
9008
9011
|
}
|
|
9009
|
-
function
|
|
9010
|
-
|
|
9012
|
+
function Xt(e) {
|
|
9013
|
+
Zt({
|
|
9011
9014
|
text: e,
|
|
9012
9015
|
selectionStart: e.length,
|
|
9013
9016
|
selectionEnd: e.length
|
|
9014
9017
|
});
|
|
9015
9018
|
}
|
|
9016
|
-
function
|
|
9019
|
+
function Zt(e) {
|
|
9017
9020
|
let t = Xi(e);
|
|
9018
9021
|
R.value = t, z.value = t.text, !Q("updateComposerState", t) && (C.value || (a("update:modelValue", t.text), a("update:composerState", t)));
|
|
9019
9022
|
}
|
|
9020
|
-
function
|
|
9023
|
+
function Qt() {
|
|
9021
9024
|
Q("cancel") || C.value || (a("cancel"), i.surface && $(() => i.surface.interrupt()));
|
|
9022
9025
|
}
|
|
9023
|
-
function
|
|
9026
|
+
function $t(e) {
|
|
9024
9027
|
Q("clientResponse", e) || C.value || (a("clientResponse", e), i.surface && $(() => i.surface.respondToClientRequest(e)));
|
|
9025
9028
|
}
|
|
9026
|
-
function
|
|
9029
|
+
function en(e) {
|
|
9027
9030
|
Q("onMessageCopied", e) || C.value || a("copyMessage", e);
|
|
9028
9031
|
}
|
|
9029
|
-
async function
|
|
9032
|
+
async function tn(e) {
|
|
9030
9033
|
if (te.value !== null) return;
|
|
9031
9034
|
let t = E.value?.deleteTurn;
|
|
9032
9035
|
if (C.value && !t) return;
|
|
@@ -9039,7 +9042,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9039
9042
|
try {
|
|
9040
9043
|
n = t(e);
|
|
9041
9044
|
} catch (e) {
|
|
9042
|
-
|
|
9045
|
+
Cn(e);
|
|
9043
9046
|
return;
|
|
9044
9047
|
}
|
|
9045
9048
|
if (n === void 0) {
|
|
@@ -9054,79 +9057,79 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9054
9057
|
!r && re === n && (te.value = null);
|
|
9055
9058
|
}
|
|
9056
9059
|
}
|
|
9057
|
-
function
|
|
9060
|
+
function nn(e) {
|
|
9058
9061
|
Q("editTurn", e) || C.value || (a("editTurn", e), i.surface && $(() => i.surface.editTurn(e.turnId, e.content, e.options)));
|
|
9059
9062
|
}
|
|
9060
|
-
function
|
|
9063
|
+
function rn(e) {
|
|
9061
9064
|
Q("forkTurn", e) || C.value || (a("forkTurn", e), i.surface && $(() => i.surface.forkTurn(e)));
|
|
9062
9065
|
}
|
|
9063
|
-
function
|
|
9066
|
+
function an(e) {
|
|
9064
9067
|
Q("retryTurn", e) || C.value || (a("retryTurn", e), i.surface && $(() => i.surface.retryTurn(e)));
|
|
9065
9068
|
}
|
|
9066
|
-
function
|
|
9069
|
+
function on(e) {
|
|
9067
9070
|
Q("sendFollowUp", e) || C.value || (a("sendFollowUp", e), i.surface && $(() => i.surface.sendMessage(e)));
|
|
9068
9071
|
}
|
|
9069
|
-
function
|
|
9072
|
+
function sn() {
|
|
9070
9073
|
Q("clearGoal") || C.value || (a("clearGoal"), i.surface && $(() => i.surface.clearGoal()));
|
|
9071
9074
|
}
|
|
9072
|
-
function
|
|
9075
|
+
function cn(e) {
|
|
9073
9076
|
V.value === e && (V.value = null), !Q("deleteQueuedPrompt", e) && (C.value || (a("deleteQueuedPrompt", e), i.surface && $(() => i.surface.deleteQueuedPrompt(e))));
|
|
9074
9077
|
}
|
|
9075
|
-
function
|
|
9078
|
+
function ln(e) {
|
|
9076
9079
|
if (z.value.length > 0) return;
|
|
9077
9080
|
let t = Je.value.find((t) => t.id === e);
|
|
9078
|
-
t && (V.value = e,
|
|
9081
|
+
t && (V.value = e, Zt({
|
|
9079
9082
|
text: t.text,
|
|
9080
9083
|
content: t.options?.content,
|
|
9081
9084
|
selectionStart: t.text.length,
|
|
9082
9085
|
selectionEnd: t.text.length
|
|
9083
9086
|
}), v.value?.focus());
|
|
9084
9087
|
}
|
|
9085
|
-
function
|
|
9088
|
+
function un(e, t, n) {
|
|
9086
9089
|
Q("updateQueuedPrompt", ...n ? [
|
|
9087
9090
|
e,
|
|
9088
9091
|
t,
|
|
9089
9092
|
n
|
|
9090
9093
|
] : [e, t]) || C.value || (n ? a("updateQueuedPrompt", e, t, n) : a("updateQueuedPrompt", e, t), i.surface && $(() => n ? i.surface.updateQueuedPrompt(e, t, n) : i.surface.updateQueuedPrompt(e, t)));
|
|
9091
9094
|
}
|
|
9092
|
-
function
|
|
9095
|
+
function dn(e, t, n) {
|
|
9093
9096
|
rt.value.steerPrompt && (V.value === e && (V.value = null), t === void 0 ? Q("steerQueuedPrompt", e) : Q("steerQueuedPrompt", ...n ? [
|
|
9094
9097
|
e,
|
|
9095
9098
|
t,
|
|
9096
9099
|
n
|
|
9097
9100
|
] : [e, t]), !C.value && (t === void 0 ? a("steerQueuedPrompt", e) : n ? a("steerQueuedPrompt", e, t, n) : a("steerQueuedPrompt", e, t), i.surface && $(() => t === void 0 ? i.surface.steerQueuedPrompt(e) : n ? i.surface.steerQueuedPrompt(e, t, n) : i.surface.steerQueuedPrompt(e, t))));
|
|
9098
9101
|
}
|
|
9099
|
-
function
|
|
9102
|
+
function fn() {
|
|
9100
9103
|
je(), !Q("interrupt") && (C.value || (a("interrupt"), i.surface && $(() => i.surface.interrupt())));
|
|
9101
9104
|
}
|
|
9102
|
-
function
|
|
9105
|
+
function pn(e, t) {
|
|
9103
9106
|
if (!rt.value.steerPrompt) {
|
|
9104
|
-
|
|
9107
|
+
St(e, t);
|
|
9105
9108
|
return;
|
|
9106
9109
|
}
|
|
9107
9110
|
let n = V.value;
|
|
9108
9111
|
if (n) {
|
|
9109
|
-
V.value = null,
|
|
9112
|
+
V.value = null, dn(n, e, t), Jt([]);
|
|
9110
9113
|
return;
|
|
9111
9114
|
}
|
|
9112
|
-
let r =
|
|
9115
|
+
let r = Yt(q.value, t);
|
|
9113
9116
|
if (C.value) {
|
|
9114
9117
|
let t = E.value?.steer;
|
|
9115
9118
|
if (t) {
|
|
9116
|
-
let n =
|
|
9119
|
+
let n = Ct();
|
|
9117
9120
|
$(() => Promise.resolve(t(e, r)), () => {
|
|
9118
9121
|
g.value = n;
|
|
9119
9122
|
});
|
|
9120
9123
|
}
|
|
9121
|
-
|
|
9124
|
+
Jt([]);
|
|
9122
9125
|
return;
|
|
9123
9126
|
}
|
|
9124
|
-
let o =
|
|
9127
|
+
let o = Ct();
|
|
9125
9128
|
r ? a("steer", e, r) : a("steer", e), i.surface && $(() => i.surface.steerMessage(e, r), () => {
|
|
9126
9129
|
g.value = o;
|
|
9127
|
-
}),
|
|
9130
|
+
}), Jt([]);
|
|
9128
9131
|
}
|
|
9129
|
-
function
|
|
9132
|
+
function mn(e) {
|
|
9130
9133
|
if (!Q("selectApprovalPreset", e)) {
|
|
9131
9134
|
if (C.value) {
|
|
9132
9135
|
Q("updateSettings", { approvalPreset: e });
|
|
@@ -9135,25 +9138,25 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9135
9138
|
a("selectApprovalPreset", e), i.surface && $(() => i.surface.updateConversationSettings({ approvalPreset: e }));
|
|
9136
9139
|
}
|
|
9137
9140
|
}
|
|
9138
|
-
function
|
|
9141
|
+
function hn(e, t, n) {
|
|
9139
9142
|
Q("resolveApproval", e, t, n) || C.value || (a("resolveApproval", e, t, n), i.surface && $(() => i.surface.resolveApproval(e, t, n)));
|
|
9140
9143
|
}
|
|
9141
|
-
function
|
|
9144
|
+
function gn(e) {
|
|
9142
9145
|
Q("updateSettings", { modelId: e }) || C.value || (a("update:modelId", e), i.surface && $(() => i.surface.updateConversationSettings({ modelId: e })));
|
|
9143
9146
|
}
|
|
9144
|
-
function
|
|
9147
|
+
function _n(e) {
|
|
9145
9148
|
Q("updateSettings", { planMode: e }) || C.value || (a("update:planMode", e), i.surface && $(() => i.surface.updateConversationSettings({ planMode: e })));
|
|
9146
9149
|
}
|
|
9147
|
-
function
|
|
9150
|
+
function vn(e) {
|
|
9148
9151
|
Q("updateSettings", { reasoningEffort: e }) || C.value || (a("update:reasoningEffort", e), i.surface && $(() => i.surface.updateConversationSettings({ reasoningEffort: e })));
|
|
9149
9152
|
}
|
|
9150
|
-
function
|
|
9153
|
+
function yn(e) {
|
|
9151
9154
|
Q("updateSettings", { serviceTier: e }) || C.value || (a("update:serviceTier", e), i.surface && $(() => i.surface.updateConversationSettings({ serviceTier: e })));
|
|
9152
9155
|
}
|
|
9153
|
-
function
|
|
9156
|
+
function bn(e) {
|
|
9154
9157
|
Q("menuSelect", e) || C.value || a("menuSelect", e);
|
|
9155
9158
|
}
|
|
9156
|
-
function
|
|
9159
|
+
function Sn(e, t) {
|
|
9157
9160
|
Q("mentionSelect", e, t) || C.value || a("mentionSelect", e, t);
|
|
9158
9161
|
}
|
|
9159
9162
|
function Q(e, ...t) {
|
|
@@ -9165,30 +9168,30 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9165
9168
|
try {
|
|
9166
9169
|
await e();
|
|
9167
9170
|
} catch (e) {
|
|
9168
|
-
t?.(),
|
|
9171
|
+
t?.(), Cn(e);
|
|
9169
9172
|
}
|
|
9170
9173
|
}
|
|
9171
|
-
function
|
|
9174
|
+
function Cn(e) {
|
|
9172
9175
|
K.value = e instanceof Error ? e.message : String(e);
|
|
9173
9176
|
}
|
|
9174
|
-
function
|
|
9177
|
+
function wn(e) {
|
|
9175
9178
|
K.value = e, a("error", e);
|
|
9176
9179
|
}
|
|
9177
|
-
function
|
|
9180
|
+
function Tn() {
|
|
9178
9181
|
v.value?.focus();
|
|
9179
9182
|
}
|
|
9180
|
-
return n({ focusComposer:
|
|
9183
|
+
return n({ focusComposer: Tn }), (n, r) => (k(), l("section", {
|
|
9181
9184
|
ref_key: "paneElement",
|
|
9182
9185
|
ref: x,
|
|
9183
9186
|
class: "codex-chat-theme codex-conversation-pane",
|
|
9184
9187
|
"aria-busy": Oe.value || Le.value,
|
|
9185
9188
|
"aria-label": e.ariaLabel,
|
|
9186
9189
|
"data-codex-generating": Oe.value ? "true" : void 0,
|
|
9187
|
-
onClick:
|
|
9188
|
-
onDragover:
|
|
9189
|
-
onDrop:
|
|
9190
|
-
onPasteCapture:
|
|
9191
|
-
}, [
|
|
9190
|
+
onClick: Lt,
|
|
9191
|
+
onDragover: Z,
|
|
9192
|
+
onDrop: Ht,
|
|
9193
|
+
onPasteCapture: Ut
|
|
9194
|
+
}, [vt.value ? (k(), s(Ws, {
|
|
9192
9195
|
key: 0,
|
|
9193
9196
|
class: "codex-conversation-pane__history-loader"
|
|
9194
9197
|
})) : (k(), s(Vd, {
|
|
@@ -9204,18 +9207,18 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9204
9207
|
key: Ee.value.id,
|
|
9205
9208
|
approval: Ee.value,
|
|
9206
9209
|
disabled: Pe.value,
|
|
9207
|
-
onResolve: r[1] ||= (e, t) =>
|
|
9210
|
+
onResolve: r[1] ||= (e, t) => hn(Ee.value.id, e, t)
|
|
9208
9211
|
}, null, 8, ["approval", "disabled"]))], !0)])) : Se.value ? (k(), s(ms, {
|
|
9209
9212
|
key: Se.value.id,
|
|
9210
9213
|
class: "codex-conversation-pane__confirmation-composer",
|
|
9211
9214
|
request: Se.value,
|
|
9212
|
-
onClientResponse:
|
|
9215
|
+
onClientResponse: $t
|
|
9213
9216
|
}, null, 8, ["request"])) : be.value ? (k(), s(ds, {
|
|
9214
9217
|
key: be.value.id,
|
|
9215
9218
|
class: "codex-conversation-pane__question-composer",
|
|
9216
9219
|
"answered-client-request-ids": me.value,
|
|
9217
9220
|
request: be.value,
|
|
9218
|
-
onClientResponse:
|
|
9221
|
+
onClientResponse: $t
|
|
9219
9222
|
}, null, 8, ["answered-client-request-ids", "request"])) : (k(), l(t, { key: 4 }, [
|
|
9220
9223
|
I(n.$slots, "before-composer", {}, void 0, !0),
|
|
9221
9224
|
m(Bs, {
|
|
@@ -9227,11 +9230,11 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9227
9230
|
"queued-prompt-edit-disabled": z.value.length > 0,
|
|
9228
9231
|
"queued-prompt-steer-disabled": !rt.value.steerPrompt,
|
|
9229
9232
|
"turn-git-diff": et.value,
|
|
9230
|
-
onClearGoal:
|
|
9231
|
-
onDeleteQueuedPrompt:
|
|
9232
|
-
onEditQueuedPrompt:
|
|
9233
|
-
onEditGoal:
|
|
9234
|
-
onSteerQueuedPrompt:
|
|
9233
|
+
onClearGoal: sn,
|
|
9234
|
+
onDeleteQueuedPrompt: cn,
|
|
9235
|
+
onEditQueuedPrompt: ln,
|
|
9236
|
+
onEditGoal: Mt,
|
|
9237
|
+
onSteerQueuedPrompt: dn
|
|
9235
9238
|
}, d({ _: 2 }, [n.$slots["composer-drawers"] ? {
|
|
9236
9239
|
name: "drawers",
|
|
9237
9240
|
fn: G((e) => [I(n.$slots, "composer-drawers", w(_(e)), void 0, !0)]),
|
|
@@ -9264,7 +9267,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9264
9267
|
disabled: Pe.value,
|
|
9265
9268
|
draft: z.value,
|
|
9266
9269
|
"empty-send-prompt": e.emptySendPrompt,
|
|
9267
|
-
"follow-up-behavior":
|
|
9270
|
+
"follow-up-behavior": dt.value,
|
|
9268
9271
|
files: at.value,
|
|
9269
9272
|
"has-attachments": q.value.length > 0,
|
|
9270
9273
|
"has-external-content": e.hasComposerContext,
|
|
@@ -9281,6 +9284,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9281
9284
|
"model-catalog-status": Ve.value,
|
|
9282
9285
|
models: He.value,
|
|
9283
9286
|
placeholder: lt.value,
|
|
9287
|
+
"suggested-prompt": ut.value,
|
|
9284
9288
|
"approval-preset": Ue.value,
|
|
9285
9289
|
"plan-mode": We.value,
|
|
9286
9290
|
presentation: qe.value,
|
|
@@ -9290,27 +9294,27 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9290
9294
|
"skill-catalog-status": Qe.value,
|
|
9291
9295
|
skills: $e.value,
|
|
9292
9296
|
"transcribe-audio": e.transcribeAudio,
|
|
9293
|
-
onError:
|
|
9294
|
-
onAttach:
|
|
9295
|
-
onContinueInterruptedTurn:
|
|
9296
|
-
onInterrupt:
|
|
9297
|
-
onMenuSelect:
|
|
9298
|
-
onMentionSelect:
|
|
9299
|
-
onSelectApprovalPreset:
|
|
9300
|
-
onSend:
|
|
9301
|
-
onSteer:
|
|
9302
|
-
onSteerQueuedPrompt:
|
|
9303
|
-
"onUpdate:modelId":
|
|
9304
|
-
"onUpdate:composerState":
|
|
9305
|
-
"onUpdate:planMode":
|
|
9306
|
-
"onUpdate:reasoningEffort":
|
|
9307
|
-
"onUpdate:serviceTier":
|
|
9297
|
+
onError: wn,
|
|
9298
|
+
onAttach: Vt,
|
|
9299
|
+
onContinueInterruptedTurn: Tt,
|
|
9300
|
+
onInterrupt: fn,
|
|
9301
|
+
onMenuSelect: bn,
|
|
9302
|
+
onMentionSelect: Sn,
|
|
9303
|
+
onSelectApprovalPreset: mn,
|
|
9304
|
+
onSend: St,
|
|
9305
|
+
onSteer: pn,
|
|
9306
|
+
onSteerQueuedPrompt: dn,
|
|
9307
|
+
"onUpdate:modelId": gn,
|
|
9308
|
+
"onUpdate:composerState": Zt,
|
|
9309
|
+
"onUpdate:planMode": _n,
|
|
9310
|
+
"onUpdate:reasoningEffort": vn,
|
|
9311
|
+
"onUpdate:serviceTier": yn
|
|
9308
9312
|
}, d({
|
|
9309
9313
|
"before-meta": G(() => [ye.value.length > 0 ? (k(), l("span", Jd, [u("button", {
|
|
9310
9314
|
class: "codex-conversation-pane__pending-question-cancel",
|
|
9311
9315
|
type: "button",
|
|
9312
9316
|
"aria-label": "Cancel pending question",
|
|
9313
|
-
onClick: r[2] ||= (e) =>
|
|
9317
|
+
onClick: r[2] ||= (e) => wt(ye.value[0].id)
|
|
9314
9318
|
}, [m(H(Ae), {
|
|
9315
9319
|
class: "codex-conversation-pane__pending-question-icon",
|
|
9316
9320
|
"aria-hidden": "true"
|
|
@@ -9346,7 +9350,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9346
9350
|
class: "codex-conversation-pane__attachment-remove",
|
|
9347
9351
|
"aria-label": `Remove ${e.name}`,
|
|
9348
9352
|
disabled: Pe.value,
|
|
9349
|
-
onClick: (t) =>
|
|
9353
|
+
onClick: (t) => qt(e.id)
|
|
9350
9354
|
}, [m(H(tt), { "aria-hidden": "true" })], 8, tf)])
|
|
9351
9355
|
]))), 128))])) : c("", !0), I(n.$slots, "composer-context", { disabled: Pe.value }, void 0, !0)]),
|
|
9352
9356
|
_: 2
|
|
@@ -9381,26 +9385,26 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9381
9385
|
fn: G(() => [I(n.$slots, "composer-after", {}, void 0, !0)]),
|
|
9382
9386
|
key: "5"
|
|
9383
9387
|
} : void 0
|
|
9384
|
-
]), 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("."))),
|
|
9388
|
+
]), 1032, /* @__PURE__ */ "autofocus.attach-enabled.capabilities.can-continue-interrupted-turn.commands.composer-state.context-usage.disabled.draft.empty-send-prompt.follow-up-behavior.files.has-attachments.has-external-content.interrupt-armed.plugins.prompt-history.prompt-history-loading.queued-prompt-id.is-sending.leading-menu-items.menu-items.model-menu-items.mention-groups.model-catalog-status.models.placeholder.suggested-prompt.approval-preset.plan-mode.presentation.selected-model-id.selected-reasoning-effort.selected-service-tier.skill-catalog-status.skills.transcribe-audio".split("."))),
|
|
9385
9389
|
I(n.$slots, "after-composer", {}, void 0, !0)
|
|
9386
9390
|
], 64))], 512)]),
|
|
9387
|
-
default: G(() => [
|
|
9391
|
+
default: G(() => [yt.value ? (k(), s(Ld, {
|
|
9388
9392
|
key: 0,
|
|
9389
9393
|
ref_key: "messageList",
|
|
9390
9394
|
ref: b,
|
|
9391
9395
|
class: "codex-conversation-pane__messages",
|
|
9392
|
-
"actions-disabled":
|
|
9396
|
+
"actions-disabled": gt.value,
|
|
9393
9397
|
"active-turn-id": ce.value,
|
|
9394
9398
|
"answered-client-request-ids": me.value,
|
|
9395
9399
|
"aria-label": e.ariaLabel,
|
|
9396
9400
|
busy: Oe.value,
|
|
9397
|
-
"can-delete-turn":
|
|
9398
|
-
"can-edit-turn":
|
|
9399
|
-
"can-fork-turn":
|
|
9400
|
-
"can-retry-turn":
|
|
9401
|
+
"can-delete-turn": ft.value,
|
|
9402
|
+
"can-edit-turn": pt.value,
|
|
9403
|
+
"can-fork-turn": mt.value,
|
|
9404
|
+
"can-retry-turn": ht.value,
|
|
9401
9405
|
"deleting-turn-id": te.value,
|
|
9402
9406
|
"empty-label": e.emptyTitle,
|
|
9403
|
-
"follow-ups-disabled":
|
|
9407
|
+
"follow-ups-disabled": _t.value,
|
|
9404
9408
|
"has-older-messages": ze.value,
|
|
9405
9409
|
"hidden-client-request-ids": xe.value,
|
|
9406
9410
|
"render-strategy": Re.value,
|
|
@@ -9410,7 +9414,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9410
9414
|
"message-text-selection": e.messageTextSelection,
|
|
9411
9415
|
messages: Y.value,
|
|
9412
9416
|
"mention-groups": Ke.value,
|
|
9413
|
-
"open-image":
|
|
9417
|
+
"open-image": Bt,
|
|
9414
9418
|
plugins: Ge.value,
|
|
9415
9419
|
presentation: qe.value,
|
|
9416
9420
|
"reset-key": Me.value,
|
|
@@ -9420,20 +9424,20 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9420
9424
|
"tool-visibility": e.toolVisibility,
|
|
9421
9425
|
"transform-message": ve.value.size > 0 || Ce.value.size > 0 ? we : e.transformMessage,
|
|
9422
9426
|
turns: le.value,
|
|
9423
|
-
onCancel:
|
|
9424
|
-
onClientResponse:
|
|
9425
|
-
onCopyMessage:
|
|
9426
|
-
onDeleteTurn:
|
|
9427
|
-
onEditTurn:
|
|
9428
|
-
onForkTurn:
|
|
9429
|
-
onLoadOlderMessages:
|
|
9430
|
-
onLoadTurnHistory:
|
|
9427
|
+
onCancel: Qt,
|
|
9428
|
+
onClientResponse: $t,
|
|
9429
|
+
onCopyMessage: en,
|
|
9430
|
+
onDeleteTurn: tn,
|
|
9431
|
+
onEditTurn: nn,
|
|
9432
|
+
onForkTurn: rn,
|
|
9433
|
+
onLoadOlderMessages: At,
|
|
9434
|
+
onLoadTurnHistory: kt,
|
|
9431
9435
|
onMessageTextSelectionChange: r[0] ||= (e) => a("messageTextSelectionChange", e),
|
|
9432
|
-
onOpenLink:
|
|
9433
|
-
onOpenVisualization:
|
|
9434
|
-
onQuoteMessage:
|
|
9435
|
-
onRetryTurn:
|
|
9436
|
-
onSendFollowUp:
|
|
9436
|
+
onOpenLink: Rt,
|
|
9437
|
+
onOpenVisualization: zt,
|
|
9438
|
+
onQuoteMessage: jt,
|
|
9439
|
+
onRetryTurn: an,
|
|
9440
|
+
onSendFollowUp: on
|
|
9437
9441
|
}, d({ _: 2 }, [
|
|
9438
9442
|
n.$slots.message ? {
|
|
9439
9443
|
name: "message",
|
|
@@ -9492,7 +9496,7 @@ var dd = ["aria-busy", "aria-label"], fd = ["title"], pd = ["title"], md = /*#__
|
|
|
9492
9496
|
_: 3
|
|
9493
9497
|
}))], 40, Hd));
|
|
9494
9498
|
}
|
|
9495
|
-
}), [["__scopeId", "data-v-
|
|
9499
|
+
}), [["__scopeId", "data-v-fcb530f4"]]), rf = {
|
|
9496
9500
|
class: "codex-conversation-sidebar",
|
|
9497
9501
|
"aria-label": "Conversations"
|
|
9498
9502
|
}, af = { class: "codex-conversation-sidebar__header" }, of = { class: "codex-conversation-sidebar__brand" }, sf = ["disabled"], cf = {
|