@shuind/dsh-codex-harness 0.1.29 → 0.1.30
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/lib/client.js +8 -14
- package/lib/types/client/index.d.ts +16 -2
- package/lib/types/client/index.js +11 -12
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -74,7 +74,6 @@ window.__ModuleLoader__.load({
|
|
|
74
74
|
const SETTINGS_NAMESPACE = "codex";
|
|
75
75
|
const ACTIVITY_FALLBACK_SLOT = "conversation.composer.dock";
|
|
76
76
|
const FAST_FALLBACK_SLOT = "conversation.input.right";
|
|
77
|
-
const CONTEXT_FALLBACK_SLOT = "conversation.input.right";
|
|
78
77
|
const DEFAULT_CONTEXT_WINDOW = 262144;
|
|
79
78
|
const en = {
|
|
80
79
|
fast: "Fast mode",
|
|
@@ -277,8 +276,8 @@ window.__ModuleLoader__.load({
|
|
|
277
276
|
]
|
|
278
277
|
});
|
|
279
278
|
}
|
|
280
|
-
/** Compact trigger
|
|
281
|
-
function
|
|
279
|
+
/** Compact context-capacity trigger shown beside the bottom activity line. */
|
|
280
|
+
function ContextSizeDock({ sessionId, useSessions, useProjection, useSettings, setSetting, unsetSetting, t }) {
|
|
282
281
|
const agentPreset = useSessions((state) => state.byId[sessionId]?.agentPreset);
|
|
283
282
|
const contextWindow = contextWindowFromProjection(useProjection);
|
|
284
283
|
const snapshot = useSettings((state) => state);
|
|
@@ -448,16 +447,17 @@ window.__ModuleLoader__.load({
|
|
|
448
447
|
]
|
|
449
448
|
});
|
|
450
449
|
}
|
|
451
|
-
/**
|
|
450
|
+
/** Keep the activity status and context control in one compact composer row. */
|
|
452
451
|
function ActivityDock(props) {
|
|
453
|
-
return (0, react_jsx_runtime.
|
|
452
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
454
453
|
style: {
|
|
455
454
|
display: "flex",
|
|
456
455
|
alignItems: "center",
|
|
456
|
+
gap: 8,
|
|
457
457
|
minHeight: 28,
|
|
458
458
|
padding: "4px 10px"
|
|
459
459
|
},
|
|
460
|
-
children: (0, react_jsx_runtime.jsx)(ActivityLine, { ...props })
|
|
460
|
+
children: [(0, react_jsx_runtime.jsx)(ContextSizeDock, { ...props }), (0, react_jsx_runtime.jsx)(ActivityLine, { ...props })]
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
const inject = [
|
|
@@ -484,18 +484,12 @@ window.__ModuleLoader__.load({
|
|
|
484
484
|
locale: NS,
|
|
485
485
|
inject: injected
|
|
486
486
|
}, FastModeFallback));
|
|
487
|
-
ctx.slots.inject(CONTEXT_FALLBACK_SLOT, () => ctx.slots.register({
|
|
488
|
-
name: CONTEXT_FALLBACK_SLOT,
|
|
489
|
-
id: "codex-context-size",
|
|
490
|
-
order: 1,
|
|
491
|
-
locale: NS,
|
|
492
|
-
inject: injected
|
|
493
|
-
}, LegacyContextSizeControl));
|
|
494
487
|
ctx.slots.inject(ACTIVITY_FALLBACK_SLOT, () => ctx.slots.register({
|
|
495
488
|
name: ACTIVITY_FALLBACK_SLOT,
|
|
496
489
|
id: "codex-activity",
|
|
497
490
|
order: 5,
|
|
498
|
-
locale: NS
|
|
491
|
+
locale: NS,
|
|
492
|
+
inject: injected
|
|
499
493
|
}, ActivityDock));
|
|
500
494
|
}
|
|
501
495
|
var client_default = {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** Browser controls for the Codex request settings mounted by the Host plugin. */
|
|
2
|
-
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
3
|
import type { Context } from '@deepseek-ai/cordis';
|
|
4
|
+
import type { SettingsScope } from '@deepseek-ai/dsh-client-runtime/client';
|
|
5
|
+
interface CodexSettings {
|
|
6
|
+
fast: boolean;
|
|
7
|
+
contextWindow?: number;
|
|
8
|
+
}
|
|
9
|
+
type CodexScope = SettingsScope<CodexSettings>;
|
|
4
10
|
declare const en: {
|
|
5
11
|
readonly fast: "Fast mode";
|
|
6
12
|
readonly fastOn: "Fast mode on (priority tier)";
|
|
@@ -20,7 +26,15 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
20
26
|
codex: CodexKey;
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
|
-
|
|
29
|
+
interface InputSettingsControlInjected {
|
|
30
|
+
hooks: {
|
|
31
|
+
settings: HostObservable<ReturnType<CodexScope['getSnapshot']>>;
|
|
32
|
+
};
|
|
33
|
+
setSetting: (field: string, value: unknown) => Promise<void>;
|
|
34
|
+
unsetSetting: (field: string) => Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
type ContextDockProps = PropsRuntime<'conversation.composer.dock'> & InjectFace<InputSettingsControlInjected> & PropsLocale<'codex'>;
|
|
37
|
+
type ActivityDockProps = ContextDockProps & PropsLocale<'codex'>;
|
|
24
38
|
type ActivityProps = ActivityDockProps;
|
|
25
39
|
export declare function ActivityLine({ sessionId, useSession, useSessions, useProjection, t }: ActivityProps): import("react").JSX.Element | null;
|
|
26
40
|
export declare const inject: string[];
|
|
@@ -7,7 +7,6 @@ const NS = 'codex';
|
|
|
7
7
|
const SETTINGS_NAMESPACE = 'codex';
|
|
8
8
|
const ACTIVITY_FALLBACK_SLOT = 'conversation.composer.dock';
|
|
9
9
|
const FAST_FALLBACK_SLOT = 'conversation.input.right';
|
|
10
|
-
const CONTEXT_FALLBACK_SLOT = 'conversation.input.right';
|
|
11
10
|
const DEFAULT_CONTEXT_WINDOW = 262_144;
|
|
12
11
|
const en = {
|
|
13
12
|
fast: 'Fast mode',
|
|
@@ -109,8 +108,8 @@ function ContextSizeControl({ contextWindow, useSettings, setSetting, unsetSetti
|
|
|
109
108
|
fontSize: 11,
|
|
110
109
|
}, children: t('contextRestore') }))] }));
|
|
111
110
|
}
|
|
112
|
-
/** Compact trigger
|
|
113
|
-
function
|
|
111
|
+
/** Compact context-capacity trigger shown beside the bottom activity line. */
|
|
112
|
+
function ContextSizeDock({ sessionId, useSessions, useProjection, useSettings, setSetting, unsetSetting, t }) {
|
|
114
113
|
const agentPreset = useSessions(state => state.byId[sessionId]?.agentPreset);
|
|
115
114
|
const contextWindow = contextWindowFromProjection(useProjection);
|
|
116
115
|
const snapshot = useSettings(state => state);
|
|
@@ -230,9 +229,15 @@ export function ActivityLine({ sessionId, useSession, useSessions, useProjection
|
|
|
230
229
|
opacity: 0.55,
|
|
231
230
|
} }), _jsx("span", { children: label }), _jsxs("span", { style: { color: 'var(--dsw-alias-label-tertiary)' }, children: ["\u00B7 ", elapsedSeconds(activity.startedAt, now), "s"] })] }));
|
|
232
231
|
}
|
|
233
|
-
/**
|
|
232
|
+
/** Keep the activity status and context control in one compact composer row. */
|
|
234
233
|
function ActivityDock(props) {
|
|
235
|
-
return (
|
|
234
|
+
return (_jsxs("div", { style: {
|
|
235
|
+
display: 'flex',
|
|
236
|
+
alignItems: 'center',
|
|
237
|
+
gap: 8,
|
|
238
|
+
minHeight: 28,
|
|
239
|
+
padding: '4px 10px',
|
|
240
|
+
}, children: [_jsx(ContextSizeDock, { ...props }), _jsx(ActivityLine, { ...props })] }));
|
|
236
241
|
}
|
|
237
242
|
export const inject = ['slots', 'locale', 'settingsScope'];
|
|
238
243
|
/** Mount all controls through the official composer seats shared by every DSH release. */
|
|
@@ -251,18 +256,12 @@ export function apply(ctx) {
|
|
|
251
256
|
locale: NS,
|
|
252
257
|
inject: injected,
|
|
253
258
|
}, FastModeFallback));
|
|
254
|
-
ctx.slots.inject(CONTEXT_FALLBACK_SLOT, () => ctx.slots.register({
|
|
255
|
-
name: CONTEXT_FALLBACK_SLOT,
|
|
256
|
-
id: 'codex-context-size',
|
|
257
|
-
order: 1,
|
|
258
|
-
locale: NS,
|
|
259
|
-
inject: injected,
|
|
260
|
-
}, LegacyContextSizeControl));
|
|
261
259
|
ctx.slots.inject(ACTIVITY_FALLBACK_SLOT, () => ctx.slots.register({
|
|
262
260
|
name: ACTIVITY_FALLBACK_SLOT,
|
|
263
261
|
id: 'codex-activity',
|
|
264
262
|
order: 5,
|
|
265
263
|
locale: NS,
|
|
264
|
+
inject: injected,
|
|
266
265
|
}, ActivityDock));
|
|
267
266
|
}
|
|
268
267
|
export default { inject, apply };
|
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.30",
|
|
4
4
|
"description": "A Codex harness with a streamlined system prompt 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",
|