@agentrouter-top/relay-dsh-plugin-codex 0.2.2-agentrouter.4 → 0.2.2-agentrouter.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codex-activity-wire.mjs +5 -0
- package/docs/image-generation-presentation.md +19 -0
- package/docs/quiet-activity.md +17 -0
- package/lib/client.js +98 -47
- package/lib/client.js.map +1 -1
- package/lib/host-plugin.js +24 -5
- package/lib/host-plugin.js.map +1 -1
- package/package.json +4 -2
package/codex-activity-wire.mjs
CHANGED
|
@@ -12,5 +12,10 @@ export function readActivityPayload(value) {
|
|
|
12
12
|
for (const key of ["summary", "input", "output", "exitCode", "commandActions"]) {
|
|
13
13
|
if (activity[key] !== undefined && typeof activity[key] !== "string") return null;
|
|
14
14
|
}
|
|
15
|
+
if (activity.imageGeneration !== undefined) {
|
|
16
|
+
const image = activity.imageGeneration;
|
|
17
|
+
if (activity.type !== "imageGeneration" || !image || typeof image !== "object" || image.version !== 1
|
|
18
|
+
|| (image.attachmentId !== undefined && (typeof image.attachmentId !== "string" || !image.attachmentId))) return null;
|
|
19
|
+
}
|
|
15
20
|
return value;
|
|
16
21
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Image generation presentation v1
|
|
2
|
+
|
|
3
|
+
Relay projects native Codex `imageGeneration` item start/completion into a dot-matrix
|
|
4
|
+
waiting frame. This is not a partial image, estimated progress, or a new image tool.
|
|
5
|
+
Only a successful attachment import associates `activity.imageGeneration.attachmentId`
|
|
6
|
+
with the existing DSH image block. Projection matches that exact ID within the same
|
|
7
|
+
DSH step, keeps the generation key, and consumes only the matched image occurrence.
|
|
8
|
+
Parallel images cannot be paired by arrival order. Old activity without this optional
|
|
9
|
+
version-1 metadata, MCP images and image-view results keep their existing renderers.
|
|
10
|
+
|
|
11
|
+
The enhanced Codex process projection owns the frame. Native/fallback DSH transcripts
|
|
12
|
+
retain their tool and image rows. Failure/interruption stops the animation without
|
|
13
|
+
adding a warning badge; existing actual turn errors remain available. Reduced-motion
|
|
14
|
+
uses a static dot field. The final result uses DSH's public `renderMessageImages`, so
|
|
15
|
+
the independent Viewer plugin continues to handle viewing and downloading.
|
|
16
|
+
|
|
17
|
+
No Codex prompt, gateway, credentials, tool implementation, Desktop code, or session
|
|
18
|
+
history is modified. Image URLs and private filesystem paths are not added to the
|
|
19
|
+
presentation metadata.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Quiet Codex activity presentation
|
|
2
|
+
|
|
3
|
+
Individual tool attempts do not raise user-facing failure warnings. Relay uses
|
|
4
|
+
neutral action labels for failed/nonzero-exit activities, with no warning
|
|
5
|
+
triangle, failed counter, error dot or outcome badge. Active work still shows
|
|
6
|
+
its progress indicator. No failure is relabelled as success.
|
|
7
|
+
|
|
8
|
+
Expanding a row still exposes its original input, output, provenance and exit
|
|
9
|
+
code. This is a rendering policy only: native App Server results, DSH events,
|
|
10
|
+
permissions, approvals, retries and saved history are unchanged. Codex continues
|
|
11
|
+
to receive the real result and decide how to proceed. Turn-level errors and
|
|
12
|
+
requests that require user action remain visible on their existing paths.
|
|
13
|
+
|
|
14
|
+
This policy covers Relay's grouped process, native-tool fallback and legacy
|
|
15
|
+
activity row. It uses Relay components and public DSH UI primitives only; the
|
|
16
|
+
AgentRouter main plugin merely pins the updated Relay package. No Desktop or
|
|
17
|
+
other kernel renderer is modified.
|
package/lib/client.js
CHANGED
|
@@ -193,13 +193,13 @@ window.__ModuleLoader__.load({
|
|
|
193
193
|
}
|
|
194
194
|
//#endregion
|
|
195
195
|
//#region \0relay-css-module:.\src\client\AdvancedDebug.module.css.mjs
|
|
196
|
-
const css$
|
|
197
|
-
const tagId$
|
|
198
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
196
|
+
const css$4 = ".Y4qSZW_section{width:100%;max-width:780px;color:var(--dsw-alias-label-primary)}.Y4qSZW_settingRow{border-bottom:1px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:20px;min-height:58px;padding:8px 0;display:flex}.Y4qSZW_statusRow{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:flex-start;gap:10px;min-height:70px;padding:10px 0;display:flex}.Y4qSZW_statusDot{background:var(--dsw-alias-label-tertiary);border-radius:50%;flex:none;width:8px;height:8px;margin-top:6px}.Y4qSZW_statusRow[data-codex-status=connected] .Y4qSZW_statusDot{background:#27a65b}.Y4qSZW_statusRow[data-codex-status=connection-failed] .Y4qSZW_statusDot,.Y4qSZW_statusRow[data-codex-status=unavailable] .Y4qSZW_statusDot,.Y4qSZW_statusRow[data-codex-status=rebind-required] .Y4qSZW_statusDot{background:#d94841}.Y4qSZW_settingCopy code{color:var(--dsw-alias-label-tertiary);font-size:11px}.Y4qSZW_statusBadge{border-radius:999px;padding:2px 7px;font-size:11px;font-weight:600;line-height:16px}.Y4qSZW_statusError{color:#d94841;background:#d9484124}.Y4qSZW_statusRebind{color:#a95d00;background:#c26a0029}.Y4qSZW_settingCopy{flex-direction:column;gap:2px;min-width:0;display:flex}.Y4qSZW_settingCopy strong{font-size:14px;font-weight:500;line-height:20px}.Y4qSZW_settingCopy span{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.Y4qSZW_switch{cursor:pointer;flex:none;width:36px;height:20px;display:inline-flex;position:relative}.Y4qSZW_switch input{opacity:0;width:1px;height:1px;position:absolute}.Y4qSZW_switch span{background:var(--dsw-alias-fill-l2);border-radius:10px;width:100%;transition:background-color .12s}.Y4qSZW_switch span:after{background:var(--dsw-alias-bg-layer-1);content:\"\";border-radius:50%;width:16px;height:16px;transition:transform .12s;position:absolute;top:2px;left:2px;box-shadow:0 1px 3px #0003}.Y4qSZW_switch input:checked+span{background:var(--dsw-alias-state-business-primary)}.Y4qSZW_switch input:checked+span:after{transform:translate(16px)}.Y4qSZW_switch input:focus-visible+span{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y4qSZW_marker{display:none}[data-relay-simple-conversation=true] [role=tablist]{display:none}";
|
|
197
|
+
const tagId$4 = "@agentrouter-top/relay-dsh-plugin-codex/AdvancedDebug.module.css";
|
|
198
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
199
199
|
const tag = document.createElement("style");
|
|
200
200
|
tag.dataset.plugin = "@agentrouter-top/relay-dsh-plugin-codex";
|
|
201
|
-
tag.dataset.pluginCss = tagId$
|
|
202
|
-
tag.textContent = css$
|
|
201
|
+
tag.dataset.pluginCss = tagId$4;
|
|
202
|
+
tag.textContent = css$4;
|
|
203
203
|
document.head.appendChild(tag);
|
|
204
204
|
}
|
|
205
205
|
var AdvancedDebug_module_css_default = {
|
|
@@ -32123,7 +32123,7 @@ window.__ModuleLoader__.load({
|
|
|
32123
32123
|
key: "1qoq8a"
|
|
32124
32124
|
}]
|
|
32125
32125
|
]);
|
|
32126
|
-
|
|
32126
|
+
createLucideIcon("triangle-alert", [
|
|
32127
32127
|
["path", {
|
|
32128
32128
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
32129
32129
|
key: "wmoenq"
|
|
@@ -34871,7 +34871,6 @@ window.__ModuleLoader__.load({
|
|
|
34871
34871
|
exports.LoaderCircle = LoaderCircle;
|
|
34872
34872
|
exports.Search = Search;
|
|
34873
34873
|
exports.Terminal = Terminal;
|
|
34874
|
-
exports.TriangleAlert = TriangleAlert;
|
|
34875
34874
|
exports.Wrench = Wrench;
|
|
34876
34875
|
})))();
|
|
34877
34876
|
const CODEX_ACTIVITY_TOOL = "relay_codex_activity";
|
|
@@ -34890,6 +34889,10 @@ window.__ModuleLoader__.load({
|
|
|
34890
34889
|
"exitCode",
|
|
34891
34890
|
"commandActions"
|
|
34892
34891
|
]) if (activity[key] !== void 0 && typeof activity[key] !== "string") return null;
|
|
34892
|
+
if (activity.imageGeneration !== void 0) {
|
|
34893
|
+
const image = activity.imageGeneration;
|
|
34894
|
+
if (activity.type !== "imageGeneration" || !image || typeof image !== "object" || image.version !== 1 || image.attachmentId !== void 0 && (typeof image.attachmentId !== "string" || !image.attachmentId)) return null;
|
|
34895
|
+
}
|
|
34893
34896
|
return value;
|
|
34894
34897
|
}
|
|
34895
34898
|
//#endregion
|
|
@@ -35142,10 +35145,10 @@ window.__ModuleLoader__.load({
|
|
|
35142
35145
|
function summarizeParts(parts) {
|
|
35143
35146
|
const groups = /* @__PURE__ */ new Map();
|
|
35144
35147
|
for (const part of parts) {
|
|
35148
|
+
const displayState = part.state === "error" || part.state === "exited" ? "attempt" : part.state;
|
|
35145
35149
|
const key = JSON.stringify([
|
|
35146
35150
|
part.category,
|
|
35147
|
-
|
|
35148
|
-
part.exitCode,
|
|
35151
|
+
displayState,
|
|
35149
35152
|
part.category === "unknown" ? part.label : null
|
|
35150
35153
|
]);
|
|
35151
35154
|
const group = groups.get(key) ?? [];
|
|
@@ -35184,17 +35187,15 @@ window.__ModuleLoader__.load({
|
|
|
35184
35187
|
if (part.label) {
|
|
35185
35188
|
const suffix = {
|
|
35186
35189
|
running: " (running)",
|
|
35187
|
-
error: " (failed)",
|
|
35188
35190
|
unknown: " (status unknown)"
|
|
35189
35191
|
}[part.state] ?? "";
|
|
35190
35192
|
return `${short(part.label, 120)}${part.count > 1 ? ` (${part.count} activities)` : ""}${suffix}`;
|
|
35191
35193
|
}
|
|
35192
|
-
const [present, past,
|
|
35194
|
+
const [present, past, , neutral] = verbs[part.category];
|
|
35193
35195
|
const subject = short(part.subject);
|
|
35194
35196
|
if (part.state === "running") return `${present} ${subject}`;
|
|
35195
35197
|
if (part.state === "completed") return `${past} ${subject}`;
|
|
35196
|
-
if (part.state === "error") return
|
|
35197
|
-
if (part.state === "exited") return `${neutral} exited ${part.exitCode}: ${subject}`;
|
|
35198
|
+
if (part.state === "error" || part.state === "exited") return `${neutral}: ${subject}`;
|
|
35198
35199
|
return `${neutral} (status unknown): ${subject}`;
|
|
35199
35200
|
}
|
|
35200
35201
|
function basename(path) {
|
|
@@ -35216,13 +35217,13 @@ window.__ModuleLoader__.load({
|
|
|
35216
35217
|
}
|
|
35217
35218
|
//#endregion
|
|
35218
35219
|
//#region \0relay-css-module:.\src\client\CodexActivityView.module.css.mjs
|
|
35219
|
-
const css$
|
|
35220
|
-
const tagId$
|
|
35221
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
35220
|
+
const css$3 = ".jIHzgW_activity{width:min(100%,960px);color:var(--dsw-alias-label-secondary)}.jIHzgW_row{gap:8px;min-width:0;max-width:100%}.jIHzgW_title{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;font-size:14px;line-height:24px;overflow:hidden}.jIHzgW_summary{min-width:0;color:var(--dsw-alias-label-tertiary);flex:1;align-items:center;gap:8px;font-size:13px;line-height:20px;display:flex}.jIHzgW_summary :first-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.jIHzgW_detail{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-background-container,#f6f6f7);color:var(--dsw-alias-label-secondary);border-radius:8px;margin:8px 0 12px 28px;overflow:hidden}.jIHzgW_detailBlock{min-width:0}.jIHzgW_detailLabel{color:var(--dsw-alias-label-tertiary);padding:10px 12px 0;font-size:13px;line-height:18px}.jIHzgW_detail pre{max-height:360px;color:var(--dsw-alias-label-secondary);font:var(--dsw-font-markdown-code-block-small);white-space:pre-wrap;word-break:break-word;margin:0;padding:10px 12px 12px;overflow:auto}.jIHzgW_provenance{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;padding:10px 12px 0;font-size:12px;line-height:18px;overflow:hidden}.jIHzgW_footer{border-top:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);justify-content:space-between;gap:12px;padding:8px 12px;font-size:13px;line-height:18px;display:flex}";
|
|
35221
|
+
const tagId$3 = "@agentrouter-top/relay-dsh-plugin-codex/CodexActivityView.module.css";
|
|
35222
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
35222
35223
|
const tag = document.createElement("style");
|
|
35223
35224
|
tag.dataset.plugin = "@agentrouter-top/relay-dsh-plugin-codex";
|
|
35224
|
-
tag.dataset.pluginCss = tagId$
|
|
35225
|
-
tag.textContent = css$
|
|
35225
|
+
tag.dataset.pluginCss = tagId$3;
|
|
35226
|
+
tag.textContent = css$3;
|
|
35226
35227
|
document.head.appendChild(tag);
|
|
35227
35228
|
}
|
|
35228
35229
|
var CodexActivityView_module_css_default = {
|
|
@@ -35725,6 +35726,24 @@ window.__ModuleLoader__.load({
|
|
|
35725
35726
|
const last = text.at(-1);
|
|
35726
35727
|
return last ? [last] : [];
|
|
35727
35728
|
}
|
|
35729
|
+
/** Place each generated attachment in its original generation frame. Never guess
|
|
35730
|
+
* by filename, nearest activity, or cross-turn order. Legacy/MCP images stay native. */
|
|
35731
|
+
function imageGenerationFrames(segments) {
|
|
35732
|
+
const consumed = /* @__PURE__ */ new Set();
|
|
35733
|
+
const frames = /* @__PURE__ */ new Map();
|
|
35734
|
+
for (const segment of segments) {
|
|
35735
|
+
const generation = segment.activity?.imageGeneration;
|
|
35736
|
+
if (segment.kind !== "activity" || generation?.version !== 1) continue;
|
|
35737
|
+
const image = generation.attachmentId ? segments.find((candidate) => candidate.kind === "image" && candidate.step === segment.step && !consumed.has(candidate.key) && candidate.attachment?.attachmentId === generation.attachmentId) : void 0;
|
|
35738
|
+
if (image) consumed.add(image.key);
|
|
35739
|
+
frames.set(segment.key, {
|
|
35740
|
+
...segment,
|
|
35741
|
+
kind: "image",
|
|
35742
|
+
attachment: image?.attachment
|
|
35743
|
+
});
|
|
35744
|
+
}
|
|
35745
|
+
return segments.filter((segment) => !consumed.has(segment.key)).map((segment) => frames.get(segment.key) ?? segment);
|
|
35746
|
+
}
|
|
35728
35747
|
const codexProcessDefinition = {
|
|
35729
35748
|
kind: "relay-codex-process",
|
|
35730
35749
|
target: "chat",
|
|
@@ -35789,11 +35808,6 @@ window.__ModuleLoader__.load({
|
|
|
35789
35808
|
};
|
|
35790
35809
|
//#endregion
|
|
35791
35810
|
//#region src/client/CodexActivityView.tsx
|
|
35792
|
-
function dotState(status) {
|
|
35793
|
-
if (status === "running") return "ongoing";
|
|
35794
|
-
if (status === "error") return "error";
|
|
35795
|
-
return "done";
|
|
35796
|
-
}
|
|
35797
35811
|
function ActivityIcon({ category }) {
|
|
35798
35812
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(category === "read" ? import_lucide_react.BookOpen : category === "search" || category === "webSearch" ? import_lucide_react.Search : category === "listFiles" ? import_lucide_react.FolderOpen : category === "edit" ? import_lucide_react.FilePenLine : category === "image" || category === "imageGeneration" ? import_lucide_react.Image : category === "plan" ? import_lucide_react.ListChecks : category === "command" ? import_lucide_react.Terminal : import_lucide_react.Wrench, {
|
|
35799
35813
|
size: 16,
|
|
@@ -35864,8 +35878,8 @@ window.__ModuleLoader__.load({
|
|
|
35864
35878
|
expandOnRowClick: true,
|
|
35865
35879
|
collapsedContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
35866
35880
|
className: CodexActivityView_module_css_default.summary,
|
|
35867
|
-
children: activity.status
|
|
35868
|
-
state:
|
|
35881
|
+
children: activity.status === "running" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, {
|
|
35882
|
+
state: "ongoing",
|
|
35869
35883
|
size: 8
|
|
35870
35884
|
}) : null
|
|
35871
35885
|
}),
|
|
@@ -35892,10 +35906,10 @@ window.__ModuleLoader__.load({
|
|
|
35892
35906
|
label: "Output",
|
|
35893
35907
|
text: activity.output
|
|
35894
35908
|
}) : null] }),
|
|
35895
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
35909
|
+
activity.exitCode !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
35896
35910
|
className: CodexActivityView_module_css_default.footer,
|
|
35897
|
-
children:
|
|
35898
|
-
})
|
|
35911
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: ["exit ", activity.exitCode] })
|
|
35912
|
+
}) : null
|
|
35899
35913
|
]
|
|
35900
35914
|
})
|
|
35901
35915
|
})
|
|
@@ -35910,15 +35924,57 @@ window.__ModuleLoader__.load({
|
|
|
35910
35924
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", { children: text })]
|
|
35911
35925
|
});
|
|
35912
35926
|
}
|
|
35913
|
-
function statusLabel(status) {
|
|
35914
|
-
if (status === "running") return "Running";
|
|
35915
|
-
if (status === "error") return "Failed";
|
|
35916
|
-
return "Success";
|
|
35917
|
-
}
|
|
35918
35927
|
function shortId(value) {
|
|
35919
35928
|
return value.length > 15 ? `${value.slice(0, 8)}...${value.slice(-4)}` : value;
|
|
35920
35929
|
}
|
|
35921
35930
|
//#endregion
|
|
35931
|
+
//#region \0relay-css-module:.\src\client\CodexImageGeneration.module.css.mjs
|
|
35932
|
+
const css$2 = ".gSdKhG_frame{border-radius:16px;width:min(100%,480px);min-width:0;overflow:hidden}.gSdKhG_placeholder{aspect-ratio:1;background:var(--dsw-alias-bg-layer-2,#f3f4f6);color:var(--dsw-alias-label-secondary,#646b77);border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:inherit;place-items:end center;display:grid;position:relative;overflow:hidden}.gSdKhG_field{color:var(--dsw-alias-label-tertiary,#9299a3);opacity:.48;background:currentColor;position:absolute;inset:18px;overflow:hidden;mask-image:radial-gradient(circle,#000 1.2px,#0000 1.5px);mask-size:12px 12px}.gSdKhG_light{background:linear-gradient(115deg, transparent 28%, var(--dsw-alias-label-primary,#343b46) 48%, transparent 68%);animation:3.6s ease-in-out infinite alternate gSdKhG_codex-image-shimmer;position:absolute;inset:-55%}.gSdKhG_label{z-index:1;text-align:center;background:var(--dsw-alias-bg-layer-2,#f3f4f6);border-radius:12px;margin:0 16px 24px;padding:6px 12px;font-size:13px;line-height:20px}.gSdKhG_frame[data-state=stopped] .gSdKhG_light{opacity:.25;animation:none}@keyframes gSdKhG_codex-image-shimmer{0%{opacity:.35;transform:translate(-30%,-12%)}to{opacity:1;transform:translate(30%,12%)}}@media (prefers-reduced-motion:reduce){.gSdKhG_light{opacity:.55;animation:none}}";
|
|
35933
|
+
const tagId$2 = "@agentrouter-top/relay-dsh-plugin-codex/CodexImageGeneration.module.css";
|
|
35934
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
35935
|
+
const tag = document.createElement("style");
|
|
35936
|
+
tag.dataset.plugin = "@agentrouter-top/relay-dsh-plugin-codex";
|
|
35937
|
+
tag.dataset.pluginCss = tagId$2;
|
|
35938
|
+
tag.textContent = css$2;
|
|
35939
|
+
document.head.appendChild(tag);
|
|
35940
|
+
}
|
|
35941
|
+
var CodexImageGeneration_module_css_default = {
|
|
35942
|
+
"codex-image-shimmer": "gSdKhG_codex-image-shimmer",
|
|
35943
|
+
"field": "gSdKhG_field",
|
|
35944
|
+
"frame": "gSdKhG_frame",
|
|
35945
|
+
"label": "gSdKhG_label",
|
|
35946
|
+
"light": "gSdKhG_light",
|
|
35947
|
+
"placeholder": "gSdKhG_placeholder"
|
|
35948
|
+
};
|
|
35949
|
+
//#endregion
|
|
35950
|
+
//#region src/client/CodexImageGeneration.tsx
|
|
35951
|
+
function CodexImageGeneration({ segment, running, renderMessageImages }) {
|
|
35952
|
+
const pending = !segment.attachment && running && segment.activity?.status !== "error";
|
|
35953
|
+
const label = pending ? "正在生成图片" : "图片生成已结束,未提供可显示的图片";
|
|
35954
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
35955
|
+
className: CodexImageGeneration_module_css_default.frame,
|
|
35956
|
+
"data-codex-image-generation": segment.key,
|
|
35957
|
+
"data-state": segment.attachment ? "ready" : pending ? "generating" : "stopped",
|
|
35958
|
+
"aria-busy": pending,
|
|
35959
|
+
children: segment.attachment ? renderMessageImages({
|
|
35960
|
+
images: [{ attachment: segment.attachment }],
|
|
35961
|
+
align: "start"
|
|
35962
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
35963
|
+
className: CodexImageGeneration_module_css_default.placeholder,
|
|
35964
|
+
role: "status",
|
|
35965
|
+
"aria-live": "polite",
|
|
35966
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
35967
|
+
className: CodexImageGeneration_module_css_default.field,
|
|
35968
|
+
"aria-hidden": "true",
|
|
35969
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: CodexImageGeneration_module_css_default.light })
|
|
35970
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
35971
|
+
className: CodexImageGeneration_module_css_default.label,
|
|
35972
|
+
children: label
|
|
35973
|
+
})]
|
|
35974
|
+
})
|
|
35975
|
+
});
|
|
35976
|
+
}
|
|
35977
|
+
//#endregion
|
|
35922
35978
|
//#region src/client/process-files.ts
|
|
35923
35979
|
function codexProducedFileMentions(segments, openFile, native) {
|
|
35924
35980
|
const paths = /* @__PURE__ */ new Set();
|
|
@@ -36071,9 +36127,10 @@ window.__ModuleLoader__.load({
|
|
|
36071
36127
|
};
|
|
36072
36128
|
}, [state.status]);
|
|
36073
36129
|
const answerKeys = new Set(codexProcessAnswerSegments(state).map((segment) => segment.key));
|
|
36074
|
-
const
|
|
36075
|
-
const
|
|
36076
|
-
const
|
|
36130
|
+
const segments = imageGenerationFrames(state.segments);
|
|
36131
|
+
const finalIndex = segments.findIndex((segment) => answerKeys.has(segment.key));
|
|
36132
|
+
const process = finalIndex < 0 ? segments : segments.slice(0, finalIndex);
|
|
36133
|
+
const answer = finalIndex < 0 ? [] : segments.slice(finalIndex);
|
|
36077
36134
|
const deliverables = process.filter((segment) => segment.kind === "image");
|
|
36078
36135
|
const hasProcess = process.some((segment) => segment.kind !== "text" || Boolean(segment.text?.trim()));
|
|
36079
36136
|
const open = expanded ?? (state.status === "running" || answer.length === 0 && deliverables.length === 0);
|
|
@@ -36128,7 +36185,11 @@ window.__ModuleLoader__.load({
|
|
|
36128
36185
|
});
|
|
36129
36186
|
}
|
|
36130
36187
|
function ProcessItems({ segments, renderMessageImages, running, fileMentions, showImages = true }) {
|
|
36131
|
-
return groupProcessSegments(segments).map((item) => "activities" in item ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActivityGroup, { segments: item.activities }, item.key) : item.
|
|
36188
|
+
return groupProcessSegments(segments).map((item) => "activities" in item ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActivityGroup, { segments: item.activities }, item.key) : item.activity?.imageGeneration ? showImages ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CodexImageGeneration, {
|
|
36189
|
+
segment: item,
|
|
36190
|
+
running,
|
|
36191
|
+
renderMessageImages
|
|
36192
|
+
}, item.key) : null : item.kind === "image" && item.attachment ? showImages ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: renderMessageImages({
|
|
36132
36193
|
images: [{ attachment: item.attachment }],
|
|
36133
36194
|
align: "start"
|
|
36134
36195
|
}) }, item.key) : null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -36146,7 +36207,6 @@ window.__ModuleLoader__.load({
|
|
|
36146
36207
|
const [open, setOpen] = (0, react.useState)(false);
|
|
36147
36208
|
const activities = segments.flatMap((segment) => segment.activity ? [segment.activity] : []);
|
|
36148
36209
|
const active = activities.filter((activity) => activity.status === "running");
|
|
36149
|
-
const failed = activities.filter((activity) => activity.status === "error").length;
|
|
36150
36210
|
const current = active.at(-1);
|
|
36151
36211
|
const representative = current ?? activities.at(-1);
|
|
36152
36212
|
if (!representative) return null;
|
|
@@ -36179,15 +36239,6 @@ window.__ModuleLoader__.load({
|
|
|
36179
36239
|
className: CodexProcessView_module_css_default.count,
|
|
36180
36240
|
children: [active.length, " running"]
|
|
36181
36241
|
}),
|
|
36182
|
-
failed > 0 && current && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
36183
|
-
className: CodexProcessView_module_css_default.error,
|
|
36184
|
-
children: [failed, " failed"]
|
|
36185
|
-
}),
|
|
36186
|
-
failed > 0 && !current && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(import_lucide_react.TriangleAlert, {
|
|
36187
|
-
size: 14,
|
|
36188
|
-
className: CodexProcessView_module_css_default.error,
|
|
36189
|
-
"aria-label": "Failed"
|
|
36190
|
-
}),
|
|
36191
36242
|
open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { size: 14 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(import_lucide_react.ChevronRight, { size: 14 })
|
|
36192
36243
|
]
|
|
36193
36244
|
}), open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|