@codex-app-sdk/vue 0.16.0 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/ChatAttachmentBlock.vue.d.ts.map +1 -1
- package/dist/chat/ChatMediaBlock.vue.d.ts.map +1 -1
- package/dist/chat/host-image-previews.d.ts +4 -0
- package/dist/chat/host-image-previews.d.ts.map +1 -0
- package/dist/components/CodexMessage.vue.d.ts.map +1 -1
- package/dist/components/CodexMessageList.vue.d.ts.map +1 -1
- package/dist/index.js +373 -344
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4850,16 +4850,18 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4850
4850
|
r.value = !1;
|
|
4851
4851
|
});
|
|
4852
4852
|
let p = 0;
|
|
4853
|
-
W(
|
|
4854
|
-
t.attachment.kind,
|
|
4855
|
-
t.attachment.path,
|
|
4856
|
-
t.attachment.url
|
|
4853
|
+
W([
|
|
4854
|
+
() => t.attachment.kind,
|
|
4855
|
+
() => t.attachment.path,
|
|
4856
|
+
() => t.attachment.url
|
|
4857
4857
|
], async ([e, t, r]) => {
|
|
4858
4858
|
let a = ++p;
|
|
4859
|
-
|
|
4860
|
-
let o =
|
|
4861
|
-
if (o)
|
|
4862
|
-
|
|
4859
|
+
i.value = void 0;
|
|
4860
|
+
let o = t || r;
|
|
4861
|
+
if (e !== "image" || !o || g(r)) return;
|
|
4862
|
+
let s = n?.readImagePreview;
|
|
4863
|
+
if (s) try {
|
|
4864
|
+
let e = await s(o);
|
|
4863
4865
|
a === p && e && g(e) && (i.value = e);
|
|
4864
4866
|
} catch {}
|
|
4865
4867
|
}, { immediate: !0 }), E(() => {
|
|
@@ -4880,7 +4882,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4880
4882
|
await t.openImage?.(n, { intent: "open" }) !== !0 && (a.value = !0);
|
|
4881
4883
|
}
|
|
4882
4884
|
function g(e) {
|
|
4883
|
-
return e ? /^(?:\.\.?\/|\/(?!\/))/.test(e) ? !
|
|
4885
|
+
return e ? /^(?:\.\.?\/|\/(?!\/))/.test(e) ? !n?.readImagePreview : /^(?:https?:|blob:)/i.test(e) || /^data:image\/(?:avif|bmp|gif|heic|heif|jpe?g|png|webp);base64,/i.test(e) : !1;
|
|
4884
4886
|
}
|
|
4885
4887
|
function _(e) {
|
|
4886
4888
|
return e && /^(?:https?:|file:)/i.test(e) ? e : void 0;
|
|
@@ -4933,7 +4935,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4933
4935
|
_: 1
|
|
4934
4936
|
}, 8, ["href", "title"]));
|
|
4935
4937
|
}
|
|
4936
|
-
}), [["__scopeId", "data-v-
|
|
4938
|
+
}), [["__scopeId", "data-v-db19ea73"]]), Ns = { class: "codex-chat-theme chat-follow-ups" }, Ps = ["disabled", "onClick"], Fs = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
4937
4939
|
__name: "ChatFollowUps",
|
|
4938
4940
|
props: {
|
|
4939
4941
|
disabled: { type: Boolean },
|
|
@@ -4982,36 +4984,63 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
4982
4984
|
setup(e) {
|
|
4983
4985
|
return (t, n) => (k(), l("div", { class: C(["codex-chat-theme chat-fold", { "chat-fold--open": e.open }]) }, [u("div", Ls, [F(t.$slots, "default", {}, void 0, !0)])], 2));
|
|
4984
4986
|
}
|
|
4985
|
-
}), [["__scopeId", "data-v-7f764329"]])
|
|
4987
|
+
}), [["__scopeId", "data-v-7f764329"]]);
|
|
4988
|
+
//#endregion
|
|
4989
|
+
//#region src/chat/host-image-previews.ts
|
|
4990
|
+
function zs(e) {
|
|
4991
|
+
return !!e && !/^(?:https?:|data:|blob:|\/\/)/i.test(e);
|
|
4992
|
+
}
|
|
4993
|
+
function Bs(e) {
|
|
4994
|
+
return /^(?:https?:|blob:|data:image\/(?:avif|bmp|gif|heic|heif|jpe?g|png|webp);base64,)/i.test(e);
|
|
4995
|
+
}
|
|
4996
|
+
function Vs(e) {
|
|
4997
|
+
let t = Ti(), n = R();
|
|
4998
|
+
return W(e, async (e, r, i) => {
|
|
4999
|
+
let a = !0;
|
|
5000
|
+
if (i(() => {
|
|
5001
|
+
a = !1;
|
|
5002
|
+
}), n.value = void 0, !zs(e) || !t?.readImagePreview) {
|
|
5003
|
+
n.value = e;
|
|
5004
|
+
return;
|
|
5005
|
+
}
|
|
5006
|
+
try {
|
|
5007
|
+
let r = await t.readImagePreview(e);
|
|
5008
|
+
a && r && Bs(r) && (n.value = r);
|
|
5009
|
+
} catch {}
|
|
5010
|
+
}, { immediate: !0 }), o(() => n.value);
|
|
5011
|
+
}
|
|
5012
|
+
//#endregion
|
|
5013
|
+
//#region src/chat/ChatMediaBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5014
|
+
var Hs = ["aria-label"], Us = ["alt", "src"], Ws = { class: "chat-media-block__footer" }, Gs = { class: "chat-media-block__title" }, Ks = { class: "chat-media-block__actions" }, qs = { class: "chat-media-block__details" }, Js = { class: "chat-media-block__prompt" }, Ys = "Download media", Xs = "Copy image", Zs = "Image copied", Qs = "Open fullscreen", $s = "Generated media", ec = "Generated media", tc = "Prompt", nc = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
4986
5015
|
__name: "ChatMediaBlock",
|
|
4987
5016
|
props: {
|
|
4988
5017
|
media: {},
|
|
4989
5018
|
openImage: { type: Function }
|
|
4990
5019
|
},
|
|
4991
5020
|
setup(e) {
|
|
4992
|
-
let t = e, n = o(() => `Open ${t.media.title || t.media.alt ||
|
|
4993
|
-
async function
|
|
5021
|
+
let t = e, n = o(() => `Open ${t.media.title || t.media.alt || ec}`), r = Vs(() => t.media.url), i = M(!1), a = M(!1), d = M(null), f = o(() => v(t.media));
|
|
5022
|
+
async function p(e) {
|
|
4994
5023
|
let n = {
|
|
4995
|
-
alt: t.media.alt ||
|
|
5024
|
+
alt: t.media.alt || $s,
|
|
4996
5025
|
kind: "media",
|
|
4997
5026
|
mimeType: t.media.mimeType,
|
|
4998
5027
|
name: t.media.title,
|
|
4999
|
-
src: t.media.url,
|
|
5000
|
-
title: t.media.title ||
|
|
5028
|
+
src: r.value || t.media.url,
|
|
5029
|
+
title: t.media.title || ec
|
|
5001
5030
|
};
|
|
5002
|
-
await t.openImage?.(n, { intent: e }) !== !0 && (
|
|
5031
|
+
await t.openImage?.(n, { intent: e }) !== !0 && (a.value = !0);
|
|
5003
5032
|
}
|
|
5004
|
-
function
|
|
5005
|
-
|
|
5033
|
+
function h() {
|
|
5034
|
+
a.value = !1;
|
|
5006
5035
|
}
|
|
5007
|
-
async function
|
|
5008
|
-
let e = await fetch(t.media.url).then((e) => e.blob()), n = e.type || t.media.mimeType || "image/png";
|
|
5036
|
+
async function g() {
|
|
5037
|
+
let e = await fetch(r.value || t.media.url).then((e) => e.blob()), n = e.type || t.media.mimeType || "image/png";
|
|
5009
5038
|
await navigator.clipboard.write([new ClipboardItem({ [n]: e })]);
|
|
5010
5039
|
}
|
|
5011
|
-
function
|
|
5012
|
-
|
|
5040
|
+
function _() {
|
|
5041
|
+
i.value = !i.value;
|
|
5013
5042
|
}
|
|
5014
|
-
function
|
|
5043
|
+
function v(e) {
|
|
5015
5044
|
let t = (e.title?.trim() || e.alt?.trim() || "generated-image").replace(/[\\/:*?"<>|]+/g, "-");
|
|
5016
5045
|
if (/\.[a-z\d]{2,5}$/i.test(t)) return t;
|
|
5017
5046
|
let n = {
|
|
@@ -5025,36 +5054,36 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5025
5054
|
}
|
|
5026
5055
|
return (t, o) => (k(), l("figure", {
|
|
5027
5056
|
ref_key: "rootElement",
|
|
5028
|
-
ref:
|
|
5057
|
+
ref: d,
|
|
5029
5058
|
class: "codex-chat-theme chat-media-block"
|
|
5030
5059
|
}, [
|
|
5031
5060
|
u("button", {
|
|
5032
5061
|
class: "chat-media-block__image-button",
|
|
5033
5062
|
type: "button",
|
|
5034
5063
|
"aria-label": n.value,
|
|
5035
|
-
onClick: o[0] ||= (e) =>
|
|
5064
|
+
onClick: o[0] ||= (e) => p("open")
|
|
5036
5065
|
}, [u("img", {
|
|
5037
5066
|
class: "chat-media-block__image",
|
|
5038
|
-
alt: e.media.alt ||
|
|
5039
|
-
src:
|
|
5040
|
-
}, null, 8,
|
|
5041
|
-
u("figcaption",
|
|
5067
|
+
alt: e.media.alt || $s,
|
|
5068
|
+
src: V(r)
|
|
5069
|
+
}, null, 8, Us)], 8, Hs),
|
|
5070
|
+
u("figcaption", Ws, [u("span", Gs, z(e.media.title || ec), 1), u("span", Ks, [
|
|
5042
5071
|
m(Ss, {
|
|
5043
|
-
label:
|
|
5044
|
-
onClick: o[1] ||= (e) =>
|
|
5072
|
+
label: Qs,
|
|
5073
|
+
onClick: o[1] ||= (e) => p("fullscreen")
|
|
5045
5074
|
}, {
|
|
5046
5075
|
default: G(() => [m(V(we))]),
|
|
5047
5076
|
_: 1
|
|
5048
5077
|
}),
|
|
5049
5078
|
m(Is, {
|
|
5050
|
-
action:
|
|
5051
|
-
"copied-label":
|
|
5052
|
-
label:
|
|
5079
|
+
action: g,
|
|
5080
|
+
"copied-label": Zs,
|
|
5081
|
+
label: Xs
|
|
5053
5082
|
}),
|
|
5054
5083
|
m(Ss, {
|
|
5055
|
-
download:
|
|
5056
|
-
href:
|
|
5057
|
-
label:
|
|
5084
|
+
download: f.value,
|
|
5085
|
+
href: V(r),
|
|
5086
|
+
label: Ys,
|
|
5058
5087
|
onClick: o[2] ||= q(() => {}, ["stop"])
|
|
5059
5088
|
}, {
|
|
5060
5089
|
default: G(() => [m(V(me))]),
|
|
@@ -5062,8 +5091,8 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5062
5091
|
}, 8, ["download", "href"]),
|
|
5063
5092
|
e.media.prompt ? (k(), s(Ss, {
|
|
5064
5093
|
key: 0,
|
|
5065
|
-
label:
|
|
5066
|
-
onClick:
|
|
5094
|
+
label: tc,
|
|
5095
|
+
onClick: _
|
|
5067
5096
|
}, {
|
|
5068
5097
|
default: G(() => [m(V(be))]),
|
|
5069
5098
|
_: 1
|
|
@@ -5071,18 +5100,18 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5071
5100
|
])]),
|
|
5072
5101
|
e.media.prompt ? (k(), s(Rs, {
|
|
5073
5102
|
key: 0,
|
|
5074
|
-
open:
|
|
5103
|
+
open: i.value
|
|
5075
5104
|
}, {
|
|
5076
|
-
default: G(() => [u("div",
|
|
5105
|
+
default: G(() => [u("div", qs, [u("div", { class: "chat-media-block__details-title" }, z(tc)), u("p", Js, z(e.media.prompt), 1)])]),
|
|
5077
5106
|
_: 1
|
|
5078
5107
|
}, 8, ["open"])) : c("", !0),
|
|
5079
5108
|
m(Ds, {
|
|
5080
|
-
alt: e.media.alt ||
|
|
5081
|
-
label: e.media.title ||
|
|
5082
|
-
open:
|
|
5083
|
-
src: e.media.url,
|
|
5084
|
-
"theme-source":
|
|
5085
|
-
onClose:
|
|
5109
|
+
alt: e.media.alt || $s,
|
|
5110
|
+
label: e.media.title || ec,
|
|
5111
|
+
open: a.value,
|
|
5112
|
+
src: V(r) || e.media.url,
|
|
5113
|
+
"theme-source": d.value,
|
|
5114
|
+
onClose: h
|
|
5086
5115
|
}, null, 8, [
|
|
5087
5116
|
"alt",
|
|
5088
5117
|
"label",
|
|
@@ -5092,26 +5121,26 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5092
5121
|
])
|
|
5093
5122
|
], 512));
|
|
5094
5123
|
}
|
|
5095
|
-
}), [["__scopeId", "data-v-
|
|
5124
|
+
}), [["__scopeId", "data-v-6e99a4ae"]]), rc = { class: "chat-mermaid-block__actions" }, ic = {
|
|
5096
5125
|
key: 0,
|
|
5097
5126
|
class: "chat-mermaid-block__code"
|
|
5098
|
-
},
|
|
5127
|
+
}, ac = ["innerHTML"], oc = {
|
|
5099
5128
|
key: 2,
|
|
5100
5129
|
class: "chat-mermaid-block__error"
|
|
5101
|
-
},
|
|
5130
|
+
}, sc = ["data-codex-theme"], cc = { class: "chat-mermaid-block__fullscreen-panel" }, lc = { class: "chat-mermaid-block__actions chat-mermaid-block__actions--fullscreen" }, uc = {
|
|
5102
5131
|
key: 0,
|
|
5103
5132
|
class: "chat-mermaid-block__code chat-mermaid-block__code--fullscreen"
|
|
5104
|
-
},
|
|
5133
|
+
}, dc = ["innerHTML"], fc = {
|
|
5105
5134
|
key: 2,
|
|
5106
5135
|
class: "chat-mermaid-block__error"
|
|
5107
|
-
},
|
|
5136
|
+
}, pc = "Close fullscreen", mc = "Open fullscreen", hc = "Render diagram", gc = "Show source", _c = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
5108
5137
|
__name: "ChatMermaidBlock",
|
|
5109
5138
|
props: { code: {} },
|
|
5110
5139
|
setup(e) {
|
|
5111
5140
|
let t = e, r = M(!1), i = M(!1), a = M(null), d = M({
|
|
5112
5141
|
mode: "light",
|
|
5113
5142
|
style: {}
|
|
5114
|
-
}), f = /@import\s+url\([^)]*\);\s*/g, p = /\sdata-label="[^"]*"/g, h = o(() => i.value ?
|
|
5143
|
+
}), f = /@import\s+url\([^)]*\);\s*/g, p = /\sdata-label="[^"]*"/g, h = o(() => i.value ? hc : gc), g = o(() => {
|
|
5115
5144
|
try {
|
|
5116
5145
|
return {
|
|
5117
5146
|
error: "",
|
|
@@ -5154,7 +5183,7 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5154
5183
|
ref: a,
|
|
5155
5184
|
class: "codex-chat-theme chat-mermaid-block"
|
|
5156
5185
|
}, [
|
|
5157
|
-
u("div",
|
|
5186
|
+
u("div", rc, [m(Ss, {
|
|
5158
5187
|
bordered: "",
|
|
5159
5188
|
label: h.value,
|
|
5160
5189
|
onClick: _
|
|
@@ -5163,17 +5192,17 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5163
5192
|
_: 1
|
|
5164
5193
|
}, 8, ["label"]), m(Ss, {
|
|
5165
5194
|
bordered: "",
|
|
5166
|
-
label:
|
|
5195
|
+
label: mc,
|
|
5167
5196
|
onClick: v
|
|
5168
5197
|
}, {
|
|
5169
5198
|
default: G(() => [m(V(we))]),
|
|
5170
5199
|
_: 1
|
|
5171
5200
|
})]),
|
|
5172
|
-
i.value ? (k(), l("pre",
|
|
5201
|
+
i.value ? (k(), l("pre", ic, [u("code", null, z(t.code), 1)])) : g.value.svg ? (k(), l("div", {
|
|
5173
5202
|
key: 1,
|
|
5174
5203
|
class: "chat-mermaid-block__diagram",
|
|
5175
5204
|
innerHTML: g.value.svg
|
|
5176
|
-
}, null, 8,
|
|
5205
|
+
}, null, 8, ac)) : (k(), l("pre", oc, [u("code", null, z(g.value.error), 1)])),
|
|
5177
5206
|
(k(), s(n, { to: "body" }, [r.value ? (k(), l("div", {
|
|
5178
5207
|
key: 0,
|
|
5179
5208
|
class: "codex-chat-theme chat-mermaid-block__fullscreen",
|
|
@@ -5181,9 +5210,9 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5181
5210
|
style: T(d.value.style),
|
|
5182
5211
|
role: "dialog",
|
|
5183
5212
|
"aria-modal": "true",
|
|
5184
|
-
"aria-label":
|
|
5213
|
+
"aria-label": mc,
|
|
5185
5214
|
onClick: q(y, ["self"])
|
|
5186
|
-
}, [u("div",
|
|
5215
|
+
}, [u("div", cc, [u("div", lc, [m(Ss, {
|
|
5187
5216
|
bordered: "",
|
|
5188
5217
|
label: h.value,
|
|
5189
5218
|
onClick: _
|
|
@@ -5192,30 +5221,30 @@ var Ts = ["data-codex-theme", "aria-label"], Es = ["alt", "src"], Ds = /*#__PURE
|
|
|
5192
5221
|
_: 1
|
|
5193
5222
|
}, 8, ["label"]), m(Ss, {
|
|
5194
5223
|
bordered: "",
|
|
5195
|
-
label:
|
|
5224
|
+
label: pc,
|
|
5196
5225
|
onClick: y
|
|
5197
5226
|
}, {
|
|
5198
5227
|
default: G(() => [m(V(Ye))]),
|
|
5199
5228
|
_: 1
|
|
5200
|
-
})]), i.value ? (k(), l("pre",
|
|
5229
|
+
})]), i.value ? (k(), l("pre", uc, [u("code", null, z(t.code), 1)])) : g.value.svg ? (k(), l("div", {
|
|
5201
5230
|
key: 1,
|
|
5202
5231
|
class: "chat-mermaid-block__diagram chat-mermaid-block__diagram--fullscreen",
|
|
5203
5232
|
innerHTML: g.value.svg
|
|
5204
|
-
}, null, 8,
|
|
5233
|
+
}, null, 8, dc)) : (k(), l("pre", fc, [u("code", null, z(g.value.error), 1)]))])], 12, sc)) : c("", !0)]))
|
|
5205
5234
|
], 512));
|
|
5206
5235
|
}
|
|
5207
5236
|
}), [["__scopeId", "data-v-2356f49d"]]);
|
|
5208
5237
|
//#endregion
|
|
5209
5238
|
//#region src/chat/html-escape.ts
|
|
5210
|
-
function
|
|
5239
|
+
function vc(e) {
|
|
5211
5240
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
5212
5241
|
}
|
|
5213
|
-
function
|
|
5214
|
-
return
|
|
5242
|
+
function yc(e) {
|
|
5243
|
+
return vc(e).replace(/`/g, "`");
|
|
5215
5244
|
}
|
|
5216
5245
|
//#endregion
|
|
5217
5246
|
//#region src/chat/syntax-highlighting.ts
|
|
5218
|
-
var
|
|
5247
|
+
var bc = nt({
|
|
5219
5248
|
engine: rt(),
|
|
5220
5249
|
langs: [
|
|
5221
5250
|
it,
|
|
@@ -5239,12 +5268,12 @@ var _c = nt({
|
|
|
5239
5268
|
St
|
|
5240
5269
|
],
|
|
5241
5270
|
themes: [wt, Ct]
|
|
5242
|
-
}),
|
|
5243
|
-
function
|
|
5244
|
-
let n =
|
|
5245
|
-
if (!n || !
|
|
5271
|
+
}), xc = new Set(bc.getLoadedLanguages());
|
|
5272
|
+
function Sc(e, t) {
|
|
5273
|
+
let n = wc(t);
|
|
5274
|
+
if (!n || !xc.has(n)) return Tc(e, t);
|
|
5246
5275
|
try {
|
|
5247
|
-
return
|
|
5276
|
+
return bc.codeToHtml(e, {
|
|
5248
5277
|
defaultColor: !1,
|
|
5249
5278
|
lang: n,
|
|
5250
5279
|
themes: {
|
|
@@ -5253,10 +5282,10 @@ function yc(e, t) {
|
|
|
5253
5282
|
}
|
|
5254
5283
|
});
|
|
5255
5284
|
} catch {
|
|
5256
|
-
return
|
|
5285
|
+
return Tc(e, t);
|
|
5257
5286
|
}
|
|
5258
5287
|
}
|
|
5259
|
-
function
|
|
5288
|
+
function Cc(e) {
|
|
5260
5289
|
let t = (e ?? "").trim().toLowerCase(), n = t.match(/\.([^.\\/]+)$/)?.[1];
|
|
5261
5290
|
switch (n) {
|
|
5262
5291
|
case "patch": return "diff";
|
|
@@ -5281,38 +5310,38 @@ function bc(e) {
|
|
|
5281
5310
|
default: return t.endsWith("/dockerfile") || t === "dockerfile" ? "docker" : n;
|
|
5282
5311
|
}
|
|
5283
5312
|
}
|
|
5284
|
-
function
|
|
5313
|
+
function wc(e) {
|
|
5285
5314
|
let [t] = (e ?? "").trim().toLowerCase().split(/\s+/);
|
|
5286
5315
|
return t || null;
|
|
5287
5316
|
}
|
|
5288
|
-
function
|
|
5289
|
-
let n =
|
|
5290
|
-
return `<pre><code${n ? ` class="language-${
|
|
5317
|
+
function Tc(e, t) {
|
|
5318
|
+
let n = wc(t);
|
|
5319
|
+
return `<pre><code${n ? ` class="language-${yc(n)}"` : ""}>${Ec(e)}</code></pre>`;
|
|
5291
5320
|
}
|
|
5292
|
-
function
|
|
5293
|
-
return e.split("\n").map((e) => `<span class="line">${
|
|
5321
|
+
function Ec(e) {
|
|
5322
|
+
return e.split("\n").map((e) => `<span class="line">${vc(e)}</span>`).join("\n");
|
|
5294
5323
|
}
|
|
5295
5324
|
//#endregion
|
|
5296
5325
|
//#region src/chat/message-markdown.ts
|
|
5297
|
-
var
|
|
5298
|
-
|
|
5299
|
-
let r =
|
|
5326
|
+
var Dc = new $e();
|
|
5327
|
+
Dc.html = ({ text: e }) => vc(e), Dc.code = ({ text: e, lang: t }) => Sc(e, t), Dc.link = ({ href: e, title: t, tokens: n }) => {
|
|
5328
|
+
let r = Rc(n), i = Fc(e);
|
|
5300
5329
|
if (!i) return `<span class="chat-message-link chat-message-link--blocked">${r}</span>`;
|
|
5301
|
-
let a = t ? ` title="${
|
|
5302
|
-
return `<a class="chat-message-link" href="${
|
|
5303
|
-
},
|
|
5304
|
-
let r =
|
|
5305
|
-
if (!r) return `<span class="chat-message-image chat-message-image--blocked">${
|
|
5306
|
-
let a = t ? ` title="${
|
|
5307
|
-
return `<img class="chat-message-image" src="${
|
|
5330
|
+
let a = t ? ` title="${yc(t)}"` : "", o = Lc(i), s = jc(i) ? " target=\"_blank\" rel=\"noopener noreferrer\"" : "";
|
|
5331
|
+
return `<a class="chat-message-link" href="${yc(i)}"${a}${s}>${o}<span class="chat-message-link__label">${r}</span></a>`;
|
|
5332
|
+
}, Dc.image = ({ href: e, title: t, text: n }) => {
|
|
5333
|
+
let r = Ic(e), i = yc(n);
|
|
5334
|
+
if (!r) return `<span class="chat-message-image chat-message-image--blocked">${vc(n)}</span>`;
|
|
5335
|
+
let a = t ? ` title="${yc(t)}"` : "";
|
|
5336
|
+
return `<img class="chat-message-image" src="${yc(r)}" alt="${i}"${a} loading="lazy" decoding="async" referrerpolicy="no-referrer">`;
|
|
5308
5337
|
};
|
|
5309
|
-
var
|
|
5338
|
+
var Oc = new Qe({
|
|
5310
5339
|
async: !1,
|
|
5311
5340
|
breaks: !0,
|
|
5312
5341
|
gfm: !0,
|
|
5313
|
-
renderer:
|
|
5342
|
+
renderer: Dc
|
|
5314
5343
|
});
|
|
5315
|
-
|
|
5344
|
+
Oc.use(tt({
|
|
5316
5345
|
maxExpand: 1e3,
|
|
5317
5346
|
maxSize: 20,
|
|
5318
5347
|
nonStandard: !1,
|
|
@@ -5320,7 +5349,7 @@ Tc.use(tt({
|
|
|
5320
5349
|
strict: "ignore",
|
|
5321
5350
|
throwOnError: !1,
|
|
5322
5351
|
trust: !1
|
|
5323
|
-
})),
|
|
5352
|
+
})), Oc.use({ extensions: [{
|
|
5324
5353
|
name: "codexBlockKatex",
|
|
5325
5354
|
level: "block",
|
|
5326
5355
|
tokenizer(e) {
|
|
@@ -5332,7 +5361,7 @@ Tc.use(tt({
|
|
|
5332
5361
|
};
|
|
5333
5362
|
},
|
|
5334
5363
|
renderer(e) {
|
|
5335
|
-
return `${
|
|
5364
|
+
return `${Nc(e.text, !0)}\n`;
|
|
5336
5365
|
}
|
|
5337
5366
|
}, {
|
|
5338
5367
|
name: "codexInlineKatex",
|
|
@@ -5346,23 +5375,23 @@ Tc.use(tt({
|
|
|
5346
5375
|
};
|
|
5347
5376
|
},
|
|
5348
5377
|
renderer(e) {
|
|
5349
|
-
return
|
|
5378
|
+
return Nc(e.text, !1);
|
|
5350
5379
|
}
|
|
5351
5380
|
}] });
|
|
5352
|
-
function
|
|
5353
|
-
let n =
|
|
5354
|
-
return t.codeCopyLabel ?
|
|
5381
|
+
function kc(e, t = {}) {
|
|
5382
|
+
let n = Oc.parse(e);
|
|
5383
|
+
return t.codeCopyLabel ? Ac(n, t.codeCopyLabel) : n;
|
|
5355
5384
|
}
|
|
5356
|
-
function
|
|
5385
|
+
function Ac(e, t) {
|
|
5357
5386
|
let n = [
|
|
5358
|
-
`<button class="chat-code-block__copy" type="button" data-chat-code-copy aria-label="${
|
|
5387
|
+
`<button class="chat-code-block__copy" type="button" data-chat-code-copy aria-label="${yc(t)}" title="${yc(t)}">`,
|
|
5359
5388
|
"<svg class=\"chat-code-block__copy-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M8 8m-2 0a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2z\"/><path d=\"M16 6V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h2\"/></svg>",
|
|
5360
5389
|
"<svg class=\"chat-code-block__check-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"m5 12 5 5L20 7\"/></svg>",
|
|
5361
5390
|
"</button>"
|
|
5362
5391
|
].join("");
|
|
5363
5392
|
return e.replace(/(<pre\b[\s\S]*?<\/pre>)/g, `<div class="chat-code-block">${n}$1</div>`);
|
|
5364
5393
|
}
|
|
5365
|
-
function
|
|
5394
|
+
function jc(e) {
|
|
5366
5395
|
try {
|
|
5367
5396
|
let t = new URL(e);
|
|
5368
5397
|
return t.protocol === "http:" || t.protocol === "https:";
|
|
@@ -5370,14 +5399,14 @@ function Oc(e) {
|
|
|
5370
5399
|
return !1;
|
|
5371
5400
|
}
|
|
5372
5401
|
}
|
|
5373
|
-
function
|
|
5402
|
+
function Mc(e) {
|
|
5374
5403
|
try {
|
|
5375
5404
|
return new URL(e).protocol === "mailto:";
|
|
5376
5405
|
} catch {
|
|
5377
5406
|
return !1;
|
|
5378
5407
|
}
|
|
5379
5408
|
}
|
|
5380
|
-
function
|
|
5409
|
+
function Nc(e, t) {
|
|
5381
5410
|
let n = et.renderToString(e, {
|
|
5382
5411
|
displayMode: t,
|
|
5383
5412
|
maxExpand: 1e3,
|
|
@@ -5389,14 +5418,14 @@ function Ac(e, t) {
|
|
|
5389
5418
|
});
|
|
5390
5419
|
return t ? `<span class="katex-display">${n}</span>` : n;
|
|
5391
5420
|
}
|
|
5392
|
-
var
|
|
5421
|
+
var Pc = /* @__PURE__ */ new Set([
|
|
5393
5422
|
"file:",
|
|
5394
5423
|
"http:",
|
|
5395
5424
|
"https:",
|
|
5396
5425
|
"mailto:",
|
|
5397
5426
|
"tel:"
|
|
5398
5427
|
]);
|
|
5399
|
-
function
|
|
5428
|
+
function Fc(e) {
|
|
5400
5429
|
let t = e.trim();
|
|
5401
5430
|
if (!t || /[\u0000-\u001f\u007f]/.test(t)) return null;
|
|
5402
5431
|
if (/^[a-z]:[\\/]/i.test(t) || fn(t)) return t;
|
|
@@ -5404,15 +5433,15 @@ function Mc(e) {
|
|
|
5404
5433
|
let n = /^([a-z][a-z\d+.-]*):/i.exec(t)?.[1];
|
|
5405
5434
|
if (!n) return t;
|
|
5406
5435
|
let r = `${n.toLowerCase()}:`;
|
|
5407
|
-
if (!
|
|
5436
|
+
if (!Pc.has(r)) return null;
|
|
5408
5437
|
try {
|
|
5409
5438
|
return new URL(t), t;
|
|
5410
5439
|
} catch {
|
|
5411
5440
|
return null;
|
|
5412
5441
|
}
|
|
5413
5442
|
}
|
|
5414
|
-
function
|
|
5415
|
-
let t =
|
|
5443
|
+
function Ic(e) {
|
|
5444
|
+
let t = Fc(e);
|
|
5416
5445
|
if (!t || t.startsWith("#") || t.startsWith("?")) return null;
|
|
5417
5446
|
try {
|
|
5418
5447
|
let e = new URL(t).protocol;
|
|
@@ -5421,35 +5450,35 @@ function Nc(e) {
|
|
|
5421
5450
|
return t;
|
|
5422
5451
|
}
|
|
5423
5452
|
}
|
|
5424
|
-
function
|
|
5425
|
-
return
|
|
5453
|
+
function Lc(e) {
|
|
5454
|
+
return jc(e) ? "<svg class=\"chat-message-link__icon chat-message-link__icon--external\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 3h6v6\"></path><path d=\"m10 14 11-11\"></path><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path></svg>" : Mc(e) ? "<svg class=\"chat-message-link__icon chat-message-link__icon--mail\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"></rect><path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\"></path></svg>" : "<svg class=\"chat-message-link__icon chat-message-link__icon--file\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"></path><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"></path></svg>";
|
|
5426
5455
|
}
|
|
5427
|
-
function
|
|
5428
|
-
return e.map(
|
|
5456
|
+
function Rc(e) {
|
|
5457
|
+
return e.map(zc).join("");
|
|
5429
5458
|
}
|
|
5430
|
-
function
|
|
5459
|
+
function zc(e) {
|
|
5431
5460
|
if (!e || typeof e != "object") return "";
|
|
5432
5461
|
let t = e;
|
|
5433
5462
|
if (Array.isArray(t.tokens)) {
|
|
5434
|
-
let e =
|
|
5463
|
+
let e = Rc(t.tokens);
|
|
5435
5464
|
return t.type === "strong" ? `<strong>${e}</strong>` : t.type === "em" ? `<em>${e}</em>` : e;
|
|
5436
5465
|
}
|
|
5437
|
-
return t.type === "codespan" && typeof t.text == "string" ? `<code>${
|
|
5466
|
+
return t.type === "codespan" && typeof t.text == "string" ? `<code>${vc(t.text)}</code>` : typeof t.text == "string" ? vc(t.text) : typeof t.raw == "string" ? vc(t.raw) : "";
|
|
5438
5467
|
}
|
|
5439
5468
|
//#endregion
|
|
5440
5469
|
//#region src/chat/message-actions.ts
|
|
5441
|
-
var
|
|
5442
|
-
function
|
|
5443
|
-
return Ca(e).replace(
|
|
5470
|
+
var Bc = /<tool\s+(id|index)="[^"]*"><\/tool>/g, Vc = /<follow-up>[\s\S]*?<\/follow-up>/g, Hc = /<br\s*\/?>/gi;
|
|
5471
|
+
function Uc(e) {
|
|
5472
|
+
return Ca(e).replace(Bc, "").replace(Vc, "").trim();
|
|
5444
5473
|
}
|
|
5445
|
-
function
|
|
5446
|
-
return
|
|
5474
|
+
function Wc(e) {
|
|
5475
|
+
return Jc(Uc(e));
|
|
5447
5476
|
}
|
|
5448
|
-
function
|
|
5449
|
-
return
|
|
5477
|
+
function Gc(e) {
|
|
5478
|
+
return kc(Uc(e)).trim();
|
|
5450
5479
|
}
|
|
5451
|
-
async function
|
|
5452
|
-
let n =
|
|
5480
|
+
async function Kc(e, t = Ei()) {
|
|
5481
|
+
let n = Wc(e), r = Gc(e);
|
|
5453
5482
|
if (t) {
|
|
5454
5483
|
await t.copyToClipboard({
|
|
5455
5484
|
text: n,
|
|
@@ -5467,56 +5496,56 @@ async function Uc(e, t = Ei()) {
|
|
|
5467
5496
|
}
|
|
5468
5497
|
await i.writeText(n);
|
|
5469
5498
|
}
|
|
5470
|
-
async function
|
|
5499
|
+
async function qc(e, t = Ei()) {
|
|
5471
5500
|
if (t) {
|
|
5472
5501
|
await t.copyToClipboard({ text: e });
|
|
5473
5502
|
return;
|
|
5474
5503
|
}
|
|
5475
5504
|
await navigator.clipboard.writeText(e);
|
|
5476
5505
|
}
|
|
5477
|
-
function
|
|
5478
|
-
let t =
|
|
5506
|
+
function Jc(e) {
|
|
5507
|
+
let t = kc(e).replace(Hc, "\n"), n = document.createElement("template");
|
|
5479
5508
|
n.innerHTML = t;
|
|
5480
5509
|
let r = [];
|
|
5481
|
-
return n.content.childNodes.forEach((e) =>
|
|
5510
|
+
return n.content.childNodes.forEach((e) => Yc(e, r)), r.join("\n");
|
|
5482
5511
|
}
|
|
5483
|
-
function
|
|
5512
|
+
function Yc(e, t) {
|
|
5484
5513
|
if (e.nodeType === Node.TEXT_NODE) {
|
|
5485
5514
|
let n = e.textContent.trim();
|
|
5486
|
-
n && t.push(
|
|
5515
|
+
n && t.push(Zc(n));
|
|
5487
5516
|
return;
|
|
5488
5517
|
}
|
|
5489
5518
|
if (!(e instanceof HTMLElement)) return;
|
|
5490
5519
|
let n = e.tagName.toLowerCase();
|
|
5491
5520
|
if (e.classList.contains("katex")) {
|
|
5492
|
-
let n =
|
|
5493
|
-
n && t.push(
|
|
5521
|
+
let n = Xc(e).trim();
|
|
5522
|
+
n && t.push(Zc(n));
|
|
5494
5523
|
return;
|
|
5495
5524
|
}
|
|
5496
5525
|
if (n === "pre") {
|
|
5497
5526
|
let n = [...e.querySelectorAll(":scope > code > .line")].map((e) => e.textContent ?? "").join("\n").trim();
|
|
5498
|
-
n && t.push(
|
|
5527
|
+
n && t.push(Zc(n));
|
|
5499
5528
|
return;
|
|
5500
5529
|
}
|
|
5501
5530
|
if (n === "li" || n === "p" || /^h[1-6]$/.test(n)) {
|
|
5502
|
-
let n =
|
|
5503
|
-
n && t.push(
|
|
5531
|
+
let n = Xc(e).trim();
|
|
5532
|
+
n && t.push(Zc(n));
|
|
5504
5533
|
return;
|
|
5505
5534
|
}
|
|
5506
|
-
e.childNodes.forEach((e) =>
|
|
5535
|
+
e.childNodes.forEach((e) => Yc(e, t));
|
|
5507
5536
|
}
|
|
5508
|
-
function
|
|
5509
|
-
return e.nodeType === Node.TEXT_NODE ? e.textContent : e instanceof HTMLElement ? e.classList.contains("katex") ? e.querySelector("annotation[encoding=\"application/x-tex\"]")?.textContent ?? "" : [...e.childNodes].map(
|
|
5537
|
+
function Xc(e) {
|
|
5538
|
+
return e.nodeType === Node.TEXT_NODE ? e.textContent : e instanceof HTMLElement ? e.classList.contains("katex") ? e.querySelector("annotation[encoding=\"application/x-tex\"]")?.textContent ?? "" : [...e.childNodes].map(Xc).join("") : "";
|
|
5510
5539
|
}
|
|
5511
|
-
function
|
|
5540
|
+
function Zc(e) {
|
|
5512
5541
|
return e.replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n");
|
|
5513
5542
|
}
|
|
5514
5543
|
//#endregion
|
|
5515
5544
|
//#region src/chat/html-preview-document.ts
|
|
5516
|
-
var
|
|
5545
|
+
var Qc = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'none'; script-src 'unsafe-inline' https:; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; connect-src 'none'; frame-src 'none'; form-action 'none'; base-uri 'none'\">\n</head><body><script>\naddEventListener('load', () => {\n document.open();\n addEventListener('message', function connect(event) {\n if (event.source !== parent || event.data !== 'codex-html-connect' || !event.ports[0]) return;\n removeEventListener('message', connect);\n const port = event.ports[0];\n port.onmessage = ({ data }) => {\n if (typeof data.chunk !== 'string') return;\n if (data.chunk) document.write(data.chunk);\n if (data.complete) document.close();\n };\n });\n parent.postMessage('codex-html-ready', '*');\n}, { once: true });\n<\/script></body></html>", $c = { class: "codex-chat-theme chat-html-block" }, el = { class: "chat-html-block__header" }, tl = { class: "chat-html-block__title" }, nl = {
|
|
5517
5546
|
key: 0,
|
|
5518
5547
|
class: "chat-html-block__status"
|
|
5519
|
-
},
|
|
5548
|
+
}, rl = { class: "chat-html-block__actions" }, il = { class: "chat-html-block__viewport" }, al = ["srcdoc", "title"], ol = { key: 0 }, sl = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
5520
5549
|
__name: "ChatHtmlBlock",
|
|
5521
5550
|
props: {
|
|
5522
5551
|
source: {},
|
|
@@ -5545,7 +5574,7 @@ var Yc = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
|
|
|
5545
5574
|
}), f = !0, v());
|
|
5546
5575
|
}
|
|
5547
5576
|
function b() {
|
|
5548
|
-
return
|
|
5577
|
+
return qc(t.source, r);
|
|
5549
5578
|
}
|
|
5550
5579
|
function x() {
|
|
5551
5580
|
let e = URL.createObjectURL(new Blob([t.source], { type: "text/html" })), n = document.createElement("a");
|
|
@@ -5556,10 +5585,10 @@ var Yc = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
|
|
|
5556
5585
|
return W(() => [t.source, t.complete], v), D(() => window.addEventListener("message", y)), E(() => {
|
|
5557
5586
|
window.removeEventListener("message", y), _();
|
|
5558
5587
|
for (let [e, t] of g) clearTimeout(t), URL.revokeObjectURL(e);
|
|
5559
|
-
}), (t, r) => (k(), l("section",
|
|
5560
|
-
u("span",
|
|
5561
|
-
e.complete ? c("", !0) : (k(), l("span",
|
|
5562
|
-
u("div",
|
|
5588
|
+
}), (t, r) => (k(), l("section", $c, [u("header", el, [
|
|
5589
|
+
u("span", tl, z(e.title || V(n)("chat.html.title")), 1),
|
|
5590
|
+
e.complete ? c("", !0) : (k(), l("span", nl, z(V(n)("chat.html.streaming")), 1)),
|
|
5591
|
+
u("div", rl, [
|
|
5563
5592
|
m(Ss, {
|
|
5564
5593
|
label: V(n)(a.value ? "chat.html.preview" : "chat.html.source"),
|
|
5565
5594
|
onClick: r[0] ||= (e) => a.value = !a.value
|
|
@@ -5580,57 +5609,57 @@ var Yc = "<!doctype html><html><head>\n<meta http-equiv=\"Content-Security-Polic
|
|
|
5580
5609
|
_: 1
|
|
5581
5610
|
}, 8, ["label"])
|
|
5582
5611
|
])
|
|
5583
|
-
]), u("div",
|
|
5612
|
+
]), u("div", il, [re((k(), l("iframe", {
|
|
5584
5613
|
key: o.value,
|
|
5585
5614
|
ref_key: "frame",
|
|
5586
5615
|
ref: i,
|
|
5587
|
-
srcdoc: V(
|
|
5616
|
+
srcdoc: V(Qc),
|
|
5588
5617
|
title: e.title || V(n)("chat.html.title"),
|
|
5589
5618
|
sandbox: "allow-scripts",
|
|
5590
5619
|
referrerpolicy: "no-referrer"
|
|
5591
|
-
}, null, 8,
|
|
5620
|
+
}, null, 8, al)), [[ne, !a.value]]), a.value ? (k(), l("pre", ol, [u("code", null, z(e.source), 1)])) : c("", !0)])]));
|
|
5592
5621
|
}
|
|
5593
|
-
}), [["__scopeId", "data-v-f327ab9d"]]),
|
|
5594
|
-
function
|
|
5595
|
-
ee(
|
|
5622
|
+
}), [["__scopeId", "data-v-f327ab9d"]]), cl = () => void 0, ll = Symbol("codex-app-sdk-tool-presentation");
|
|
5623
|
+
function ul(e) {
|
|
5624
|
+
ee(ll, e);
|
|
5596
5625
|
}
|
|
5597
|
-
function
|
|
5598
|
-
return b(
|
|
5626
|
+
function dl() {
|
|
5627
|
+
return b(ll, cl);
|
|
5599
5628
|
}
|
|
5600
5629
|
//#endregion
|
|
5601
5630
|
//#region src/chat/tool-call-details.ts
|
|
5602
|
-
var
|
|
5603
|
-
function
|
|
5604
|
-
ee(
|
|
5631
|
+
var fl = Symbol("codex-app-sdk-tool-call-details");
|
|
5632
|
+
function pl(e) {
|
|
5633
|
+
ee(fl, e);
|
|
5605
5634
|
}
|
|
5606
|
-
function
|
|
5607
|
-
let e = b(
|
|
5635
|
+
function ml() {
|
|
5636
|
+
let e = b(fl, !1);
|
|
5608
5637
|
return o(() => !!B(e));
|
|
5609
5638
|
}
|
|
5610
5639
|
//#endregion
|
|
5611
5640
|
//#region src/chat/ChatToolCall.vue?vue&type=script&setup=true&lang.ts
|
|
5612
|
-
var
|
|
5641
|
+
var hl = {
|
|
5613
5642
|
key: 0,
|
|
5614
5643
|
class: "chat-tool-call__summary"
|
|
5615
|
-
},
|
|
5644
|
+
}, gl = {
|
|
5616
5645
|
key: 1,
|
|
5617
5646
|
class: "chat-tool-call__header chat-tool-call__header--static"
|
|
5618
|
-
},
|
|
5647
|
+
}, _l = {
|
|
5619
5648
|
key: 3,
|
|
5620
5649
|
class: "chat-tool-call__body"
|
|
5621
|
-
},
|
|
5650
|
+
}, vl = {
|
|
5622
5651
|
key: 0,
|
|
5623
5652
|
class: "chat-tool-call__section"
|
|
5624
|
-
},
|
|
5653
|
+
}, yl = { class: "chat-tool-call__json" }, bl = {
|
|
5625
5654
|
key: 1,
|
|
5626
5655
|
class: "chat-tool-call__section"
|
|
5627
|
-
},
|
|
5656
|
+
}, xl = { class: "chat-tool-call__json" }, Sl = { class: "chat-tool-call__body" }, Cl = {
|
|
5628
5657
|
key: 0,
|
|
5629
5658
|
class: "chat-tool-call__section"
|
|
5630
|
-
},
|
|
5659
|
+
}, wl = { class: "chat-tool-call__json" }, Tl = {
|
|
5631
5660
|
key: 1,
|
|
5632
5661
|
class: "chat-tool-call__section"
|
|
5633
|
-
},
|
|
5662
|
+
}, El = { class: "chat-tool-call__json" }, Dl = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
5634
5663
|
__name: "ChatToolCall",
|
|
5635
5664
|
props: {
|
|
5636
5665
|
answeredClientRequestIds: {},
|
|
@@ -5649,7 +5678,7 @@ var fl = {
|
|
|
5649
5678
|
"open-link"
|
|
5650
5679
|
],
|
|
5651
5680
|
setup(e, { emit: t }) {
|
|
5652
|
-
let n = e, r = t, i = Wn(), a =
|
|
5681
|
+
let n = e, r = t, i = Wn(), a = dl(), d = M(!1), f = ml(), p = o(() => yn(n.toolCall)), h = o(() => !n.toolCall.done && n.toolCall.state !== "completed"), g = o(() => Q(n.toolCall.status)), _ = o(() => a({
|
|
5653
5682
|
descriptor: g.value,
|
|
5654
5683
|
...n.toolCall.kind ? { kind: n.toolCall.kind } : {},
|
|
5655
5684
|
...n.toolCall.metadata ? { metadata: n.toolCall.metadata } : {},
|
|
@@ -5687,7 +5716,7 @@ var fl = {
|
|
|
5687
5716
|
"chat-tool-call--open": d.value,
|
|
5688
5717
|
[`chat-tool-call--${e.toolCall.state}`]: !0
|
|
5689
5718
|
}])
|
|
5690
|
-
}, [e.summaryOnly ? (k(), l("div",
|
|
5719
|
+
}, [e.summaryOnly ? (k(), l("div", hl, [m(So, {
|
|
5691
5720
|
"line-diff": w.value,
|
|
5692
5721
|
running: h.value,
|
|
5693
5722
|
title: x.value.title,
|
|
@@ -5737,7 +5766,7 @@ var fl = {
|
|
|
5737
5766
|
]), (k(), s(L(d.value ? V(ue) : V(ce)), {
|
|
5738
5767
|
class: "chat-tool-call__chevron",
|
|
5739
5768
|
size: 15
|
|
5740
|
-
}))])) : (k(), l("div",
|
|
5769
|
+
}))])) : (k(), l("div", gl, [m(So, {
|
|
5741
5770
|
"line-diff": w.value,
|
|
5742
5771
|
running: h.value,
|
|
5743
5772
|
title: x.value.title,
|
|
@@ -5756,22 +5785,22 @@ var fl = {
|
|
|
5756
5785
|
"title-target-parts",
|
|
5757
5786
|
"tool-call",
|
|
5758
5787
|
"tool-presentation"
|
|
5759
|
-
])])), e.headerless && D.value ? (k(), l("div",
|
|
5788
|
+
])])), e.headerless && D.value ? (k(), l("div", _l, [T.value ? (k(), l("div", vl, [n[5] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", yl, z(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", bl, [n[6] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", xl, z(A(e.toolCall.result)), 1)])) : c("", !0)])) : O.value ? (k(), s(Rs, {
|
|
5760
5789
|
key: 4,
|
|
5761
5790
|
open: d.value
|
|
5762
5791
|
}, {
|
|
5763
|
-
default: G(() => [u("div",
|
|
5792
|
+
default: G(() => [u("div", Sl, [T.value ? (k(), l("div", Cl, [n[7] ||= u("div", { class: "chat-tool-call__section-title" }, "Input", -1), u("pre", wl, z(A(p.value)), 1)])) : c("", !0), E.value ? (k(), l("div", Tl, [n[8] ||= u("div", { class: "chat-tool-call__section-title" }, "Result", -1), u("pre", El, z(A(e.toolCall.result)), 1)])) : c("", !0)])]),
|
|
5764
5793
|
_: 1
|
|
5765
5794
|
}, 8, ["open"])) : c("", !0)], 2));
|
|
5766
5795
|
}
|
|
5767
|
-
}), [["__scopeId", "data-v-f2711f10"]]),
|
|
5796
|
+
}), [["__scopeId", "data-v-f2711f10"]]), Ol = {
|
|
5768
5797
|
key: 1,
|
|
5769
5798
|
class: "codex-chat-theme chat-tool-group"
|
|
5770
|
-
},
|
|
5799
|
+
}, kl = ["data-label"], Al = {
|
|
5771
5800
|
key: 0,
|
|
5772
5801
|
class: "chat-tool-group__diff",
|
|
5773
5802
|
"aria-label": "Total line changes"
|
|
5774
|
-
},
|
|
5803
|
+
}, jl = { class: "chat-tool-group__body" }, Ml = { class: "chat-tool-group__running-item-content" }, Nl = 3e3, Pl = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
5775
5804
|
__name: "ChatToolGroup",
|
|
5776
5805
|
props: {
|
|
5777
5806
|
activityTitle: {},
|
|
@@ -5788,7 +5817,7 @@ var fl = {
|
|
|
5788
5817
|
"open-link"
|
|
5789
5818
|
],
|
|
5790
5819
|
setup(e, { emit: n }) {
|
|
5791
|
-
let r = e, i = n, d = M(!1), f = M(/* @__PURE__ */ new Set()), p = /* @__PURE__ */ new Map(), h = new Set(r.toolCalls.filter(I).map((e) => e.id)), g =
|
|
5820
|
+
let r = e, i = n, d = M(!1), f = M(/* @__PURE__ */ new Set()), p = /* @__PURE__ */ new Map(), h = new Set(r.toolCalls.filter(I).map((e) => e.id)), g = ml(), _ = o(() => r.showToolDetails ?? g.value), v = o(() => r.toolCalls.length === 1), y = o(() => {
|
|
5792
5821
|
if (!(!v.value || !r.toolCalls[0] || !te(r.toolCalls[0]))) return r.toolCalls[0];
|
|
5793
5822
|
}), b = o(() => r.toolCalls.filter((e) => !I(e))), x = o(() => !r.activityTitle && v.value && b.value.length === 1 ? r.toolCalls[0] : void 0), S = o(() => r.toolCalls.filter((e) => I(e) || !d.value && f.value.has(e.id) && x.value?.id !== e.id)), w = M(S.value.length > 0), T = o(() => Sn(r.toolCalls)), D = o(() => !!r.activityTitle || r.toolCalls.length > 1 || _.value && r.toolCalls.some(R)), O = o(() => {
|
|
5794
5823
|
if (b.value.length > 0) {
|
|
@@ -5823,7 +5852,7 @@ var fl = {
|
|
|
5823
5852
|
return `${e} ${e === 1 ? "action" : "actions"}`;
|
|
5824
5853
|
}
|
|
5825
5854
|
function j(e) {
|
|
5826
|
-
f.value = new Set(f.value).add(e), p.set(e, setTimeout(() => N(e),
|
|
5855
|
+
f.value = new Set(f.value).add(e), p.set(e, setTimeout(() => N(e), Nl));
|
|
5827
5856
|
}
|
|
5828
5857
|
function N(e) {
|
|
5829
5858
|
let t = p.get(e);
|
|
@@ -5844,21 +5873,21 @@ var fl = {
|
|
|
5844
5873
|
function R(e) {
|
|
5845
5874
|
return yn(e) !== void 0 || e.result !== void 0 && e.result !== null;
|
|
5846
5875
|
}
|
|
5847
|
-
return (n, o) => y.value ? (k(), s(
|
|
5876
|
+
return (n, o) => y.value ? (k(), s(Dl, {
|
|
5848
5877
|
key: 0,
|
|
5849
5878
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
5850
5879
|
"tool-call": y.value,
|
|
5851
5880
|
onCancel: o[0] ||= (e) => i("cancel"),
|
|
5852
5881
|
onClientResponse: o[1] ||= (e) => i("client-response", e),
|
|
5853
5882
|
onOpenLink: o[2] ||= (e) => i("open-link", e)
|
|
5854
|
-
}, null, 8, ["answered-client-request-ids", "tool-call"])) : (k(), l("section",
|
|
5883
|
+
}, null, 8, ["answered-client-request-ids", "tool-call"])) : (k(), l("section", Ol, [
|
|
5855
5884
|
r.toolCalls.length === 0 || x.value || b.value.length > 0 ? (k(), s(L(D.value ? "button" : "div"), {
|
|
5856
5885
|
key: 0,
|
|
5857
5886
|
class: C(["chat-tool-group__header", { "chat-tool-group__header--static": !D.value }]),
|
|
5858
5887
|
type: D.value ? "button" : void 0,
|
|
5859
5888
|
onClick: ee
|
|
5860
5889
|
}, {
|
|
5861
|
-
default: G(() => [x.value ? (k(), s(
|
|
5890
|
+
default: G(() => [x.value ? (k(), s(Dl, {
|
|
5862
5891
|
key: 0,
|
|
5863
5892
|
class: "chat-tool-group__active",
|
|
5864
5893
|
"summary-only": "",
|
|
@@ -5878,8 +5907,8 @@ var fl = {
|
|
|
5878
5907
|
u("span", {
|
|
5879
5908
|
class: "chat-tool-group__title",
|
|
5880
5909
|
"data-label": O.value
|
|
5881
|
-
}, z(O.value), 9,
|
|
5882
|
-
T.value ? (k(), l("span",
|
|
5910
|
+
}, z(O.value), 9, kl),
|
|
5911
|
+
T.value ? (k(), l("span", Al, [T.value.addedLines ? (k(), s(co, {
|
|
5883
5912
|
key: 0,
|
|
5884
5913
|
kind: "added",
|
|
5885
5914
|
label: "Total added lines",
|
|
@@ -5899,7 +5928,7 @@ var fl = {
|
|
|
5899
5928
|
_: 1
|
|
5900
5929
|
}, 8, ["class", "type"])) : c("", !0),
|
|
5901
5930
|
m(Rs, { open: d.value }, {
|
|
5902
|
-
default: G(() => [u("div",
|
|
5931
|
+
default: G(() => [u("div", jl, [(k(!0), l(t, null, P(b.value, (t) => (k(), s(Dl, {
|
|
5903
5932
|
key: t.id,
|
|
5904
5933
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
5905
5934
|
headerless: v.value,
|
|
@@ -5927,7 +5956,7 @@ var fl = {
|
|
|
5927
5956
|
default: G(() => [(k(!0), l(t, null, P(S.value, (t) => (k(), l("div", {
|
|
5928
5957
|
key: t.id,
|
|
5929
5958
|
class: "chat-tool-group__running-item"
|
|
5930
|
-
}, [u("div",
|
|
5959
|
+
}, [u("div", Ml, [m(Dl, {
|
|
5931
5960
|
class: "chat-tool-group__active",
|
|
5932
5961
|
"summary-only": !_.value,
|
|
5933
5962
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
@@ -5949,19 +5978,19 @@ var fl = {
|
|
|
5949
5978
|
}), [["__scopeId", "data-v-7a9a4bb4"]]);
|
|
5950
5979
|
//#endregion
|
|
5951
5980
|
//#region src/chat/user-text.ts
|
|
5952
|
-
function
|
|
5981
|
+
function Fl(e, t = [], n = [], r = []) {
|
|
5953
5982
|
let i = [], a = 0;
|
|
5954
|
-
for (let o of e.matchAll(
|
|
5983
|
+
for (let o of e.matchAll(Hl())) {
|
|
5955
5984
|
let s = o.index ?? 0;
|
|
5956
5985
|
s > a && i.push({
|
|
5957
5986
|
type: "text",
|
|
5958
5987
|
text: e.slice(a, s)
|
|
5959
5988
|
});
|
|
5960
5989
|
let c = o[0], l = o[1], u = o[2], d = o[3], f = o[4], p = o[5];
|
|
5961
|
-
l === void 0 ? u === void 0 ? f === void 0 ? i.push({ type: "line-break" }) : i.push(
|
|
5990
|
+
l === void 0 ? u === void 0 ? f === void 0 ? i.push({ type: "line-break" }) : i.push(Il(f, p, t, n, r) ?? {
|
|
5962
5991
|
type: "text",
|
|
5963
5992
|
text: c
|
|
5964
|
-
}) : i.push(
|
|
5993
|
+
}) : i.push(Ll(u, d, t, n) ?? {
|
|
5965
5994
|
type: "text",
|
|
5966
5995
|
text: c
|
|
5967
5996
|
}) : i.push({
|
|
@@ -5974,7 +6003,7 @@ function Ml(e, t = [], n = [], r = []) {
|
|
|
5974
6003
|
text: e.slice(a)
|
|
5975
6004
|
}), i;
|
|
5976
6005
|
}
|
|
5977
|
-
function
|
|
6006
|
+
function Il(e, t, n, r, i) {
|
|
5978
6007
|
if (e === "$") {
|
|
5979
6008
|
let i = r.find((e) => Dr(e, t));
|
|
5980
6009
|
if (i) return {
|
|
@@ -6009,27 +6038,27 @@ function Nl(e, t, n, r, i) {
|
|
|
6009
6038
|
...s
|
|
6010
6039
|
} : null;
|
|
6011
6040
|
}
|
|
6012
|
-
function
|
|
6013
|
-
let i = e.trim(), a =
|
|
6041
|
+
function Ll(e, t, n, r) {
|
|
6042
|
+
let i = e.trim(), a = Rl(t);
|
|
6014
6043
|
if (i.startsWith("@") && a.startsWith("plugin://")) {
|
|
6015
|
-
let e =
|
|
6044
|
+
let e = Bl(a.slice(9));
|
|
6016
6045
|
if (!e) return null;
|
|
6017
6046
|
let t = n.find((t) => t.id === e), r = i.slice(1) || e.split("@")[0];
|
|
6018
6047
|
return {
|
|
6019
6048
|
type: "plugin-mention",
|
|
6020
|
-
displayName: t?.displayName ||
|
|
6049
|
+
displayName: t?.displayName || Vl(r, "App"),
|
|
6021
6050
|
href: a,
|
|
6022
6051
|
label: i,
|
|
6023
6052
|
...t ? { plugin: t } : {}
|
|
6024
6053
|
};
|
|
6025
6054
|
}
|
|
6026
6055
|
if (i.startsWith("$")) {
|
|
6027
|
-
let e =
|
|
6056
|
+
let e = zl(a);
|
|
6028
6057
|
if (!e) return null;
|
|
6029
6058
|
let t = r.find((t) => t.path === e);
|
|
6030
6059
|
return {
|
|
6031
6060
|
type: "skill-mention",
|
|
6032
|
-
displayName: t ? wr(t, n) :
|
|
6061
|
+
displayName: t ? wr(t, n) : Vl(i, "Skill"),
|
|
6033
6062
|
href: a,
|
|
6034
6063
|
label: i,
|
|
6035
6064
|
...t ? { skill: t } : {}
|
|
@@ -6037,12 +6066,12 @@ function Pl(e, t, n, r) {
|
|
|
6037
6066
|
}
|
|
6038
6067
|
return null;
|
|
6039
6068
|
}
|
|
6040
|
-
function
|
|
6069
|
+
function Rl(e) {
|
|
6041
6070
|
let t = e.trim();
|
|
6042
6071
|
return t.startsWith("<") && t.endsWith(">") ? t.slice(1, -1).trim() : t;
|
|
6043
6072
|
}
|
|
6044
|
-
function
|
|
6045
|
-
let t = e.split(/[?#]/, 1)[0], n =
|
|
6073
|
+
function zl(e) {
|
|
6074
|
+
let t = e.split(/[?#]/, 1)[0], n = Bl(t);
|
|
6046
6075
|
if (n.startsWith("file://")) try {
|
|
6047
6076
|
n = decodeURIComponent(new URL(n).pathname);
|
|
6048
6077
|
} catch {
|
|
@@ -6050,26 +6079,26 @@ function Il(e) {
|
|
|
6050
6079
|
}
|
|
6051
6080
|
return /(?:^|[\\/])SKILL\.md$/i.test(n) ? n : null;
|
|
6052
6081
|
}
|
|
6053
|
-
function
|
|
6082
|
+
function Bl(e) {
|
|
6054
6083
|
try {
|
|
6055
6084
|
return decodeURIComponent(e);
|
|
6056
6085
|
} catch {
|
|
6057
6086
|
return e;
|
|
6058
6087
|
}
|
|
6059
6088
|
}
|
|
6060
|
-
function
|
|
6089
|
+
function Vl(e, t) {
|
|
6061
6090
|
let n = e.trim().replace(/^[@$]/, "");
|
|
6062
|
-
return !n ||
|
|
6091
|
+
return !n || Ul(n) ? t : n.split(/[-_:\s]/).filter(Boolean).map((e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" ");
|
|
6063
6092
|
}
|
|
6064
|
-
function
|
|
6093
|
+
function Hl() {
|
|
6065
6094
|
return /`([^`\n]+)`|\[([^\]\n]+)\]\(([^)\n]+)\)|(?<![\w.%+-])([$@/])([A-Za-z0-9_.:-]+(?:[ \t]+\([A-Za-z0-9_.-]+\))?)|(\n)/g;
|
|
6066
6095
|
}
|
|
6067
|
-
function
|
|
6096
|
+
function Ul(e) {
|
|
6068
6097
|
return /^app[-_]?[a-f\d]{16,}$/i.test(e);
|
|
6069
6098
|
}
|
|
6070
6099
|
//#endregion
|
|
6071
6100
|
//#region src/chat/ChatUserText.vue?vue&type=script&setup=true&lang.ts
|
|
6072
|
-
var
|
|
6101
|
+
var Wl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Gl = { key: 0 }, Kl = { key: 1 }, ql = { key: 2 }, Jl = ["title"], Yl = { class: "chat-user-text__mention-label" }, Xl = ["title"], Zl = ["src", "onError"], Ql = ["src", "onError"], $l = {
|
|
6073
6102
|
key: 2,
|
|
6074
6103
|
class: "chat-user-text__mention-icon",
|
|
6075
6104
|
"aria-hidden": "true",
|
|
@@ -6079,7 +6108,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6079
6108
|
"stroke-width": "1.9",
|
|
6080
6109
|
"stroke-linecap": "round",
|
|
6081
6110
|
"stroke-linejoin": "round"
|
|
6082
|
-
},
|
|
6111
|
+
}, eu = { class: "chat-user-text__mention-label" }, tu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6083
6112
|
__name: "ChatUserText",
|
|
6084
6113
|
props: {
|
|
6085
6114
|
content: {},
|
|
@@ -6088,7 +6117,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6088
6117
|
skills: { default: () => [] }
|
|
6089
6118
|
},
|
|
6090
6119
|
setup(e) {
|
|
6091
|
-
let n = e, r = A(/* @__PURE__ */ new Set()), i = o(() =>
|
|
6120
|
+
let n = e, r = A(/* @__PURE__ */ new Set()), i = o(() => Fl(n.content, n.plugins, n.skills, n.mentionGroups));
|
|
6092
6121
|
function a(e, t) {
|
|
6093
6122
|
let n = e.type === "plugin-mention" ? t === "dark" && e.plugin?.iconUrlDark !== e.plugin?.iconUrl ? e.plugin?.iconUrlDark : t === "light" ? e.plugin?.iconUrl : void 0 : t === "light" ? e.skill?.iconSmall : void 0;
|
|
6094
6123
|
return !n || r.has(n) ? null : n.startsWith("blob:") || n.startsWith("https://") || /^data:image\/(?:avif|bmp|gif|jpeg|png|svg\+xml|webp|x-icon);base64,/i.test(n) ? n : null;
|
|
@@ -6103,7 +6132,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6103
6132
|
function h(e) {
|
|
6104
6133
|
return !!(e && /^#[\da-f]{3,8}$/i.test(e));
|
|
6105
6134
|
}
|
|
6106
|
-
return (e, n) => (k(), l("div",
|
|
6135
|
+
return (e, n) => (k(), l("div", Wl, [u("p", null, [(k(!0), l(t, null, P(i.value, (i, o) => (k(), l(t, { key: `${i.type}-${o}` }, [i.type === "text" ? (k(), l("span", Gl, z(i.text), 1)) : i.type === "code" ? (k(), l("code", Kl, z(i.text), 1)) : i.type === "line-break" ? (k(), l("br", ql)) : i.type === "custom-mention" ? F(e.$slots, "mention", {
|
|
6107
6136
|
group: i.group,
|
|
6108
6137
|
item: i.item,
|
|
6109
6138
|
token: i,
|
|
@@ -6114,7 +6143,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6114
6143
|
}, [m(V(Le), {
|
|
6115
6144
|
class: "chat-user-text__mention-icon",
|
|
6116
6145
|
"aria-hidden": "true"
|
|
6117
|
-
}), u("span",
|
|
6146
|
+
}), u("span", Yl, z(i.displayName), 1)], 8, Jl)], !0, 3) : (k(), l("span", {
|
|
6118
6147
|
key: 4,
|
|
6119
6148
|
class: C(["chat-user-text__mention", `chat-user-text__mention--${i.type === "plugin-mention" ? "plugin" : "skill"}`]),
|
|
6120
6149
|
style: T(d(i)),
|
|
@@ -6133,7 +6162,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6133
6162
|
loading: "lazy",
|
|
6134
6163
|
referrerpolicy: "no-referrer",
|
|
6135
6164
|
onError: (e) => r.add(a(i, "light"))
|
|
6136
|
-
}, null, 40,
|
|
6165
|
+
}, null, 40, Zl)) : c("", !0),
|
|
6137
6166
|
a(i, "dark") ? (k(), l("img", {
|
|
6138
6167
|
key: 1,
|
|
6139
6168
|
class: "chat-user-text__mention-image chat-user-text__mention-image--dark",
|
|
@@ -6144,18 +6173,18 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6144
6173
|
loading: "lazy",
|
|
6145
6174
|
referrerpolicy: "no-referrer",
|
|
6146
6175
|
onError: (e) => r.add(a(i, "dark"))
|
|
6147
|
-
}, null, 40,
|
|
6148
|
-
i.type === "plugin-mention" ? (k(), l("svg",
|
|
6176
|
+
}, null, 40, Ql)) : c("", !0),
|
|
6177
|
+
i.type === "plugin-mention" ? (k(), l("svg", $l, [...n[0] ||= [f("<path d=\"M8 3v4\" data-v-cd57e1c4></path><path d=\"M16 3v4\" data-v-cd57e1c4></path><path d=\"M6 7h12v3a6 6 0 0 1-12 0V7\" data-v-cd57e1c4></path><path d=\"M12 16v5\" data-v-cd57e1c4></path><path d=\"M9 21h6\" data-v-cd57e1c4></path>", 5)]])) : (k(), s(V(Le), {
|
|
6149
6178
|
key: 3,
|
|
6150
6179
|
class: "chat-user-text__mention-icon",
|
|
6151
6180
|
"aria-hidden": "true"
|
|
6152
6181
|
}))
|
|
6153
|
-
], 2), u("span",
|
|
6182
|
+
], 2), u("span", eu, z(i.displayName), 1)], 14, Xl))], 64))), 128))])]));
|
|
6154
6183
|
}
|
|
6155
|
-
}), [["__scopeId", "data-v-cd57e1c4"]]),
|
|
6184
|
+
}), [["__scopeId", "data-v-cd57e1c4"]]), nu = {
|
|
6156
6185
|
key: 1,
|
|
6157
6186
|
class: "codex-chat-theme chat-visualization-block"
|
|
6158
|
-
},
|
|
6187
|
+
}, ru = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6159
6188
|
__name: "ChatVisualizationBlock",
|
|
6160
6189
|
props: {
|
|
6161
6190
|
path: {},
|
|
@@ -6179,12 +6208,12 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6179
6208
|
m(V(xe), { class: "chat-visualization-block__icon" }),
|
|
6180
6209
|
u("span", null, z(e.title), 1),
|
|
6181
6210
|
m(V(he), { class: "chat-visualization-block__open" })
|
|
6182
|
-
])) : (k(), l("div",
|
|
6211
|
+
])) : (k(), l("div", nu, [m(V(xe), { class: "chat-visualization-block__icon" }), u("span", null, z(e.title), 1)]));
|
|
6183
6212
|
}
|
|
6184
|
-
}), [["__scopeId", "data-v-6aa2f6f0"]]),
|
|
6213
|
+
}), [["__scopeId", "data-v-6aa2f6f0"]]), iu = ["aria-expanded", "disabled"], au = ["data-label"], ou = { class: "chat-work-group__body" }, su = {
|
|
6185
6214
|
key: 2,
|
|
6186
6215
|
class: "chat-work-group__body chat-work-group__body--continuation"
|
|
6187
|
-
},
|
|
6216
|
+
}, cu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6188
6217
|
__name: "ChatWorkGroup",
|
|
6189
6218
|
props: {
|
|
6190
6219
|
active: { type: Boolean },
|
|
@@ -6220,18 +6249,18 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6220
6249
|
}, [u("span", {
|
|
6221
6250
|
class: C(["chat-work-group__title", { "codex-text-shimmer": m.value }]),
|
|
6222
6251
|
"data-label": _.value
|
|
6223
|
-
}, z(_.value), 11,
|
|
6252
|
+
}, z(_.value), 11, au), m.value ? c("", !0) : (k(), s(L(h.value ? V(ce) : V(le)), {
|
|
6224
6253
|
key: 0,
|
|
6225
6254
|
size: 15
|
|
6226
|
-
}))], 8,
|
|
6255
|
+
}))], 8, iu)) : c("", !0), g.value ? (k(), s(Rs, {
|
|
6227
6256
|
key: 1,
|
|
6228
6257
|
open: h.value
|
|
6229
6258
|
}, {
|
|
6230
|
-
default: G(() => [u("div",
|
|
6259
|
+
default: G(() => [u("div", ou, [F(e.$slots, "default", {}, void 0, !0)])]),
|
|
6231
6260
|
_: 3
|
|
6232
|
-
}, 8, ["open"])) : (k(), l("div",
|
|
6261
|
+
}, 8, ["open"])) : (k(), l("div", su, [F(e.$slots, "default", {}, void 0, !0)]))], 2)) : c("", !0);
|
|
6233
6262
|
}
|
|
6234
|
-
}), [["__scopeId", "data-v-a9b546fe"]]),
|
|
6263
|
+
}), [["__scopeId", "data-v-a9b546fe"]]), lu = ["innerHTML"], uu = ["innerHTML"], du = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6235
6264
|
__name: "ChatMessageBlock",
|
|
6236
6265
|
props: {
|
|
6237
6266
|
block: {},
|
|
@@ -6254,13 +6283,13 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6254
6283
|
"send-follow-up"
|
|
6255
6284
|
],
|
|
6256
6285
|
setup(e, { emit: n }) {
|
|
6257
|
-
let r = e, i = n, a = Wn(), f = Ti(), p = o(() => r.block.type === "text" || r.block.type === "reasoning" ?
|
|
6286
|
+
let r = e, i = n, a = Wn(), f = Ti(), p = o(() => r.block.type === "text" || r.block.type === "reasoning" ? kc(r.block.content, { codeCopyLabel: a("chat.code.copy") }) : ""), h = /* @__PURE__ */ new Map();
|
|
6258
6287
|
async function g(e) {
|
|
6259
6288
|
let t = (e.target instanceof Element ? e.target : null)?.closest("[data-chat-code-copy]");
|
|
6260
6289
|
if (!t) return;
|
|
6261
6290
|
let n = t.closest(".chat-code-block")?.querySelector("pre code")?.textContent;
|
|
6262
6291
|
if (n === void 0) return;
|
|
6263
|
-
await
|
|
6292
|
+
await qc(n, f), t.dataset.copied = "true", t.setAttribute("aria-label", a("chat.code.copied")), t.title = a("chat.code.copied");
|
|
6264
6293
|
let r = h.get(t);
|
|
6265
6294
|
clearTimeout(r), h.set(t, setTimeout(() => {
|
|
6266
6295
|
t.removeAttribute("data-copied"), t.setAttribute("aria-label", a("chat.code.copy")), t.title = a("chat.code.copy"), h.delete(t);
|
|
@@ -6274,7 +6303,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6274
6303
|
return e.block.type === "user-text" ? F(n.$slots, "text", {
|
|
6275
6304
|
block: e.block,
|
|
6276
6305
|
content: e.block.content
|
|
6277
|
-
}, () => [m(
|
|
6306
|
+
}, () => [m(tu, {
|
|
6278
6307
|
class: "chat-message-block chat-message-block--text",
|
|
6279
6308
|
content: e.block.content,
|
|
6280
6309
|
"mention-groups": e.mentionGroups,
|
|
@@ -6297,12 +6326,12 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6297
6326
|
class: "codex-chat-theme chat-message-block chat-message-block--text codex-markdown",
|
|
6298
6327
|
innerHTML: p.value,
|
|
6299
6328
|
onClick: g
|
|
6300
|
-
}, null, 8,
|
|
6329
|
+
}, null, 8, lu)], !0, 1) : e.block.type === "reasoning" ? (k(), l("div", {
|
|
6301
6330
|
key: 2,
|
|
6302
6331
|
class: "codex-chat-theme chat-message-block chat-message-block--reasoning codex-markdown",
|
|
6303
6332
|
innerHTML: p.value,
|
|
6304
6333
|
onClick: g
|
|
6305
|
-
}, null, 8,
|
|
6334
|
+
}, null, 8, uu)) : e.block.type === "html" ? (k(), s(sl, {
|
|
6306
6335
|
key: 3,
|
|
6307
6336
|
source: e.block.source,
|
|
6308
6337
|
title: e.block.title,
|
|
@@ -6314,14 +6343,14 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6314
6343
|
])) : e.block.type === "mermaid" ? F(n.$slots, "mermaid", {
|
|
6315
6344
|
block: e.block,
|
|
6316
6345
|
code: e.block.code
|
|
6317
|
-
}, () => [m(
|
|
6346
|
+
}, () => [m(_c, { code: e.block.code }, null, 8, ["code"])], !0, 4) : e.block.type === "visualization" ? F(n.$slots, "visualization", { block: e.block }, () => [m(ru, {
|
|
6318
6347
|
path: e.block.path,
|
|
6319
6348
|
title: e.block.title,
|
|
6320
6349
|
onOpenVisualization: r[0] ||= (e) => i("open-visualization", e)
|
|
6321
6350
|
}, null, 8, ["path", "title"])], !0, 5) : e.block.type === "media" ? F(n.$slots, "media", {
|
|
6322
6351
|
block: e.block,
|
|
6323
6352
|
media: e.block.media
|
|
6324
|
-
}, () => [m(
|
|
6353
|
+
}, () => [m(nc, {
|
|
6325
6354
|
media: e.block.media,
|
|
6326
6355
|
"open-image": e.openImage
|
|
6327
6356
|
}, null, 8, ["media", "open-image"])], !0, 6) : e.block.type === "question" ? (k(), s(Jo, {
|
|
@@ -6343,7 +6372,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6343
6372
|
}, null, 8, ["attachment", "open-image"])], !0, 8) : e.block.type === "tool" ? F(n.$slots, "tool", {
|
|
6344
6373
|
block: e.block,
|
|
6345
6374
|
toolCall: e.block.toolCall
|
|
6346
|
-
}, () => [m(
|
|
6375
|
+
}, () => [m(Dl, {
|
|
6347
6376
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
6348
6377
|
"show-tool-details": e.showToolDetails,
|
|
6349
6378
|
"tool-call": e.block.toolCall,
|
|
@@ -6357,7 +6386,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6357
6386
|
])], !0, 9) : e.block.type === "tool-group" ? F(n.$slots, "tool", {
|
|
6358
6387
|
block: e.block,
|
|
6359
6388
|
toolCalls: e.block.toolCalls
|
|
6360
|
-
}, () => [m(
|
|
6389
|
+
}, () => [m(Pl, {
|
|
6361
6390
|
"activity-title": e.block.activityTitle,
|
|
6362
6391
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
6363
6392
|
"show-tool-details": e.showToolDetails,
|
|
@@ -6370,7 +6399,7 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6370
6399
|
"answered-client-request-ids",
|
|
6371
6400
|
"show-tool-details",
|
|
6372
6401
|
"tool-calls"
|
|
6373
|
-
])], !0, 10) : e.block.type === "work-group" ? (k(), s(
|
|
6402
|
+
])], !0, 10) : e.block.type === "work-group" ? (k(), s(cu, {
|
|
6374
6403
|
key: 11,
|
|
6375
6404
|
active: e.block.active,
|
|
6376
6405
|
continuation: e.block.continuation,
|
|
@@ -6432,15 +6461,15 @@ var Vl = { class: "codex-chat-theme chat-user-text codex-markdown" }, Hl = { key
|
|
|
6432
6461
|
}, null, 8, ["disabled", "prompts"])) : c("", !0);
|
|
6433
6462
|
};
|
|
6434
6463
|
}
|
|
6435
|
-
}), [["__scopeId", "data-v-9351ce41"]]),
|
|
6436
|
-
function
|
|
6464
|
+
}), [["__scopeId", "data-v-9351ce41"]]), fu = 1440 * 60 * 1e3;
|
|
6465
|
+
function pu(e, t = /* @__PURE__ */ new Date()) {
|
|
6437
6466
|
let n = new Date(e);
|
|
6438
6467
|
if (Number.isNaN(n.getTime())) return "";
|
|
6439
6468
|
let r = {
|
|
6440
6469
|
hour: "numeric",
|
|
6441
6470
|
minute: "2-digit"
|
|
6442
6471
|
};
|
|
6443
|
-
return
|
|
6472
|
+
return hu(n, t) ? new Intl.DateTimeFormat(void 0, r).format(n) : n.getTime() < t.getTime() && t.getTime() - n.getTime() < 7 * fu ? new Intl.DateTimeFormat(void 0, {
|
|
6444
6473
|
weekday: "short",
|
|
6445
6474
|
...r
|
|
6446
6475
|
}).format(n) : new Intl.DateTimeFormat(void 0, {
|
|
@@ -6448,19 +6477,19 @@ function uu(e, t = /* @__PURE__ */ new Date()) {
|
|
|
6448
6477
|
timeStyle: "short"
|
|
6449
6478
|
}).format(n);
|
|
6450
6479
|
}
|
|
6451
|
-
function
|
|
6480
|
+
function mu(e) {
|
|
6452
6481
|
let t = new Date(e);
|
|
6453
6482
|
return Number.isNaN(t.getTime()) ? "" : new Intl.DateTimeFormat(void 0, {
|
|
6454
6483
|
dateStyle: "full",
|
|
6455
6484
|
timeStyle: "short"
|
|
6456
6485
|
}).format(t);
|
|
6457
6486
|
}
|
|
6458
|
-
function
|
|
6487
|
+
function hu(e, t) {
|
|
6459
6488
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
6460
6489
|
}
|
|
6461
6490
|
//#endregion
|
|
6462
6491
|
//#region src/chat/ChatMessageActions.vue?vue&type=script&setup=true&lang.ts
|
|
6463
|
-
var
|
|
6492
|
+
var gu = ["aria-busy", "aria-label"], _u = ["title"], vu = ["title"], yu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6464
6493
|
__name: "ChatMessageActions",
|
|
6465
6494
|
props: {
|
|
6466
6495
|
canDelete: {
|
|
@@ -6494,7 +6523,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6494
6523
|
"retry"
|
|
6495
6524
|
],
|
|
6496
6525
|
setup(e, { emit: t }) {
|
|
6497
|
-
let n = e, r = t, i = Wn(), a = o(() => n.presentation?.copy !== !1), u = o(() => n.presentation?.delete !== !1), d = o(() => n.presentation?.edit !== !1), f = o(() => n.presentation?.fork !== !1), p = o(() => n.presentation?.quote !== !1), h = o(() => n.presentation?.retry !== !1), g = o(() => n.message.createdAt ?
|
|
6526
|
+
let n = e, r = t, i = Wn(), a = o(() => n.presentation?.copy !== !1), u = o(() => n.presentation?.delete !== !1), d = o(() => n.presentation?.edit !== !1), f = o(() => n.presentation?.fork !== !1), p = o(() => n.presentation?.quote !== !1), h = o(() => n.presentation?.retry !== !1), g = o(() => n.message.createdAt ? pu(n.message.createdAt) : ""), _ = o(() => n.message.createdAt ? mu(n.message.createdAt) : void 0);
|
|
6498
6527
|
async function v() {
|
|
6499
6528
|
await n.copyAction?.(), r("copy");
|
|
6500
6529
|
}
|
|
@@ -6507,7 +6536,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6507
6536
|
key: 0,
|
|
6508
6537
|
class: "chat-message-actions__sent-at",
|
|
6509
6538
|
title: _.value
|
|
6510
|
-
}, z(g.value), 9,
|
|
6539
|
+
}, z(g.value), 9, _u)) : c("", !0),
|
|
6511
6540
|
a.value ? (k(), s(Is, {
|
|
6512
6541
|
key: 1,
|
|
6513
6542
|
action: v,
|
|
@@ -6572,10 +6601,10 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6572
6601
|
key: 7,
|
|
6573
6602
|
class: "chat-message-actions__sent-at",
|
|
6574
6603
|
title: _.value
|
|
6575
|
-
}, z(g.value), 9,
|
|
6576
|
-
], 10,
|
|
6604
|
+
}, z(g.value), 9, vu)) : c("", !0)
|
|
6605
|
+
], 10, gu));
|
|
6577
6606
|
}
|
|
6578
|
-
}), [["__scopeId", "data-v-704b28cf"]]),
|
|
6607
|
+
}), [["__scopeId", "data-v-704b28cf"]]), bu = ["data-label"], xu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6579
6608
|
__name: "ChatCompactionMessage",
|
|
6580
6609
|
props: {
|
|
6581
6610
|
completedTitle: {},
|
|
@@ -6587,9 +6616,9 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6587
6616
|
return (e, t) => (k(), l("div", { class: C(["codex-chat-theme chat-message chat-message--compaction", { "chat-message--compaction-running": n.value }]) }, [t[0] ||= u("div", { class: "chat-message__compaction-line" }, null, -1), u("span", {
|
|
6588
6617
|
class: "chat-message__compaction-title",
|
|
6589
6618
|
"data-label": r.value
|
|
6590
|
-
}, [u("span", { class: C(["chat-message__compaction-label", { "codex-text-shimmer": n.value }]) }, z(r.value), 3)], 8,
|
|
6619
|
+
}, [u("span", { class: C(["chat-message__compaction-label", { "codex-text-shimmer": n.value }]) }, z(r.value), 3)], 8, bu)], 2));
|
|
6591
6620
|
}
|
|
6592
|
-
}), [["__scopeId", "data-v-49449489"]]),
|
|
6621
|
+
}), [["__scopeId", "data-v-49449489"]]), Su = { class: "codex-chat-theme chat-message__edit-card" }, Cu = ["aria-label", "onKeydown"], wu = { class: "chat-message__edit-actions" }, Tu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6593
6622
|
__name: "ChatMessageEditor",
|
|
6594
6623
|
props: {
|
|
6595
6624
|
cancelLabel: {},
|
|
@@ -6617,7 +6646,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6617
6646
|
let e = i.value.trim();
|
|
6618
6647
|
e && r("save", e);
|
|
6619
6648
|
}
|
|
6620
|
-
return (t, n) => (k(), l("div",
|
|
6649
|
+
return (t, n) => (k(), l("div", Su, [re(u("textarea", {
|
|
6621
6650
|
ref_key: "input",
|
|
6622
6651
|
ref: a,
|
|
6623
6652
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
@@ -6628,7 +6657,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6628
6657
|
K(q(c, ["meta", "prevent"]), ["enter"]),
|
|
6629
6658
|
K(q(c, ["ctrl", "prevent"]), ["enter"])
|
|
6630
6659
|
]
|
|
6631
|
-
}, null, 40,
|
|
6660
|
+
}, null, 40, Cu), [[U, i.value]]), u("div", wu, [u("button", {
|
|
6632
6661
|
type: "button",
|
|
6633
6662
|
class: "chat-message__edit-button",
|
|
6634
6663
|
onClick: s
|
|
@@ -6638,23 +6667,23 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6638
6667
|
onClick: c
|
|
6639
6668
|
}, z(e.saveLabel), 1)])]));
|
|
6640
6669
|
}
|
|
6641
|
-
}), [["__scopeId", "data-v-181e3239"]]),
|
|
6670
|
+
}), [["__scopeId", "data-v-181e3239"]]), Eu = { class: "chat-message__body" }, Du = {
|
|
6642
6671
|
key: 0,
|
|
6643
6672
|
class: "chat-message--steer chat-message--steer-above"
|
|
6644
|
-
},
|
|
6673
|
+
}, Ou = {
|
|
6645
6674
|
key: 1,
|
|
6646
6675
|
class: "chat-message__attachments",
|
|
6647
6676
|
"aria-label": "Message attachments"
|
|
6648
|
-
},
|
|
6677
|
+
}, ku = {
|
|
6649
6678
|
key: 2,
|
|
6650
6679
|
class: "chat-message__stack"
|
|
6651
|
-
},
|
|
6680
|
+
}, Au = {
|
|
6652
6681
|
key: 0,
|
|
6653
6682
|
class: "chat-message__empty-response"
|
|
6654
|
-
},
|
|
6683
|
+
}, ju = ["data-label"], Mu = {
|
|
6655
6684
|
key: 4,
|
|
6656
6685
|
class: "chat-message--steer chat-message--steer-below"
|
|
6657
|
-
},
|
|
6686
|
+
}, Nu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6658
6687
|
__name: "CodexMessage",
|
|
6659
6688
|
props: {
|
|
6660
6689
|
activityState: {},
|
|
@@ -6716,7 +6745,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6716
6745
|
if (!e) return;
|
|
6717
6746
|
let t = w.value.length > 0 && w.value.every((e) => e.type === "tool" || e.type === "tool-group");
|
|
6718
6747
|
return e.phased.value || e.active.value && t;
|
|
6719
|
-
}), D = o(() => _a(h.value, T.value, y.value, E.value, r.answeredClientRequestIds)), O = o(() => h.value.role === "assistant" && D.value.length > 0 && D.value.every((e) => e.type === "work-group" || e.type === "media")), A = o(() => {
|
|
6748
|
+
}), D = o(() => _a(h.value, T.value, y.value, E.value, r.answeredClientRequestIds)), O = o(() => h.value.role === "assistant" && D.value.length > 0 && D.value.every((e) => e.type === "work-group" || e.type === "media") && (h.value.streaming === !0 || y.value === !0 || _.value?.finalStarted.value === !0 || !D.value.some((e) => e.type === "work-group"))), A = o(() => {
|
|
6720
6749
|
if (h.value.role === "assistant" && h.value.streaming !== !0 && w.value.length > 0 && T.value.length === 0) return !0;
|
|
6721
6750
|
let e = _.value;
|
|
6722
6751
|
return !e?.enabled.value || e.active.value ? !1 : e.completedWithoutFinal.value ? h.value.type === "steer" : e.expanded.value ? !1 : h.value.type === "steer" || h.value.role === "assistant" && e.headerMessageIndex.value !== r.index && D.value.every((e) => e.type === "work-group");
|
|
@@ -6763,12 +6792,12 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6763
6792
|
});
|
|
6764
6793
|
}
|
|
6765
6794
|
async function me() {
|
|
6766
|
-
await
|
|
6795
|
+
await Kc(h.value.content, a);
|
|
6767
6796
|
}
|
|
6768
6797
|
function he(e) {
|
|
6769
6798
|
return e.type === "text" ? e.content.trim().length > 0 : e.type === "attachment" || e.type === "media" || e.type === "mermaid" || e.type === "html" || e.type === "reasoning" || e.type === "tool" || e.type === "tool-group" || e.type === "visualization" || e.type === "work-group";
|
|
6770
6799
|
}
|
|
6771
|
-
return (n, r) => h.value.type === "compaction" ? (k(), s(
|
|
6800
|
+
return (n, r) => h.value.type === "compaction" ? (k(), s(xu, {
|
|
6772
6801
|
key: 0,
|
|
6773
6802
|
class: "codex-chat-theme",
|
|
6774
6803
|
"completed-title": V(f)("chat.compaction.completed"),
|
|
@@ -6784,17 +6813,17 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6784
6813
|
"chat-message--actions-visible": e.actionsAlwaysVisible && !U.value,
|
|
6785
6814
|
"chat-message--editing": B.value
|
|
6786
6815
|
}]])
|
|
6787
|
-
}, [u("div",
|
|
6788
|
-
n.$slots.header ? (k(), l("div",
|
|
6816
|
+
}, [u("div", Eu, [
|
|
6817
|
+
n.$slots.header ? (k(), l("div", Du, [F(n.$slots, "header", {
|
|
6789
6818
|
index: e.index,
|
|
6790
6819
|
message: h.value
|
|
6791
6820
|
}, void 0, !0)])) : c("", !0),
|
|
6792
|
-
I.value.length > 0 ? (k(), l("div",
|
|
6821
|
+
I.value.length > 0 ? (k(), l("div", Ou, [(k(!0), l(t, null, P(I.value, ({ block: t, blockIndex: r }) => F(n.$slots, "block", {
|
|
6793
6822
|
block: t,
|
|
6794
6823
|
blockIndex: r,
|
|
6795
6824
|
index: e.index,
|
|
6796
6825
|
message: h.value
|
|
6797
|
-
}, () => [m(
|
|
6826
|
+
}, () => [m(du, {
|
|
6798
6827
|
block: t,
|
|
6799
6828
|
"open-image": pe
|
|
6800
6829
|
}, d({ _: 2 }, [n.$slots.attachment ? {
|
|
@@ -6805,7 +6834,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6805
6834
|
}), void 0, !0)]),
|
|
6806
6835
|
key: "0"
|
|
6807
6836
|
} : void 0]), 1032, ["block"])], !0, `attachment-${r}`)), 128))])) : c("", !0),
|
|
6808
|
-
B.value || L.value.length > 0 || ie.value || ae.value || oe.value ? (k(), l("div",
|
|
6837
|
+
B.value || L.value.length > 0 || ie.value || ae.value || oe.value ? (k(), l("div", ku, [B.value ? (k(), s(Tu, {
|
|
6809
6838
|
key: 0,
|
|
6810
6839
|
"cancel-label": V(f)("chat.actions.cancel"),
|
|
6811
6840
|
content: R.value,
|
|
@@ -6819,7 +6848,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6819
6848
|
"input-label",
|
|
6820
6849
|
"save-label"
|
|
6821
6850
|
])) : (k(), l(t, { key: 1 }, [
|
|
6822
|
-
(k(!0), l(t, null, P(L.value, ({ block: a, blockIndex: o }) => (k(), l(t, { key: a.type === "tool" ? a.toolCall.id : `${a.type}-${o}` }, [a.type === "work-group" ? (k(), s(
|
|
6851
|
+
(k(!0), l(t, null, P(L.value, ({ block: a, blockIndex: o }) => (k(), l(t, { key: a.type === "tool" ? a.toolCall.id : `${a.type}-${o}` }, [a.type === "work-group" ? (k(), s(du, {
|
|
6823
6852
|
key: 0,
|
|
6824
6853
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
6825
6854
|
block: a,
|
|
@@ -6872,7 +6901,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6872
6901
|
blockIndex: o,
|
|
6873
6902
|
index: e.index,
|
|
6874
6903
|
message: h.value
|
|
6875
|
-
}, () => [m(
|
|
6904
|
+
}, () => [m(du, {
|
|
6876
6905
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
6877
6906
|
block: a,
|
|
6878
6907
|
"follow-ups-disabled": e.followUpsDisabled,
|
|
@@ -6928,14 +6957,14 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6928
6957
|
"show-tool-details",
|
|
6929
6958
|
"skills"
|
|
6930
6959
|
])], !0, 1)], 64))), 128)),
|
|
6931
|
-
ie.value ? (k(), l("span",
|
|
6960
|
+
ie.value ? (k(), l("span", Au, z(V(f)("chat.message.emptyResponse")), 1)) : c("", !0),
|
|
6932
6961
|
ae.value ? F(n.$slots, "thinking", {
|
|
6933
6962
|
index: e.index,
|
|
6934
6963
|
message: h.value
|
|
6935
6964
|
}, () => [u("span", {
|
|
6936
6965
|
class: "chat-message__thinking codex-text-shimmer",
|
|
6937
6966
|
"data-label": p.value
|
|
6938
|
-
}, z(p.value), 9,
|
|
6967
|
+
}, z(p.value), 9, ju)], !0, 1) : oe.value ? F(n.$slots, "status", {
|
|
6939
6968
|
index: e.index,
|
|
6940
6969
|
message: h.value,
|
|
6941
6970
|
status: "streaming"
|
|
@@ -6948,7 +6977,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6948
6977
|
disabled: U.value,
|
|
6949
6978
|
index: e.index,
|
|
6950
6979
|
message: h.value
|
|
6951
|
-
}, () => [m(
|
|
6980
|
+
}, () => [m(yu, {
|
|
6952
6981
|
class: C(["chat-message__actions", { "chat-message__actions--reserved": U.value }]),
|
|
6953
6982
|
"aria-hidden": U.value ? "true" : void 0,
|
|
6954
6983
|
inert: U.value ? "" : void 0,
|
|
@@ -6980,10 +7009,10 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
6980
7009
|
"mutation-disabled",
|
|
6981
7010
|
"presentation"
|
|
6982
7011
|
])], !0, 3) : c("", !0),
|
|
6983
|
-
h.value.type === "steer" ? (k(), l("div",
|
|
7012
|
+
h.value.type === "steer" ? (k(), l("div", Mu, " Steered conversation ")) : c("", !0)
|
|
6984
7013
|
])], 2));
|
|
6985
7014
|
}
|
|
6986
|
-
}), [["__scopeId", "data-v-
|
|
7015
|
+
}), [["__scopeId", "data-v-ba9ff3ff"]]), Pu = { class: "codex-message-turn" }, Fu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
6987
7016
|
__name: "CodexMessageTurn",
|
|
6988
7017
|
props: {
|
|
6989
7018
|
active: { type: Boolean },
|
|
@@ -7022,9 +7051,9 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7022
7051
|
let n = ga(e).filter((e) => t.showToolBlocks || e.type !== "tool" && e.type !== "tool-group");
|
|
7023
7052
|
return n.length === 0 ? !1 : i.value ? n.some((e) => Aa(e, t.answeredClientRequestIds)) : u.value && n.every((e) => e.type === "tool" || e.type === "tool-group");
|
|
7024
7053
|
}
|
|
7025
|
-
return (e, t) => (k(), l("div",
|
|
7054
|
+
return (e, t) => (k(), l("div", Pu, [F(e.$slots, "default", {}, void 0, !0)]));
|
|
7026
7055
|
}
|
|
7027
|
-
}), [["__scopeId", "data-v-0b8c9fec"]]),
|
|
7056
|
+
}), [["__scopeId", "data-v-0b8c9fec"]]), Iu = ["aria-label", "title"], Lu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7028
7057
|
__name: "CodexScrollToBottom",
|
|
7029
7058
|
props: { label: { default: "Scroll to bottom" } },
|
|
7030
7059
|
emits: ["click"],
|
|
@@ -7040,9 +7069,9 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7040
7069
|
"aria-hidden": "true",
|
|
7041
7070
|
size: 24,
|
|
7042
7071
|
"stroke-width": 1.75
|
|
7043
|
-
})], 8,
|
|
7072
|
+
})], 8, Iu));
|
|
7044
7073
|
}
|
|
7045
|
-
}), [["__scopeId", "data-v-5a75ce89"]]),
|
|
7074
|
+
}), [["__scopeId", "data-v-5a75ce89"]]), Ru = ["aria-label"], zu = { class: "codex-message-list__content" }, Bu = { class: "codex-message-list__empty" }, Vu = ["data-codex-message-index"], Hu = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7046
7075
|
__name: "CodexMessageList",
|
|
7047
7076
|
props: {
|
|
7048
7077
|
actionsDisabled: { type: Boolean },
|
|
@@ -7425,7 +7454,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7425
7454
|
onClickCapture: fe,
|
|
7426
7455
|
onPointerdown: pe,
|
|
7427
7456
|
onScroll: ue
|
|
7428
|
-
}, [u("div",
|
|
7457
|
+
}, [u("div", zu, [N.value.length === 0 ? F(n.$slots, "empty", {}, () => [u("p", Bu, z(e.emptyLabel), 1)], !0, 0) : (k(!0), l(t, { key: 1 }, P(L.value, (i) => (k(), s(Fu, {
|
|
7429
7458
|
key: i.key,
|
|
7430
7459
|
entries: i.entries,
|
|
7431
7460
|
"answered-client-request-ids": e.answeredClientRequestIds,
|
|
@@ -7441,7 +7470,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7441
7470
|
}, [n.$slots.message ? F(n.$slots, "message", {
|
|
7442
7471
|
message: V($)(ne(t.message, i.turnId)),
|
|
7443
7472
|
index: t.index
|
|
7444
|
-
}, void 0, !0, 0) : (k(), s(
|
|
7473
|
+
}, void 0, !0, 0) : (k(), s(Nu, {
|
|
7445
7474
|
key: 1,
|
|
7446
7475
|
"activity-state": t.activityState,
|
|
7447
7476
|
"actions-disabled": e.actionsDisabled,
|
|
@@ -7541,7 +7570,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7541
7570
|
"show-tool-details",
|
|
7542
7571
|
"skills",
|
|
7543
7572
|
"thread-actions-disabled"
|
|
7544
|
-
]))], 8,
|
|
7573
|
+
]))], 8, Vu))), 128))]),
|
|
7545
7574
|
_: 2
|
|
7546
7575
|
}, 1032, [
|
|
7547
7576
|
"entries",
|
|
@@ -7550,20 +7579,20 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7550
7579
|
"show-tool-blocks",
|
|
7551
7580
|
"status",
|
|
7552
7581
|
"turn-id"
|
|
7553
|
-
]))), 128))])], 544), ie.value ? (k(), s(
|
|
7582
|
+
]))), 128))])], 544), ie.value ? (k(), s(Lu, {
|
|
7554
7583
|
key: 0,
|
|
7555
7584
|
class: "codex-message-list__scroll-to-bottom",
|
|
7556
7585
|
label: e.scrollToBottomLabel,
|
|
7557
7586
|
onClick: Ie
|
|
7558
|
-
}, null, 8, ["label"])) : c("", !0)], 8,
|
|
7587
|
+
}, null, 8, ["label"])) : c("", !0)], 8, Ru));
|
|
7559
7588
|
}
|
|
7560
|
-
}), [["__scopeId", "data-v-
|
|
7589
|
+
}), [["__scopeId", "data-v-3019818e"]]), Uu = {
|
|
7561
7590
|
key: 0,
|
|
7562
7591
|
class: "codex-workbench-layout__body codex-workbench-layout__body--scroll"
|
|
7563
|
-
},
|
|
7592
|
+
}, Wu = { class: "codex-workbench-layout__body-content" }, Gu = {
|
|
7564
7593
|
key: 1,
|
|
7565
7594
|
class: "codex-workbench-layout__body codex-workbench-layout__body--child"
|
|
7566
|
-
},
|
|
7595
|
+
}, Ku = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7567
7596
|
__name: "CodexWorkbenchLayout",
|
|
7568
7597
|
props: { scrollMode: { default: "body" } },
|
|
7569
7598
|
setup(e) {
|
|
@@ -7589,7 +7618,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7589
7618
|
class: C(["codex-chat-theme codex-workbench-layout", `codex-workbench-layout--${e.scrollMode}`]),
|
|
7590
7619
|
style: T(a.value)
|
|
7591
7620
|
}, [
|
|
7592
|
-
e.scrollMode === "body" ? (k(), l("div",
|
|
7621
|
+
e.scrollMode === "body" ? (k(), l("div", Uu, [u("div", Wu, [F(r.$slots, "default", {}, void 0, !0)])])) : (k(), l("div", Gu, [F(r.$slots, "default", {}, void 0, !0)])),
|
|
7593
7622
|
r.$slots.header ? (k(), l("div", {
|
|
7594
7623
|
key: 2,
|
|
7595
7624
|
ref_key: "headerEl",
|
|
@@ -7604,36 +7633,36 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
7604
7633
|
}, [F(r.$slots, "footer", {}, void 0, !0)], 512)) : c("", !0)
|
|
7605
7634
|
], 6));
|
|
7606
7635
|
}
|
|
7607
|
-
}), [["__scopeId", "data-v-18471407"]]),
|
|
7636
|
+
}), [["__scopeId", "data-v-18471407"]]), qu = [
|
|
7608
7637
|
"aria-busy",
|
|
7609
7638
|
"aria-label",
|
|
7610
7639
|
"data-codex-generating"
|
|
7611
|
-
],
|
|
7640
|
+
], Ju = {
|
|
7612
7641
|
key: 1,
|
|
7613
7642
|
class: "codex-conversation-pane__hero"
|
|
7614
|
-
},
|
|
7643
|
+
}, Yu = { class: "codex-conversation-pane__hero-copy" }, Xu = { key: 0 }, Zu = {
|
|
7615
7644
|
key: 0,
|
|
7616
7645
|
class: "codex-conversation-pane__error",
|
|
7617
7646
|
role: "alert"
|
|
7618
|
-
},
|
|
7647
|
+
}, Qu = {
|
|
7619
7648
|
key: 1,
|
|
7620
7649
|
class: "codex-conversation-pane__approvals"
|
|
7621
|
-
},
|
|
7650
|
+
}, $u = {
|
|
7622
7651
|
key: 0,
|
|
7623
7652
|
class: "codex-conversation-pane__pending-question"
|
|
7624
|
-
},
|
|
7653
|
+
}, ed = ["aria-label"], td = {
|
|
7625
7654
|
key: 0,
|
|
7626
7655
|
class: "codex-conversation-pane__attachments",
|
|
7627
7656
|
"aria-label": "Prompt attachments"
|
|
7628
|
-
},
|
|
7657
|
+
}, nd = ["src", "alt"], rd = {
|
|
7629
7658
|
key: 1,
|
|
7630
7659
|
class: "codex-conversation-pane__attachment-file",
|
|
7631
7660
|
"aria-hidden": "true"
|
|
7632
|
-
},
|
|
7661
|
+
}, id = ["title"], ad = { class: "codex-conversation-pane__attachment-actions" }, od = [
|
|
7633
7662
|
"aria-label",
|
|
7634
7663
|
"disabled",
|
|
7635
7664
|
"onClick"
|
|
7636
|
-
],
|
|
7665
|
+
], sd = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
7637
7666
|
__name: "CodexConversationPane",
|
|
7638
7667
|
props: {
|
|
7639
7668
|
ariaLabel: { default: "Conversation" },
|
|
@@ -8279,7 +8308,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8279
8308
|
}, [vt.value ? (k(), s(bs, {
|
|
8280
8309
|
key: 0,
|
|
8281
8310
|
class: "codex-conversation-pane__history-loader"
|
|
8282
|
-
})) : (k(), s(
|
|
8311
|
+
})) : (k(), s(Ku, {
|
|
8283
8312
|
key: 1,
|
|
8284
8313
|
class: "codex-conversation-pane__layout",
|
|
8285
8314
|
"scroll-mode": "child"
|
|
@@ -8288,7 +8317,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8288
8317
|
ref_key: "footerElement",
|
|
8289
8318
|
ref: y,
|
|
8290
8319
|
class: "codex-conversation-pane__footer"
|
|
8291
|
-
}, [Ie.value ? (k(), l("p",
|
|
8320
|
+
}, [Ie.value ? (k(), l("p", Zu, z(Ie.value), 1)) : c("", !0), Oe.value ? (k(), l("div", Qu, [F(n.$slots, "approval", { approval: Oe.value }, () => [(k(), s(na, {
|
|
8292
8321
|
key: Oe.value.id,
|
|
8293
8322
|
approval: Oe.value,
|
|
8294
8323
|
disabled: Fe.value,
|
|
@@ -8390,7 +8419,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8390
8419
|
"onUpdate:reasoningEffort": _n,
|
|
8391
8420
|
"onUpdate:serviceTier": vn
|
|
8392
8421
|
}, d({
|
|
8393
|
-
"before-meta": G(() => [be.value.length > 0 ? (k(), l("span",
|
|
8422
|
+
"before-meta": G(() => [be.value.length > 0 ? (k(), l("span", $u, [u("button", {
|
|
8394
8423
|
class: "codex-conversation-pane__pending-question-cancel",
|
|
8395
8424
|
type: "button",
|
|
8396
8425
|
"aria-label": "Cancel pending question",
|
|
@@ -8406,8 +8435,8 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8406
8435
|
type: "button",
|
|
8407
8436
|
"aria-label": be.value.length === 1 ? "Pending question" : `${be.value.length} pending questions`,
|
|
8408
8437
|
onClick: r[3] ||= (e) => h.value = be.value[0].id
|
|
8409
|
-
}, z(be.value.length === 1 ? "Pending question" : `${be.value.length} pending questions`), 9,
|
|
8410
|
-
before: G(() => [q.value.length > 0 ? (k(), l("div",
|
|
8438
|
+
}, z(be.value.length === 1 ? "Pending question" : `${be.value.length} pending questions`), 9, ed)])) : c("", !0)]),
|
|
8439
|
+
before: G(() => [q.value.length > 0 ? (k(), l("div", td, [(k(!0), l(t, null, P(q.value, (e, t) => (k(), l("div", {
|
|
8411
8440
|
key: e.id,
|
|
8412
8441
|
class: "codex-conversation-pane__attachment"
|
|
8413
8442
|
}, [
|
|
@@ -8416,12 +8445,12 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8416
8445
|
class: "codex-conversation-pane__attachment-preview",
|
|
8417
8446
|
src: e.previewUrl,
|
|
8418
8447
|
alt: e.name
|
|
8419
|
-
}, null, 8,
|
|
8448
|
+
}, null, 8, nd)) : (k(), l("span", rd, "📎")),
|
|
8420
8449
|
u("span", {
|
|
8421
8450
|
class: "codex-conversation-pane__attachment-name",
|
|
8422
8451
|
title: e.name
|
|
8423
|
-
}, z(e.name), 9,
|
|
8424
|
-
u("span",
|
|
8452
|
+
}, z(e.name), 9, id),
|
|
8453
|
+
u("span", ad, [F(n.$slots, "composer-attachment-actions", {
|
|
8425
8454
|
attachments: q.value,
|
|
8426
8455
|
index: t,
|
|
8427
8456
|
disabled: Fe.value
|
|
@@ -8431,7 +8460,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8431
8460
|
"aria-label": `Remove ${e.name}`,
|
|
8432
8461
|
disabled: Fe.value,
|
|
8433
8462
|
onClick: (t) => Gt(e.id)
|
|
8434
|
-
}, [m(V(Ye), { "aria-hidden": "true" })], 8,
|
|
8463
|
+
}, [m(V(Ye), { "aria-hidden": "true" })], 8, od)])
|
|
8435
8464
|
]))), 128))])) : c("", !0), F(n.$slots, "composer-context", { disabled: Fe.value }, void 0, !0)]),
|
|
8436
8465
|
_: 2
|
|
8437
8466
|
}, [
|
|
@@ -8468,7 +8497,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8468
8497
|
]), 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("."))),
|
|
8469
8498
|
F(n.$slots, "after-composer", {}, void 0, !0)
|
|
8470
8499
|
], 64))], 512)]),
|
|
8471
|
-
default: G(() => [yt.value ? (k(), s(
|
|
8500
|
+
default: G(() => [yt.value ? (k(), s(Hu, {
|
|
8472
8501
|
key: 0,
|
|
8473
8502
|
ref_key: "messageList",
|
|
8474
8503
|
ref: b,
|
|
@@ -8568,23 +8597,23 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8568
8597
|
fn: G((e) => [F(n.$slots, "message-tool", w(_(e)), void 0, !0)]),
|
|
8569
8598
|
key: "9"
|
|
8570
8599
|
} : void 0
|
|
8571
|
-
]), 1032, /* @__PURE__ */ "actions-disabled.active-turn-id.answered-client-request-ids.aria-label.busy.can-delete-turn.can-edit-turn.can-fork-turn.can-retry-turn.deleting-turn-id.empty-label.follow-ups-disabled.has-older-messages.hidden-client-request-ids.render-strategy.loading-older-messages.initial-message-batch-size.message-batch-size.message-text-selection.messages.mention-groups.plugins.presentation.reset-key.scroll-to-bottom-label.show-tool-details.skills.tool-visibility.transform-message.turns".split("."))) : (k(), l("div",
|
|
8600
|
+
]), 1032, /* @__PURE__ */ "actions-disabled.active-turn-id.answered-client-request-ids.aria-label.busy.can-delete-turn.can-edit-turn.can-fork-turn.can-retry-turn.deleting-turn-id.empty-label.follow-ups-disabled.has-older-messages.hidden-client-request-ids.render-strategy.loading-older-messages.initial-message-batch-size.message-batch-size.message-text-selection.messages.mention-groups.plugins.presentation.reset-key.scroll-to-bottom-label.show-tool-details.skills.tool-visibility.transform-message.turns".split("."))) : (k(), l("div", Ju, [F(n.$slots, "empty", {
|
|
8572
8601
|
title: e.emptyTitle,
|
|
8573
8602
|
description: e.emptyDescription
|
|
8574
|
-
}, () => [u("div",
|
|
8603
|
+
}, () => [u("div", Yu, [u("h1", null, z(e.emptyTitle), 1), e.emptyDescription ? (k(), l("p", Xu, z(e.emptyDescription), 1)) : c("", !0)])], !0)]))]),
|
|
8575
8604
|
_: 3
|
|
8576
|
-
}))], 40,
|
|
8605
|
+
}))], 40, qu));
|
|
8577
8606
|
}
|
|
8578
|
-
}), [["__scopeId", "data-v-c7008843"]]),
|
|
8607
|
+
}), [["__scopeId", "data-v-c7008843"]]), cd = {
|
|
8579
8608
|
class: "codex-conversation-sidebar",
|
|
8580
8609
|
"aria-label": "Conversations"
|
|
8581
|
-
},
|
|
8610
|
+
}, ld = { class: "codex-conversation-sidebar__header" }, ud = { class: "codex-conversation-sidebar__brand" }, dd = ["disabled"], fd = {
|
|
8582
8611
|
key: 0,
|
|
8583
8612
|
class: "codex-conversation-sidebar__empty"
|
|
8584
|
-
},
|
|
8613
|
+
}, pd = {
|
|
8585
8614
|
key: 1,
|
|
8586
8615
|
class: "codex-conversation-sidebar__list"
|
|
8587
|
-
},
|
|
8616
|
+
}, md = ["aria-current", "onClick"], hd = ["aria-label", "title"], gd = { class: "codex-conversation-sidebar__title" }, _d = { class: "codex-conversation-sidebar__time" }, vd = ["aria-label", "onClick"], yd = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
8588
8617
|
__name: "CodexConversationSidebar",
|
|
8589
8618
|
props: {
|
|
8590
8619
|
activeConversationId: { default: null },
|
|
@@ -8616,12 +8645,12 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8616
8645
|
let n = Math.floor(t / 60);
|
|
8617
8646
|
return n < 24 ? `${n}h` : `${Math.floor(n / 24)}d`;
|
|
8618
8647
|
}
|
|
8619
|
-
return (n, o) => (k(), l("aside",
|
|
8648
|
+
return (n, o) => (k(), l("aside", cd, [u("div", ld, [u("span", ud, z(e.brand), 1), u("button", {
|
|
8620
8649
|
class: "codex-conversation-sidebar__new",
|
|
8621
8650
|
type: "button",
|
|
8622
8651
|
disabled: e.createDisabled,
|
|
8623
8652
|
onClick: o[0] ||= (e) => r("create")
|
|
8624
|
-
}, [...o[1] ||= [u("span", { "aria-hidden": "true" }, "+", -1), p(" New thread ", -1)]], 8,
|
|
8653
|
+
}, [...o[1] ||= [u("span", { "aria-hidden": "true" }, "+", -1), p(" New thread ", -1)]], 8, dd)]), e.conversations.length === 0 ? (k(), l("p", fd, z(e.loading ? "Loading threads…" : "No conversations yet"), 1)) : (k(), l("nav", pd, [(k(!0), l(t, null, P(e.conversations, (t) => (k(), l("div", {
|
|
8625
8654
|
key: t.id,
|
|
8626
8655
|
class: C(["codex-conversation-sidebar__item", { "codex-conversation-sidebar__item--active": t.id === e.activeConversationId }])
|
|
8627
8656
|
}, [u("button", {
|
|
@@ -8634,10 +8663,10 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8634
8663
|
class: C(["codex-conversation-sidebar__status", `codex-conversation-sidebar__status--${t.status}`]),
|
|
8635
8664
|
"aria-label": `Status: ${t.status}`,
|
|
8636
8665
|
title: t.status
|
|
8637
|
-
}, null, 10,
|
|
8638
|
-
u("span",
|
|
8639
|
-
u("span",
|
|
8640
|
-
], 8,
|
|
8666
|
+
}, null, 10, hd),
|
|
8667
|
+
u("span", gd, z(t.title), 1),
|
|
8668
|
+
u("span", _d, z(a(t.updatedAt)), 1)
|
|
8669
|
+
], 8, md), u("button", {
|
|
8641
8670
|
class: "codex-conversation-sidebar__delete",
|
|
8642
8671
|
type: "button",
|
|
8643
8672
|
"aria-label": `Delete ${t.title}`,
|
|
@@ -8647,15 +8676,15 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8647
8676
|
"aria-hidden": "true",
|
|
8648
8677
|
fill: "none",
|
|
8649
8678
|
viewBox: "0 0 24 24"
|
|
8650
|
-
}, [u("path", { d: "M4 7h16M10 11v6m4-6v6M9 7l1-2h4l1 2m2 0-1 12H8L7 7" })], -1)]], 8,
|
|
8679
|
+
}, [u("path", { d: "M4 7h16M10 11v6m4-6v6M9 7l1-2h4l1 2m2 0-1 12H8L7 7" })], -1)]], 8, vd)], 2))), 128))]))]));
|
|
8651
8680
|
}
|
|
8652
|
-
}), [["__scopeId", "data-v-97c47314"]]),
|
|
8681
|
+
}), [["__scopeId", "data-v-97c47314"]]), bd = { class: "chat-composer-file-menu__section" }, xd = ["onMousedown"], Sd = { class: "chat-composer-file-menu__name" }, Cd = { class: "chat-composer-file-menu__path" }, wd = {
|
|
8653
8682
|
key: 0,
|
|
8654
8683
|
class: "chat-composer-file-menu__hint"
|
|
8655
|
-
},
|
|
8684
|
+
}, Td = {
|
|
8656
8685
|
key: 1,
|
|
8657
8686
|
class: "chat-composer-file-menu__empty"
|
|
8658
|
-
},
|
|
8687
|
+
}, Ed = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
8659
8688
|
__name: "ChatComposerFileMentionMenu",
|
|
8660
8689
|
props: {
|
|
8661
8690
|
activeIndex: {},
|
|
@@ -8676,7 +8705,7 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8676
8705
|
role: "listbox",
|
|
8677
8706
|
"aria-label": "Files"
|
|
8678
8707
|
}, [
|
|
8679
|
-
u("div",
|
|
8708
|
+
u("div", bd, z(V(r)("chat.files.title")), 1),
|
|
8680
8709
|
(k(!0), l(t, null, P(e.visibleFiles, (t, r) => (k(), l("button", {
|
|
8681
8710
|
key: t.path,
|
|
8682
8711
|
class: C(["chat-composer-file-menu__item", { "chat-composer-file-menu__item--active": r === e.activeIndex }]),
|
|
@@ -8688,16 +8717,16 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8688
8717
|
class: "chat-composer-file-menu__icon",
|
|
8689
8718
|
"aria-hidden": "true"
|
|
8690
8719
|
}),
|
|
8691
|
-
u("span",
|
|
8692
|
-
u("span",
|
|
8693
|
-
], 42,
|
|
8694
|
-
e.showHint ? (k(), l("div",
|
|
8720
|
+
u("span", Sd, z(t.name), 1),
|
|
8721
|
+
u("span", Cd, z(t.path), 1)
|
|
8722
|
+
], 42, xd))), 128)),
|
|
8723
|
+
e.showHint ? (k(), l("div", wd, z(V(r)("chat.files.hint")), 1)) : e.visibleFiles.length === 0 ? (k(), l("div", Td, z(V(r)("chat.files.empty")), 1)) : c("", !0)
|
|
8695
8724
|
], 512));
|
|
8696
8725
|
}
|
|
8697
|
-
}), [["__scopeId", "data-v-122fc71c"]]),
|
|
8726
|
+
}), [["__scopeId", "data-v-122fc71c"]]), Dd = ["onMousedown"], Od = ["src"], kd = { class: "chat-composer-plugin-menu__main" }, Ad = { class: "chat-composer-plugin-menu__name" }, jd = { class: "chat-composer-plugin-menu__description" }, Md = {
|
|
8698
8727
|
key: 0,
|
|
8699
8728
|
class: "chat-composer-plugin-menu__empty"
|
|
8700
|
-
},
|
|
8729
|
+
}, Nd = /*#__PURE__*/ X(/* @__PURE__ */ h({
|
|
8701
8730
|
__name: "ChatComposerPluginMenu",
|
|
8702
8731
|
props: {
|
|
8703
8732
|
activeIndex: {},
|
|
@@ -8731,24 +8760,24 @@ var pu = ["aria-busy", "aria-label"], mu = ["title"], hu = ["title"], gu = /*#__
|
|
|
8731
8760
|
alt: "",
|
|
8732
8761
|
"aria-hidden": "true",
|
|
8733
8762
|
referrerpolicy: "no-referrer"
|
|
8734
|
-
}, null, 8,
|
|
8763
|
+
}, null, 8, Od)) : (k(), s(V(je), {
|
|
8735
8764
|
key: 1,
|
|
8736
8765
|
class: "chat-composer-plugin-menu__icon",
|
|
8737
8766
|
"aria-hidden": "true"
|
|
8738
|
-
})), u("span",
|
|
8739
|
-
e.visiblePlugins.length === 0 ? (k(), l("div",
|
|
8767
|
+
})), u("span", kd, [u("span", Ad, z(V(sr)(t)), 1), u("span", jd, z(V(cr)(t)), 1)])], 42, Dd))), 128)),
|
|
8768
|
+
e.visiblePlugins.length === 0 ? (k(), l("div", Md, "No matching plugins")) : c("", !0)
|
|
8740
8769
|
], 512));
|
|
8741
8770
|
}
|
|
8742
|
-
}), [["__scopeId", "data-v-336657b0"]]),
|
|
8743
|
-
function
|
|
8744
|
-
return
|
|
8745
|
-
id: `queued-prompt-${
|
|
8771
|
+
}), [["__scopeId", "data-v-336657b0"]]), Pd = 0;
|
|
8772
|
+
function Fd(e) {
|
|
8773
|
+
return Pd += 1, {
|
|
8774
|
+
id: `queued-prompt-${Pd}`,
|
|
8746
8775
|
text: e
|
|
8747
8776
|
};
|
|
8748
8777
|
}
|
|
8749
8778
|
//#endregion
|
|
8750
8779
|
//#region src/use-codex-surface.ts
|
|
8751
|
-
var
|
|
8780
|
+
var Id = {
|
|
8752
8781
|
status: "idle",
|
|
8753
8782
|
authentication: {
|
|
8754
8783
|
status: "notLoaded",
|
|
@@ -8793,8 +8822,8 @@ var Nd = {
|
|
|
8793
8822
|
historyLoading: !1,
|
|
8794
8823
|
error: null
|
|
8795
8824
|
};
|
|
8796
|
-
function
|
|
8797
|
-
let t = A(structuredClone(
|
|
8825
|
+
function Ld(e) {
|
|
8826
|
+
let t = A(structuredClone(Id)), n = A(/* @__PURE__ */ new Set()), r = j(n), i = R(null), a = /* @__PURE__ */ new Set(), o = 0, s = (e) => {
|
|
8798
8827
|
Object.assign(t, e), n.clear();
|
|
8799
8828
|
for (let t of e.answeredClientRequestIds) n.add(t);
|
|
8800
8829
|
}, c = Tt(e, (e) => {
|
|
@@ -8855,7 +8884,7 @@ function Pd(e) {
|
|
|
8855
8884
|
}
|
|
8856
8885
|
//#endregion
|
|
8857
8886
|
//#region src/use-codex-live-chat.ts
|
|
8858
|
-
function
|
|
8887
|
+
function Rd(e) {
|
|
8859
8888
|
let t = M("idle"), n = M(null), r = M(!1), i = M([]), a, o = !1;
|
|
8860
8889
|
function s(t) {
|
|
8861
8890
|
if (!(!("conversationId" in t) || t.conversationId !== e.conversationId)) {
|
|
@@ -8916,7 +8945,7 @@ function Fd(e) {
|
|
|
8916
8945
|
let a = new Audio();
|
|
8917
8946
|
if (a.autoplay = !0, u.audio = a, i.ontrack = (e) => {
|
|
8918
8947
|
a.srcObject = e.streams[0] ?? new MediaStream([e.track]), a.play().catch((e) => {
|
|
8919
|
-
u.cancelled || (n.value =
|
|
8948
|
+
u.cancelled || (n.value = zd(e), d().catch(() => void 0));
|
|
8920
8949
|
});
|
|
8921
8950
|
}, i.onconnectionstatechange = () => {
|
|
8922
8951
|
u.cancelled || (i.connectionState === "connected" && (clearTimeout(u.timer), t.value = "connected"), (i.connectionState === "failed" || i.connectionState === "closed") && (n.value = "Live chat connection ended", d().catch(() => void 0)));
|
|
@@ -8936,7 +8965,7 @@ function Fd(e) {
|
|
|
8936
8965
|
n.value = "Timed out connecting live chat", d().catch(() => void 0);
|
|
8937
8966
|
}, 3e4));
|
|
8938
8967
|
} catch (e) {
|
|
8939
|
-
if (!u.cancelled) throw n.value =
|
|
8968
|
+
if (!u.cancelled) throw n.value = zd(e), t.value = "error", c(u), await l(u).catch(() => void 0), a === u && (a = void 0), e;
|
|
8940
8969
|
} finally {
|
|
8941
8970
|
u.cancelled && c(u);
|
|
8942
8971
|
}
|
|
@@ -8948,7 +8977,7 @@ function Fd(e) {
|
|
|
8948
8977
|
try {
|
|
8949
8978
|
e.requested && await e.done?.catch(() => void 0), await l(e);
|
|
8950
8979
|
} catch (e) {
|
|
8951
|
-
throw n.value =
|
|
8980
|
+
throw n.value = zd(e), e;
|
|
8952
8981
|
} finally {
|
|
8953
8982
|
a === e && (a = void 0), t.value = n.value ? "error" : "idle";
|
|
8954
8983
|
}
|
|
@@ -8971,16 +9000,16 @@ function Fd(e) {
|
|
|
8971
9000
|
setMuted: f
|
|
8972
9001
|
};
|
|
8973
9002
|
}
|
|
8974
|
-
function
|
|
9003
|
+
function zd(e) {
|
|
8975
9004
|
return e instanceof Error ? e.message : String(e);
|
|
8976
9005
|
}
|
|
8977
9006
|
//#endregion
|
|
8978
9007
|
//#region src/codex-theme.ts
|
|
8979
|
-
function
|
|
9008
|
+
function Bd(e, t = {}) {
|
|
8980
9009
|
let n = e.getAttribute("data-codex-theme"), r = /* @__PURE__ */ new Map(), i = t.mode ?? "system";
|
|
8981
9010
|
e.setAttribute("data-codex-theme", i);
|
|
8982
9011
|
for (let [n, i] of Object.entries(t.tokens ?? {})) {
|
|
8983
|
-
let t =
|
|
9012
|
+
let t = Vd(n);
|
|
8984
9013
|
r.has(t) || r.set(t, e.style.getPropertyValue(t)), i == null || !i.trim() ? e.style.removeProperty(t) : e.style.setProperty(t, i);
|
|
8985
9014
|
}
|
|
8986
9015
|
return () => {
|
|
@@ -8988,7 +9017,7 @@ function Ld(e, t = {}) {
|
|
|
8988
9017
|
for (let [t, n] of r) n ? e.style.setProperty(t, n) : e.style.removeProperty(t);
|
|
8989
9018
|
};
|
|
8990
9019
|
}
|
|
8991
|
-
function
|
|
9020
|
+
function Vd(e) {
|
|
8992
9021
|
let t = e.trim();
|
|
8993
9022
|
if (t.startsWith("--codex-")) return t;
|
|
8994
9023
|
let n = t.replace(/^--/, "").replace(/([a-z\d])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z\d-]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
|
|
@@ -8996,6 +9025,6 @@ function Rd(e) {
|
|
|
8996
9025
|
return `--codex-${n}`;
|
|
8997
9026
|
}
|
|
8998
9027
|
//#endregion
|
|
8999
|
-
export { co as CodexAnimatedDiffStat, na as CodexApprovalPrompt, Ms as CodexAttachmentBlock,
|
|
9028
|
+
export { co as CodexAnimatedDiffStat, na as CodexApprovalPrompt, Ms as CodexAttachmentBlock, xu as CodexCompactionMessage, Vi as CodexComposer, nn as CodexComposerActionMenu, zt as CodexComposerActiveModes, xr as CodexComposerAtMentionMenu, Ed as CodexComposerFileMentionMenu, en as CodexComposerMenu, Qt as CodexComposerMenuList, Nd as CodexComposerPluginMenu, Ft as CodexComposerSendButton, gs as CodexComposerShelf, Ir as CodexComposerSkillMenu, Qr as CodexComposerSlashMenu, an as CodexComposerVoiceButton, dn as CodexComposerVoiceField, Yn as CodexContextUsageIndicator, bs as CodexConversationHistoryLoader, sd as CodexConversationPane, yd as CodexConversationSidebar, Rs as CodexFoldTransition, Fs as CodexFollowUps, ns as CodexGoal, Ss as CodexIconButton, Ds as CodexImageLightbox, nc as CodexMediaBlock, ni as CodexMentionChip, _c as CodexMermaidBlock, Nu as CodexMessage, yu as CodexMessageActions, du as CodexMessageBlock, Tu as CodexMessageEditor, Hu as CodexMessageList, Fu as CodexMessageTurn, tr as CodexModelReasoningSelector, Jo as CodexQuestionRequest, cs as CodexQueuedPrompt, us as CodexQueuedPrompts, oi as CodexRichTextEditor, Lu as CodexScrollToBottom, Dl as CodexToolCall, So as CodexToolCallTitle, Xo as CodexToolConfirmation, Pl as CodexToolGroup, lo as CodexToolIcon, qo as CodexToolUserInputRequest, ps as CodexTurnGitInfo, tu as CodexUserText, ru as CodexVisualizationBlock, cu as CodexWorkGroup, Ku as CodexWorkbenchLayout, Bd as applyCodexTheme, Vt as approvalPresetOptions, Ot as codexCapabilities, kt as codexCommands, pn as codexConversationLinkFromHref, zr as commandDescription, ia as createCodexConversationPaneController, Fd as createQueuedChatPrompt, Bt as defaultApprovalPreset, Gn as defaultCodexChatTranslate, Et as defaultCodexConversationPresentation, Rr as filterComposerCommands, ri as filterComposerMentionGroups, or as filterComposerPlugins, Cr as filterComposerSkills, ii as findComposerMention, Ei as getCodexGlobalHostCapabilities, Di as getCodexNativeRendererApi, Vl as humanizeMentionName, ki as ingestCodexAttachments, Ht as isApprovalPreset, Cc as languageForFilePath, fn as parseCodexEditorFileReference, Fl as parseCodexUserText, Oi as pickCodexAttachments, cr as pluginDescription, sr as pluginDisplayName, lr as pluginInsertText, ur as pluginMatchesMention, Or as promptSkillInputsFromText, Un as provideCodexChatTranslate, wi as provideCodexHostCapabilities, pl as provideCodexToolCallDetails, ul as provideCodexToolPresentation, Z as registerCodexToolTitlePresenter, Sc as renderCodeBlock, kc as renderMarkdown, ra as resolveCodexConversationPaneValue, Dt as resolveCodexConversationPresentation, Tr as skillDescription, wr as skillDisplayName, Er as skillInsertText, Dr as skillMatchesMention, qa as surfaceMessageToChatMessage, $ as toCodexChatMessage, Ka as toCodexChatMessages, Wn as useCodexChatTranslate, Pi as useCodexComposerVoice, Ti as useCodexHostCapabilities, Rd as useCodexLiveChat, Ld as useCodexSurface, ml as useCodexToolCallDetails, dl as useCodexToolPresentation };
|
|
9000
9029
|
|
|
9001
9030
|
//# sourceMappingURL=index.js.map
|