@shuind/dsh-codex-harness 0.1.17 → 0.1.18
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 +1 -1
- package/lib/client.js +6 -6
- package/lib/index.js +1 -1
- package/lib/types/activity.js +4 -2
- package/lib/types/client/activity.d.ts +1 -1
- package/lib/types/client/activity.js +2 -2
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -412,9 +412,9 @@ window.__ModuleLoader__.load({
|
|
|
412
412
|
//#endregion
|
|
413
413
|
//#region lib/types/client/activity.js
|
|
414
414
|
/** Client-only inference used while the host activity projection frame is in flight. */
|
|
415
|
-
/** Infer the model
|
|
415
|
+
/** Infer the active model phase from the existing conversation snapshot. */
|
|
416
416
|
function awaitingModelStartedAt(snapshot) {
|
|
417
|
-
if (!snapshot.running || snapshot.
|
|
417
|
+
if (!snapshot.running || snapshot.runningCalls.length > 0) return void 0;
|
|
418
418
|
let latest;
|
|
419
419
|
for (const timing of snapshot.turnTimings.values()) if (timing.endTime === void 0) latest = timing.startTime;
|
|
420
420
|
return latest;
|
|
@@ -614,10 +614,10 @@ window.__ModuleLoader__.load({
|
|
|
614
614
|
const agentPreset = useSessions((state) => state.byId[sessionId]?.agentPreset);
|
|
615
615
|
const projectedActivity = useProjection("codexActivity");
|
|
616
616
|
const fallbackStartedAt = useSession((snapshot) => awaitingModelStartedAt(snapshot));
|
|
617
|
-
const activity = projectedActivity
|
|
617
|
+
const activity = projectedActivity !== void 0 ? projectedActivity : agentPreset === "codex" && fallbackStartedAt !== void 0 ? {
|
|
618
618
|
activity: "awaiting-model",
|
|
619
619
|
startedAt: fallbackStartedAt
|
|
620
|
-
} : null
|
|
620
|
+
} : null;
|
|
621
621
|
const [now, setNow] = (0, import_react.useState)(() => Date.now());
|
|
622
622
|
(0, import_react.useEffect)(() => {
|
|
623
623
|
if (agentPreset !== "codex" || activity === void 0 || activity === null) return void 0;
|
|
@@ -697,8 +697,8 @@ window.__ModuleLoader__.load({
|
|
|
697
697
|
locale: NS,
|
|
698
698
|
inject: injected
|
|
699
699
|
}, ContextSizeControl));
|
|
700
|
-
ctx.slots.inject("conversation.
|
|
701
|
-
name: "conversation.
|
|
700
|
+
ctx.slots.inject("conversation.composer.dock", () => ctx.slots.register({
|
|
701
|
+
name: "conversation.composer.dock",
|
|
702
702
|
id: "codex-activity",
|
|
703
703
|
order: 5,
|
|
704
704
|
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 === "
|
|
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 = {
|
package/lib/types/activity.js
CHANGED
|
@@ -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 === '
|
|
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
|
|
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
|
|
2
|
+
/** Infer the active model phase from the existing conversation snapshot. */
|
|
3
3
|
export function awaitingModelStartedAt(snapshot) {
|
|
4
|
-
if (!snapshot.running || snapshot.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
163
|
-
name: 'conversation.
|
|
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.
|
|
3
|
+
"version": "0.1.18",
|
|
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",
|