@codex-app-sdk/vue 0.14.3 → 0.14.4
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 +321 -311
- 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
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 te, renderList as N, renderSlot as P, resolveComponent as F, 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 q, IconArrowFork as J, IconBolt as ae, IconCheck as oe, IconCheck as
|
|
2
|
+
import { IconArrowDown as q, IconArrowFork as J, IconBolt as ae, IconCheck as oe, IconCheck as Y, IconChevronDown as se, IconChevronRight as ce, IconChevronUp as le, IconCircle as ue, IconCircleX as de, IconCode as fe, IconCopy as pe, IconDownload as me, IconExternalLink as he, IconEye as ge, IconFileText as _e, IconFolder as ve, IconHandStop as ye, IconInfoCircle as be, IconLayoutDashboard as xe, IconListDetails as Se, IconLoader2 as Ce, IconMaximize as we, IconMessageQuestion as Te, IconMicrophone as Ee, IconPaperclip as De, IconPencil as Oe, IconPhoto as ke, IconPlayerPlayFilled as Ae, IconPlugConnected as je, IconPlus as Me, IconQuote as Ne, IconRotateClockwise as Pe, IconSearch as Fe, IconShieldCheck as Ie, IconSparkleHighlight as Le, IconSparkles as Re, IconSquareCheck as ze, IconSquareDashed as Be, IconSquareX as Ve, IconSteeringWheel as He, IconTargetArrow as Ue, IconTerminal as We, IconTerminal2 as Ge, IconTool as Ke, IconTrash as qe, IconWorldSearch as Je, IconX as Ye } from "@tabler/icons-vue";
|
|
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";
|
|
@@ -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(Y, {
|
|
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", {
|
|
@@ -928,9 +928,9 @@ function _n(e) {
|
|
|
928
928
|
if (/^[a-z]:[\\/]/i.test(t)) return {
|
|
929
929
|
href: t,
|
|
930
930
|
kind: "file",
|
|
931
|
-
path:
|
|
931
|
+
path: bn(yn(t))
|
|
932
932
|
};
|
|
933
|
-
let n =
|
|
933
|
+
let n = bn(yn(t)), r = gn(n);
|
|
934
934
|
if (r) return vn(t, r);
|
|
935
935
|
try {
|
|
936
936
|
let e = new URL(t);
|
|
@@ -939,7 +939,7 @@ function _n(e) {
|
|
|
939
939
|
kind: "external"
|
|
940
940
|
};
|
|
941
941
|
if (e.protocol === "file:") {
|
|
942
|
-
let n =
|
|
942
|
+
let n = bn(e.pathname), r = gn(n);
|
|
943
943
|
return r ? vn(t, r) : {
|
|
944
944
|
href: t,
|
|
945
945
|
kind: "file",
|
|
@@ -967,7 +967,7 @@ function vn(e, t) {
|
|
|
967
967
|
function yn(e) {
|
|
968
968
|
return e.split("#", 1)[0].split("?", 1)[0].trim();
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function bn(e) {
|
|
971
971
|
try {
|
|
972
972
|
return decodeURIComponent(e);
|
|
973
973
|
} catch {
|
|
@@ -976,10 +976,10 @@ function Z(e) {
|
|
|
976
976
|
}
|
|
977
977
|
//#endregion
|
|
978
978
|
//#region src/chat/types.ts
|
|
979
|
-
function
|
|
979
|
+
function Z(e) {
|
|
980
980
|
return e.function;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function Q(e) {
|
|
983
983
|
return e.kind === "imageGeneration" || e.function === "image_generation";
|
|
984
984
|
}
|
|
985
985
|
function xn(e) {
|
|
@@ -1029,14 +1029,14 @@ function Dn(e, t, n = Wn) {
|
|
|
1029
1029
|
});
|
|
1030
1030
|
if (i) return i;
|
|
1031
1031
|
}
|
|
1032
|
-
if (
|
|
1032
|
+
if (Q(e)) return n(`chat.tool.imageGeneration.${Hn(e)}`);
|
|
1033
1033
|
if (t && Un(t.action)) {
|
|
1034
1034
|
let r = Vn(t.phase);
|
|
1035
1035
|
if (t.action === "plan") return n(`chat.tool.command.plan.${t.params?.operation === "update" ? "update" : "write"}.${r}`);
|
|
1036
|
-
let i = Mn(e, t, jn(t,
|
|
1036
|
+
let i = Mn(e, t, jn(t, Z(e)));
|
|
1037
1037
|
return n(`chat.tool.command.${t.action}.${r}`, i ? { target: i } : void 0);
|
|
1038
1038
|
}
|
|
1039
|
-
return t ? `${t.phase} ${
|
|
1039
|
+
return t ? `${t.phase} ${Z(e)}` : An(e, n);
|
|
1040
1040
|
}
|
|
1041
1041
|
function On(e, t, n = Wn) {
|
|
1042
1042
|
let r = Dn(e, t, n);
|
|
@@ -1046,7 +1046,7 @@ function On(e, t, n = Wn) {
|
|
|
1046
1046
|
"edit",
|
|
1047
1047
|
"read"
|
|
1048
1048
|
].includes(t.action)) return { title: r };
|
|
1049
|
-
let i = Mn(e, t, jn(t,
|
|
1049
|
+
let i = Mn(e, t, jn(t, Z(e))), a = r.endsWith(i) ? r.slice(0, -i.length).trimEnd() : void 0;
|
|
1050
1050
|
return a ? {
|
|
1051
1051
|
prefix: a,
|
|
1052
1052
|
target: i,
|
|
@@ -1083,7 +1083,7 @@ function kn(e, t, n) {
|
|
|
1083
1083
|
}), s;
|
|
1084
1084
|
}
|
|
1085
1085
|
function An(e, t = Wn) {
|
|
1086
|
-
return t(`chat.tool.fallback.${!e.done && e.state !== "completed" ? "running" : "completed"}`, { name:
|
|
1086
|
+
return t(`chat.tool.fallback.${!e.done && e.state !== "completed" ? "running" : "completed"}`, { name: Z(e) });
|
|
1087
1087
|
}
|
|
1088
1088
|
function jn(e, t) {
|
|
1089
1089
|
let n = e.params?.target;
|
|
@@ -1478,7 +1478,7 @@ var Xn = ["aria-label"], Zn = {
|
|
|
1478
1478
|
};
|
|
1479
1479
|
});
|
|
1480
1480
|
}
|
|
1481
|
-
return (t, r) => (k(), l("div", er, [e.models.length === 0 ? (k(), l("button", tr, [u("span", nr, R(y.value), 1), m(B(
|
|
1481
|
+
return (t, r) => (k(), l("div", er, [e.models.length === 0 ? (k(), l("button", tr, [u("span", nr, R(y.value), 1), m(B(se), {
|
|
1482
1482
|
class: "chat-model-selector__chevron",
|
|
1483
1483
|
"aria-hidden": "true"
|
|
1484
1484
|
})])) : (k(), s(en, {
|
|
@@ -1505,7 +1505,7 @@ var Xn = ["aria-label"], Zn = {
|
|
|
1505
1505
|
"aria-hidden": "true"
|
|
1506
1506
|
})) : c("", !0),
|
|
1507
1507
|
u("span", ir, R(y.value), 1),
|
|
1508
|
-
m(B(
|
|
1508
|
+
m(B(se), {
|
|
1509
1509
|
class: "chat-model-selector__chevron",
|
|
1510
1510
|
"aria-hidden": "true"
|
|
1511
1511
|
})
|
|
@@ -2677,6 +2677,7 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2677
2677
|
draft: {},
|
|
2678
2678
|
draftRevision: {},
|
|
2679
2679
|
emptySendPrompt: {},
|
|
2680
|
+
followUpBehavior: {},
|
|
2680
2681
|
files: {},
|
|
2681
2682
|
hasAttachments: { type: Boolean },
|
|
2682
2683
|
hasExternalContent: { type: Boolean },
|
|
@@ -2725,29 +2726,34 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2725
2726
|
],
|
|
2726
2727
|
setup(e, { expose: t, emit: n }) {
|
|
2727
2728
|
let r = e, i = n, a = ki(), 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({
|
|
2728
|
-
apply:
|
|
2729
|
+
apply: st,
|
|
2729
2730
|
currentPrompt: () => f.value
|
|
2730
|
-
}), A = !1, j = null, te = 0, N = o(() => r.capabilities ?? Ot), F = 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(() => !!(N.value.planMode && r.planMode && !L.value)), z = o(() => I.value?.composerMode?.placeholder ?? r.placeholder ?? "Ask Codex…"), V = o(() => F.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)), G = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), q = o(() => !!(re.value && !r.isSending && !r.disabled && !H.value && !r.hasAttachments && !r.hasExternalContent && !I.value && !G.value)), J = null, ae = o(() => !!(r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !
|
|
2731
|
+
}), A = !1, j = null, te = 0, N = o(() => r.capabilities ?? Ot), F = 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(() => !!(N.value.planMode && r.planMode && !L.value)), z = o(() => I.value?.composerMode?.placeholder ?? r.placeholder ?? "Ask Codex…"), V = o(() => F.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)), G = o(() => !!(r.canContinueInterruptedTurn && !r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled)), q = o(() => !!(re.value && !r.isSending && !r.disabled && !H.value && !r.hasAttachments && !r.hasExternalContent && !I.value && !G.value)), J = null, ae = o(() => !!(r.isSending && !H.value && !r.hasAttachments && !r.hasExternalContent && !r.disabled && !me.value && !he.value)), oe = o(() => ae.value), Y = o(() => r.followUpBehavior === "steer" && N.value.steerPrompt), se = o(() => r.interruptArmed ? !1 : he.value ? !0 : me.value && !r.disabled ? !1 : !ie.value && !ae.value && !G.value), ce = o(() => G.value ? "Continue" : q.value ? "Send default prompt" : r.isSending ? Y.value ? "Steer prompt" : "Queue prompt" : "Send prompt"), le = o(() => {
|
|
2732
|
+
if (r.interruptArmed) return "Press Escape again or click to stop generation";
|
|
2733
|
+
if (ae.value) return "Interrupt";
|
|
2734
|
+
let e = `${ce.value} (Enter)`;
|
|
2735
|
+
return !r.isSending || !N.value.steerPrompt ? e : `${e}. ${Y.value ? "Queue" : "Steer"} prompt (Cmd/Ctrl+Enter)`;
|
|
2736
|
+
}), { buttonDisabled: ue, buttonLabel: de, buttonTitle: fe, error: pe, isRecording: me, isTranscribing: he, recorder: ge, stop: _e, toggle: ve } = Pi({
|
|
2731
2737
|
isDisabled: () => r.disabled,
|
|
2732
2738
|
isSending: () => r.isSending,
|
|
2733
|
-
onTranscript:
|
|
2739
|
+
onTranscript: Ye,
|
|
2734
2740
|
transcribeAudio: r.transcribeAudio
|
|
2735
2741
|
});
|
|
2736
|
-
U(
|
|
2742
|
+
U(pe, (e) => i("error", e)), U(he, (e) => {
|
|
2737
2743
|
if (e || J === null) return;
|
|
2738
2744
|
let t = J;
|
|
2739
2745
|
J = null, S(() => {
|
|
2740
2746
|
g.value?.setCaret(t);
|
|
2741
2747
|
});
|
|
2742
2748
|
});
|
|
2743
|
-
let
|
|
2749
|
+
let ye = 0;
|
|
2744
2750
|
U(() => [r.promptHistory, r.promptHistoryLoading], ([e, t]) => {
|
|
2745
|
-
if (ee(e ?? []), t ||
|
|
2746
|
-
let n =
|
|
2747
|
-
|
|
2751
|
+
if (ee(e ?? []), t || ye === 0) return;
|
|
2752
|
+
let n = ye;
|
|
2753
|
+
ye = 0;
|
|
2748
2754
|
for (let e = 0; e < n; e += 1) E("ArrowUp");
|
|
2749
2755
|
}, { immediate: !0 });
|
|
2750
|
-
let { activeAtIndex:
|
|
2756
|
+
let { activeAtIndex: be, activeSkillIndex: xe, activeSlashIndex: Se, close: Ce, closeSoon: we, resume: Te, fileMenuShowsHint: Ee, atMenuVisible: De, handleKeydown: Oe, selectCommand: ke, selectFile: Ae, selectPlugin: je, selectMention: Me, selectSkill: Ne, selectSlashSkill: Pe, skillMenuVisible: Fe, slashMenuVisible: Ie, suspend: Le, updateCaretPosition: Re, visibleFiles: ze, visiblePlugins: Be, visibleMentionGroups: Ve, visibleSkills: He, visibleSlashCommands: Ue, visibleSlashSkills: We } = hi({
|
|
2751
2757
|
caretPosition: v,
|
|
2752
2758
|
commands: () => r.commands ?? kt,
|
|
2753
2759
|
disabled: () => r.disabled,
|
|
@@ -2756,12 +2762,12 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2756
2762
|
mentionGroups: () => r.mentionGroups ?? [],
|
|
2757
2763
|
isSending: () => r.isSending,
|
|
2758
2764
|
onCommandActivated: (e) => {
|
|
2759
|
-
|
|
2765
|
+
$e(e);
|
|
2760
2766
|
},
|
|
2761
2767
|
onCommandSubmitted: (e) => {
|
|
2762
|
-
e === "/plan" && L.value &&
|
|
2768
|
+
e === "/plan" && L.value && Qe(), O(e), i("send", e);
|
|
2763
2769
|
},
|
|
2764
|
-
onTextInserted:
|
|
2770
|
+
onTextInserted: dt,
|
|
2765
2771
|
onMentionSelected: (e, t) => i("mentionSelect", e, t),
|
|
2766
2772
|
prompt: f,
|
|
2767
2773
|
skills: () => r.skills ?? [],
|
|
@@ -2769,16 +2775,16 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2769
2775
|
editor: g
|
|
2770
2776
|
});
|
|
2771
2777
|
U(() => r.composerState, (e) => {
|
|
2772
|
-
e &&
|
|
2778
|
+
e && nt(e);
|
|
2773
2779
|
}, {
|
|
2774
2780
|
deep: !0,
|
|
2775
2781
|
immediate: !0
|
|
2776
2782
|
}), U(() => r.draftRevision, () => {
|
|
2777
|
-
r.composerState ||
|
|
2778
|
-
}, { immediate: r.draftRevision !== void 0 }), U(f, () =>
|
|
2783
|
+
r.composerState || Xe(r.draft ?? "");
|
|
2784
|
+
}, { immediate: r.draftRevision !== void 0 }), U(f, () => lt()), D(() => {
|
|
2779
2785
|
r.autofocus && g.value?.focusEnd();
|
|
2780
2786
|
});
|
|
2781
|
-
function
|
|
2787
|
+
function Ge() {
|
|
2782
2788
|
if (G.value) {
|
|
2783
2789
|
i("continueInterruptedTurn");
|
|
2784
2790
|
return;
|
|
@@ -2787,80 +2793,80 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2787
2793
|
i("send", re.value);
|
|
2788
2794
|
return;
|
|
2789
2795
|
}
|
|
2790
|
-
|
|
2796
|
+
r.isSending && Y.value ? qe() : Je("send");
|
|
2791
2797
|
}
|
|
2792
|
-
async function
|
|
2798
|
+
async function Ke() {
|
|
2793
2799
|
if (r.interruptArmed) {
|
|
2794
2800
|
i("interrupt");
|
|
2795
2801
|
return;
|
|
2796
2802
|
}
|
|
2797
|
-
if (
|
|
2798
|
-
await
|
|
2803
|
+
if (me.value) {
|
|
2804
|
+
await _e() && Ge();
|
|
2799
2805
|
return;
|
|
2800
2806
|
}
|
|
2801
2807
|
if (ae.value) {
|
|
2802
2808
|
i("interrupt");
|
|
2803
2809
|
return;
|
|
2804
2810
|
}
|
|
2805
|
-
|
|
2811
|
+
Ge();
|
|
2806
2812
|
}
|
|
2807
|
-
function
|
|
2813
|
+
function qe() {
|
|
2808
2814
|
if (!N.value.steerPrompt) {
|
|
2809
|
-
|
|
2815
|
+
Je("send");
|
|
2810
2816
|
return;
|
|
2811
2817
|
}
|
|
2812
2818
|
if (!f.value.trim() && r.queuedPromptId && !r.hasAttachments && !r.hasExternalContent && !r.disabled) {
|
|
2813
2819
|
i("steerQueuedPrompt", r.queuedPromptId);
|
|
2814
2820
|
return;
|
|
2815
2821
|
}
|
|
2816
|
-
|
|
2822
|
+
Je("steer");
|
|
2817
2823
|
}
|
|
2818
|
-
function
|
|
2824
|
+
function Je(e) {
|
|
2819
2825
|
let t = f.value.trim();
|
|
2820
2826
|
if (!ie.value || e === "steer" && !t && !r.hasAttachments) return;
|
|
2821
2827
|
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;
|
|
2822
|
-
t && O(a), f.value = "", p.value = null, h.value = !1, y.value = 0, b.value = 0, v.value = 0,
|
|
2828
|
+
t && O(a), f.value = "", p.value = null, h.value = !1, y.value = 0, b.value = 0, v.value = 0, Ce(), e === "send" ? o ? i("send", a, o) : i("send", a) : o ? i("steer", a, o) : i("steer", a);
|
|
2823
2829
|
}
|
|
2824
|
-
async function
|
|
2830
|
+
async function Ye(e) {
|
|
2825
2831
|
let t = e.trim();
|
|
2826
2832
|
if (!t) return;
|
|
2827
2833
|
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;
|
|
2828
|
-
f.value = `${a}${s}${o}`, h.value = !0, v.value = c, y.value = c, b.value = c, J = c,
|
|
2834
|
+
f.value = `${a}${s}${o}`, h.value = !0, v.value = c, y.value = c, b.value = c, J = c, Ce();
|
|
2829
2835
|
}
|
|
2830
|
-
function
|
|
2831
|
-
T(),
|
|
2836
|
+
function Xe(e) {
|
|
2837
|
+
T(), nt({
|
|
2832
2838
|
text: e,
|
|
2833
2839
|
selectionStart: e.length,
|
|
2834
2840
|
selectionEnd: e.length
|
|
2835
2841
|
});
|
|
2836
2842
|
}
|
|
2837
|
-
function
|
|
2838
|
-
|
|
2843
|
+
function Ze() {
|
|
2844
|
+
Qe(), g.value?.focusEnd();
|
|
2839
2845
|
}
|
|
2840
|
-
function
|
|
2841
|
-
p.value = null,
|
|
2846
|
+
function Qe() {
|
|
2847
|
+
p.value = null, lt();
|
|
2842
2848
|
}
|
|
2843
|
-
function
|
|
2844
|
-
e.id === ne.value?.id && r.planMode && i("update:planMode", !1), p.value = e.id,
|
|
2849
|
+
function $e(e) {
|
|
2850
|
+
e.id === ne.value?.id && r.planMode && i("update:planMode", !1), p.value = e.id, lt();
|
|
2845
2851
|
}
|
|
2846
|
-
function
|
|
2852
|
+
function et(e) {
|
|
2847
2853
|
if (e) {
|
|
2848
2854
|
if (!ne.value) return;
|
|
2849
|
-
|
|
2850
|
-
} else L.value &&
|
|
2855
|
+
$e(ne.value);
|
|
2856
|
+
} else L.value && Qe();
|
|
2851
2857
|
}
|
|
2852
|
-
function
|
|
2853
|
-
e && L.value &&
|
|
2858
|
+
function tt(e) {
|
|
2859
|
+
e && L.value && Qe(), i("update:planMode", e);
|
|
2854
2860
|
}
|
|
2855
|
-
function
|
|
2861
|
+
function nt(e) {
|
|
2856
2862
|
let t = Li(e);
|
|
2857
|
-
p.value = t.activeCommandId ?? null,
|
|
2863
|
+
p.value = t.activeCommandId ?? null, rt(t, j) || T();
|
|
2858
2864
|
let n = ++te, r = g.value?.getSelectionRange();
|
|
2859
2865
|
if (g.value && f.value === t.text && g.value.readText() === t.text && r?.valid && r.start === t.selectionStart && r.end === t.selectionEnd) {
|
|
2860
2866
|
y.value = t.selectionStart, b.value = t.selectionEnd, v.value = t.selectionEnd, j = t, A = !1;
|
|
2861
2867
|
return;
|
|
2862
2868
|
}
|
|
2863
|
-
A = !0, f.value = t.text, y.value = t.selectionStart, b.value = t.selectionEnd, v.value = t.selectionEnd, j = t,
|
|
2869
|
+
A = !0, f.value = t.text, y.value = t.selectionStart, b.value = t.selectionEnd, v.value = t.selectionEnd, j = t, Ce(), S(() => {
|
|
2864
2870
|
if (n !== te) return;
|
|
2865
2871
|
if (f.value !== t.text) {
|
|
2866
2872
|
A = !1;
|
|
@@ -2870,27 +2876,27 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2870
2876
|
(!e?.valid || e.start !== t.selectionStart || e.end !== t.selectionEnd) && g.value?.setSelection(t.selectionStart, t.selectionEnd, { focus: !1 }), A = !1;
|
|
2871
2877
|
});
|
|
2872
2878
|
}
|
|
2873
|
-
function
|
|
2879
|
+
function rt(e, t) {
|
|
2874
2880
|
return !!(t && e.text === t.text && e.selectionStart === t.selectionStart && e.selectionEnd === t.selectionEnd && (e.activeCommandId ?? null) === (t.activeCommandId ?? null));
|
|
2875
2881
|
}
|
|
2876
|
-
function
|
|
2877
|
-
if (!
|
|
2882
|
+
function it(e) {
|
|
2883
|
+
if (!Oe(e)) {
|
|
2878
2884
|
if (e.key === "Tab" && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && !e.isComposing && !r.disabled && !I.value && r.placeholder?.trim() && (g.value?.readText() ?? f.value) === "") {
|
|
2879
2885
|
e.preventDefault(), g.value?.insertTextAtSelection(r.placeholder);
|
|
2880
2886
|
return;
|
|
2881
2887
|
}
|
|
2882
|
-
if (!e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && (e.key === "ArrowUp" || e.key === "ArrowDown") &&
|
|
2888
|
+
if (!e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey && (e.key === "ArrowUp" || e.key === "ArrowDown") && at()) {
|
|
2883
2889
|
if (E(e.key)) {
|
|
2884
2890
|
e.preventDefault();
|
|
2885
2891
|
return;
|
|
2886
2892
|
}
|
|
2887
2893
|
if (e.key === "ArrowUp" && r.promptHistoryLoading && f.value === "") {
|
|
2888
|
-
|
|
2894
|
+
ye += 1, e.preventDefault();
|
|
2889
2895
|
return;
|
|
2890
2896
|
}
|
|
2891
2897
|
}
|
|
2892
2898
|
if (e.key === "Tab" && e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
|
2893
|
-
e.preventDefault(), N.value.planMode &&
|
|
2899
|
+
e.preventDefault(), N.value.planMode && tt(!R.value);
|
|
2894
2900
|
return;
|
|
2895
2901
|
}
|
|
2896
2902
|
if (e.key === "Enter") {
|
|
@@ -2898,31 +2904,31 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2898
2904
|
e.preventDefault(), g.value?.insertTextAtSelection("\n");
|
|
2899
2905
|
return;
|
|
2900
2906
|
}
|
|
2901
|
-
if (e.preventDefault(), e.metaKey
|
|
2902
|
-
|
|
2907
|
+
if (e.preventDefault(), e.metaKey !== e.ctrlKey && !e.altKey) {
|
|
2908
|
+
r.isSending ? Y.value ? Je("send") : qe() : Ge();
|
|
2903
2909
|
return;
|
|
2904
2910
|
}
|
|
2905
|
-
!e.metaKey && !e.ctrlKey && !e.altKey &&
|
|
2911
|
+
!e.metaKey && !e.ctrlKey && !e.altKey && Ge();
|
|
2906
2912
|
}
|
|
2907
2913
|
}
|
|
2908
2914
|
}
|
|
2909
|
-
function
|
|
2915
|
+
function at() {
|
|
2910
2916
|
let e = g.value?.getSelectionRange();
|
|
2911
2917
|
return e?.valid ? e.start === e.end && e.end === f.value.length : y.value === b.value && b.value === f.value.length;
|
|
2912
2918
|
}
|
|
2913
|
-
function
|
|
2914
|
-
|
|
2919
|
+
function ot() {
|
|
2920
|
+
ye = 0, T(), Te(), Re(), ft();
|
|
2915
2921
|
}
|
|
2916
|
-
function
|
|
2922
|
+
function st(e) {
|
|
2917
2923
|
let t = e.length;
|
|
2918
|
-
f.value = e, y.value = t, b.value = t, v.value = t,
|
|
2924
|
+
f.value = e, y.value = t, b.value = t, v.value = t, Le(), S(() => {
|
|
2919
2925
|
g.value?.setText(e, t);
|
|
2920
2926
|
});
|
|
2921
2927
|
}
|
|
2922
|
-
function
|
|
2923
|
-
y.value = e.start, b.value = e.end,
|
|
2928
|
+
function ct(e) {
|
|
2929
|
+
y.value = e.start, b.value = e.end, Re(e), lt();
|
|
2924
2930
|
}
|
|
2925
|
-
function
|
|
2931
|
+
function lt() {
|
|
2926
2932
|
if (A) return;
|
|
2927
2933
|
let e = Li({
|
|
2928
2934
|
text: f.value,
|
|
@@ -2930,41 +2936,41 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2930
2936
|
selectionEnd: b.value,
|
|
2931
2937
|
activeCommandId: p.value
|
|
2932
2938
|
});
|
|
2933
|
-
|
|
2939
|
+
rt(e, j) || (j = e, i("update:composerState", e));
|
|
2934
2940
|
}
|
|
2935
|
-
function
|
|
2941
|
+
function ut(e) {
|
|
2936
2942
|
let t = e.clipboardData;
|
|
2937
2943
|
if (!t) return;
|
|
2938
2944
|
let n = t.getData("text/plain"), r = t.files.length > 0 || [...t.types ?? []].includes("text/html");
|
|
2939
2945
|
!n && !r || (e.preventDefault(), n && g.value?.insertTextAtSelection(n));
|
|
2940
2946
|
}
|
|
2941
|
-
function
|
|
2947
|
+
function dt(e) {
|
|
2942
2948
|
y.value = e, b.value = e, v.value = e, S(() => {
|
|
2943
2949
|
g.value?.setCaret(e);
|
|
2944
2950
|
});
|
|
2945
2951
|
}
|
|
2946
|
-
function
|
|
2952
|
+
function ft() {
|
|
2947
2953
|
g.value?.autoResize();
|
|
2948
2954
|
}
|
|
2949
|
-
function
|
|
2955
|
+
function pt(e) {
|
|
2950
2956
|
e?.preserveSelection ? g.value?.setSelection(y.value, b.value) : g.value?.focusEnd();
|
|
2951
2957
|
}
|
|
2952
|
-
return t({ focus:
|
|
2958
|
+
return t({ focus: pt }), (t, n) => (k(), l("form", {
|
|
2953
2959
|
class: C(["codex-chat-theme chat-composer", { "chat-composer--disabled": e.disabled && !e.isSending }]),
|
|
2954
2960
|
"aria-label": "Prompt composer",
|
|
2955
|
-
onSubmit: K(
|
|
2961
|
+
onSubmit: K(Ge, ["prevent"])
|
|
2956
2962
|
}, [
|
|
2957
2963
|
P(t.$slots, "before", {}, void 0, !0),
|
|
2958
|
-
B(
|
|
2964
|
+
B(De) ? (k(), s(Tr, {
|
|
2959
2965
|
key: 0,
|
|
2960
|
-
"active-index": B(
|
|
2961
|
-
"show-file-hint": B(
|
|
2962
|
-
"mention-groups": B(
|
|
2963
|
-
"visible-files": B(
|
|
2964
|
-
"visible-plugins": B(
|
|
2965
|
-
onSelectFile: B(
|
|
2966
|
-
onSelectPlugin: B(
|
|
2967
|
-
onSelectMention: B(
|
|
2966
|
+
"active-index": B(be),
|
|
2967
|
+
"show-file-hint": B(Ee),
|
|
2968
|
+
"mention-groups": B(Ve),
|
|
2969
|
+
"visible-files": B(ze),
|
|
2970
|
+
"visible-plugins": B(Be),
|
|
2971
|
+
onSelectFile: B(Ae),
|
|
2972
|
+
onSelectPlugin: B(je),
|
|
2973
|
+
onSelectMention: B(Me)
|
|
2968
2974
|
}, d({ _: 2 }, [t.$slots["suggestion-item"] ? {
|
|
2969
2975
|
name: "mention",
|
|
2970
2976
|
fn: W((e) => [P(t.$slots, "suggestion-item", x(e, { surface: "menu" }), void 0, !0)]),
|
|
@@ -2979,25 +2985,25 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
2979
2985
|
"onSelectPlugin",
|
|
2980
2986
|
"onSelectMention"
|
|
2981
2987
|
])) : c("", !0),
|
|
2982
|
-
B(
|
|
2988
|
+
B(Fe) ? (k(), s(Br, {
|
|
2983
2989
|
key: 1,
|
|
2984
|
-
"active-index": B(
|
|
2990
|
+
"active-index": B(xe),
|
|
2985
2991
|
plugins: e.plugins,
|
|
2986
|
-
"visible-skills": B(
|
|
2987
|
-
onSelect: B(
|
|
2992
|
+
"visible-skills": B(He),
|
|
2993
|
+
onSelect: B(Ne)
|
|
2988
2994
|
}, null, 8, [
|
|
2989
2995
|
"active-index",
|
|
2990
2996
|
"plugins",
|
|
2991
2997
|
"visible-skills",
|
|
2992
2998
|
"onSelect"
|
|
2993
2999
|
])) : c("", !0),
|
|
2994
|
-
B(
|
|
3000
|
+
B(Ie) ? (k(), s(ni, {
|
|
2995
3001
|
key: 2,
|
|
2996
|
-
"active-index": B(
|
|
2997
|
-
"visible-commands": B(
|
|
2998
|
-
"visible-skills": B(
|
|
2999
|
-
onSelectCommand: B(
|
|
3000
|
-
onSelectSkill: B(
|
|
3002
|
+
"active-index": B(Se),
|
|
3003
|
+
"visible-commands": B(Ue),
|
|
3004
|
+
"visible-skills": B(We),
|
|
3005
|
+
onSelectCommand: B(ke),
|
|
3006
|
+
onSelectSkill: B(Pe)
|
|
3001
3007
|
}, null, 8, [
|
|
3002
3008
|
"active-index",
|
|
3003
3009
|
"visible-commands",
|
|
@@ -3005,10 +3011,10 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
3005
3011
|
"onSelectCommand",
|
|
3006
3012
|
"onSelectSkill"
|
|
3007
3013
|
])) : c("", !0),
|
|
3008
|
-
u("div", Ri, [V.value && (B(
|
|
3014
|
+
u("div", Ri, [V.value && (B(me) || B(he)) ? (k(), s(hn, {
|
|
3009
3015
|
key: 0,
|
|
3010
|
-
recorder: B(
|
|
3011
|
-
recording: B(
|
|
3016
|
+
recorder: B(ge),
|
|
3017
|
+
recording: B(me)
|
|
3012
3018
|
}, null, 8, ["recorder", "recording"])) : (k(), s(ui, {
|
|
3013
3019
|
key: 1,
|
|
3014
3020
|
ref_key: "editorEl",
|
|
@@ -3022,13 +3028,13 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
3022
3028
|
"mention-groups": e.mentionGroups,
|
|
3023
3029
|
plugins: e.plugins,
|
|
3024
3030
|
skills: e.skills,
|
|
3025
|
-
onBlur: B(
|
|
3026
|
-
onClick: B(
|
|
3027
|
-
onCaretChange:
|
|
3028
|
-
onInput:
|
|
3029
|
-
onKeydown:
|
|
3030
|
-
onKeyup: B(
|
|
3031
|
-
onPaste:
|
|
3031
|
+
onBlur: B(we),
|
|
3032
|
+
onClick: B(Re),
|
|
3033
|
+
onCaretChange: ct,
|
|
3034
|
+
onInput: ot,
|
|
3035
|
+
onKeydown: it,
|
|
3036
|
+
onKeyup: B(Re),
|
|
3037
|
+
onPaste: ut
|
|
3032
3038
|
}, d({ _: 2 }, [t.$slots.mention ? {
|
|
3033
3039
|
name: "mention",
|
|
3034
3040
|
fn: W((e) => [P(t.$slots, "mention", x(e, { surface: "composer" }), void 0, !0)]),
|
|
@@ -3062,8 +3068,8 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
3062
3068
|
onAttach: n[1] ||= (e) => t.$emit("attach"),
|
|
3063
3069
|
onSelect: n[2] ||= (e) => t.$emit("menuSelect", e),
|
|
3064
3070
|
onSelectApprovalPreset: n[3] ||= (e) => t.$emit("selectApprovalPreset", e),
|
|
3065
|
-
"onUpdate:goalMode":
|
|
3066
|
-
"onUpdate:planMode":
|
|
3071
|
+
"onUpdate:goalMode": et,
|
|
3072
|
+
"onUpdate:planMode": tt
|
|
3067
3073
|
}, d({ _: 2 }, [t.$slots["menu-icon"] ? {
|
|
3068
3074
|
name: "icon",
|
|
3069
3075
|
fn: W((e) => [P(t.$slots, "menu-icon", w(_(e)), void 0, !0)]),
|
|
@@ -3089,8 +3095,8 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
3089
3095
|
m(zt, {
|
|
3090
3096
|
"plan-mode": R.value,
|
|
3091
3097
|
command: I.value,
|
|
3092
|
-
onDisablePlanMode: n[4] ||= (e) =>
|
|
3093
|
-
onRemoveCommand:
|
|
3098
|
+
onDisablePlanMode: n[4] ||= (e) => tt(!1),
|
|
3099
|
+
onRemoveCommand: Ze
|
|
3094
3100
|
}, null, 8, ["plan-mode", "command"])
|
|
3095
3101
|
]), u("div", Vi, [
|
|
3096
3102
|
F.value.composer.contextUsage ? (k(), s($n, {
|
|
@@ -3125,11 +3131,11 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
3125
3131
|
])) : c("", !0),
|
|
3126
3132
|
V.value ? (k(), s(an, {
|
|
3127
3133
|
key: 2,
|
|
3128
|
-
disabled: B(
|
|
3129
|
-
label: B(
|
|
3130
|
-
recording: B(
|
|
3131
|
-
title: B(
|
|
3132
|
-
onToggle: B(
|
|
3134
|
+
disabled: B(ue),
|
|
3135
|
+
label: B(de),
|
|
3136
|
+
recording: B(me),
|
|
3137
|
+
title: B(fe),
|
|
3138
|
+
onToggle: B(ve)
|
|
3133
3139
|
}, null, 8, [
|
|
3134
3140
|
"disabled",
|
|
3135
3141
|
"label",
|
|
@@ -3143,21 +3149,23 @@ var Ri = { class: "chat-composer__input-row" }, zi = { class: "chat-composer__me
|
|
|
3143
3149
|
"hover-to-enable": q.value,
|
|
3144
3150
|
busy: oe.value,
|
|
3145
3151
|
"interrupt-armed": e.interruptArmed,
|
|
3146
|
-
"submit-label":
|
|
3152
|
+
"submit-label": ce.value,
|
|
3153
|
+
title: le.value,
|
|
3147
3154
|
"interrupt-label": "Codex is working",
|
|
3148
|
-
onClick:
|
|
3155
|
+
onClick: Ke
|
|
3149
3156
|
}, null, 8, [
|
|
3150
3157
|
"disabled",
|
|
3151
3158
|
"hover-to-enable",
|
|
3152
3159
|
"busy",
|
|
3153
3160
|
"interrupt-armed",
|
|
3154
|
-
"submit-label"
|
|
3161
|
+
"submit-label",
|
|
3162
|
+
"title"
|
|
3155
3163
|
]),
|
|
3156
3164
|
P(t.$slots, "after", {}, void 0, !0)
|
|
3157
3165
|
])])
|
|
3158
3166
|
], 34));
|
|
3159
3167
|
}
|
|
3160
|
-
}), [["__scopeId", "data-v-
|
|
3168
|
+
}), [["__scopeId", "data-v-c582d8a1"]]), Ui = { class: "codex-chat-theme chat-tool-confirmation" }, Wi = { class: "chat-tool-confirmation__header" }, Gi = { class: "chat-tool-confirmation__question" }, Ki = {
|
|
3161
3169
|
key: 0,
|
|
3162
3170
|
class: "chat-tool-confirmation__description"
|
|
3163
3171
|
}, qi = {
|
|
@@ -3521,7 +3529,7 @@ function Ta(e) {
|
|
|
3521
3529
|
return (/^\*\*([\s\S]*)\*\*$/u.exec(t)?.[1] ?? /^__([\s\S]*)__$/u.exec(t)?.[1] ?? t).trim().replace(/\s+/gu, " ");
|
|
3522
3530
|
}
|
|
3523
3531
|
function Ea(e) {
|
|
3524
|
-
if (ha.has(
|
|
3532
|
+
if (ha.has(Z(e))) return !0;
|
|
3525
3533
|
let t = Da(e.status);
|
|
3526
3534
|
return t?.source === "codex" && t.action === "plan" || (t?.source === "mcp" || t?.source === "home") && typeof t.params?.requestId == "string" && e.state === "running";
|
|
3527
3535
|
}
|
|
@@ -3575,7 +3583,7 @@ function Fa(e, t, n) {
|
|
|
3575
3583
|
}
|
|
3576
3584
|
function Ia(e, t) {
|
|
3577
3585
|
return t.find((t) => {
|
|
3578
|
-
if (
|
|
3586
|
+
if (Z(t) !== "image_generation") return !1;
|
|
3579
3587
|
let n = Ra(t, "url"), r = Ra(t, "externalUrl"), i = Ra(t, "path");
|
|
3580
3588
|
return e.url === n || e.url === r || e.url === i;
|
|
3581
3589
|
});
|
|
@@ -3890,7 +3898,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
3890
3898
|
let t = e, n = o(() => {
|
|
3891
3899
|
if (t.presentation?.icon === null) return;
|
|
3892
3900
|
if (t.presentation?.icon) return t.presentation.icon;
|
|
3893
|
-
if (
|
|
3901
|
+
if (Q(t.toolCall)) return ke;
|
|
3894
3902
|
if (t.toolCall.kind === "webSearch") return Je;
|
|
3895
3903
|
let e = wn(t.toolCall.status);
|
|
3896
3904
|
if (e) switch (e.action) {
|
|
@@ -4093,15 +4101,15 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4093
4101
|
e.stopPropagation(), !(e.key !== "Enter" || e.isComposing || e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && (e.preventDefault(), S.value && _[S.value.id]?.trim() && J());
|
|
4094
4102
|
}
|
|
4095
4103
|
function J() {
|
|
4096
|
-
w.value ?
|
|
4104
|
+
w.value ? se() : ae();
|
|
4097
4105
|
}
|
|
4098
4106
|
function ae() {
|
|
4099
4107
|
j.value && (a.value += 1);
|
|
4100
4108
|
}
|
|
4101
|
-
function
|
|
4109
|
+
function Y() {
|
|
4102
4110
|
a.value > 0 && --a.value;
|
|
4103
4111
|
}
|
|
4104
|
-
function
|
|
4112
|
+
function se() {
|
|
4105
4113
|
if (!b.value || D.value || O.value || !j.value) return;
|
|
4106
4114
|
let e = x.value.reduce((e, t) => (e[t.id] = le(t), e), {});
|
|
4107
4115
|
d.value = !0, i("client-response", {
|
|
@@ -4223,7 +4231,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4223
4231
|
key: 0,
|
|
4224
4232
|
class: "codex-request-button chat-tool-user-input__button",
|
|
4225
4233
|
type: "button",
|
|
4226
|
-
onClick:
|
|
4234
|
+
onClick: Y
|
|
4227
4235
|
}, " Back ")) : c("", !0), u("button", {
|
|
4228
4236
|
class: "codex-request-button codex-request-button--primary chat-tool-user-input__button chat-tool-user-input__button--primary",
|
|
4229
4237
|
disabled: !j.value,
|
|
@@ -4291,7 +4299,7 @@ var no = Symbol("codex-app-sdk-question-responses"), ro = Symbol("codex-app-sdk-
|
|
|
4291
4299
|
return typeof e == "string" ? e : void 0;
|
|
4292
4300
|
}), d = o(() => {
|
|
4293
4301
|
let e = c.value.confirmationSummary;
|
|
4294
|
-
return typeof e == "string" && e.trim() ? e : `Allow tool call ${
|
|
4302
|
+
return typeof e == "string" && e.trim() ? e : `Allow tool call ${Z(n.toolCall)}?`;
|
|
4295
4303
|
}), f = o(() => {
|
|
4296
4304
|
let e = c.value.argumentsPreview;
|
|
4297
4305
|
if (typeof e == "string") return e;
|
|
@@ -4829,7 +4837,7 @@ var Ds = ["data-codex-theme", "aria-label"], Os = ["alt", "src"], ks = /*#__PURE
|
|
|
4829
4837
|
label: n.value ? e.copiedLabel : e.label,
|
|
4830
4838
|
onClick: i
|
|
4831
4839
|
}, {
|
|
4832
|
-
default: W(() => [n.value ? (k(), s(B(
|
|
4840
|
+
default: W(() => [n.value ? (k(), s(B(Y), { key: 0 })) : (k(), s(B(pe), { key: 1 }))]),
|
|
4833
4841
|
_: 1
|
|
4834
4842
|
}, 8, ["disabled", "label"]));
|
|
4835
4843
|
}
|
|
@@ -5563,7 +5571,7 @@ var ml = {
|
|
|
5563
5571
|
"title-target-parts",
|
|
5564
5572
|
"tool-call",
|
|
5565
5573
|
"tool-presentation"
|
|
5566
|
-
]), e.expandable === !1 ? c("", !0) : (k(), s(I(d.value ? B(le) : B(
|
|
5574
|
+
]), e.expandable === !1 ? c("", !0) : (k(), s(I(d.value ? B(le) : B(se)), {
|
|
5567
5575
|
key: 0,
|
|
5568
5576
|
class: "chat-tool-group__chevron",
|
|
5569
5577
|
size: 15
|
|
@@ -5591,7 +5599,7 @@ var ml = {
|
|
|
5591
5599
|
"title-target-parts",
|
|
5592
5600
|
"tool-call",
|
|
5593
5601
|
"tool-presentation"
|
|
5594
|
-
]), (k(), s(I(d.value ? B(le) : B(
|
|
5602
|
+
]), (k(), s(I(d.value ? B(le) : B(se)), {
|
|
5595
5603
|
class: "chat-tool-call__chevron",
|
|
5596
5604
|
size: 15
|
|
5597
5605
|
}))])) : (k(), l("div", hl, [m(So, {
|
|
@@ -5747,7 +5755,7 @@ var ml = {
|
|
|
5747
5755
|
label: "Total removed lines",
|
|
5748
5756
|
value: T.value.removedLines
|
|
5749
5757
|
}, null, 8, ["value"])) : c("", !0)])) : c("", !0),
|
|
5750
|
-
D.value ? (k(), s(I(d.value ? B(le) : B(
|
|
5758
|
+
D.value ? (k(), s(I(d.value ? B(le) : B(se)), {
|
|
5751
5759
|
key: 1,
|
|
5752
5760
|
class: "chat-tool-group__chevron",
|
|
5753
5761
|
size: 15
|
|
@@ -6077,7 +6085,7 @@ var Ul = { class: "codex-chat-theme chat-user-text codex-markdown" }, Wl = { key
|
|
|
6077
6085
|
}, [u("span", {
|
|
6078
6086
|
class: C(["chat-work-group__title", { "codex-text-shimmer": m.value }]),
|
|
6079
6087
|
"data-label": _.value
|
|
6080
|
-
}, R(_.value), 11, iu), m.value ? c("", !0) : (k(), s(I(h.value ? B(
|
|
6088
|
+
}, R(_.value), 11, iu), m.value ? c("", !0) : (k(), s(I(h.value ? B(se) : B(ce)), {
|
|
6081
6089
|
key: 0,
|
|
6082
6090
|
size: 15
|
|
6083
6091
|
}))], 8, ru)) : c("", !0), g.value ? (k(), s(Bs, {
|
|
@@ -6583,8 +6591,8 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
6583
6591
|
}))), te = o(() => w.value.map((e, t) => ({
|
|
6584
6592
|
block: e,
|
|
6585
6593
|
blockIndex: t
|
|
6586
|
-
}))), F = o(() => h.value.role === "user" ? te.value.filter(({ block: e }) => e.type === "attachment") : []), I = o(() => h.value.role === "user" ? te.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), q = o(() => D.value.some(he)), J = o(() => _.value?.latestStreamingAssistantIndex.value === void 0 || _.value.latestStreamingAssistantIndex.value === r.index), ae = o(() => h.value.role === "assistant" && h.value.streaming !== !0 && w.value.length === 0), oe = o(() => h.value.role === "assistant" && h.value.streaming === !0 && J.value && !q.value),
|
|
6587
|
-
function
|
|
6594
|
+
}))), F = o(() => h.value.role === "user" ? te.value.filter(({ block: e }) => e.type === "attachment") : []), I = o(() => h.value.role === "user" ? te.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), q = o(() => D.value.some(he)), J = o(() => _.value?.latestStreamingAssistantIndex.value === void 0 || _.value.latestStreamingAssistantIndex.value === r.index), ae = o(() => h.value.role === "assistant" && h.value.streaming !== !0 && w.value.length === 0), oe = o(() => h.value.role === "assistant" && h.value.streaming === !0 && J.value && !q.value), Y = o(() => h.value.role === "assistant" && h.value.streaming === !0 && J.value && q.value);
|
|
6595
|
+
function se() {
|
|
6588
6596
|
h.value.role !== "user" || !ie.value || (z.value = !0);
|
|
6589
6597
|
}
|
|
6590
6598
|
function ce() {
|
|
@@ -6662,7 +6670,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
6662
6670
|
}), void 0, !0)]),
|
|
6663
6671
|
key: "0"
|
|
6664
6672
|
} : void 0]), 1032, ["block"])], !0, `attachment-${r}`)), 128))])) : c("", !0),
|
|
6665
|
-
z.value || I.value.length > 0 || ae.value || oe.value ||
|
|
6673
|
+
z.value || I.value.length > 0 || ae.value || oe.value || Y.value ? (k(), l("div", Ou, [z.value ? (k(), s(wu, {
|
|
6666
6674
|
key: 0,
|
|
6667
6675
|
"cancel-label": B(f)("chat.actions.cancel"),
|
|
6668
6676
|
content: L.value,
|
|
@@ -6792,7 +6800,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
6792
6800
|
}, () => [u("span", {
|
|
6793
6801
|
class: "chat-message__thinking codex-text-shimmer",
|
|
6794
6802
|
"data-label": p.value
|
|
6795
|
-
}, R(p.value), 9, Au)], !0, 1) :
|
|
6803
|
+
}, R(p.value), 9, Au)], !0, 1) : Y.value ? P(n.$slots, "status", {
|
|
6796
6804
|
index: e.index,
|
|
6797
6805
|
message: h.value,
|
|
6798
6806
|
status: "streaming"
|
|
@@ -6820,7 +6828,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
6820
6828
|
presentation: S.value.messages.actions,
|
|
6821
6829
|
onCopy: r[10] ||= (t) => i("copy-message", e.index),
|
|
6822
6830
|
onDelete: ue,
|
|
6823
|
-
onEdit:
|
|
6831
|
+
onEdit: se,
|
|
6824
6832
|
onFork: de,
|
|
6825
6833
|
onQuote: r[11] ||= (t) => i("quote-message", e.index),
|
|
6826
6834
|
onRetry: fe
|
|
@@ -7087,7 +7095,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7087
7095
|
function K(e) {
|
|
7088
7096
|
return e === G.value;
|
|
7089
7097
|
}
|
|
7090
|
-
let q = M(null), J = M(!0), ae = M(!1), oe = null,
|
|
7098
|
+
let q = M(null), J = M(!0), ae = M(!1), oe = null, Y = null, se = 0, ce = !1, le = null;
|
|
7091
7099
|
D(async () => {
|
|
7092
7100
|
document.addEventListener("pointerup", me), document.addEventListener("selectionchange", he), await S(), Ie();
|
|
7093
7101
|
let e = q.value?.querySelector(".codex-message-list__content");
|
|
@@ -7130,8 +7138,8 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7130
7138
|
});
|
|
7131
7139
|
function ue() {
|
|
7132
7140
|
ve();
|
|
7133
|
-
let e = q.value, t = e !== null && e.scrollTop <
|
|
7134
|
-
e && (
|
|
7141
|
+
let e = q.value, t = e !== null && e.scrollTop < se;
|
|
7142
|
+
e && (se = e.scrollTop), Pe(), ae.value ? t && Ne(!1) : Ne(!0), m.value === "lazy" && xe() && _.value <= 0 && i.hasOlderMessages && !i.loadingOlderMessages ? be() : m.value === "lazy" && xe() && Se();
|
|
7135
7143
|
}
|
|
7136
7144
|
function de() {
|
|
7137
7145
|
J.value ? Le() : S(Pe);
|
|
@@ -7261,17 +7269,17 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7261
7269
|
return e ? e.scrollHeight - e.scrollTop - e.clientHeight <= i.bottomThreshold : J.value;
|
|
7262
7270
|
}
|
|
7263
7271
|
function Ie() {
|
|
7264
|
-
q.value && (q.value.scrollTop = q.value.scrollHeight,
|
|
7272
|
+
q.value && (q.value.scrollTop = q.value.scrollHeight, se = q.value.scrollTop, Ne(!0), Pe());
|
|
7265
7273
|
}
|
|
7266
7274
|
function Le() {
|
|
7267
|
-
if (
|
|
7275
|
+
if (Y !== null) return;
|
|
7268
7276
|
let e = () => {
|
|
7269
|
-
|
|
7277
|
+
Y = null, J.value && Ie();
|
|
7270
7278
|
};
|
|
7271
|
-
|
|
7279
|
+
Y = typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : setTimeout(e, 0);
|
|
7272
7280
|
}
|
|
7273
7281
|
return E(() => {
|
|
7274
|
-
document.removeEventListener("pointerup", me), document.removeEventListener("selectionchange", he), oe?.disconnect(), oe = null,
|
|
7282
|
+
document.removeEventListener("pointerup", me), document.removeEventListener("selectionchange", he), oe?.disconnect(), oe = null, Y !== null && (typeof Y == "number" && typeof cancelAnimationFrame == "function" ? cancelAnimationFrame(Y) : clearTimeout(Y));
|
|
7275
7283
|
}), n({ scrollToBottom: Ie }), (n, r) => (k(), l("div", {
|
|
7276
7284
|
class: "codex-chat-theme codex-message-list",
|
|
7277
7285
|
"aria-label": e.ariaLabel
|
|
@@ -7540,6 +7548,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7540
7548
|
default: void 0
|
|
7541
7549
|
},
|
|
7542
7550
|
emptySendPrompt: {},
|
|
7551
|
+
followUpBehavior: {},
|
|
7543
7552
|
emptyDescription: { default: "" },
|
|
7544
7553
|
emptyTitle: { default: "Start a conversation with Codex" },
|
|
7545
7554
|
error: {},
|
|
@@ -7628,16 +7637,16 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7628
7637
|
text: i.modelValue,
|
|
7629
7638
|
selectionStart: i.modelValue.length,
|
|
7630
7639
|
selectionEnd: i.modelValue.length
|
|
7631
|
-
})), I = M(F), L = M(F.text), z = M(null), V = M(null), H = M(null), re = 0, ie = 0, G = M(null), K = M([...te.value]), q = /* @__PURE__ */ new Map(), J = M([]), ae = M(!1), oe = 0,
|
|
7632
|
-
let e =
|
|
7633
|
-
return !t || e.some((e) =>
|
|
7634
|
-
}), ce = o(() => A((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? O.value?.activeTurnId : i.activeTurnId)), le = o(() => A((e) => e.identity.turns, () => i.turns ?? O.value?.turns ?? [])), ue = o(() => !ke.value && ce.value == null && (le.value ?? []).at(-1)?.status === "interrupted"), fe = o(() =>
|
|
7640
|
+
})), I = M(F), L = M(F.text), z = M(null), V = M(null), H = M(null), re = 0, ie = 0, G = M(null), K = M([...te.value]), q = /* @__PURE__ */ new Map(), J = M([]), ae = M(!1), oe = 0, Y = o(() => A((e) => e.identity.messages, () => i.messages ?? O.value?.messages ?? [])), se = o(() => {
|
|
7641
|
+
let e = Y.value, t = H.value;
|
|
7642
|
+
return !t || e.some((e) => At(e, t)) ? e : [...e, t.message];
|
|
7643
|
+
}), ce = o(() => A((e) => e.identity.activeTurnId, () => i.activeTurnId === void 0 ? O.value?.activeTurnId : i.activeTurnId)), le = o(() => A((e) => e.identity.turns, () => i.turns ?? O.value?.turns ?? [])), ue = o(() => !ke.value && ce.value == null && (le.value ?? []).at(-1)?.status === "interrupted"), fe = o(() => se.value.flatMap((e) => {
|
|
7635
7644
|
let t = $(e);
|
|
7636
7645
|
if (t.role !== "user") return [];
|
|
7637
7646
|
let n = Ca(t.content);
|
|
7638
7647
|
return n && n !== "(no user instructions)" ? [n] : [];
|
|
7639
|
-
})), pe = o(() => A((e) => e.composer?.promptHistory, () => i.promptHistory)), me = o(() =>
|
|
7640
|
-
let e = /* @__PURE__ */ new Set(), t = new Map((le.value ?? []).map((e, t) => [e.id, t])), n =
|
|
7648
|
+
})), pe = o(() => A((e) => e.composer?.promptHistory, () => i.promptHistory)), me = o(() => xt(pe.value ?? J.value, fe.value)), he = o(() => A((e) => e.thread?.answeredClientRequestIds, () => i.answeredClientRequestIds ?? i.surface?.answeredClientRequestIds)), ge = o(() => /* @__PURE__ */ new Set([...he.value ?? [], ...p.keys()])), _e = o(() => A((e) => e.thread?.clientRequests ?? [], () => i.clientRequests ?? O.value?.clientRequests ?? [])), ve = o(() => {
|
|
7649
|
+
let e = /* @__PURE__ */ new Set(), t = new Map((le.value ?? []).map((e, t) => [e.id, t])), n = Y.value.map($);
|
|
7641
7650
|
for (let [r, i] of n.entries()) for (let a of i.parts ?? []) {
|
|
7642
7651
|
if (a.type !== "question" || a.request.payload.request.delivery !== "async") continue;
|
|
7643
7652
|
let o = a.request.turnId ?? i.turnId, s = o ? t.get(o) : void 0;
|
|
@@ -7651,7 +7660,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7651
7660
|
}), ye = o(() => /* @__PURE__ */ new Set([...g.value, ...ve.value])), be = o(() => {
|
|
7652
7661
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
7653
7662
|
for (let n of _e.value) n.kind !== "ask_user" || n.payload.request.delivery !== "tool" || n.payload.request.questions.length === 0 || ge.value.has(n.id) || (t.add(n.id), e.push(n));
|
|
7654
|
-
for (let n of
|
|
7663
|
+
for (let n of se.value) for (let r of $(n).parts ?? []) r.type !== "question" || r.historical === !0 || r.request.payload.request.questions.length === 0 || t.has(r.request.id) || ge.value.has(r.request.id) || ye.value.has(r.request.id) || (t.add(r.request.id), e.push(r.request));
|
|
7655
7664
|
return e;
|
|
7656
7665
|
}), xe = o(() => be.value.find((e) => e.payload.request.delivery === "tool") ?? be.value.find((e) => e.id === h.value) ?? be.value.find((e) => {
|
|
7657
7666
|
if (e.payload.request.delivery !== "async") return !0;
|
|
@@ -7673,12 +7682,12 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7673
7682
|
root: x,
|
|
7674
7683
|
busy: () => ke.value,
|
|
7675
7684
|
enabled: () => i.escapeInterrupt,
|
|
7676
|
-
onInterrupt:
|
|
7685
|
+
onInterrupt: un
|
|
7677
7686
|
}), 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(() => ({
|
|
7678
7687
|
...Ot,
|
|
7679
7688
|
...T.value ? T.value.capabilities : i.capabilities,
|
|
7680
7689
|
approvalPresets: T.value?.capabilities?.approvalPresets ?? (T.value ? Ot.approvalPresets : i.approvalPresets ?? O.value?.approvalPresets ?? i.capabilities?.approvalPresets) ?? Ot.approvalPresets
|
|
7681
|
-
})), 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.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)),
|
|
7690
|
+
})), at = o(() => A((e) => e.catalogs?.commands ?? [], () => i.commands ?? kt)), ot = o(() => A((e) => e.catalogs?.files ?? [], () => i.files)), st = o(() => A((e) => e.composer?.leadingMenuItems ?? [], () => i.leadingMenuItems)), ct = o(() => A((e) => e.composer?.menuItems ?? [], () => i.menuItems)), lt = o(() => A((e) => e.composer?.modelMenuItems ?? [], () => i.modelMenuItems)), ut = o(() => A((e) => e.composer?.placeholder, () => i.placeholder)), dt = o(() => A((e) => e.composer?.followUpBehavior ?? "queue", () => i.followUpBehavior ?? "queue")), ft = o(() => A((e) => e.policy?.canDeleteTurn ?? !0, () => i.canDeleteTurn)), pt = o(() => A((e) => e.policy?.canEditTurn ?? !0, () => i.canEditTurn)), mt = o(() => A((e) => e.policy?.canForkTurn ?? !1, () => i.canForkTurn)), ht = o(() => A((e) => e.policy?.canRetryTurn ?? !0, () => i.canRetryTurn)), gt = o(() => A((e) => e.policy?.actionsDisabled ?? !1, () => i.actionsDisabled ?? !1)), _t = o(() => ke.value || A((e) => e.policy?.followUpsDisabled ?? !1, () => i.followUpsDisabled ?? !1)), vt = o(() => Re.value), yt = o(() => se.value.length > 0 || ke.value || De.value.length > 0);
|
|
7682
7691
|
U(() => !!(Oe.value || Ce.value || xe.value), async (e, t) => {
|
|
7683
7692
|
if (e || !t) return;
|
|
7684
7693
|
let n = document.activeElement;
|
|
@@ -7698,7 +7707,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7698
7707
|
}, { deep: !0 }), U(te, (e) => {
|
|
7699
7708
|
K.value = [...e];
|
|
7700
7709
|
}), U(rt, (e) => {
|
|
7701
|
-
!e && K.value.length > 0 &&
|
|
7710
|
+
!e && K.value.length > 0 && Kt([]);
|
|
7702
7711
|
}), U(Ne, (e, t) => {
|
|
7703
7712
|
h.value = null, g.value = /* @__PURE__ */ new Set();
|
|
7704
7713
|
let n = H.value;
|
|
@@ -7717,18 +7726,18 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7717
7726
|
selectionEnd: i.modelValue.length
|
|
7718
7727
|
}));
|
|
7719
7728
|
I.value = r, L.value = r.text;
|
|
7720
|
-
}), U(
|
|
7729
|
+
}), U(Y, (e) => {
|
|
7721
7730
|
let t = H.value;
|
|
7722
7731
|
if (t) {
|
|
7723
|
-
if (e.some((e) =>
|
|
7732
|
+
if (e.some((e) => At(e, t))) {
|
|
7724
7733
|
H.value = null;
|
|
7725
7734
|
return;
|
|
7726
7735
|
}
|
|
7727
7736
|
t.hasAdoptedConversationKey && e.length > 0 && (H.value = null);
|
|
7728
7737
|
}
|
|
7729
|
-
}), U([
|
|
7738
|
+
}), U([se, le], () => {
|
|
7730
7739
|
let e = V.value;
|
|
7731
|
-
e && (le.value?.some((t) => t.id === e) ||
|
|
7740
|
+
e && (le.value?.some((t) => t.id === e) || se.value.some((t) => $(t).turnId === e) || (ie += 1, V.value = null));
|
|
7732
7741
|
}), U(Xe, (e) => {
|
|
7733
7742
|
let t = z.value;
|
|
7734
7743
|
t && !e.some((e) => e.id === t) && (z.value = null);
|
|
@@ -7738,13 +7747,13 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7738
7747
|
() => E.value?.readPromptHistory,
|
|
7739
7748
|
pe
|
|
7740
7749
|
], () => {
|
|
7741
|
-
|
|
7750
|
+
bt();
|
|
7742
7751
|
}, { immediate: !0 }), U(() => [O.value?.status, O.value?.error], ([e, t]) => {
|
|
7743
7752
|
e === "ready" && t == null && (G.value = null);
|
|
7744
7753
|
}), D(() => {
|
|
7745
7754
|
i.surface && i.surface.state.status === "idle" && Q(() => i.surface.connect());
|
|
7746
7755
|
});
|
|
7747
|
-
async function
|
|
7756
|
+
async function bt() {
|
|
7748
7757
|
let e = ++oe, t = Ne.value;
|
|
7749
7758
|
if (ae.value = !1, J.value = [], t == null || pe.value !== void 0) return;
|
|
7750
7759
|
let n = q.get(t);
|
|
@@ -7765,7 +7774,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7765
7774
|
}
|
|
7766
7775
|
}
|
|
7767
7776
|
}
|
|
7768
|
-
function
|
|
7777
|
+
function xt(e, t) {
|
|
7769
7778
|
let n = Math.min(e.length, t.length);
|
|
7770
7779
|
for (; n > 0;) {
|
|
7771
7780
|
let r = e.length - n;
|
|
@@ -7774,34 +7783,34 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7774
7783
|
}
|
|
7775
7784
|
return [...e, ...t.slice(n)].slice(-100);
|
|
7776
7785
|
}
|
|
7777
|
-
function
|
|
7778
|
-
|
|
7786
|
+
function St(e, t) {
|
|
7787
|
+
Jt("");
|
|
7779
7788
|
let n = z.value;
|
|
7780
7789
|
if (n) {
|
|
7781
|
-
z.value = null,
|
|
7790
|
+
z.value = null, cn(n, e), Kt([]);
|
|
7782
7791
|
return;
|
|
7783
7792
|
}
|
|
7784
|
-
let r =
|
|
7793
|
+
let r = qt(K.value, t), o = Ct();
|
|
7785
7794
|
if (b.value?.scrollToBottom(), S(() => b.value?.scrollToBottom()), C.value) {
|
|
7786
7795
|
let t = E.value?.submit;
|
|
7787
7796
|
if (t) {
|
|
7788
|
-
let n =
|
|
7797
|
+
let n = Et(e, K.value);
|
|
7789
7798
|
Q(() => Promise.resolve(t(e, r)), () => {
|
|
7790
|
-
|
|
7799
|
+
jt(n), g.value = o;
|
|
7791
7800
|
});
|
|
7792
7801
|
}
|
|
7793
|
-
|
|
7802
|
+
Kt([]);
|
|
7794
7803
|
return;
|
|
7795
7804
|
}
|
|
7796
7805
|
r ? a("submit", e, r) : a("submit", e), i.surface && Q(() => i.surface.sendMessage(e, r), () => {
|
|
7797
7806
|
g.value = o;
|
|
7798
|
-
}),
|
|
7807
|
+
}), Kt([]);
|
|
7799
7808
|
}
|
|
7800
|
-
function
|
|
7809
|
+
function Ct() {
|
|
7801
7810
|
let e = g.value;
|
|
7802
7811
|
return g.value = /* @__PURE__ */ new Set([...e, ...be.value.filter((e) => e.payload.request.delivery === "async").map((e) => e.id)]), h.value = null, e;
|
|
7803
7812
|
}
|
|
7804
|
-
function
|
|
7813
|
+
function wt(e) {
|
|
7805
7814
|
if (!be.value.some((t) => t.id === e)) return;
|
|
7806
7815
|
let t = {
|
|
7807
7816
|
id: e,
|
|
@@ -7810,13 +7819,13 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7810
7819
|
cancelled: !0
|
|
7811
7820
|
}
|
|
7812
7821
|
};
|
|
7813
|
-
p.set(e, t.payload), g.value = /* @__PURE__ */ new Set([...g.value, e]), h.value = null,
|
|
7822
|
+
p.set(e, t.payload), g.value = /* @__PURE__ */ new Set([...g.value, e]), h.value = null, Zt(t);
|
|
7814
7823
|
}
|
|
7815
|
-
function
|
|
7824
|
+
function Tt() {
|
|
7816
7825
|
Z("continueInterruptedTurn") || C.value || (a("continueInterruptedTurn"), i.surface && Q(() => i.surface.continueInterruptedTurn()));
|
|
7817
7826
|
}
|
|
7818
|
-
function
|
|
7819
|
-
if (ke.value ||
|
|
7827
|
+
function Et(e, t) {
|
|
7828
|
+
if (ke.value || Y.value.length > 0) return null;
|
|
7820
7829
|
let n = `codex-optimistic-user-${++re}`;
|
|
7821
7830
|
return H.value = {
|
|
7822
7831
|
adoptedConversationKey: null,
|
|
@@ -7843,14 +7852,14 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7843
7852
|
}
|
|
7844
7853
|
}, n;
|
|
7845
7854
|
}
|
|
7846
|
-
function
|
|
7855
|
+
function At(e, t) {
|
|
7847
7856
|
let n = $(e);
|
|
7848
7857
|
return n.role === "user" && Ca(n.content) === t.prompt;
|
|
7849
7858
|
}
|
|
7850
|
-
function
|
|
7859
|
+
function jt(e) {
|
|
7851
7860
|
e && H.value?.message.id === e && (H.value = null);
|
|
7852
7861
|
}
|
|
7853
|
-
function
|
|
7862
|
+
function Mt() {
|
|
7854
7863
|
if (!Z("loadOlderHistory") && !C.value) {
|
|
7855
7864
|
if (i.surface && Ne.value) {
|
|
7856
7865
|
Q(() => i.surface.loadOlderConversationHistory(String(Ne.value)));
|
|
@@ -7859,97 +7868,97 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7859
7868
|
a("loadOlderHistory");
|
|
7860
7869
|
}
|
|
7861
7870
|
}
|
|
7862
|
-
function
|
|
7863
|
-
let t =
|
|
7871
|
+
function Nt(e) {
|
|
7872
|
+
let t = se.value[e];
|
|
7864
7873
|
if (!t) return;
|
|
7865
7874
|
let n = $(t), r = Ca(n.content);
|
|
7866
|
-
n.role !== "user" || !r || (
|
|
7875
|
+
n.role !== "user" || !r || (Jt(r), !Z("quoteMessage", e) && (C.value || a("quoteMessage", e)));
|
|
7867
7876
|
}
|
|
7868
|
-
function
|
|
7877
|
+
function Pt() {
|
|
7869
7878
|
if (!Le.value?.objective.trim()) return;
|
|
7870
7879
|
let e = Le.value.objective;
|
|
7871
|
-
|
|
7880
|
+
Yt({
|
|
7872
7881
|
text: e,
|
|
7873
7882
|
selectionStart: e.length,
|
|
7874
7883
|
selectionEnd: e.length,
|
|
7875
7884
|
activeCommandId: "codex.goal"
|
|
7876
7885
|
}), !Z("editGoal") && (C.value || a("editGoal"));
|
|
7877
7886
|
}
|
|
7878
|
-
function
|
|
7887
|
+
function X(e) {
|
|
7879
7888
|
let t = (e.target instanceof Element ? e.target : null)?.closest("a[href]");
|
|
7880
7889
|
if (!t) return;
|
|
7881
7890
|
let n = t.getAttribute("href")?.trim() ?? "";
|
|
7882
7891
|
if (!n || n.startsWith("#")) return;
|
|
7883
7892
|
e.preventDefault();
|
|
7884
7893
|
let r = _n(n);
|
|
7885
|
-
r &&
|
|
7894
|
+
r && Ft(r);
|
|
7886
7895
|
}
|
|
7887
|
-
function
|
|
7896
|
+
function Ft(e) {
|
|
7888
7897
|
if (!Z("openLink", e) && !C.value) {
|
|
7889
7898
|
if (a("openLink", e), i.openConversationLink) {
|
|
7890
|
-
Promise.resolve(i.openConversationLink(e)).catch(
|
|
7899
|
+
Promise.resolve(i.openConversationLink(e)).catch(xn);
|
|
7891
7900
|
return;
|
|
7892
7901
|
}
|
|
7893
|
-
e.kind === "external" && (f ? f.openExternal(e.href).catch(
|
|
7902
|
+
e.kind === "external" && (f ? f.openExternal(e.href).catch(xn) : window.open(e.href, "_blank", "noopener,noreferrer"));
|
|
7894
7903
|
}
|
|
7895
7904
|
}
|
|
7896
|
-
function
|
|
7897
|
-
Z("openVisualization", e) || C.value || (a("openVisualization", e), i.openVisualization && Promise.resolve(i.openVisualization(e)).catch(
|
|
7905
|
+
function It(e) {
|
|
7906
|
+
Z("openVisualization", e) || C.value || (a("openVisualization", e), i.openVisualization && Promise.resolve(i.openVisualization(e)).catch(xn));
|
|
7898
7907
|
}
|
|
7899
|
-
async function
|
|
7908
|
+
async function Lt(e, t) {
|
|
7900
7909
|
let n = C.value ? E.value?.openImage : i.openImage;
|
|
7901
7910
|
if (!n) return !1;
|
|
7902
7911
|
G.value = null;
|
|
7903
7912
|
try {
|
|
7904
7913
|
return await n(e, t) !== !1;
|
|
7905
7914
|
} catch (e) {
|
|
7906
|
-
return
|
|
7915
|
+
return xn(e), !0;
|
|
7907
7916
|
}
|
|
7908
7917
|
}
|
|
7909
|
-
async function
|
|
7918
|
+
async function Rt() {
|
|
7910
7919
|
if (!Z("attach") && (C.value || a("attach"), rt.value)) try {
|
|
7911
|
-
|
|
7920
|
+
Wt(await Mi(i.pickAttachments, f));
|
|
7912
7921
|
} catch (e) {
|
|
7913
|
-
|
|
7922
|
+
xn(e);
|
|
7914
7923
|
}
|
|
7915
7924
|
}
|
|
7916
|
-
function
|
|
7925
|
+
function zt(e) {
|
|
7917
7926
|
rt.value && e.dataTransfer?.types.includes("Files") && e.preventDefault();
|
|
7918
7927
|
}
|
|
7919
|
-
function
|
|
7928
|
+
function Bt(e) {
|
|
7920
7929
|
if (!rt.value) return;
|
|
7921
7930
|
let t = [...e.dataTransfer?.files ?? []];
|
|
7922
|
-
t.length !== 0 && (e.preventDefault(),
|
|
7923
|
-
}
|
|
7924
|
-
function Bt(e) {
|
|
7925
|
-
let t = Vt(e).filter((e) => e.type.startsWith("image/"));
|
|
7926
|
-
t.length !== 0 && (e.preventDefault(), rt.value && Ht(t));
|
|
7931
|
+
t.length !== 0 && (e.preventDefault(), Ut(t));
|
|
7927
7932
|
}
|
|
7928
7933
|
function Vt(e) {
|
|
7934
|
+
let t = Ht(e).filter((e) => e.type.startsWith("image/"));
|
|
7935
|
+
t.length !== 0 && (e.preventDefault(), rt.value && Ut(t));
|
|
7936
|
+
}
|
|
7937
|
+
function Ht(e) {
|
|
7929
7938
|
let t = e.clipboardData;
|
|
7930
7939
|
if (!t) return [];
|
|
7931
7940
|
let n = [...t.files];
|
|
7932
7941
|
return n.length > 0 ? n : [...t.items ?? []].filter((e) => e.kind === "file").map((e) => e.getAsFile()).filter((e) => e !== null);
|
|
7933
7942
|
}
|
|
7934
|
-
async function
|
|
7943
|
+
async function Ut(e) {
|
|
7935
7944
|
try {
|
|
7936
|
-
|
|
7945
|
+
Wt(await Ni(e, i.ingestAttachments, f));
|
|
7937
7946
|
} catch (e) {
|
|
7938
|
-
|
|
7947
|
+
xn(e);
|
|
7939
7948
|
}
|
|
7940
7949
|
}
|
|
7941
|
-
function
|
|
7950
|
+
function Wt(e) {
|
|
7942
7951
|
let t = new Map(K.value.map((e) => [e.reference, e]));
|
|
7943
7952
|
for (let n of e) t.set(n.reference, n);
|
|
7944
|
-
|
|
7945
|
-
}
|
|
7946
|
-
function Wt(e) {
|
|
7947
|
-
Gt(K.value.filter((t) => t.id !== e));
|
|
7953
|
+
Kt([...t.values()].slice(0, 20));
|
|
7948
7954
|
}
|
|
7949
7955
|
function Gt(e) {
|
|
7956
|
+
Kt(K.value.filter((t) => t.id !== e));
|
|
7957
|
+
}
|
|
7958
|
+
function Kt(e) {
|
|
7950
7959
|
K.value = e, !Z("updateAttachments", e) && (C.value || a("attachmentsChange", e));
|
|
7951
7960
|
}
|
|
7952
|
-
function
|
|
7961
|
+
function qt(e, t) {
|
|
7953
7962
|
if (e.length === 0) return t;
|
|
7954
7963
|
let n = e.map((e) => e.type === "image" ? {
|
|
7955
7964
|
type: "image",
|
|
@@ -7963,27 +7972,27 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7963
7972
|
attachments: n
|
|
7964
7973
|
};
|
|
7965
7974
|
}
|
|
7966
|
-
function
|
|
7967
|
-
|
|
7975
|
+
function Jt(e) {
|
|
7976
|
+
Yt({
|
|
7968
7977
|
text: e,
|
|
7969
7978
|
selectionStart: e.length,
|
|
7970
7979
|
selectionEnd: e.length
|
|
7971
7980
|
});
|
|
7972
7981
|
}
|
|
7973
|
-
function
|
|
7982
|
+
function Yt(e) {
|
|
7974
7983
|
let t = Li(e);
|
|
7975
7984
|
I.value = t, L.value = t.text, !Z("updateComposerState", t) && (C.value || (a("update:modelValue", t.text), a("update:composerState", t)));
|
|
7976
7985
|
}
|
|
7977
|
-
function
|
|
7986
|
+
function Xt() {
|
|
7978
7987
|
Z("cancel") || C.value || (a("cancel"), i.surface && Q(() => i.surface.interrupt()));
|
|
7979
7988
|
}
|
|
7980
|
-
function
|
|
7989
|
+
function Zt(e) {
|
|
7981
7990
|
Z("clientResponse", e) || C.value || (a("clientResponse", e), i.surface && Q(() => i.surface.respondToClientRequest(e)));
|
|
7982
7991
|
}
|
|
7983
|
-
function
|
|
7992
|
+
function Qt(e) {
|
|
7984
7993
|
Z("onMessageCopied", e) || C.value || a("copyMessage", e);
|
|
7985
7994
|
}
|
|
7986
|
-
async function
|
|
7995
|
+
async function $t(e) {
|
|
7987
7996
|
if (V.value !== null) return;
|
|
7988
7997
|
let t = E.value?.deleteTurn;
|
|
7989
7998
|
if (C.value && !t) return;
|
|
@@ -7996,7 +8005,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
7996
8005
|
try {
|
|
7997
8006
|
n = t(e);
|
|
7998
8007
|
} catch (e) {
|
|
7999
|
-
|
|
8008
|
+
xn(e);
|
|
8000
8009
|
return;
|
|
8001
8010
|
}
|
|
8002
8011
|
if (n === void 0) {
|
|
@@ -8011,66 +8020,66 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8011
8020
|
!r && ie === n && (V.value = null);
|
|
8012
8021
|
}
|
|
8013
8022
|
}
|
|
8014
|
-
function
|
|
8023
|
+
function en(e) {
|
|
8015
8024
|
Z("editTurn", e) || C.value || (a("editTurn", e), i.surface && Q(() => i.surface.editTurn(e.turnId, e.content)));
|
|
8016
8025
|
}
|
|
8017
|
-
function
|
|
8026
|
+
function tn(e) {
|
|
8018
8027
|
Z("forkTurn", e) || C.value || (a("forkTurn", e), i.surface && Q(() => i.surface.forkTurn(e)));
|
|
8019
8028
|
}
|
|
8020
|
-
function
|
|
8029
|
+
function nn(e) {
|
|
8021
8030
|
Z("retryTurn", e) || C.value || (a("retryTurn", e), i.surface && Q(() => i.surface.retryTurn(e)));
|
|
8022
8031
|
}
|
|
8023
|
-
function
|
|
8032
|
+
function rn(e) {
|
|
8024
8033
|
Z("sendFollowUp", e) || C.value || (a("sendFollowUp", e), i.surface && Q(() => i.surface.sendMessage(e)));
|
|
8025
8034
|
}
|
|
8026
|
-
function
|
|
8035
|
+
function an() {
|
|
8027
8036
|
Z("clearGoal") || C.value || (a("clearGoal"), i.surface && Q(() => i.surface.clearGoal()));
|
|
8028
8037
|
}
|
|
8029
|
-
function
|
|
8038
|
+
function on(e) {
|
|
8030
8039
|
z.value === e && (z.value = null), !Z("deleteQueuedPrompt", e) && (C.value || (a("deleteQueuedPrompt", e), i.surface && Q(() => i.surface.deleteQueuedPrompt(e))));
|
|
8031
8040
|
}
|
|
8032
|
-
function
|
|
8041
|
+
function sn(e) {
|
|
8033
8042
|
if (L.value.length > 0) return;
|
|
8034
8043
|
let t = Xe.value.find((t) => t.id === e);
|
|
8035
|
-
t && (z.value = e,
|
|
8044
|
+
t && (z.value = e, Jt(t.text), v.value?.focus());
|
|
8036
8045
|
}
|
|
8037
|
-
function
|
|
8046
|
+
function cn(e, t) {
|
|
8038
8047
|
Z("updateQueuedPrompt", e, t) || C.value || (a("updateQueuedPrompt", e, t), i.surface && Q(() => i.surface.updateQueuedPrompt(e, t)));
|
|
8039
8048
|
}
|
|
8040
|
-
function
|
|
8049
|
+
function ln(e, t) {
|
|
8041
8050
|
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))));
|
|
8042
8051
|
}
|
|
8043
|
-
function
|
|
8052
|
+
function un() {
|
|
8044
8053
|
Me(), !Z("interrupt") && (C.value || (a("interrupt"), i.surface && Q(() => i.surface.interrupt())));
|
|
8045
8054
|
}
|
|
8046
|
-
function
|
|
8055
|
+
function dn(e, t) {
|
|
8047
8056
|
if (!it.value.steerPrompt) {
|
|
8048
|
-
|
|
8057
|
+
St(e, t);
|
|
8049
8058
|
return;
|
|
8050
8059
|
}
|
|
8051
8060
|
let n = z.value;
|
|
8052
8061
|
if (n) {
|
|
8053
|
-
z.value = null,
|
|
8062
|
+
z.value = null, ln(n, e), Kt([]);
|
|
8054
8063
|
return;
|
|
8055
8064
|
}
|
|
8056
|
-
let r =
|
|
8065
|
+
let r = qt(K.value, t);
|
|
8057
8066
|
if (C.value) {
|
|
8058
8067
|
let t = E.value?.steer;
|
|
8059
8068
|
if (t) {
|
|
8060
|
-
let n =
|
|
8069
|
+
let n = Ct();
|
|
8061
8070
|
Q(() => Promise.resolve(t(e, r)), () => {
|
|
8062
8071
|
g.value = n;
|
|
8063
8072
|
});
|
|
8064
8073
|
}
|
|
8065
|
-
|
|
8074
|
+
Kt([]);
|
|
8066
8075
|
return;
|
|
8067
8076
|
}
|
|
8068
|
-
let o =
|
|
8077
|
+
let o = Ct();
|
|
8069
8078
|
r ? a("steer", e, r) : a("steer", e), i.surface && Q(() => i.surface.steerMessage(e, r), () => {
|
|
8070
8079
|
g.value = o;
|
|
8071
|
-
}),
|
|
8080
|
+
}), Kt([]);
|
|
8072
8081
|
}
|
|
8073
|
-
function
|
|
8082
|
+
function fn(e) {
|
|
8074
8083
|
if (!Z("selectApprovalPreset", e)) {
|
|
8075
8084
|
if (C.value) {
|
|
8076
8085
|
Z("updateSettings", { approvalPreset: e });
|
|
@@ -8079,25 +8088,25 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8079
8088
|
a("selectApprovalPreset", e), i.surface && Q(() => i.surface.updateConversationSettings({ approvalPreset: e }));
|
|
8080
8089
|
}
|
|
8081
8090
|
}
|
|
8082
|
-
function
|
|
8091
|
+
function pn(e, t, n) {
|
|
8083
8092
|
Z("resolveApproval", e, t, n) || C.value || (a("resolveApproval", e, t, n), i.surface && Q(() => i.surface.resolveApproval(e, t, n)));
|
|
8084
8093
|
}
|
|
8085
|
-
function
|
|
8094
|
+
function mn(e) {
|
|
8086
8095
|
Z("updateSettings", { modelId: e }) || C.value || (a("update:modelId", e), i.surface && Q(() => i.surface.updateConversationSettings({ modelId: e })));
|
|
8087
8096
|
}
|
|
8088
|
-
function
|
|
8097
|
+
function hn(e) {
|
|
8089
8098
|
Z("updateSettings", { planMode: e }) || C.value || (a("update:planMode", e), i.surface && Q(() => i.surface.updateConversationSettings({ planMode: e })));
|
|
8090
8099
|
}
|
|
8091
|
-
function
|
|
8100
|
+
function gn(e) {
|
|
8092
8101
|
Z("updateSettings", { reasoningEffort: e }) || C.value || (a("update:reasoningEffort", e), i.surface && Q(() => i.surface.updateConversationSettings({ reasoningEffort: e })));
|
|
8093
8102
|
}
|
|
8094
|
-
function
|
|
8103
|
+
function vn(e) {
|
|
8095
8104
|
Z("updateSettings", { serviceTier: e }) || C.value || (a("update:serviceTier", e), i.surface && Q(() => i.surface.updateConversationSettings({ serviceTier: e })));
|
|
8096
8105
|
}
|
|
8097
|
-
function
|
|
8106
|
+
function yn(e) {
|
|
8098
8107
|
Z("menuSelect", e) || C.value || a("menuSelect", e);
|
|
8099
8108
|
}
|
|
8100
|
-
function
|
|
8109
|
+
function bn(e, t) {
|
|
8101
8110
|
Z("mentionSelect", e, t) || C.value || a("mentionSelect", e, t);
|
|
8102
8111
|
}
|
|
8103
8112
|
function Z(e, ...t) {
|
|
@@ -8109,30 +8118,30 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8109
8118
|
try {
|
|
8110
8119
|
await e();
|
|
8111
8120
|
} catch (e) {
|
|
8112
|
-
t?.(),
|
|
8121
|
+
t?.(), xn(e);
|
|
8113
8122
|
}
|
|
8114
8123
|
}
|
|
8115
|
-
function
|
|
8124
|
+
function xn(e) {
|
|
8116
8125
|
G.value = e instanceof Error ? e.message : String(e);
|
|
8117
8126
|
}
|
|
8118
|
-
function
|
|
8127
|
+
function Sn(e) {
|
|
8119
8128
|
G.value = e, a("error", e);
|
|
8120
8129
|
}
|
|
8121
|
-
function
|
|
8130
|
+
function Cn() {
|
|
8122
8131
|
v.value?.focus();
|
|
8123
8132
|
}
|
|
8124
|
-
return n({ focusComposer:
|
|
8133
|
+
return n({ focusComposer: Cn }), (n, r) => (k(), l("section", {
|
|
8125
8134
|
ref_key: "paneElement",
|
|
8126
8135
|
ref: x,
|
|
8127
8136
|
class: "codex-chat-theme codex-conversation-pane",
|
|
8128
8137
|
"aria-busy": Ae.value || Re.value,
|
|
8129
8138
|
"aria-label": e.ariaLabel,
|
|
8130
8139
|
"data-codex-generating": Ae.value ? "true" : void 0,
|
|
8131
|
-
onClick:
|
|
8132
|
-
onDragover:
|
|
8133
|
-
onDrop:
|
|
8134
|
-
onPasteCapture:
|
|
8135
|
-
}, [
|
|
8140
|
+
onClick: X,
|
|
8141
|
+
onDragover: zt,
|
|
8142
|
+
onDrop: Bt,
|
|
8143
|
+
onPasteCapture: Vt
|
|
8144
|
+
}, [vt.value ? (k(), s(Ss, {
|
|
8136
8145
|
key: 0,
|
|
8137
8146
|
class: "codex-conversation-pane__history-loader"
|
|
8138
8147
|
})) : (k(), s(Gu, {
|
|
@@ -8148,18 +8157,18 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8148
8157
|
key: Oe.value.id,
|
|
8149
8158
|
approval: Oe.value,
|
|
8150
8159
|
disabled: Fe.value,
|
|
8151
|
-
onResolve: r[1] ||= (e, t) =>
|
|
8160
|
+
onResolve: r[1] ||= (e, t) => pn(Oe.value.id, e, t)
|
|
8152
8161
|
}, null, 8, ["approval", "disabled"]))], !0)])) : Ce.value ? (k(), s($o, {
|
|
8153
8162
|
key: Ce.value.id,
|
|
8154
8163
|
class: "codex-conversation-pane__confirmation-composer",
|
|
8155
8164
|
request: Ce.value,
|
|
8156
|
-
onClientResponse:
|
|
8165
|
+
onClientResponse: Zt
|
|
8157
8166
|
}, null, 8, ["request"])) : xe.value ? (k(), s(Xo, {
|
|
8158
8167
|
key: xe.value.id,
|
|
8159
8168
|
class: "codex-conversation-pane__question-composer",
|
|
8160
8169
|
"answered-client-request-ids": ge.value,
|
|
8161
8170
|
request: xe.value,
|
|
8162
|
-
onClientResponse:
|
|
8171
|
+
onClientResponse: Zt
|
|
8163
8172
|
}, null, 8, ["answered-client-request-ids", "request"])) : (k(), l(t, { key: 4 }, [
|
|
8164
8173
|
P(n.$slots, "before-composer", {}, void 0, !0),
|
|
8165
8174
|
m(vs, {
|
|
@@ -8171,11 +8180,11 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8171
8180
|
"queued-prompt-edit-disabled": L.value.length > 0,
|
|
8172
8181
|
"queued-prompt-steer-disabled": !it.value.steerPrompt,
|
|
8173
8182
|
"turn-git-diff": nt.value,
|
|
8174
|
-
onClearGoal:
|
|
8175
|
-
onDeleteQueuedPrompt:
|
|
8176
|
-
onEditQueuedPrompt:
|
|
8177
|
-
onEditGoal:
|
|
8178
|
-
onSteerQueuedPrompt:
|
|
8183
|
+
onClearGoal: an,
|
|
8184
|
+
onDeleteQueuedPrompt: on,
|
|
8185
|
+
onEditQueuedPrompt: sn,
|
|
8186
|
+
onEditGoal: Pt,
|
|
8187
|
+
onSteerQueuedPrompt: ln
|
|
8179
8188
|
}, d({ _: 2 }, [n.$slots["composer-shelf-actions"] ? {
|
|
8180
8189
|
name: "actions",
|
|
8181
8190
|
fn: W((e) => [P(n.$slots, "composer-shelf-actions", w(_(e)), void 0, !0)]),
|
|
@@ -8204,6 +8213,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8204
8213
|
disabled: Fe.value,
|
|
8205
8214
|
draft: L.value,
|
|
8206
8215
|
"empty-send-prompt": e.emptySendPrompt,
|
|
8216
|
+
"follow-up-behavior": dt.value,
|
|
8207
8217
|
files: ot.value,
|
|
8208
8218
|
"has-attachments": K.value.length > 0,
|
|
8209
8219
|
"has-external-content": e.hasComposerContext,
|
|
@@ -8229,27 +8239,27 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8229
8239
|
"skill-catalog-status": et.value,
|
|
8230
8240
|
skills: tt.value,
|
|
8231
8241
|
"transcribe-audio": e.transcribeAudio,
|
|
8232
|
-
onError:
|
|
8233
|
-
onAttach:
|
|
8234
|
-
onContinueInterruptedTurn:
|
|
8235
|
-
onInterrupt:
|
|
8236
|
-
onMenuSelect:
|
|
8237
|
-
onMentionSelect:
|
|
8238
|
-
onSelectApprovalPreset:
|
|
8239
|
-
onSend:
|
|
8240
|
-
onSteer:
|
|
8241
|
-
onSteerQueuedPrompt:
|
|
8242
|
-
"onUpdate:modelId":
|
|
8243
|
-
"onUpdate:composerState":
|
|
8244
|
-
"onUpdate:planMode":
|
|
8245
|
-
"onUpdate:reasoningEffort":
|
|
8246
|
-
"onUpdate:serviceTier":
|
|
8242
|
+
onError: Sn,
|
|
8243
|
+
onAttach: Rt,
|
|
8244
|
+
onContinueInterruptedTurn: Tt,
|
|
8245
|
+
onInterrupt: un,
|
|
8246
|
+
onMenuSelect: yn,
|
|
8247
|
+
onMentionSelect: bn,
|
|
8248
|
+
onSelectApprovalPreset: fn,
|
|
8249
|
+
onSend: St,
|
|
8250
|
+
onSteer: dn,
|
|
8251
|
+
onSteerQueuedPrompt: ln,
|
|
8252
|
+
"onUpdate:modelId": mn,
|
|
8253
|
+
"onUpdate:composerState": Yt,
|
|
8254
|
+
"onUpdate:planMode": hn,
|
|
8255
|
+
"onUpdate:reasoningEffort": gn,
|
|
8256
|
+
"onUpdate:serviceTier": vn
|
|
8247
8257
|
}, d({
|
|
8248
8258
|
"before-meta": W(() => [be.value.length > 0 ? (k(), l("span", Qu, [u("button", {
|
|
8249
8259
|
class: "codex-conversation-pane__pending-question-cancel",
|
|
8250
8260
|
type: "button",
|
|
8251
8261
|
"aria-label": "Cancel pending question",
|
|
8252
|
-
onClick: r[2] ||= (e) =>
|
|
8262
|
+
onClick: r[2] ||= (e) => wt(be.value[0].id)
|
|
8253
8263
|
}, [m(B(Te), {
|
|
8254
8264
|
class: "codex-conversation-pane__pending-question-icon",
|
|
8255
8265
|
"aria-hidden": "true"
|
|
@@ -8285,7 +8295,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8285
8295
|
class: "codex-conversation-pane__attachment-remove",
|
|
8286
8296
|
"aria-label": `Remove ${e.name}`,
|
|
8287
8297
|
disabled: Fe.value,
|
|
8288
|
-
onClick: (t) =>
|
|
8298
|
+
onClick: (t) => Gt(e.id)
|
|
8289
8299
|
}, [m(B(Ye), { "aria-hidden": "true" })], 8, ad)])
|
|
8290
8300
|
]))), 128))])) : c("", !0), P(n.$slots, "composer-context", { disabled: Fe.value }, void 0, !0)]),
|
|
8291
8301
|
_: 2
|
|
@@ -8320,26 +8330,26 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8320
8330
|
fn: W(() => [P(n.$slots, "composer-after", {}, void 0, !0)]),
|
|
8321
8331
|
key: "5"
|
|
8322
8332
|
} : void 0
|
|
8323
|
-
]), 1032, /* @__PURE__ */ "autofocus.attach-enabled.capabilities.can-continue-interrupted-turn.commands.composer-state.context-usage.disabled.draft.empty-send-prompt.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("."))),
|
|
8333
|
+
]), 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("."))),
|
|
8324
8334
|
P(n.$slots, "after-composer", {}, void 0, !0)
|
|
8325
8335
|
], 64))], 512)]),
|
|
8326
|
-
default: W(() => [
|
|
8336
|
+
default: W(() => [yt.value ? (k(), s(Vu, {
|
|
8327
8337
|
key: 0,
|
|
8328
8338
|
ref_key: "messageList",
|
|
8329
8339
|
ref: b,
|
|
8330
8340
|
class: "codex-conversation-pane__messages",
|
|
8331
|
-
"actions-disabled":
|
|
8341
|
+
"actions-disabled": gt.value,
|
|
8332
8342
|
"active-turn-id": ce.value,
|
|
8333
8343
|
"answered-client-request-ids": ge.value,
|
|
8334
8344
|
"aria-label": e.ariaLabel,
|
|
8335
8345
|
busy: Ae.value,
|
|
8336
|
-
"can-delete-turn":
|
|
8337
|
-
"can-edit-turn":
|
|
8338
|
-
"can-fork-turn":
|
|
8339
|
-
"can-retry-turn":
|
|
8346
|
+
"can-delete-turn": ft.value,
|
|
8347
|
+
"can-edit-turn": pt.value,
|
|
8348
|
+
"can-fork-turn": mt.value,
|
|
8349
|
+
"can-retry-turn": ht.value,
|
|
8340
8350
|
"deleting-turn-id": V.value,
|
|
8341
8351
|
"empty-label": e.emptyTitle,
|
|
8342
|
-
"follow-ups-disabled":
|
|
8352
|
+
"follow-ups-disabled": _t.value,
|
|
8343
8353
|
"has-older-messages": Be.value,
|
|
8344
8354
|
"hidden-client-request-ids": Se.value,
|
|
8345
8355
|
"render-strategy": ze.value,
|
|
@@ -8347,9 +8357,9 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8347
8357
|
"initial-message-batch-size": e.initialMessageBatchSize,
|
|
8348
8358
|
"message-batch-size": e.messageBatchSize,
|
|
8349
8359
|
"message-text-selection": e.messageTextSelection,
|
|
8350
|
-
messages:
|
|
8360
|
+
messages: se.value,
|
|
8351
8361
|
"mention-groups": qe.value,
|
|
8352
|
-
"open-image":
|
|
8362
|
+
"open-image": Lt,
|
|
8353
8363
|
plugins: Ke.value,
|
|
8354
8364
|
presentation: Je.value,
|
|
8355
8365
|
"reset-key": Ne.value,
|
|
@@ -8359,19 +8369,19 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8359
8369
|
"tool-visibility": e.toolVisibility,
|
|
8360
8370
|
"transform-message": ye.value.size > 0 || we.value.size > 0 ? Ee : e.transformMessage,
|
|
8361
8371
|
turns: le.value,
|
|
8362
|
-
onCancel:
|
|
8363
|
-
onClientResponse:
|
|
8364
|
-
onCopyMessage:
|
|
8365
|
-
onDeleteTurn:
|
|
8366
|
-
onEditTurn:
|
|
8367
|
-
onForkTurn:
|
|
8368
|
-
onLoadOlderMessages:
|
|
8372
|
+
onCancel: Xt,
|
|
8373
|
+
onClientResponse: Zt,
|
|
8374
|
+
onCopyMessage: Qt,
|
|
8375
|
+
onDeleteTurn: $t,
|
|
8376
|
+
onEditTurn: en,
|
|
8377
|
+
onForkTurn: tn,
|
|
8378
|
+
onLoadOlderMessages: Mt,
|
|
8369
8379
|
onMessageTextSelectionChange: r[0] ||= (e) => a("messageTextSelectionChange", e),
|
|
8370
|
-
onOpenLink:
|
|
8371
|
-
onOpenVisualization:
|
|
8372
|
-
onQuoteMessage:
|
|
8373
|
-
onRetryTurn:
|
|
8374
|
-
onSendFollowUp:
|
|
8380
|
+
onOpenLink: Ft,
|
|
8381
|
+
onOpenVisualization: It,
|
|
8382
|
+
onQuoteMessage: Nt,
|
|
8383
|
+
onRetryTurn: nn,
|
|
8384
|
+
onSendFollowUp: rn
|
|
8375
8385
|
}, d({ _: 2 }, [
|
|
8376
8386
|
n.$slots.message ? {
|
|
8377
8387
|
name: "message",
|
|
@@ -8430,7 +8440,7 @@ var hu = ["aria-busy", "aria-label"], gu = ["title"], _u = ["title"], vu = /*#__
|
|
|
8430
8440
|
_: 3
|
|
8431
8441
|
}))], 40, Ku));
|
|
8432
8442
|
}
|
|
8433
|
-
}), [["__scopeId", "data-v-
|
|
8443
|
+
}), [["__scopeId", "data-v-c7008843"]]), sd = {
|
|
8434
8444
|
class: "codex-conversation-sidebar",
|
|
8435
8445
|
"aria-label": "Conversations"
|
|
8436
8446
|
}, cd = { class: "codex-conversation-sidebar__header" }, ld = { class: "codex-conversation-sidebar__brand" }, ud = ["disabled"], dd = {
|