@agentrouter-top/relay-dsh-plugin-codex 0.2.2-agentrouter.6 → 0.2.2-agentrouter.8
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/docs/image-motion.md +19 -0
- package/docs/native-turn-status.md +13 -0
- package/lib/client.js +245 -43
- package/lib/client.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Image generation motion
|
|
2
|
+
|
|
3
|
+
Relay owns the approved iridescent dot field and the native-image reveal. This
|
|
4
|
+
is an indeterminate status, not server progress. No model, tool, authentication,
|
|
5
|
+
attachment import, Viewer or Desktop behavior is changed.
|
|
6
|
+
|
|
7
|
+
The pending card is 4:3 and at most 480 px wide. Six interpolated colors and a
|
|
8
|
+
soft moving ribbon replace the grey grid. Light/dark mode comes exclusively
|
|
9
|
+
from the public DSH theme service. No host DOM probing or additional dependency.
|
|
10
|
+
Canvas updates are imperative, at most about 33 paints per second, DPR capped
|
|
11
|
+
at 2. Hidden/offscreen/reduced-motion frames do not animate; completion, failure,
|
|
12
|
+
interruption and unmount dispose subscriptions. Document/media listeners are
|
|
13
|
+
shared across pending images.
|
|
14
|
+
|
|
15
|
+
Generated frames stay mounted when process details collapse. Completion fades
|
|
16
|
+
the field into DSH's native image renderer without duplicate attachments. The
|
|
17
|
+
actual result keeps its native aspect ratio and Viewer actions. History opens
|
|
18
|
+
immediately without replaying the animation. Design-preview palette/demo
|
|
19
|
+
controls and synthetic images are not shipped.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Native turn status
|
|
2
|
+
|
|
3
|
+
Relay no longer hides DSH's turn-level status when its Codex process view mounts.
|
|
4
|
+
Public DSH 0.1.2-rc.1 keeps this status present from session `running` across
|
|
5
|
+
first-token waits, tools and streamed output, independently of tool completion
|
|
6
|
+
or process folding. DSH also owns its localization, elapsed time and removal at
|
|
7
|
+
the end of a turn. Relay does not create a second status component or infer model
|
|
8
|
+
reasoning from a timer.
|
|
9
|
+
|
|
10
|
+
This removes only the old blanket CSS suppression. Codex process rows, quiet
|
|
11
|
+
tool outcomes, iridescent image frames, native history, approvals and other
|
|
12
|
+
kernels retain their existing behavior. No shell, runtime or authentication
|
|
13
|
+
change is required.
|
package/lib/client.js
CHANGED
|
@@ -35240,31 +35240,31 @@ window.__ModuleLoader__.load({
|
|
|
35240
35240
|
//#endregion
|
|
35241
35241
|
//#region src/client/process-presence.ts
|
|
35242
35242
|
const mounted = /* @__PURE__ */ new Map();
|
|
35243
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
35244
|
-
const subscribe = (listener) => {
|
|
35245
|
-
listeners.add(listener);
|
|
35243
|
+
const listeners$1 = /* @__PURE__ */ new Set();
|
|
35244
|
+
const subscribe$1 = (listener) => {
|
|
35245
|
+
listeners$1.add(listener);
|
|
35246
35246
|
return () => {
|
|
35247
|
-
listeners.delete(listener);
|
|
35247
|
+
listeners$1.delete(listener);
|
|
35248
35248
|
};
|
|
35249
35249
|
};
|
|
35250
|
-
const notify = () => {
|
|
35251
|
-
for (const listener of listeners) listener();
|
|
35250
|
+
const notify$1 = () => {
|
|
35251
|
+
for (const listener of listeners$1) listener();
|
|
35252
35252
|
};
|
|
35253
35253
|
const keyOf = (sessionId, turn) => JSON.stringify([sessionId, turn]);
|
|
35254
35254
|
/** Suppression is reversible and only active after the replacement mounts. */
|
|
35255
35255
|
function mountProcess(sessionId, turn) {
|
|
35256
35256
|
const key = keyOf(sessionId, turn);
|
|
35257
35257
|
mounted.set(key, (mounted.get(key) ?? 0) + 1);
|
|
35258
|
-
notify();
|
|
35258
|
+
notify$1();
|
|
35259
35259
|
return () => {
|
|
35260
35260
|
const count = (mounted.get(key) ?? 1) - 1;
|
|
35261
35261
|
if (count === 0) mounted.delete(key);
|
|
35262
35262
|
else mounted.set(key, count);
|
|
35263
|
-
notify();
|
|
35263
|
+
notify$1();
|
|
35264
35264
|
};
|
|
35265
35265
|
}
|
|
35266
35266
|
function useProcessPresence(sessionId, turn) {
|
|
35267
|
-
return (0, react.useSyncExternalStore)(subscribe, () => mounted.has(keyOf(sessionId, turn)), () => false);
|
|
35267
|
+
return (0, react.useSyncExternalStore)(subscribe$1, () => mounted.has(keyOf(sessionId, turn)), () => false);
|
|
35268
35268
|
}
|
|
35269
35269
|
//#endregion
|
|
35270
35270
|
//#region src/client/compatible-chat.ts
|
|
@@ -35928,8 +35928,179 @@ window.__ModuleLoader__.load({
|
|
|
35928
35928
|
return value.length > 15 ? `${value.slice(0, 8)}...${value.slice(-4)}` : value;
|
|
35929
35929
|
}
|
|
35930
35930
|
//#endregion
|
|
35931
|
+
//#region src/client/image-motion.ts
|
|
35932
|
+
const palette = [
|
|
35933
|
+
[
|
|
35934
|
+
49,
|
|
35935
|
+
190,
|
|
35936
|
+
217
|
|
35937
|
+
],
|
|
35938
|
+
[
|
|
35939
|
+
88,
|
|
35940
|
+
140,
|
|
35941
|
+
246
|
|
35942
|
+
],
|
|
35943
|
+
[
|
|
35944
|
+
161,
|
|
35945
|
+
113,
|
|
35946
|
+
237
|
|
35947
|
+
],
|
|
35948
|
+
[
|
|
35949
|
+
237,
|
|
35950
|
+
132,
|
|
35951
|
+
188
|
|
35952
|
+
],
|
|
35953
|
+
[
|
|
35954
|
+
245,
|
|
35955
|
+
189,
|
|
35956
|
+
121
|
|
35957
|
+
],
|
|
35958
|
+
[
|
|
35959
|
+
78,
|
|
35960
|
+
202,
|
|
35961
|
+
214
|
|
35962
|
+
]
|
|
35963
|
+
];
|
|
35964
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
35965
|
+
let reduced;
|
|
35966
|
+
const notify = () => {
|
|
35967
|
+
for (const listener of listeners) listener();
|
|
35968
|
+
};
|
|
35969
|
+
function subscribe(listener) {
|
|
35970
|
+
if (!listeners.size) {
|
|
35971
|
+
reduced = window.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
35972
|
+
reduced?.addEventListener("change", notify);
|
|
35973
|
+
document.addEventListener("visibilitychange", notify);
|
|
35974
|
+
}
|
|
35975
|
+
listeners.add(listener);
|
|
35976
|
+
return () => {
|
|
35977
|
+
listeners.delete(listener);
|
|
35978
|
+
if (!listeners.size) {
|
|
35979
|
+
reduced?.removeEventListener("change", notify);
|
|
35980
|
+
document.removeEventListener("visibilitychange", notify);
|
|
35981
|
+
reduced = void 0;
|
|
35982
|
+
}
|
|
35983
|
+
};
|
|
35984
|
+
}
|
|
35985
|
+
/** One bounded canvas timeline; no per-frame React state or host DOM inspection. */
|
|
35986
|
+
function mountImageMotion(canvas, dark) {
|
|
35987
|
+
const ctx = canvas.getContext("2d");
|
|
35988
|
+
if (!ctx) return () => {};
|
|
35989
|
+
let width = 0, height = 0, points = [];
|
|
35990
|
+
let clock = 1.6, last = 0, lastPaint = 0, raf = 0, disposed = false;
|
|
35991
|
+
let visible = typeof IntersectionObserver === "undefined";
|
|
35992
|
+
const colorAt = (position) => {
|
|
35993
|
+
const offset = (position % 1 + 1) % 1 * palette.length;
|
|
35994
|
+
const i = Math.floor(offset), f = offset - i;
|
|
35995
|
+
return palette[i].map((channel, index) => {
|
|
35996
|
+
const value = channel + (palette[(i + 1) % palette.length][index] - channel) * f;
|
|
35997
|
+
return Math.round(dark ? value + (255 - value) * .16 : value);
|
|
35998
|
+
}).join(",");
|
|
35999
|
+
};
|
|
36000
|
+
const draw = () => {
|
|
36001
|
+
if (!width || !height) return;
|
|
36002
|
+
ctx.clearRect(0, 0, width, height);
|
|
36003
|
+
const t = clock;
|
|
36004
|
+
for (let i = 0; i < 3; i++) {
|
|
36005
|
+
const x = width * (.25 + i * .24 + .045 * Math.sin(t * .43 + i));
|
|
36006
|
+
const y = height * (.43 + .075 * Math.sin(t * .6 + i));
|
|
36007
|
+
const glow = ctx.createRadialGradient(x, y, 0, x, y, width * .31);
|
|
36008
|
+
const rgb = colorAt(i * .28 - t * .045);
|
|
36009
|
+
glow.addColorStop(0, `rgba(${rgb},${dark ? .105 : .066})`);
|
|
36010
|
+
glow.addColorStop(1, `rgba(${rgb},0)`);
|
|
36011
|
+
ctx.fillStyle = glow;
|
|
36012
|
+
ctx.fillRect(0, 0, width, height);
|
|
36013
|
+
}
|
|
36014
|
+
for (const p of points) {
|
|
36015
|
+
if (p.edge < .002) continue;
|
|
36016
|
+
const u = p.nx * .93 + p.ny * .24, v = p.ny * .95 - p.nx * .22;
|
|
36017
|
+
const spine = .2 * Math.sin(u * 3.3 - t * .8) + .14 * Math.sin(t * .42);
|
|
36018
|
+
const main = Math.exp(-Math.pow((v - spine) / .21, 2));
|
|
36019
|
+
const echo = Math.exp(-Math.pow((v - spine + .43) / .29, 2));
|
|
36020
|
+
const travel = .59 + .41 * Math.sin(u * 4.2 - t * 1.12 + p.ny * .7);
|
|
36021
|
+
const swell = .8 + .2 * Math.sin(t * .62 + u * 1.9);
|
|
36022
|
+
const energy = (main * (.7 + .3 * travel) + echo * .3) * swell;
|
|
36023
|
+
const alpha = (.022 + energy * (dark ? .86 : .79)) * p.edge;
|
|
36024
|
+
const radius = .53 + energy * .9;
|
|
36025
|
+
const dx = Math.sin(p.ny * 4.1 + t * .61) * .7 * energy;
|
|
36026
|
+
const dy = Math.cos(p.nx * 3.2 - t * .5) * 1.02 * energy;
|
|
36027
|
+
ctx.fillStyle = `rgba(${colorAt((u + 1) * .39 + p.ny * .08 - t * .045)},${alpha.toFixed(3)})`;
|
|
36028
|
+
ctx.beginPath();
|
|
36029
|
+
ctx.arc(p.x + dx, p.y + dy, radius, 0, Math.PI * 2);
|
|
36030
|
+
ctx.fill();
|
|
36031
|
+
if (energy > .6) {
|
|
36032
|
+
ctx.fillStyle = `rgba(255,255,255,${((energy - .6) * p.edge * (dark ? .65 : .32)).toFixed(3)})`;
|
|
36033
|
+
ctx.beginPath();
|
|
36034
|
+
ctx.arc(p.x + dx, p.y + dy, radius * .4, 0, Math.PI * 2);
|
|
36035
|
+
ctx.fill();
|
|
36036
|
+
}
|
|
36037
|
+
}
|
|
36038
|
+
};
|
|
36039
|
+
const canAnimate = () => !disposed && visible && width > 0 && height > 0 && !document.hidden && !reduced?.matches;
|
|
36040
|
+
const tick = (now) => {
|
|
36041
|
+
raf = 0;
|
|
36042
|
+
if (!canAnimate()) {
|
|
36043
|
+
last = 0;
|
|
36044
|
+
return;
|
|
36045
|
+
}
|
|
36046
|
+
if (last) clock += Math.min((now - last) / 1e3, .07);
|
|
36047
|
+
last = now;
|
|
36048
|
+
if (now - lastPaint >= 30) {
|
|
36049
|
+
draw();
|
|
36050
|
+
lastPaint = now;
|
|
36051
|
+
}
|
|
36052
|
+
raf = requestAnimationFrame(tick);
|
|
36053
|
+
};
|
|
36054
|
+
const sync = () => {
|
|
36055
|
+
cancelAnimationFrame(raf);
|
|
36056
|
+
raf = 0;
|
|
36057
|
+
last = 0;
|
|
36058
|
+
if (canAnimate()) raf = requestAnimationFrame(tick);
|
|
36059
|
+
};
|
|
36060
|
+
const resize = () => {
|
|
36061
|
+
if (disposed) return;
|
|
36062
|
+
const rect = canvas.getBoundingClientRect(), ratio = Math.min(window.devicePixelRatio || 1, 2);
|
|
36063
|
+
width = rect.width;
|
|
36064
|
+
height = rect.height;
|
|
36065
|
+
canvas.width = Math.round(width * ratio);
|
|
36066
|
+
canvas.height = Math.round(height * ratio);
|
|
36067
|
+
ctx.setTransform(ratio, 0, 0, ratio, 0, 0);
|
|
36068
|
+
const spacing = width < 400 ? 7.4 : 8.4, inset = 22;
|
|
36069
|
+
points = [];
|
|
36070
|
+
for (let y = inset; y < height - 48; y += spacing) for (let x = inset; x < width - inset; x += spacing) {
|
|
36071
|
+
const nx = (x - width * .5) / (width * .47), ny = (y - height * .43) / (height * .42);
|
|
36072
|
+
points.push({
|
|
36073
|
+
x,
|
|
36074
|
+
y,
|
|
36075
|
+
nx,
|
|
36076
|
+
ny,
|
|
36077
|
+
edge: Math.pow(Math.max(0, 1 - nx ** 4 - ny ** 4), 1.2)
|
|
36078
|
+
});
|
|
36079
|
+
}
|
|
36080
|
+
draw();
|
|
36081
|
+
sync();
|
|
36082
|
+
};
|
|
36083
|
+
const unsubscribe = subscribe(sync);
|
|
36084
|
+
const resizer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(resize);
|
|
36085
|
+
const intersection = typeof IntersectionObserver === "undefined" ? void 0 : new IntersectionObserver((entries) => {
|
|
36086
|
+
if (disposed) return;
|
|
36087
|
+
visible = entries.some((entry) => entry.isIntersecting);
|
|
36088
|
+
sync();
|
|
36089
|
+
});
|
|
36090
|
+
resizer?.observe(canvas);
|
|
36091
|
+
intersection?.observe(canvas);
|
|
36092
|
+
resize();
|
|
36093
|
+
return () => {
|
|
36094
|
+
disposed = true;
|
|
36095
|
+
cancelAnimationFrame(raf);
|
|
36096
|
+
unsubscribe();
|
|
36097
|
+
resizer?.disconnect();
|
|
36098
|
+
intersection?.disconnect();
|
|
36099
|
+
};
|
|
36100
|
+
}
|
|
36101
|
+
//#endregion
|
|
35931
36102
|
//#region \0relay-css-module:.\src\client\CodexImageGeneration.module.css.mjs
|
|
35932
|
-
const css$2 = ".gSdKhG_frame{border-radius:
|
|
36103
|
+
const css$2 = ".gSdKhG_frame{--image-well:#f7f8ff;--image-accent:#6f77a7;border-radius:24px;width:min(100%,480px);min-width:0;position:relative;overflow:hidden}.gSdKhG_frame[data-color-scheme=dark]{--image-well:#1a2238;--image-accent:#b9c5fa}.gSdKhG_placeholder{box-sizing:border-box;aspect-ratio:4/3;background:var(--image-well);color:var(--image-accent);border:1px solid var(--dsw-alias-border-l2,#e6e8f2);border-radius:inherit;place-items:end center;transition:opacity 1.2s,filter 1.2s,transform 1.6s,visibility 0s 1.2s;display:grid;position:relative;overflow:hidden}.gSdKhG_field{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.gSdKhG_label{z-index:1;text-align:center;gap:6px;margin:0 16px 26px;font-size:13px;line-height:20px;display:grid}.gSdKhG_subtitle{opacity:.75;font-size:11px}.gSdKhG_result{min-width:0}.gSdKhG_frame[data-state=ready] .gSdKhG_placeholder{aspect-ratio:auto;opacity:0;filter:blur(5px);visibility:hidden;pointer-events:none;position:absolute;inset:0;transform:scale(1.025)}.gSdKhG_frame[data-reveal] .gSdKhG_result{animation:1.6s both gSdKhG_codex-image-reveal}.gSdKhG_frame[data-state=stopped] .gSdKhG_field{opacity:.4}@keyframes gSdKhG_codex-image-reveal{0%{opacity:0;transform:scale(1.035)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.gSdKhG_placeholder{transition:none}.gSdKhG_frame[data-reveal] .gSdKhG_result{animation:none}}";
|
|
35933
36104
|
const tagId$2 = "@agentrouter-top/relay-dsh-plugin-codex/CodexImageGeneration.module.css";
|
|
35934
36105
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
35935
36106
|
const tag = document.createElement("style");
|
|
@@ -35939,39 +36110,56 @@ window.__ModuleLoader__.load({
|
|
|
35939
36110
|
document.head.appendChild(tag);
|
|
35940
36111
|
}
|
|
35941
36112
|
var CodexImageGeneration_module_css_default = {
|
|
35942
|
-
"codex-image-
|
|
36113
|
+
"codex-image-reveal": "gSdKhG_codex-image-reveal",
|
|
35943
36114
|
"field": "gSdKhG_field",
|
|
35944
36115
|
"frame": "gSdKhG_frame",
|
|
35945
36116
|
"label": "gSdKhG_label",
|
|
35946
|
-
"
|
|
35947
|
-
"
|
|
36117
|
+
"placeholder": "gSdKhG_placeholder",
|
|
36118
|
+
"result": "gSdKhG_result",
|
|
36119
|
+
"subtitle": "gSdKhG_subtitle"
|
|
35948
36120
|
};
|
|
35949
36121
|
//#endregion
|
|
35950
36122
|
//#region src/client/CodexImageGeneration.tsx
|
|
36123
|
+
const ImageColorScheme = (0, react.createContext)("light");
|
|
35951
36124
|
function CodexImageGeneration({ segment, running, renderMessageImages }) {
|
|
35952
36125
|
const pending = !segment.attachment && running && segment.activity?.status !== "error";
|
|
36126
|
+
const scheme = (0, react.useContext)(ImageColorScheme);
|
|
36127
|
+
const canvas = (0, react.useRef)(null);
|
|
36128
|
+
const beganWithPlaceholder = (0, react.useRef)(!segment.attachment).current;
|
|
36129
|
+
(0, react.useEffect)(() => {
|
|
36130
|
+
if (pending && canvas.current) return mountImageMotion(canvas.current, scheme === "dark");
|
|
36131
|
+
}, [pending, scheme]);
|
|
35953
36132
|
const label = pending ? "正在生成图片" : "图片生成已结束,未提供可显示的图片";
|
|
35954
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
36133
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
35955
36134
|
className: CodexImageGeneration_module_css_default.frame,
|
|
35956
36135
|
"data-codex-image-generation": segment.key,
|
|
36136
|
+
"data-color-scheme": scheme,
|
|
36137
|
+
"data-reveal": beganWithPlaceholder && Boolean(segment.attachment) || void 0,
|
|
35957
36138
|
"data-state": segment.attachment ? "ready" : pending ? "generating" : "stopped",
|
|
35958
36139
|
"aria-busy": pending,
|
|
35959
|
-
children: segment.attachment
|
|
35960
|
-
|
|
35961
|
-
|
|
35962
|
-
|
|
36140
|
+
children: [segment.attachment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36141
|
+
className: CodexImageGeneration_module_css_default.result,
|
|
36142
|
+
children: renderMessageImages({
|
|
36143
|
+
images: [{ attachment: segment.attachment }],
|
|
36144
|
+
align: "start"
|
|
36145
|
+
})
|
|
36146
|
+
}), beganWithPlaceholder && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
35963
36147
|
className: CodexImageGeneration_module_css_default.placeholder,
|
|
35964
|
-
|
|
35965
|
-
|
|
35966
|
-
|
|
36148
|
+
"aria-hidden": Boolean(segment.attachment) || void 0,
|
|
36149
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("canvas", {
|
|
36150
|
+
ref: canvas,
|
|
35967
36151
|
className: CodexImageGeneration_module_css_default.field,
|
|
35968
|
-
"aria-hidden": "true"
|
|
35969
|
-
|
|
35970
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
36152
|
+
"aria-hidden": "true"
|
|
36153
|
+
}), !segment.attachment && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
35971
36154
|
className: CodexImageGeneration_module_css_default.label,
|
|
35972
|
-
|
|
36155
|
+
role: "status",
|
|
36156
|
+
"aria-live": "polite",
|
|
36157
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }), pending && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
36158
|
+
className: CodexImageGeneration_module_css_default.subtitle,
|
|
36159
|
+
children: "图像即将在这里呈现"
|
|
36160
|
+
})]
|
|
35973
36161
|
})]
|
|
35974
|
-
})
|
|
36162
|
+
})]
|
|
35975
36163
|
});
|
|
35976
36164
|
}
|
|
35977
36165
|
//#endregion
|
|
@@ -36022,7 +36210,7 @@ window.__ModuleLoader__.load({
|
|
|
36022
36210
|
}
|
|
36023
36211
|
//#endregion
|
|
36024
36212
|
//#region \0relay-css-module:.\src\client\CodexProcessView.module.css.mjs
|
|
36025
|
-
const css$1 = "._06p8sG_process{width:100%;min-width:0;color:var(--dsw-alias-label-secondary)}._06p8sG_processToggle,._06p8sG_groupToggle{min-width:0;max-width:100%;min-height:28px;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:2px 0;font-size:14px;line-height:24px;display:flex}._06p8sG_processToggle{margin-bottom:16px}._06p8sG_processToggle:focus-visible,._06p8sG_groupToggle:focus-visible{outline:2px solid var(--dsw-static-deepseek-500,#416aff);outline-offset:3px;border-radius:4px}._06p8sG_groupToggle>svg{flex:none}._06p8sG_groupTitle{white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}._06p8sG_count{flex-shrink:0;font-size:12px}._06p8sG_flow,._06p8sG_answer{flex-direction:column;gap:20px;min-width:0;display:flex}._06p8sG_flow[hidden]{display:none}._06p8sG_flow{border-top:1px solid var(--dsw-alias-border-l2);padding-top:16px}._06p8sG_answer{color:var(--dsw-alias-label-primary)}._06p8sG_flow:not([hidden])+._06p8sG_answer{margin-top:24px}._06p8sG_prose{min-width:0;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}._06p8sG_prose p{margin:0 0 12px}._06p8sG_prose p:last-child{margin-bottom:0}._06p8sG_activities{flex-direction:column;gap:8px;min-width:0;padding:8px 0 0 20px;display:flex}._06p8sG_reasoning{overflow-wrap:anywhere;margin:8px 0 0 24px;font-size:13px}._06p8sG_error{color:var(--dsw-alias-state-error-primary,#b42318)}._06p8sG_spinner{animation:1.4s linear infinite _06p8sG_codex-spin}@keyframes _06p8sG_codex-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){._06p8sG_spinner{animation:none}}[data-chat-flow-kind=assistant-step]:has(>[data-slot]>[data-codex-native-assistant]){display:none}[data-chat-flow-kind=tool-call]:has(>[data-slot]>[data-chat-call-id]>[data-slot]>[data-codex-grouped-call]){display:none}[data-chat-flow-kind=context]:has(>[data-slot]>[data-codex-internal-context]){display:none}[data-chat-flow-kind=relay-codex-process]:has(>[data-slot]>[data-codex-process-fallback]){display:none}
|
|
36213
|
+
const css$1 = "._06p8sG_process{width:100%;min-width:0;color:var(--dsw-alias-label-secondary)}._06p8sG_processToggle,._06p8sG_groupToggle{min-width:0;max-width:100%;min-height:28px;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:2px 0;font-size:14px;line-height:24px;display:flex}._06p8sG_processToggle{margin-bottom:16px}._06p8sG_processToggle:focus-visible,._06p8sG_groupToggle:focus-visible{outline:2px solid var(--dsw-static-deepseek-500,#416aff);outline-offset:3px;border-radius:4px}._06p8sG_groupToggle>svg{flex:none}._06p8sG_groupTitle{white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}._06p8sG_count{flex-shrink:0;font-size:12px}._06p8sG_flow,._06p8sG_answer{flex-direction:column;gap:20px;min-width:0;display:flex}._06p8sG_flow[hidden]{display:none}._06p8sG_flow{border-top:1px solid var(--dsw-alias-border-l2);padding-top:16px}._06p8sG_flow[data-images-only]{border-top:0;padding-top:0}._06p8sG_flow>[hidden]{display:none}._06p8sG_answer{color:var(--dsw-alias-label-primary)}._06p8sG_flow:not([hidden])+._06p8sG_answer{margin-top:24px}._06p8sG_prose{min-width:0;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}._06p8sG_prose p{margin:0 0 12px}._06p8sG_prose p:last-child{margin-bottom:0}._06p8sG_activities{flex-direction:column;gap:8px;min-width:0;padding:8px 0 0 20px;display:flex}._06p8sG_reasoning{overflow-wrap:anywhere;margin:8px 0 0 24px;font-size:13px}._06p8sG_error{color:var(--dsw-alias-state-error-primary,#b42318)}._06p8sG_spinner{animation:1.4s linear infinite _06p8sG_codex-spin}@keyframes _06p8sG_codex-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){._06p8sG_spinner{animation:none}}[data-chat-flow-kind=assistant-step]:has(>[data-slot]>[data-codex-native-assistant]){display:none}[data-chat-flow-kind=tool-call]:has(>[data-slot]>[data-chat-call-id]>[data-slot]>[data-codex-grouped-call]){display:none}[data-chat-flow-kind=context]:has(>[data-slot]>[data-codex-internal-context]){display:none}[data-chat-flow-kind=relay-codex-process]:has(>[data-slot]>[data-codex-process-fallback]){display:none}";
|
|
36026
36214
|
const tagId$1 = "@agentrouter-top/relay-dsh-plugin-codex/CodexProcessView.module.css";
|
|
36027
36215
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
36028
36216
|
const tag = document.createElement("style");
|
|
@@ -36132,9 +36320,10 @@ window.__ModuleLoader__.load({
|
|
|
36132
36320
|
const process = finalIndex < 0 ? segments : segments.slice(0, finalIndex);
|
|
36133
36321
|
const answer = finalIndex < 0 ? [] : segments.slice(finalIndex);
|
|
36134
36322
|
const deliverables = process.filter((segment) => segment.kind === "image");
|
|
36323
|
+
const persistentImages = deliverables.some((segment) => segment.activity?.imageGeneration);
|
|
36135
36324
|
const hasProcess = process.some((segment) => segment.kind !== "text" || Boolean(segment.text?.trim()));
|
|
36136
36325
|
const open = expanded ?? (state.status === "running" || answer.length === 0 && deliverables.length === 0);
|
|
36137
|
-
const visibleAnswer = [...open ? [] : deliverables, ...answer];
|
|
36326
|
+
const visibleAnswer = [...open || persistentImages ? [] : deliverables, ...answer];
|
|
36138
36327
|
const seconds = Math.max(0, Math.floor(((state.endedAt ?? now) - state.startedAt) / 1e3));
|
|
36139
36328
|
const elapsed = seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m ${seconds % 60}s`;
|
|
36140
36329
|
const status = state.status === "running" ? "Working" : state.status === "error" ? "Stopped" : "Worked";
|
|
@@ -36156,22 +36345,23 @@ window.__ModuleLoader__.load({
|
|
|
36156
36345
|
] }), open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { size: 15 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(import_lucide_react.ChevronRight, { size: 15 })]
|
|
36157
36346
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
36158
36347
|
className: CodexProcessView_module_css_default.flow,
|
|
36159
|
-
hidden: !open,
|
|
36348
|
+
hidden: !open && !persistentImages,
|
|
36160
36349
|
"data-codex-process-content": true,
|
|
36161
|
-
|
|
36162
|
-
|
|
36163
|
-
|
|
36164
|
-
|
|
36165
|
-
|
|
36166
|
-
|
|
36167
|
-
|
|
36168
|
-
|
|
36169
|
-
|
|
36350
|
+
"data-images-only": !open && persistentImages || void 0,
|
|
36351
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProcessItems, {
|
|
36352
|
+
segments: process,
|
|
36353
|
+
renderMessageImages,
|
|
36354
|
+
running: state.status === "running",
|
|
36355
|
+
showImages: open || persistentImages,
|
|
36356
|
+
collapseProcess: !open
|
|
36357
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
36358
|
+
hidden: !open,
|
|
36359
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReasoningSummary, { segments: process }), state.error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36170
36360
|
className: CodexProcessView_module_css_default.error,
|
|
36171
36361
|
role: "status",
|
|
36172
36362
|
children: state.error
|
|
36173
|
-
})
|
|
36174
|
-
]
|
|
36363
|
+
})]
|
|
36364
|
+
})]
|
|
36175
36365
|
})] }), visibleAnswer.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36176
36366
|
className: CodexProcessView_module_css_default.answer,
|
|
36177
36367
|
"data-codex-final-answer": true,
|
|
@@ -36184,8 +36374,11 @@ window.__ModuleLoader__.load({
|
|
|
36184
36374
|
})]
|
|
36185
36375
|
});
|
|
36186
36376
|
}
|
|
36187
|
-
function ProcessItems({ segments, renderMessageImages, running, fileMentions, showImages = true }) {
|
|
36188
|
-
return groupProcessSegments(segments).map((item) => "activities" in item ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
36377
|
+
function ProcessItems({ segments, renderMessageImages, running, fileMentions, showImages = true, collapseProcess = false }) {
|
|
36378
|
+
return groupProcessSegments(segments).map((item) => "activities" in item ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36379
|
+
hidden: collapseProcess,
|
|
36380
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActivityGroup, { segments: item.activities })
|
|
36381
|
+
}, item.key) : item.activity?.imageGeneration ? showImages ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CodexImageGeneration, {
|
|
36189
36382
|
segment: item,
|
|
36190
36383
|
running,
|
|
36191
36384
|
renderMessageImages
|
|
@@ -36193,6 +36386,7 @@ window.__ModuleLoader__.load({
|
|
|
36193
36386
|
images: [{ attachment: item.attachment }],
|
|
36194
36387
|
align: "start"
|
|
36195
36388
|
}) }, item.key) : null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36389
|
+
hidden: collapseProcess,
|
|
36196
36390
|
className: CodexProcessView_module_css_default.prose,
|
|
36197
36391
|
"data-codex-commentary": item.phase !== "final_answer" || void 0,
|
|
36198
36392
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
@@ -36295,10 +36489,18 @@ window.__ModuleLoader__.load({
|
|
|
36295
36489
|
conversationEvents(ctx).register(codexProcessDefinition);
|
|
36296
36490
|
installContextPresentation(ctx, debug);
|
|
36297
36491
|
ctx.slots.inject("conversation.chat.node", () => {
|
|
36492
|
+
const subscribeTheme = (listener) => ctx.on("theme/change", listener);
|
|
36493
|
+
const getScheme = () => ctx.theme.getTheme().active.colorScheme;
|
|
36298
36494
|
const disposeProcess = ctx.slots.register({
|
|
36299
36495
|
name: "conversation.chat.node",
|
|
36300
36496
|
key: "relay-codex-process"
|
|
36301
|
-
},
|
|
36497
|
+
}, function ThemedCodexProcess(props) {
|
|
36498
|
+
const scheme = (0, react.useSyncExternalStore)(subscribeTheme, getScheme, getScheme);
|
|
36499
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImageColorScheme.Provider, {
|
|
36500
|
+
value: scheme,
|
|
36501
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CodexProcessView, { ...props })
|
|
36502
|
+
});
|
|
36503
|
+
});
|
|
36302
36504
|
let previous;
|
|
36303
36505
|
let disposeAssistant;
|
|
36304
36506
|
const reconcile = () => {
|