@shuind/dsh-codex-harness 0.1.17 → 0.1.19

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/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  ## 安装
16
16
 
17
17
  ```sh
18
- dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.17
18
+ dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.19
19
19
  ```
20
20
 
21
21
  重启 Web,创建新会话,在模式菜单中选择 **Codex 模式**。
package/lib/client.js CHANGED
@@ -7,414 +7,18 @@ window.__ModuleLoader__.load({
7
7
  __esModule: { value: true },
8
8
  [Symbol.toStringTag]: { value: "Module" }
9
9
  });
10
- //#region \0rolldown/runtime.js
11
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
12
- //#endregion
13
- //#region node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
14
- /**
15
- * @license React
16
- * react.production.min.js
17
- *
18
- * Copyright (c) Facebook, Inc. and its affiliates.
19
- *
20
- * This source code is licensed under the MIT license found in the
21
- * LICENSE file in the root directory of this source tree.
22
- */
23
- var require_react_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
24
- var l = Symbol.for("react.element");
25
- var n = Symbol.for("react.portal");
26
- var p = Symbol.for("react.fragment");
27
- var q = Symbol.for("react.strict_mode");
28
- var r = Symbol.for("react.profiler");
29
- var t = Symbol.for("react.provider");
30
- var u = Symbol.for("react.context");
31
- var v = Symbol.for("react.forward_ref");
32
- var w = Symbol.for("react.suspense");
33
- var x = Symbol.for("react.memo");
34
- var y = Symbol.for("react.lazy");
35
- var z = Symbol.iterator;
36
- function A(a) {
37
- if (null === a || "object" !== typeof a) return null;
38
- a = z && a[z] || a["@@iterator"];
39
- return "function" === typeof a ? a : null;
40
- }
41
- var B = {
42
- isMounted: function() {
43
- return !1;
44
- },
45
- enqueueForceUpdate: function() {},
46
- enqueueReplaceState: function() {},
47
- enqueueSetState: function() {}
48
- };
49
- var C = Object.assign;
50
- var D = {};
51
- function E(a, b, e) {
52
- this.props = a;
53
- this.context = b;
54
- this.refs = D;
55
- this.updater = e || B;
56
- }
57
- E.prototype.isReactComponent = {};
58
- E.prototype.setState = function(a, b) {
59
- if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
60
- this.updater.enqueueSetState(this, a, b, "setState");
61
- };
62
- E.prototype.forceUpdate = function(a) {
63
- this.updater.enqueueForceUpdate(this, a, "forceUpdate");
64
- };
65
- function F() {}
66
- F.prototype = E.prototype;
67
- function G(a, b, e) {
68
- this.props = a;
69
- this.context = b;
70
- this.refs = D;
71
- this.updater = e || B;
72
- }
73
- var H = G.prototype = new F();
74
- H.constructor = G;
75
- C(H, E.prototype);
76
- H.isPureReactComponent = !0;
77
- var I = Array.isArray;
78
- var J = Object.prototype.hasOwnProperty;
79
- var K = { current: null };
80
- var L = {
81
- key: !0,
82
- ref: !0,
83
- __self: !0,
84
- __source: !0
85
- };
86
- function M(a, b, e) {
87
- var d, c = {}, k = null, h = null;
88
- if (null != b) for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
89
- var g = arguments.length - 2;
90
- if (1 === g) c.children = e;
91
- else if (1 < g) {
92
- for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2];
93
- c.children = f;
94
- }
95
- if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);
96
- return {
97
- $$typeof: l,
98
- type: a,
99
- key: k,
100
- ref: h,
101
- props: c,
102
- _owner: K.current
103
- };
104
- }
105
- function N(a, b) {
106
- return {
107
- $$typeof: l,
108
- type: a.type,
109
- key: b,
110
- ref: a.ref,
111
- props: a.props,
112
- _owner: a._owner
113
- };
114
- }
115
- function O(a) {
116
- return "object" === typeof a && null !== a && a.$$typeof === l;
117
- }
118
- function escape(a) {
119
- var b = {
120
- "=": "=0",
121
- ":": "=2"
122
- };
123
- return "$" + a.replace(/[=:]/g, function(a) {
124
- return b[a];
125
- });
126
- }
127
- var P = /\/+/g;
128
- function Q(a, b) {
129
- return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
130
- }
131
- function R(a, b, e, d, c) {
132
- var k = typeof a;
133
- if ("undefined" === k || "boolean" === k) a = null;
134
- var h = !1;
135
- if (null === a) h = !0;
136
- else switch (k) {
137
- case "string":
138
- case "number":
139
- h = !0;
140
- break;
141
- case "object": switch (a.$$typeof) {
142
- case l:
143
- case n: h = !0;
144
- }
145
- }
146
- if (h) return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a) {
147
- return a;
148
- })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
149
- h = 0;
150
- d = "" === d ? "." : d + ":";
151
- if (I(a)) for (var g = 0; g < a.length; g++) {
152
- k = a[g];
153
- var f = d + Q(k, g);
154
- h += R(k, b, e, f, c);
155
- }
156
- else if (f = A(a), "function" === typeof f) for (a = f.call(a), g = 0; !(k = a.next()).done;) k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);
157
- else if ("object" === k) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
158
- return h;
159
- }
160
- function S(a, b, e) {
161
- if (null == a) return a;
162
- var d = [], c = 0;
163
- R(a, d, "", "", function(a) {
164
- return b.call(e, a, c++);
165
- });
166
- return d;
167
- }
168
- function T(a) {
169
- if (-1 === a._status) {
170
- var b = a._result;
171
- b = b();
172
- b.then(function(b) {
173
- if (0 === a._status || -1 === a._status) a._status = 1, a._result = b;
174
- }, function(b) {
175
- if (0 === a._status || -1 === a._status) a._status = 2, a._result = b;
176
- });
177
- -1 === a._status && (a._status = 0, a._result = b);
178
- }
179
- if (1 === a._status) return a._result.default;
180
- throw a._result;
181
- }
182
- var U = { current: null };
183
- var V = { transition: null };
184
- var W = {
185
- ReactCurrentDispatcher: U,
186
- ReactCurrentBatchConfig: V,
187
- ReactCurrentOwner: K
188
- };
189
- function X() {
190
- throw Error("act(...) is not supported in production builds of React.");
191
- }
192
- exports.Children = {
193
- map: S,
194
- forEach: function(a, b, e) {
195
- S(a, function() {
196
- b.apply(this, arguments);
197
- }, e);
198
- },
199
- count: function(a) {
200
- var b = 0;
201
- S(a, function() {
202
- b++;
203
- });
204
- return b;
205
- },
206
- toArray: function(a) {
207
- return S(a, function(a) {
208
- return a;
209
- }) || [];
210
- },
211
- only: function(a) {
212
- if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
213
- return a;
214
- }
215
- };
216
- exports.Component = E;
217
- exports.Fragment = p;
218
- exports.Profiler = r;
219
- exports.PureComponent = G;
220
- exports.StrictMode = q;
221
- exports.Suspense = w;
222
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
223
- exports.act = X;
224
- exports.cloneElement = function(a, b, e) {
225
- if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
226
- var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner;
227
- if (null != b) {
228
- void 0 !== b.ref && (k = b.ref, h = K.current);
229
- void 0 !== b.key && (c = "" + b.key);
230
- if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
231
- for (f in b) J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);
232
- }
233
- var f = arguments.length - 2;
234
- if (1 === f) d.children = e;
235
- else if (1 < f) {
236
- g = Array(f);
237
- for (var m = 0; m < f; m++) g[m] = arguments[m + 2];
238
- d.children = g;
239
- }
240
- return {
241
- $$typeof: l,
242
- type: a.type,
243
- key: c,
244
- ref: k,
245
- props: d,
246
- _owner: h
247
- };
248
- };
249
- exports.createContext = function(a) {
250
- a = {
251
- $$typeof: u,
252
- _currentValue: a,
253
- _currentValue2: a,
254
- _threadCount: 0,
255
- Provider: null,
256
- Consumer: null,
257
- _defaultValue: null,
258
- _globalName: null
259
- };
260
- a.Provider = {
261
- $$typeof: t,
262
- _context: a
263
- };
264
- return a.Consumer = a;
265
- };
266
- exports.createElement = M;
267
- exports.createFactory = function(a) {
268
- var b = M.bind(null, a);
269
- b.type = a;
270
- return b;
271
- };
272
- exports.createRef = function() {
273
- return { current: null };
274
- };
275
- exports.forwardRef = function(a) {
276
- return {
277
- $$typeof: v,
278
- render: a
279
- };
280
- };
281
- exports.isValidElement = O;
282
- exports.lazy = function(a) {
283
- return {
284
- $$typeof: y,
285
- _payload: {
286
- _status: -1,
287
- _result: a
288
- },
289
- _init: T
290
- };
291
- };
292
- exports.memo = function(a, b) {
293
- return {
294
- $$typeof: x,
295
- type: a,
296
- compare: void 0 === b ? null : b
297
- };
298
- };
299
- exports.startTransition = function(a) {
300
- var b = V.transition;
301
- V.transition = {};
302
- try {
303
- a();
304
- } finally {
305
- V.transition = b;
306
- }
307
- };
308
- exports.unstable_act = X;
309
- exports.useCallback = function(a, b) {
310
- return U.current.useCallback(a, b);
311
- };
312
- exports.useContext = function(a) {
313
- return U.current.useContext(a);
314
- };
315
- exports.useDebugValue = function() {};
316
- exports.useDeferredValue = function(a) {
317
- return U.current.useDeferredValue(a);
318
- };
319
- exports.useEffect = function(a, b) {
320
- return U.current.useEffect(a, b);
321
- };
322
- exports.useId = function() {
323
- return U.current.useId();
324
- };
325
- exports.useImperativeHandle = function(a, b, e) {
326
- return U.current.useImperativeHandle(a, b, e);
327
- };
328
- exports.useInsertionEffect = function(a, b) {
329
- return U.current.useInsertionEffect(a, b);
330
- };
331
- exports.useLayoutEffect = function(a, b) {
332
- return U.current.useLayoutEffect(a, b);
333
- };
334
- exports.useMemo = function(a, b) {
335
- return U.current.useMemo(a, b);
336
- };
337
- exports.useReducer = function(a, b, e) {
338
- return U.current.useReducer(a, b, e);
339
- };
340
- exports.useRef = function(a) {
341
- return U.current.useRef(a);
342
- };
343
- exports.useState = function(a) {
344
- return U.current.useState(a);
345
- };
346
- exports.useSyncExternalStore = function(a, b, e) {
347
- return U.current.useSyncExternalStore(a, b, e);
348
- };
349
- exports.useTransition = function() {
350
- return U.current.useTransition();
351
- };
352
- exports.version = "18.3.1";
353
- }));
354
- //#endregion
355
- //#region node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
356
- var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
357
- module.exports = require_react_production_min();
358
- }));
359
- //#endregion
360
- //#region node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js
361
- /**
362
- * @license React
363
- * react-jsx-runtime.production.min.js
364
- *
365
- * Copyright (c) Facebook, Inc. and its affiliates.
366
- *
367
- * This source code is licensed under the MIT license found in the
368
- * LICENSE file in the root directory of this source tree.
369
- */
370
- var require_react_jsx_runtime_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
371
- var f = require_react();
372
- var k = Symbol.for("react.element");
373
- var m = Object.prototype.hasOwnProperty;
374
- var n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
375
- var p = {
376
- key: !0,
377
- ref: !0,
378
- __self: !0,
379
- __source: !0
380
- };
381
- function q(c, a, g) {
382
- var b, d = {}, e = null, h = null;
383
- void 0 !== g && (e = "" + g);
384
- void 0 !== a.key && (e = "" + a.key);
385
- void 0 !== a.ref && (h = a.ref);
386
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
387
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
388
- return {
389
- $$typeof: k,
390
- type: c,
391
- key: e,
392
- ref: h,
393
- props: d,
394
- _owner: n.current
395
- };
396
- }
397
- exports.jsx = q;
398
- exports.jsxs = q;
399
- }));
400
- //#endregion
401
- //#region node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js
402
- var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
403
- module.exports = require_react_jsx_runtime_production_min();
404
- }));
405
- //#endregion
10
+ let react_jsx_runtime = require("react/jsx-runtime");
11
+ let react = require("react");
406
12
  //#region lib/types/context.js
407
- var import_react = require_react();
408
- var import_jsx_runtime = require_jsx_runtime();
409
13
  /** User-selectable Codex context controls use whole K-token units. */
410
14
  const CODEX_CONTEXT_UNIT = 1e3;
411
15
  const CODEX_CONTEXT_MAX = 1e6;
412
16
  //#endregion
413
17
  //#region lib/types/client/activity.js
414
18
  /** Client-only inference used while the host activity projection frame is in flight. */
415
- /** Infer the model-wait phase from the existing conversation snapshot. */
19
+ /** Infer the active model phase from the existing conversation snapshot. */
416
20
  function awaitingModelStartedAt(snapshot) {
417
- if (!snapshot.running || snapshot.partial !== null || snapshot.runningCalls.length > 0) return void 0;
21
+ if (!snapshot.running || snapshot.runningCalls.length > 0) return void 0;
418
22
  let latest;
419
23
  for (const timing of snapshot.turnTimings.values()) if (timing.endTime === void 0) latest = timing.startTime;
420
24
  return latest;
@@ -453,7 +57,7 @@ window.__ModuleLoader__.load({
453
57
  const snapshot = useSettings((state) => state);
454
58
  const fast = snapshot.value?.fast ?? false;
455
59
  if (agentPreset !== "codex") return null;
456
- return (0, import_jsx_runtime.jsxs)("button", {
60
+ return (0, react_jsx_runtime.jsxs)("button", {
457
61
  type: "button",
458
62
  role: "menuitemcheckbox",
459
63
  disabled: snapshot.writable === false,
@@ -482,7 +86,7 @@ window.__ModuleLoader__.load({
482
86
  fontWeight: fast ? 600 : 400,
483
87
  textAlign: "left"
484
88
  },
485
- children: [(0, import_jsx_runtime.jsx)("span", { children: t("fast") }), (0, import_jsx_runtime.jsx)("span", {
89
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("fast") }), (0, react_jsx_runtime.jsx)("span", {
486
90
  style: {
487
91
  color: "var(--dsw-alias-label-tertiary)",
488
92
  fontSize: 12
@@ -502,27 +106,27 @@ window.__ModuleLoader__.load({
502
106
  if (normalized === contextWindow) unsetSetting("contextWindow");
503
107
  else setSetting("contextWindow", normalized);
504
108
  };
505
- return (0, import_jsx_runtime.jsxs)("div", {
109
+ return (0, react_jsx_runtime.jsxs)("div", {
506
110
  style: {
507
111
  marginTop: 10,
508
112
  display: "grid",
509
113
  gap: 5
510
114
  },
511
115
  children: [
512
- (0, import_jsx_runtime.jsxs)("div", {
116
+ (0, react_jsx_runtime.jsxs)("div", {
513
117
  style: {
514
118
  display: "flex",
515
119
  alignItems: "baseline",
516
120
  justifyContent: "space-between",
517
121
  gap: 12
518
122
  },
519
- children: [(0, import_jsx_runtime.jsx)("strong", {
123
+ children: [(0, react_jsx_runtime.jsx)("strong", {
520
124
  style: {
521
125
  color: "var(--dsw-alias-label-primary)",
522
126
  fontSize: 12
523
127
  },
524
128
  children: t("contextSize")
525
- }), (0, import_jsx_runtime.jsxs)("span", {
129
+ }), (0, react_jsx_runtime.jsxs)("span", {
526
130
  style: {
527
131
  color: "var(--dsw-alias-label-secondary)",
528
132
  fontSize: 11
@@ -530,7 +134,7 @@ window.__ModuleLoader__.load({
530
134
  children: [valueK, "K"]
531
135
  })]
532
136
  }),
533
- (0, import_jsx_runtime.jsx)("input", {
137
+ (0, react_jsx_runtime.jsx)("input", {
534
138
  type: "range",
535
139
  min: 1,
536
140
  max: maxK,
@@ -542,14 +146,14 @@ window.__ModuleLoader__.load({
542
146
  setValueK(Number(event.target.value));
543
147
  }
544
148
  }),
545
- (0, import_jsx_runtime.jsxs)("div", {
149
+ (0, react_jsx_runtime.jsxs)("div", {
546
150
  style: {
547
151
  display: "flex",
548
152
  alignItems: "center",
549
153
  gap: 7
550
154
  },
551
155
  children: [
552
- (0, import_jsx_runtime.jsx)("input", {
156
+ (0, react_jsx_runtime.jsx)("input", {
553
157
  type: "number",
554
158
  min: 1,
555
159
  max: maxK,
@@ -571,14 +175,14 @@ window.__ModuleLoader__.load({
571
175
  fontSize: 11
572
176
  }
573
177
  }),
574
- (0, import_jsx_runtime.jsx)("span", {
178
+ (0, react_jsx_runtime.jsx)("span", {
575
179
  style: {
576
180
  color: "var(--dsw-alias-label-secondary)",
577
181
  fontSize: 11
578
182
  },
579
183
  children: "K"
580
184
  }),
581
- (0, import_jsx_runtime.jsx)("span", {
185
+ (0, react_jsx_runtime.jsx)("span", {
582
186
  style: {
583
187
  color: "var(--dsw-alias-label-secondary)",
584
188
  fontSize: 11
@@ -587,7 +191,7 @@ window.__ModuleLoader__.load({
587
191
  })
588
192
  ]
589
193
  }),
590
- configured !== void 0 && (0, import_jsx_runtime.jsx)("button", {
194
+ configured !== void 0 && (0, react_jsx_runtime.jsx)("button", {
591
195
  type: "button",
592
196
  onClick: () => {
593
197
  unsetSetting("contextWindow");
@@ -614,12 +218,12 @@ window.__ModuleLoader__.load({
614
218
  const agentPreset = useSessions((state) => state.byId[sessionId]?.agentPreset);
615
219
  const projectedActivity = useProjection("codexActivity");
616
220
  const fallbackStartedAt = useSession((snapshot) => awaitingModelStartedAt(snapshot));
617
- const activity = projectedActivity ?? (agentPreset === "codex" && fallbackStartedAt !== void 0 ? {
221
+ const activity = projectedActivity !== void 0 ? projectedActivity : agentPreset === "codex" && fallbackStartedAt !== void 0 ? {
618
222
  activity: "awaiting-model",
619
223
  startedAt: fallbackStartedAt
620
- } : null);
621
- const [now, setNow] = (0, import_react.useState)(() => Date.now());
622
- (0, import_react.useEffect)(() => {
224
+ } : null;
225
+ const [now, setNow] = (0, react.useState)(() => Date.now());
226
+ (0, react.useEffect)(() => {
623
227
  if (agentPreset !== "codex" || activity === void 0 || activity === null) return void 0;
624
228
  setNow(Date.now());
625
229
  const timer = setInterval(() => {
@@ -629,7 +233,7 @@ window.__ModuleLoader__.load({
629
233
  }, [agentPreset, activity?.startedAt]);
630
234
  if (agentPreset !== "codex" || activity === void 0 || activity === null) return null;
631
235
  const label = activity.activity === "awaiting-model" ? t("activityAwaitingModel") : t("activityCompacting");
632
- return (0, import_jsx_runtime.jsxs)("div", {
236
+ return (0, react_jsx_runtime.jsxs)("div", {
633
237
  id: "codex-activity",
634
238
  role: "status",
635
239
  "aria-live": "polite",
@@ -644,7 +248,7 @@ window.__ModuleLoader__.load({
644
248
  lineHeight: "20px"
645
249
  },
646
250
  children: [
647
- (0, import_jsx_runtime.jsx)("span", {
251
+ (0, react_jsx_runtime.jsx)("span", {
648
252
  "aria-hidden": "true",
649
253
  style: {
650
254
  width: 7,
@@ -654,8 +258,8 @@ window.__ModuleLoader__.load({
654
258
  background: "var(--dsw-static-blue-500)"
655
259
  }
656
260
  }),
657
- (0, import_jsx_runtime.jsx)("span", { children: label }),
658
- (0, import_jsx_runtime.jsxs)("span", {
261
+ (0, react_jsx_runtime.jsx)("span", { children: label }),
262
+ (0, react_jsx_runtime.jsxs)("span", {
659
263
  style: { color: "var(--dsw-alias-label-tertiary)" },
660
264
  children: [
661
265
  "· ",
@@ -697,8 +301,8 @@ window.__ModuleLoader__.load({
697
301
  locale: NS,
698
302
  inject: injected
699
303
  }, ContextSizeControl));
700
- ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
701
- name: "conversation.input.dock",
304
+ ctx.slots.inject("conversation.composer.dock", () => ctx.slots.register({
305
+ name: "conversation.composer.dock",
702
306
  id: "codex-activity",
703
307
  order: 5,
704
308
  locale: NS
package/lib/index.js CHANGED
@@ -792,7 +792,7 @@ function applyCodexActivity(state, event) {
792
792
  startedAt: event.time
793
793
  };
794
794
  if (event.type === "turn/start" || event.type === "turn/end" || event.type === "compaction/end") return null;
795
- if (state?.activity === "awaiting-model" && (event.type === "llm/retry" || event.type === "assistant/chunk" || event.type === "assistant/message" || event.type === "step/end")) return null;
795
+ if (state?.activity === "awaiting-model" && (event.type === "llm/retry" || event.type === "tool/call" || event.type === "step/end")) return null;
796
796
  return state;
797
797
  }
798
798
  const codexActivityProjection = {
@@ -21,10 +21,12 @@ export function applyCodexActivity(state, event) {
21
21
  }
22
22
  if (event.type === 'turn/start' || event.type === 'turn/end' || event.type === 'compaction/end')
23
23
  return null;
24
+ // Keep the line through reasoning and streamed output. It is the only
25
+ // visible indication that the model is still progressing; tool cards have
26
+ // their own status, so a tool dispatch retires this ambient line.
24
27
  if (state?.activity === 'awaiting-model'
25
28
  && (event.type === 'llm/retry'
26
- || event.type === 'assistant/chunk'
27
- || event.type === 'assistant/message'
29
+ || event.type === 'tool/call'
28
30
  || event.type === 'step/end'))
29
31
  return null;
30
32
  return state;
@@ -1,6 +1,6 @@
1
1
  /** Client-only inference used while the host activity projection frame is in flight. */
2
2
  import type { ConversationSnapshot } from '@deepseek-ai/dsh-client-runtime/client';
3
3
  export type ActivitySessionSnapshot = Pick<ConversationSnapshot, 'running' | 'partial' | 'runningCalls' | 'turnTimings'>;
4
- /** Infer the model-wait phase from the existing conversation snapshot. */
4
+ /** Infer the active model phase from the existing conversation snapshot. */
5
5
  export declare function awaitingModelStartedAt(snapshot: ActivitySessionSnapshot): number | undefined;
6
6
  //# sourceMappingURL=activity.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /** Client-only inference used while the host activity projection frame is in flight. */
2
- /** Infer the model-wait phase from the existing conversation snapshot. */
2
+ /** Infer the active model phase from the existing conversation snapshot. */
3
3
  export function awaitingModelStartedAt(snapshot) {
4
- if (!snapshot.running || snapshot.partial !== null || snapshot.runningCalls.length > 0)
4
+ if (!snapshot.running || snapshot.runningCalls.length > 0)
5
5
  return undefined;
6
6
  let latest;
7
7
  for (const timing of snapshot.turnTimings.values()) {
@@ -32,7 +32,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
32
32
  };
33
33
  }
34
34
  }
35
- type ActivityProps = PropsRuntime<'conversation.input.dock'> & PropsLocale<'codex'>;
35
+ type ActivityProps = PropsRuntime<'conversation.composer.dock'> & PropsLocale<'codex'>;
36
36
  export declare function ActivityLine({ sessionId, useSession, useSessions, useProjection, t }: ActivityProps): import("react").JSX.Element | null;
37
37
  export declare const inject: string[];
38
38
  /** Mount Fast inside the model selector and context size inside the meter panel. */
@@ -102,7 +102,9 @@ export function ActivityLine({ sessionId, useSession, useSessions, useProjection
102
102
  // only covers the short wire gap before the next projection frame arrives;
103
103
  // running tool calls and streamed output intentionally remain silent.
104
104
  const fallbackStartedAt = useSession((snapshot) => awaitingModelStartedAt(snapshot));
105
- const activity = projectedActivity ?? (agentPreset === CODEX_PRESET_ID && fallbackStartedAt !== undefined
105
+ // `undefined` means the key has not arrived yet; `null` is an authoritative
106
+ // clear and must not be resurrected by the local snapshot fallback.
107
+ const activity = projectedActivity !== undefined ? projectedActivity : (agentPreset === CODEX_PRESET_ID && fallbackStartedAt !== undefined
106
108
  ? { activity: 'awaiting-model', startedAt: fallbackStartedAt }
107
109
  : null);
108
110
  const [now, setNow] = useState(() => Date.now());
@@ -159,8 +161,8 @@ export function apply(ctx) {
159
161
  locale: NS,
160
162
  inject: injected,
161
163
  }, ContextSizeControl));
162
- ctx.slots.inject('conversation.input.dock', () => ctx.slots.register({
163
- name: 'conversation.input.dock',
164
+ ctx.slots.inject('conversation.composer.dock', () => ctx.slots.register({
165
+ name: 'conversation.composer.dock',
164
166
  id: 'codex-activity',
165
167
  order: 5,
166
168
  locale: NS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuind/dsh-codex-harness",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "A minimal Codex harness for GPT models that do not fit DSH's native interface, while remaining compatible with the DSH plugin ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",