@shuind/dsh-codex-harness 0.2.21 → 0.3.0
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/CHANGELOG.md +185 -0
- package/README.md +38 -50
- package/RELEASE.md +61 -0
- package/assets/codex.svg +5 -0
- package/cordis.patch.yml +181 -6
- package/docs/preset-library.md +33 -23
- package/docs/tool-policy-benchmark.json +310 -0
- package/docs/tool-policy.md +148 -0
- package/lib/client.js +4774 -2416
- package/lib/compact-command.js +416 -0
- package/lib/compaction.js +141 -12
- package/lib/hybrid-executor.js +1196 -0
- package/lib/index.js +3658 -2334
- package/lib/preferences.js +117 -0
- package/lib/tool-policy.js +2422 -0
- package/lib/typert.js +86 -79
- package/lib/types/client/activity.d.ts +33 -9
- package/lib/types/client/activity.js +4 -3
- package/lib/types/client/desktop.d.ts +67 -0
- package/lib/types/client/desktop.js +229 -0
- package/lib/types/client/index.d.ts +207 -110
- package/lib/types/client/index.js +99 -492
- package/lib/types/client/policy-drafts.d.ts +25 -0
- package/lib/types/client/policy-drafts.js +47 -0
- package/lib/types/client/policy-locale.d.ts +260 -0
- package/lib/types/client/policy-locale.js +357 -0
- package/lib/types/client/preset-manager.d.ts +38 -10
- package/lib/types/client/preset-manager.js +235 -185
- package/lib/types/client/preset-requests.d.ts +12 -0
- package/lib/types/client/preset-requests.js +101 -0
- package/lib/types/client/tool-policy.d.ts +33 -0
- package/lib/types/client/tool-policy.js +336 -0
- package/lib/types/contracts/preset-editor-schema.d.ts +78 -0
- package/lib/types/contracts/preset-editor-schema.js +95 -0
- package/lib/types/{prompt.js → contracts/prompt.js} +13 -7
- package/lib/types/{settings.d.ts → contracts/settings.d.ts} +11 -4
- package/lib/types/{settings.js → contracts/settings.js} +22 -6
- package/lib/types/contracts/tool-policy-contract.d.ts +63 -0
- package/lib/types/contracts/tool-policy-contract.js +33 -0
- package/lib/types/contracts/ui-contracts.d.ts +92 -0
- package/lib/types/contracts/ui-contracts.js +83 -0
- package/lib/types/entries/client.d.ts +10 -0
- package/lib/types/entries/client.js +10 -0
- package/lib/types/{compact-command.d.ts → entries/compact-command.d.ts} +2 -0
- package/lib/types/entries/compact-command.js +176 -0
- package/lib/types/{compaction.d.ts → entries/compaction.d.ts} +15 -3
- package/lib/types/{compaction.js → entries/compaction.js} +47 -11
- package/lib/types/entries/hybrid-executor.d.ts +19 -0
- package/lib/types/entries/hybrid-executor.js +57 -0
- package/lib/types/entries/index.d.ts +66 -0
- package/lib/types/entries/index.js +192 -0
- package/lib/types/entries/preferences.d.ts +11 -0
- package/lib/types/entries/preferences.js +16 -0
- package/lib/types/entries/tool-policy.d.ts +97 -0
- package/lib/types/entries/tool-policy.js +158 -0
- package/lib/types/entries/typert.host.d.ts +23 -0
- package/lib/types/entries/typert.host.js +24 -0
- package/lib/types/hybrid/codex-hybrid-executor.d.ts +44 -0
- package/lib/types/hybrid/codex-hybrid-executor.js +257 -0
- package/lib/types/hybrid/hybrid-sdk.d.ts +13 -0
- package/lib/types/hybrid/hybrid-sdk.js +196 -0
- package/lib/types/hybrid/program-calls.d.ts +28 -0
- package/lib/types/hybrid/program-calls.js +193 -0
- package/lib/types/hybrid/subcall-scheduler.d.ts +90 -0
- package/lib/types/hybrid/subcall-scheduler.js +343 -0
- package/lib/types/policy/deferred-tools.d.ts +42 -0
- package/lib/types/policy/deferred-tools.js +264 -0
- package/lib/types/policy/overlay-installer.d.ts +12 -0
- package/lib/types/policy/overlay-installer.js +179 -0
- package/lib/types/policy/rule-resolver.d.ts +94 -0
- package/lib/types/policy/rule-resolver.js +114 -0
- package/lib/types/policy/tool-capabilities.d.ts +33 -0
- package/lib/types/policy/tool-capabilities.js +46 -0
- package/lib/types/{activity.d.ts → presets/activity.d.ts} +3 -5
- package/lib/types/{activity.js → presets/activity.js} +51 -27
- package/lib/types/presets/desktop-preset.d.ts +22 -0
- package/lib/types/presets/desktop-preset.js +43 -0
- package/lib/types/presets/preset-editor.d.ts +47 -0
- package/lib/types/presets/preset-editor.js +81 -0
- package/lib/types/presets/preset-prompt-catalog.d.ts +23 -0
- package/lib/types/presets/preset-prompt-catalog.js +215 -0
- package/lib/types/presets/preset-tool-catalog.d.ts +5 -0
- package/lib/types/presets/preset-tool-catalog.js +58 -0
- package/lib/types/presets/runtime-enhancements.d.ts +45 -0
- package/lib/types/presets/runtime-enhancements.js +349 -0
- package/lib/types/presets/small-window-compaction.d.ts +15 -0
- package/lib/types/presets/small-window-compaction.js +121 -0
- package/lib/types/responses/compact-checkpoint.d.ts +27 -0
- package/lib/types/responses/compact-checkpoint.js +257 -0
- package/lib/types/responses/fetch-transport.d.ts +16 -0
- package/lib/types/responses/fetch-transport.js +257 -0
- package/lib/types/responses/remote-compact.d.ts +13 -0
- package/lib/types/responses/remote-compact.js +319 -0
- package/lib/types/responses/sse-diagnostics.d.ts +9 -0
- package/lib/types/responses/sse-diagnostics.js +157 -0
- package/lib/types/responses/wire-rewrite.d.ts +35 -0
- package/lib/types/responses/wire-rewrite.js +237 -0
- package/lib/types/tools/exec-output.d.ts +58 -0
- package/lib/types/tools/exec-output.js +173 -0
- package/lib/types/tools/exec-plan-tools.d.ts +37 -0
- package/lib/types/tools/exec-plan-tools.js +265 -0
- package/lib/types/tools/exec-runner.d.ts +21 -0
- package/lib/types/tools/exec-runner.js +385 -0
- package/lib/types/tools/patch-tool.d.ts +16 -0
- package/lib/types/tools/patch-tool.js +258 -0
- package/lib/types/{patch.d.ts → tools/patch.d.ts} +1 -1
- package/lib/types/{patch.js → tools/patch.js} +96 -21
- package/locale/en.json +6 -0
- package/locale/hybrid-executor/en.json +6 -0
- package/locale/hybrid-executor/zh.json +6 -0
- package/locale/tool-policy/en.json +6 -0
- package/locale/tool-policy/zh.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +297 -299
- package/presets/{codex-collaboration → codex-hybrid}/agent.cordis.yml +45 -48
- package/presets/codex-hybrid/preset.yml +3 -0
- package/scripts/benchmark-tool-policy.mjs +186 -0
- package/scripts/build-preset.mjs +19 -0
- package/scripts/clean-build.mjs +11 -0
- package/src/client/activity.ts +83 -0
- package/src/client/desktop.tsx +276 -0
- package/src/client/index.tsx +391 -0
- package/src/client/policy-drafts.ts +56 -0
- package/src/client/policy-locale.ts +362 -0
- package/src/client/preset-manager.tsx +376 -0
- package/src/client/preset-requests.ts +113 -0
- package/src/client/tool-policy.tsx +402 -0
- package/src/contracts/preset-editor-schema.ts +110 -0
- package/src/contracts/prompt.ts +66 -0
- package/src/contracts/settings.ts +103 -0
- package/src/contracts/tool-policy-contract.ts +93 -0
- package/src/contracts/ui-contracts.ts +173 -0
- package/src/entries/client.tsx +14 -0
- package/src/entries/compact-command.ts +256 -0
- package/src/entries/compaction.ts +218 -0
- package/src/entries/hybrid-executor.ts +76 -0
- package/src/entries/index.ts +298 -0
- package/src/entries/preferences.ts +17 -0
- package/src/entries/tool-policy.ts +162 -0
- package/src/entries/typert.host.ts +29 -0
- package/src/hybrid/codex-hybrid-executor.ts +310 -0
- package/src/hybrid/hybrid-sdk.ts +217 -0
- package/src/hybrid/program-calls.ts +202 -0
- package/src/hybrid/subcall-scheduler.ts +446 -0
- package/src/policy/deferred-tools.ts +331 -0
- package/src/policy/overlay-installer.ts +191 -0
- package/src/policy/rule-resolver.ts +128 -0
- package/src/policy/tool-capabilities.ts +88 -0
- package/src/presets/activity.ts +146 -0
- package/src/presets/desktop-preset.ts +60 -0
- package/src/presets/preset-editor.ts +101 -0
- package/src/presets/preset-prompt-catalog.ts +221 -0
- package/src/presets/preset-tool-catalog.ts +58 -0
- package/src/presets/runtime-enhancements.ts +415 -0
- package/src/presets/small-window-compaction.ts +166 -0
- package/src/responses/compact-checkpoint.ts +264 -0
- package/src/responses/fetch-transport.ts +290 -0
- package/src/responses/remote-compact.ts +393 -0
- package/src/responses/sse-diagnostics.ts +156 -0
- package/src/responses/wire-rewrite.ts +261 -0
- package/src/tools/exec-output.ts +211 -0
- package/src/tools/exec-plan-tools.ts +307 -0
- package/src/tools/exec-runner.ts +445 -0
- package/src/tools/patch-tool.ts +331 -0
- package/src/tools/patch.ts +328 -0
- package/tsconfig.json +29 -0
- package/tsdown.config.ts +110 -0
- package/lib/installer.js +0 -237
- package/lib/invariant.js +0 -23
- package/lib/types/activity-types.d.ts +0 -6
- package/lib/types/activity-types.js +0 -3
- package/lib/types/client/preset-copy.d.ts +0 -42
- package/lib/types/client/preset-copy.js +0 -81
- package/lib/types/compact-command.js +0 -79
- package/lib/types/context.d.ts +0 -8
- package/lib/types/context.js +0 -14
- package/lib/types/exec.d.ts +0 -46
- package/lib/types/exec.js +0 -365
- package/lib/types/index.d.ts +0 -95
- package/lib/types/index.js +0 -738
- package/lib/types/installer.d.ts +0 -27
- package/lib/types/installer.js +0 -146
- package/lib/types/invariant.d.ts +0 -16
- package/lib/types/invariant.js +0 -22
- package/lib/types/preset-contract.d.ts +0 -69
- package/lib/types/preset-contract.js +0 -22
- package/lib/types/preset-editor-remote.d.ts +0 -30
- package/lib/types/preset-editor-remote.js +0 -37
- package/lib/types/preset-editor.d.ts +0 -69
- package/lib/types/preset-editor.js +0 -557
- package/lib/types/preset-templates.d.ts +0 -36
- package/lib/types/preset-templates.js +0 -12
- package/lib/types/prompt-sections.d.ts +0 -15
- package/lib/types/prompt-sections.js +0 -23
- package/lib/types/remote.d.ts +0 -40
- package/lib/types/remote.js +0 -683
- package/lib/types/typert.host.d.ts +0 -47
- package/lib/types/typert.host.js +0 -99
- package/presets/codex-collaboration/preset.yml +0 -3
- /package/lib/types/{prompt.d.ts → contracts/prompt.d.ts} +0 -0
package/lib/typert.js
CHANGED
|
@@ -1,110 +1,117 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
//#region lib/types/
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
text: z.string().max(1e6),
|
|
9
|
-
editable: z.boolean(),
|
|
10
|
-
suppressed: z.boolean().optional()
|
|
11
|
-
})).max(200);
|
|
12
|
-
const fields = {
|
|
13
|
-
name: z.string().max(200),
|
|
14
|
-
description: z.string().max(4e3),
|
|
15
|
-
systemPrompt: z.string().max(1e6),
|
|
16
|
-
inheritPrompt: z.boolean()
|
|
17
|
-
};
|
|
18
|
-
const codexOptions = z.object({
|
|
19
|
-
promptEnabled: z.boolean(),
|
|
20
|
-
terminalToolsEnabled: z.boolean(),
|
|
21
|
-
patchToolEnabled: z.boolean(),
|
|
22
|
-
planToolEnabled: z.boolean(),
|
|
23
|
-
hostedWebSearchEnabled: z.boolean(),
|
|
24
|
-
remoteCompactionEnabled: z.boolean()
|
|
25
|
-
});
|
|
26
|
-
const document = z.object({
|
|
27
|
-
...fields,
|
|
28
|
-
id: z.string(),
|
|
29
|
-
revision: z.string(),
|
|
30
|
-
editable: z.boolean(),
|
|
31
|
-
codex: z.boolean(),
|
|
32
|
-
codexOptions,
|
|
33
|
-
promptSections,
|
|
34
|
-
composition: z.string()
|
|
35
|
-
});
|
|
36
|
-
const catalog = z.object({
|
|
2
|
+
//#region lib/types/contracts/preset-editor-schema.js
|
|
3
|
+
/** Shared wire codecs and RPC descriptors for Host/Client preset inspection. */
|
|
4
|
+
const PRESET_EDITOR_PACKAGE = "@shuind/dsh-codex-harness";
|
|
5
|
+
const PRESET_EDITOR_SERVICE = "codexPresetEditor";
|
|
6
|
+
const presetIdSchema = z.string().min(1).max(256);
|
|
7
|
+
const presetCatalogSchema = z.object({
|
|
37
8
|
presets: z.array(z.object({
|
|
38
9
|
id: z.string(),
|
|
39
10
|
name: z.string(),
|
|
40
11
|
description: z.string(),
|
|
41
|
-
editable: z.boolean(),
|
|
42
12
|
isDefault: z.boolean()
|
|
43
13
|
})),
|
|
44
|
-
authorable: z.boolean(),
|
|
45
14
|
excludedCount: z.number()
|
|
46
15
|
});
|
|
47
|
-
const
|
|
16
|
+
const presetDefinitionSchema = z.object({
|
|
17
|
+
id: z.string(),
|
|
18
|
+
name: z.string(),
|
|
19
|
+
description: z.string(),
|
|
20
|
+
composition: z.string()
|
|
21
|
+
});
|
|
22
|
+
const presetToolCatalogSchema = z.object({
|
|
23
|
+
preset: z.string(),
|
|
24
|
+
registeredOnly: z.literal(true),
|
|
25
|
+
legacyCapabilities: z.object({
|
|
26
|
+
terminalToolsEnabled: z.boolean().optional(),
|
|
27
|
+
planToolEnabled: z.boolean().optional(),
|
|
28
|
+
patchToolEnabled: z.boolean().optional()
|
|
29
|
+
}).optional(),
|
|
30
|
+
tools: z.array(z.object({
|
|
31
|
+
name: z.string(),
|
|
32
|
+
description: z.string(),
|
|
33
|
+
conditional: z.boolean(),
|
|
34
|
+
defaultDeferred: z.boolean().optional(),
|
|
35
|
+
codexTool: z.object({
|
|
36
|
+
capability: z.enum([
|
|
37
|
+
"terminalToolsEnabled",
|
|
38
|
+
"planToolEnabled",
|
|
39
|
+
"patchToolEnabled"
|
|
40
|
+
]),
|
|
41
|
+
presetEnabled: z.boolean(),
|
|
42
|
+
presetOverridesLegacy: z.boolean().optional()
|
|
43
|
+
}).optional(),
|
|
44
|
+
replacements: z.array(z.object({
|
|
45
|
+
action: z.enum([
|
|
46
|
+
"codex-exec",
|
|
47
|
+
"codex-plan",
|
|
48
|
+
"codex-patch"
|
|
49
|
+
]),
|
|
50
|
+
tools: z.array(z.string()),
|
|
51
|
+
available: z.boolean(),
|
|
52
|
+
reason: z.enum(["conditional", "target-exists"]).optional()
|
|
53
|
+
}))
|
|
54
|
+
}))
|
|
55
|
+
});
|
|
56
|
+
const presetPromptCatalogSchema = z.object({
|
|
57
|
+
preset: z.string(),
|
|
58
|
+
sections: z.array(z.object({
|
|
59
|
+
name: z.string(),
|
|
60
|
+
label: z.string(),
|
|
61
|
+
text: z.string().max(1e6),
|
|
62
|
+
editable: z.boolean(),
|
|
63
|
+
order: z.number().finite().optional(),
|
|
64
|
+
complete: z.boolean().optional(),
|
|
65
|
+
interpolate: z.boolean().optional(),
|
|
66
|
+
reason: z.string().optional()
|
|
67
|
+
})).max(200)
|
|
68
|
+
});
|
|
48
69
|
function descriptor(method, parameter, input, output) {
|
|
49
|
-
const id = `${
|
|
70
|
+
const id = `${PRESET_EDITOR_PACKAGE}#${PRESET_EDITOR_SERVICE}/${method}`;
|
|
71
|
+
const strictCodec = (typeSymbol, schema) => ({
|
|
72
|
+
mode: "strict",
|
|
73
|
+
typeSymbol,
|
|
74
|
+
create: () => schema
|
|
75
|
+
});
|
|
50
76
|
return {
|
|
51
77
|
id,
|
|
52
|
-
service:
|
|
53
|
-
namespace:
|
|
78
|
+
service: PRESET_EDITOR_SERVICE,
|
|
79
|
+
namespace: PRESET_EDITOR_SERVICE,
|
|
54
80
|
method,
|
|
55
81
|
invocation: { kind: "direct" },
|
|
56
82
|
parameters: parameter === void 0 ? [] : [{
|
|
57
83
|
name: parameter,
|
|
58
84
|
wire: parameter,
|
|
59
85
|
source: "json",
|
|
60
|
-
codec: {
|
|
61
|
-
mode: "strict",
|
|
62
|
-
typeSymbol: `${id}:${parameter}`,
|
|
63
|
-
schema: input
|
|
64
|
-
}
|
|
86
|
+
codec: strictCodec(`${id}:${parameter}`, input)
|
|
65
87
|
}],
|
|
66
|
-
result: {
|
|
67
|
-
mode: "strict",
|
|
68
|
-
typeSymbol: `${id}:result`,
|
|
69
|
-
schema: output
|
|
70
|
-
}
|
|
88
|
+
result: strictCodec(`${id}:result`, output)
|
|
71
89
|
};
|
|
72
90
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
enableCodex: z.boolean().optional(),
|
|
86
|
-
composition: z.string().max(1e6).optional(),
|
|
87
|
-
promptSections: promptSections.optional(),
|
|
88
|
-
codexOptions: codexOptionsPatch.optional()
|
|
89
|
-
});
|
|
90
|
-
/** Host-side Remote contract consumed by the browser's preset editor. */
|
|
91
|
+
function buildPresetEditorDescriptors() {
|
|
92
|
+
return [
|
|
93
|
+
descriptor("catalog", void 0, z.unknown(), presetCatalogSchema),
|
|
94
|
+
descriptor("tools", "id", presetIdSchema, presetToolCatalogSchema),
|
|
95
|
+
descriptor("prompts", "id", presetIdSchema, presetPromptCatalogSchema),
|
|
96
|
+
descriptor("read", "id", presetIdSchema, presetDefinitionSchema)
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
buildPresetEditorDescriptors();
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region lib/types/entries/typert.host.js
|
|
102
|
+
/** Host-side Remote contract consumed by the browser's preset inspector. */
|
|
91
103
|
const TYPERT = {
|
|
92
|
-
package:
|
|
104
|
+
package: PRESET_EDITOR_PACKAGE,
|
|
93
105
|
face: "host",
|
|
94
106
|
schemas: [],
|
|
95
|
-
invocations:
|
|
96
|
-
descriptor("catalog", void 0, z.unknown(), catalog),
|
|
97
|
-
descriptor("read", "id", z.string(), document),
|
|
98
|
-
descriptor("update", "rawInput", updateInput, document),
|
|
99
|
-
descriptor("create", "rawInput", createInput, document)
|
|
100
|
-
],
|
|
107
|
+
invocations: buildPresetEditorDescriptors(),
|
|
101
108
|
model: {
|
|
102
109
|
services: [{
|
|
103
|
-
description: "
|
|
104
|
-
summary: "Codex preset
|
|
110
|
+
description: "Inspect DSH agent presets, registered tools, and prompt sections.",
|
|
111
|
+
summary: "Codex preset inspector.",
|
|
105
112
|
tags: [],
|
|
106
113
|
jsDoc: "",
|
|
107
|
-
key:
|
|
114
|
+
key: PRESET_EDITOR_SERVICE,
|
|
108
115
|
exportName: "CodexPresetEditor",
|
|
109
116
|
members: [],
|
|
110
117
|
types: []
|
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
/** Client-only inference used while the host activity projection frame is in flight. */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The legacy conversation slice is no longer part of the current Session
|
|
4
|
+
* snapshot. Keep this fallback structural so both generations can load without
|
|
5
|
+
* depending on the removed dsh-client-runtime package.
|
|
6
|
+
*/
|
|
7
|
+
export interface ActivitySessionSnapshot {
|
|
8
|
+
readonly running: boolean;
|
|
9
|
+
readonly partial?: {
|
|
10
|
+
readonly turn: number;
|
|
11
|
+
readonly replyStartedAt?: number | undefined;
|
|
12
|
+
} | null | undefined;
|
|
13
|
+
readonly runningCalls?: readonly unknown[] | undefined;
|
|
14
|
+
readonly turnTimings?: ReadonlyMap<number, {
|
|
15
|
+
readonly startTime: number;
|
|
16
|
+
readonly endTime?: number | undefined;
|
|
17
|
+
}> | undefined;
|
|
18
|
+
readonly chat?: {
|
|
19
|
+
readonly timeline: {
|
|
20
|
+
readonly turns: ReadonlyMap<number, {
|
|
21
|
+
readonly steps: readonly {
|
|
22
|
+
readonly step: number;
|
|
23
|
+
readonly end?: unknown;
|
|
24
|
+
}[];
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
readonly nodes: {
|
|
28
|
+
values(): Iterable<{
|
|
29
|
+
readonly kind: string;
|
|
30
|
+
readonly data: unknown;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
} | undefined;
|
|
34
|
+
}
|
|
11
35
|
export type CodexModelActivity = {
|
|
12
36
|
activity: 'requesting-model' | 'model-reply';
|
|
13
37
|
startedAt: number;
|
|
@@ -42,15 +42,16 @@ export function modelReplyStartedAt(snapshot) {
|
|
|
42
42
|
const step = turn?.steps.findLast(candidate => candidate.end === undefined);
|
|
43
43
|
if (step === undefined)
|
|
44
44
|
return undefined;
|
|
45
|
-
|
|
45
|
+
let matched;
|
|
46
|
+
for (const node of chat?.nodes.values() ?? []) {
|
|
46
47
|
if (node.kind !== 'assistant-step')
|
|
47
48
|
continue;
|
|
48
49
|
const data = node.data;
|
|
49
50
|
if (data.turn === openTurn.turn && data.step === step.step && typeof data.replyStartedAt === 'number') {
|
|
50
|
-
|
|
51
|
+
matched = data.replyStartedAt;
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
return
|
|
54
|
+
return matched;
|
|
54
55
|
}
|
|
55
56
|
/** Infer the two-phase model activity from the current client snapshot. */
|
|
56
57
|
export function modelActivity(snapshot) {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { CodexConnectScope, CodexScope, InputSettingsControlInjected } from './index.tsx';
|
|
4
|
+
import type { ToolPolicyBinding } from './tool-policy.tsx';
|
|
5
|
+
export interface DesktopConfigForm extends Pick<CodexScope, 'getSnapshot' | 'subscribe'> {
|
|
6
|
+
set(field: string, value: unknown): Promise<boolean>;
|
|
7
|
+
unset(field: string): Promise<boolean>;
|
|
8
|
+
mutate(ops: Array<{
|
|
9
|
+
op: 'set';
|
|
10
|
+
path: string[];
|
|
11
|
+
value: unknown;
|
|
12
|
+
} | {
|
|
13
|
+
op: 'unset';
|
|
14
|
+
path: string[];
|
|
15
|
+
}>, expectedRevision?: number | string): Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
interface DesktopSettingsActions extends InputSettingsControlInjected {
|
|
18
|
+
saveSettings(edits: Record<string, unknown>, expectedRevision?: number | string): Promise<void>;
|
|
19
|
+
toolPolicy?: ToolPolicyBinding;
|
|
20
|
+
}
|
|
21
|
+
interface MirrorNamespaceRow {
|
|
22
|
+
readonly ns: string;
|
|
23
|
+
readonly value?: unknown;
|
|
24
|
+
readonly base?: unknown;
|
|
25
|
+
}
|
|
26
|
+
interface ConfigMirror {
|
|
27
|
+
getSnapshot(): {
|
|
28
|
+
readonly status?: string;
|
|
29
|
+
readonly view?: {
|
|
30
|
+
readonly writable?: boolean;
|
|
31
|
+
readonly namespaces?: readonly MirrorNamespaceRow[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
subscribe(listener: () => void): () => void;
|
|
35
|
+
ensure?(): unknown;
|
|
36
|
+
}
|
|
37
|
+
interface DesktopSettingsContext {
|
|
38
|
+
configForms: {
|
|
39
|
+
get(entryId: string): DesktopConfigForm;
|
|
40
|
+
describe?(): ConfigMirror;
|
|
41
|
+
whileServed(namespaces: string[], register: () => () => void): () => void;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare function bindCodexConnectScope(configForms: DesktopSettingsContext['configForms']): CodexConnectScope;
|
|
45
|
+
export declare function adaptConfigForm(form: Pick<DesktopConfigForm, 'getSnapshot' | 'subscribe' | 'set' | 'unset'>): CodexScope;
|
|
46
|
+
export declare function saveDesktopSettings(form: Pick<DesktopConfigForm, 'mutate'>, edits: Record<string, unknown>, expectedRevision?: number | string): Promise<void>;
|
|
47
|
+
type DesktopSettingsProps = InjectFace<DesktopSettingsActions> & PropsLocale<'codex'>;
|
|
48
|
+
type SettingsPage = 'tools' | 'runtime';
|
|
49
|
+
/** There is intentionally no second editable form on a bundle detail page. */
|
|
50
|
+
export declare function DesktopSettingsCard({ t }: DesktopSettingsProps & {
|
|
51
|
+
view: 'summary' | 'page';
|
|
52
|
+
}): import("react").JSX.Element;
|
|
53
|
+
/** Kept mounted while inactive, so switching pages preserves runtime drafts. */
|
|
54
|
+
export declare function RuntimeSettingsEditor({ active, ...props }: DesktopSettingsProps & {
|
|
55
|
+
active: boolean;
|
|
56
|
+
}): import("react").JSX.Element | null;
|
|
57
|
+
export declare function CodexSettingsTab(props: DesktopSettingsProps & {
|
|
58
|
+
initialPage?: SettingsPage;
|
|
59
|
+
}): import("react").JSX.Element;
|
|
60
|
+
export declare const inject: string[];
|
|
61
|
+
export declare function apply(ctx: Context): void;
|
|
62
|
+
declare const _default: {
|
|
63
|
+
inject: string[];
|
|
64
|
+
apply: typeof apply;
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|
|
67
|
+
//# sourceMappingURL=desktop.d.ts.map
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** A single Settings workspace; the bundle page is only a signpost. */
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { applyWithSettingsApi } from "./index.js";
|
|
5
|
+
import { nextOpenAICodexOverrides, OPENAI_CODEX_SETTINGS_NAMESPACE, } from "../contracts/ui-contracts.js";
|
|
6
|
+
import { bindToolPolicy, ToolPolicySection } from "./tool-policy.js";
|
|
7
|
+
function asRecord(value) {
|
|
8
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
9
|
+
? value
|
|
10
|
+
: undefined;
|
|
11
|
+
}
|
|
12
|
+
function asOverrides(value) {
|
|
13
|
+
const record = asRecord(value);
|
|
14
|
+
if (record === undefined)
|
|
15
|
+
return undefined;
|
|
16
|
+
const out = {};
|
|
17
|
+
for (const [k, v] of Object.entries(record)) {
|
|
18
|
+
if (v === null || (typeof v === 'number' && Number.isSafeInteger(v) && v > 0))
|
|
19
|
+
out[k] = v;
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
export function bindCodexConnectScope(configForms) {
|
|
24
|
+
const form = configForms.get(OPENAI_CODEX_SETTINGS_NAMESPACE);
|
|
25
|
+
const mirror = configForms.describe?.();
|
|
26
|
+
void Promise.resolve(mirror?.ensure?.()).catch(() => { });
|
|
27
|
+
let lastFormSnap;
|
|
28
|
+
let lastMirrorSnap;
|
|
29
|
+
let projected = { status: 'loading', writable: false };
|
|
30
|
+
const getSnapshot = () => {
|
|
31
|
+
const formSnap = form.getSnapshot();
|
|
32
|
+
const mirrorSnap = mirror?.getSnapshot();
|
|
33
|
+
if (formSnap === lastFormSnap && mirrorSnap === lastMirrorSnap)
|
|
34
|
+
return projected;
|
|
35
|
+
lastFormSnap = formSnap;
|
|
36
|
+
lastMirrorSnap = mirrorSnap;
|
|
37
|
+
const formRecord = formSnap.status === 'ready' ? asRecord(formSnap.value) : undefined;
|
|
38
|
+
if (formRecord !== undefined) {
|
|
39
|
+
return projected = {
|
|
40
|
+
status: 'ready',
|
|
41
|
+
writable: formSnap.writable,
|
|
42
|
+
overrides: asOverrides(formRecord.contextWindowOverrides),
|
|
43
|
+
baseOverrides: asOverrides(asRecord(formSnap.base)?.contextWindowOverrides),
|
|
44
|
+
...(typeof formRecord.enableNativeCompaction === 'boolean'
|
|
45
|
+
? { nativeCompaction: formRecord.enableNativeCompaction }
|
|
46
|
+
: {}),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const view = mirrorSnap?.view;
|
|
50
|
+
if (view !== undefined) {
|
|
51
|
+
const row = view.namespaces?.find(candidate => candidate.ns === OPENAI_CODEX_SETTINGS_NAMESPACE);
|
|
52
|
+
const rowRecord = row === undefined ? undefined : asRecord(row.value);
|
|
53
|
+
if (row === undefined || rowRecord === undefined)
|
|
54
|
+
return projected = { status: 'unavailable', writable: false };
|
|
55
|
+
return projected = {
|
|
56
|
+
status: 'ready',
|
|
57
|
+
writable: view.writable ?? formSnap.writable,
|
|
58
|
+
overrides: asOverrides(rowRecord.contextWindowOverrides),
|
|
59
|
+
baseOverrides: asOverrides(asRecord(row.base)?.contextWindowOverrides),
|
|
60
|
+
...(typeof rowRecord.enableNativeCompaction === 'boolean'
|
|
61
|
+
? { nativeCompaction: rowRecord.enableNativeCompaction }
|
|
62
|
+
: {}),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return projected = { status: formSnap.status, writable: formSnap.writable };
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
getSnapshot,
|
|
69
|
+
subscribe: listener => {
|
|
70
|
+
const stopForm = form.subscribe(listener);
|
|
71
|
+
const stopMirror = mirror?.subscribe(listener);
|
|
72
|
+
return () => { stopForm(); stopMirror?.(); };
|
|
73
|
+
},
|
|
74
|
+
setModelOverride: async (modelId, tokens) => {
|
|
75
|
+
const snap = getSnapshot();
|
|
76
|
+
const next = nextOpenAICodexOverrides(snap.overrides, snap.baseOverrides, modelId, tokens);
|
|
77
|
+
const accepted = next === undefined
|
|
78
|
+
? await form.unset('contextWindowOverrides')
|
|
79
|
+
: await form.set('contextWindowOverrides', next);
|
|
80
|
+
if (!accepted)
|
|
81
|
+
throw new Error('The host did not accept the settings change.');
|
|
82
|
+
},
|
|
83
|
+
setNativeCompaction: async (enabled) => {
|
|
84
|
+
const accepted = await form.set('enableNativeCompaction', enabled);
|
|
85
|
+
if (!accepted)
|
|
86
|
+
throw new Error('The host did not accept the settings change.');
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export function adaptConfigForm(form) {
|
|
91
|
+
const accepted = async (result) => { if (!await result)
|
|
92
|
+
throw new Error('The host did not accept the settings change.'); };
|
|
93
|
+
return { getSnapshot: () => form.getSnapshot(), subscribe: listener => form.subscribe(listener),
|
|
94
|
+
set: (field, value) => accepted(form.set(field, value)), unset: field => accepted(form.unset(field)) };
|
|
95
|
+
}
|
|
96
|
+
export async function saveDesktopSettings(form, edits, expectedRevision) {
|
|
97
|
+
const ops = Object.entries(edits).map(([field, value]) => value === undefined ? { op: 'unset', path: [field] } : { op: 'set', path: [field], value });
|
|
98
|
+
if (!ops.length)
|
|
99
|
+
return;
|
|
100
|
+
const accepted = expectedRevision === undefined ? await form.mutate(ops) : await form.mutate(ops, expectedRevision);
|
|
101
|
+
if (!accepted)
|
|
102
|
+
throw new Error('The host did not accept the settings change.');
|
|
103
|
+
}
|
|
104
|
+
const desktopStyles = `
|
|
105
|
+
.codex-harness-settings { max-width:760px; min-width:0; font-size:13px; color:var(--dsw-alias-label-primary); }
|
|
106
|
+
.codex-harness-settings h3 { font-size:14px; margin:0 0 10px; }
|
|
107
|
+
.codex-harness-settings .codex-harness-nav { display:flex; align-items:flex-end; gap:20px; margin-bottom:14px; border-bottom:0.5px solid var(--dsw-alias-border-l2); }
|
|
108
|
+
.codex-harness-settings .codex-harness-nav button { position:relative; border:0; padding:7px 1px 9px; background:transparent; color:var(--dsw-alias-label-tertiary, var(--dsw-alias-label-secondary)); font:inherit; font-size:13px; line-height:20px; cursor:pointer; }
|
|
109
|
+
.codex-harness-settings .codex-harness-nav button[aria-pressed=true] { color:var(--dsw-alias-label-primary); font-weight:500; }
|
|
110
|
+
.codex-harness-settings .codex-harness-nav button[aria-pressed=true]::after { position:absolute; right:0; bottom:-1px; left:0; height:2px; border-radius:2px 2px 0 0; background:var(--dsw-alias-label-primary); content:''; }
|
|
111
|
+
.codex-harness-settings button { box-sizing:border-box; min-width:0; max-width:100%; font:inherit; color:inherit; }
|
|
112
|
+
.codex-harness-settings .codex-harness-btn { background:var(--dsw-alias-bg-layer-2); border:0.5px solid var(--dsw-alias-border-l3, var(--dsw-alias-border-l2)); border-radius:var(--dsw-radius-md, 8px); padding:6px 12px; font-size:12px; cursor:pointer; }
|
|
113
|
+
.codex-harness-settings .codex-harness-btn:disabled { opacity:.48; cursor:default; }
|
|
114
|
+
.codex-harness-settings .codex-harness-primary { background:var(--dsw-alias-label-primary); color:var(--dsw-alias-bg-base); border-color:transparent; font-weight:500; }
|
|
115
|
+
.codex-harness-settings :is(input,button):focus-visible { outline:2px solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary)); outline-offset:2px; }
|
|
116
|
+
.codex-harness-settings fieldset { min-width:0; border:0; padding:0; margin:0; display:flex; flex-direction:column; gap:12px; }
|
|
117
|
+
.codex-harness-settings .codex-harness-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:12px; }
|
|
118
|
+
.codex-harness-settings .codex-harness-card { border:0.5px solid var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l2)); border-radius:var(--dsw-radius-xl, 12px); background:var(--dsw-alias-settings-card-fill, var(--dsw-alias-bg-layer-1)); padding:12px 16px; }
|
|
119
|
+
.codex-harness-settings .codex-harness-group h4 { margin:0 0 6px; font-size:12px; font-weight:600; color:var(--dsw-alias-label-secondary); }
|
|
120
|
+
.codex-harness-settings .codex-harness-setting-row { min-width:0; display:flex; gap:12px; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:0.5px solid var(--dsw-alias-border-l1); }
|
|
121
|
+
.codex-harness-settings .codex-harness-setting-row:last-child { border-bottom:0; }
|
|
122
|
+
.codex-harness-settings .codex-harness-note { margin:0 0 12px; color:var(--dsw-alias-label-secondary); font-size:12px; line-height:1.5; }
|
|
123
|
+
.codex-harness-settings .codex-harness-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }
|
|
124
|
+
.codex-harness-settings input[role=switch] { appearance:none; width:34px; height:20px; border:0.5px solid var(--dsw-alias-border-l3, var(--dsw-alias-border-l2)); border-radius:16px; background:var(--dsw-alias-bg-layer-2); position:relative; cursor:pointer; flex-shrink:0; margin:0; transition:background .15s; }
|
|
125
|
+
.codex-harness-settings input[role=switch]:before { content:''; position:absolute; width:14px; height:14px; top:2.5px; left:2.5px; border-radius:50%; background:var(--dsw-alias-label-secondary); transition:left .15s, background .15s; }
|
|
126
|
+
.codex-harness-settings input[role=switch]:checked { background:var(--dsw-alias-label-primary); border-color:transparent; }
|
|
127
|
+
.codex-harness-settings input[role=switch]:checked:before { left:16.5px; background:var(--dsw-alias-bg-base); }
|
|
128
|
+
`;
|
|
129
|
+
/** There is intentionally no second editable form on a bundle detail page. */
|
|
130
|
+
export function DesktopSettingsCard({ t }) {
|
|
131
|
+
return _jsxs("section", { children: [_jsx("p", { children: t('settingsBundleSummary') }), _jsx("p", { children: t('settingsBundlePath') })] });
|
|
132
|
+
}
|
|
133
|
+
/** Kept mounted while inactive, so switching pages preserves runtime drafts. */
|
|
134
|
+
export function RuntimeSettingsEditor({ active, ...props }) {
|
|
135
|
+
const { useSettings, saveSettings, t } = props;
|
|
136
|
+
const snapshot = useSettings(state => state);
|
|
137
|
+
const [draft, setDraft] = useState();
|
|
138
|
+
const [saving, setSaving] = useState(false);
|
|
139
|
+
const [error, setError] = useState('');
|
|
140
|
+
const edits = draft?.edits ?? {};
|
|
141
|
+
const value = (field) => Object.hasOwn(edits, field) ? edits[field] === undefined ? snapshot.base?.[field] : edits[field] : snapshot.value?.[field];
|
|
142
|
+
const edit = (field, next) => {
|
|
143
|
+
setError('');
|
|
144
|
+
setDraft(current => ({ edits: { ...current?.edits, [field]: next }, revision: current === undefined ? snapshot.revision : current.revision }));
|
|
145
|
+
};
|
|
146
|
+
const groups = [
|
|
147
|
+
{ label: 'globalGroupRequest', fields: [['fast', 'fast'], ['hostedWebSearchEnabled', 'settingsPreferHostedSearch'], ['remoteCompactionEnabled', 'settingsPreferRemoteCompaction']] },
|
|
148
|
+
{ label: 'globalGroupDisplay', fields: [['contextWindowControlEnabled', 'contextWindowControl'], ['fastModeControlEnabled', 'fastModeControl'], ['activityIndicatorEnabled', 'capabilityActivity']] },
|
|
149
|
+
];
|
|
150
|
+
if (!active)
|
|
151
|
+
return null;
|
|
152
|
+
return _jsxs("section", { "aria-label": t('settingsRuntimePage'), children: [_jsxs("h3", { children: [t('settingsRuntimePage'), _jsxs("span", { className: "codex-harness-note", children: [" \u00B7 ", t('settingsRuntimeScope')] })] }), _jsx("form", { onSubmit: event => {
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
if (saving || draft === undefined || !snapshot.writable || snapshot.status !== 'ready')
|
|
155
|
+
return;
|
|
156
|
+
setSaving(true);
|
|
157
|
+
setError('');
|
|
158
|
+
const submitted = draft;
|
|
159
|
+
void saveSettings(submitted.edits, submitted.revision).then(() => setDraft(current => current === submitted ? undefined : current))
|
|
160
|
+
.catch(() => setError(t('settingsSharedFailed'))).finally(() => setSaving(false));
|
|
161
|
+
}, children: _jsxs("fieldset", { disabled: !snapshot.writable || snapshot.status !== 'ready' || saving, children: [_jsx("div", { className: "codex-harness-grid", children: groups.map(group => _jsxs("div", { className: "codex-harness-card codex-harness-group", children: [_jsx("h4", { children: t(group.label) }), group.fields.map(([field, label]) => _jsxs("label", { className: "codex-harness-setting-row", children: [_jsx("span", { children: t(label) }), _jsx("input", { type: "checkbox", role: "switch", "aria-label": t(label), "aria-checked": Boolean(value(field) ?? (field !== 'fast')), checked: Boolean(value(field) ?? (field !== 'fast')), onChange: event => edit(field, event.target.checked) })] }, field))] }, group.label)) }), _jsxs("div", { className: "codex-harness-actions", children: [_jsx("button", { className: "codex-harness-btn codex-harness-primary", type: "submit", disabled: !Object.keys(edits).length, children: t(saving ? 'promptSaving' : 'settingsSaveRuntime') }), _jsx("button", { className: "codex-harness-btn", type: "button", disabled: draft === undefined, onClick: () => { setDraft(undefined); setError(''); }, children: t('promptDiscard') })] })] }) }), !snapshot.writable && _jsx("p", { className: "codex-harness-note", children: t('promptReadOnly') }), error && _jsx("p", { role: "alert", children: error })] });
|
|
162
|
+
}
|
|
163
|
+
export function CodexSettingsTab(props) {
|
|
164
|
+
const { toolPolicy, presetManager, t } = props;
|
|
165
|
+
const [page, setPage] = useState(props.initialPage ?? 'tools');
|
|
166
|
+
const mode = page === 'tools' ? 'tools' : 'inactive';
|
|
167
|
+
return _jsxs("section", { className: "codex-harness-settings", children: [_jsx("style", { children: desktopStyles }), _jsxs("nav", { className: "codex-harness-nav", "aria-label": t('settingsTabLabel'), children: [_jsx("button", { type: "button", "aria-pressed": page === 'tools', onClick: () => setPage('tools'), children: t('settingsToolsPage') }), _jsx("button", { type: "button", "aria-pressed": page === 'runtime', onClick: () => setPage('runtime'), children: t('settingsRuntimePage') })] }), toolPolicy !== undefined && _jsx(ToolPolicySection, { binding: toolPolicy, presetManager: presetManager, mode: mode, t: t }), _jsx(RuntimeSettingsEditor, { ...props, active: page === 'runtime' })] });
|
|
168
|
+
}
|
|
169
|
+
export const inject = ['commandUi', 'sessions', 'slots', 'locale', 'configForms', 'remote'];
|
|
170
|
+
export function apply(ctx) {
|
|
171
|
+
let form;
|
|
172
|
+
let connectScope;
|
|
173
|
+
const getCodexConnectScope = () => {
|
|
174
|
+
try {
|
|
175
|
+
return connectScope ??= bindCodexConnectScope(ctx.configForms);
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
applyWithSettingsApi(ctx, {
|
|
182
|
+
bind: host => { form = host.configForms.get('codex'); return adaptConfigForm(form); },
|
|
183
|
+
getCodexConnectScope,
|
|
184
|
+
register: (host, settings, manager) => {
|
|
185
|
+
const desktop = host;
|
|
186
|
+
const presetManager = { ...manager, remote: host.remote };
|
|
187
|
+
const t = host.locale.bind('codex');
|
|
188
|
+
const toolPolicy = bindToolPolicy(host, host.configForms);
|
|
189
|
+
const injected = () => ({
|
|
190
|
+
hooks: { settings },
|
|
191
|
+
setSetting: (field, value) => settings.set(field, value),
|
|
192
|
+
unsetSetting: field => settings.unset(field),
|
|
193
|
+
presetManager,
|
|
194
|
+
toolPolicy,
|
|
195
|
+
saveSettings: async (edits, revision) => {
|
|
196
|
+
await saveDesktopSettings(form, edits, revision);
|
|
197
|
+
if (typeof edits.remoteCompactionEnabled === 'boolean') {
|
|
198
|
+
const scope = getCodexConnectScope();
|
|
199
|
+
if (scope?.setNativeCompaction !== undefined && scope.getSnapshot().writable) {
|
|
200
|
+
await scope.setNativeCompaction(edits.remoteCompactionEnabled).catch(() => { });
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
return desktop.configForms.whileServed(['codex'], () => {
|
|
206
|
+
const disposers = [];
|
|
207
|
+
const dispose = () => { for (const off of disposers.splice(0).reverse())
|
|
208
|
+
off(); };
|
|
209
|
+
try {
|
|
210
|
+
disposers.push(host.slots.inject('settings.plugins.tab', () => host.slots.register({ name: 'settings.plugins.tab', id: 'codex-harness', order: 30,
|
|
211
|
+
label: () => t('settingsTabLabel'), locale: 'codex', inject: injected }, CodexSettingsTab)));
|
|
212
|
+
disposers.push(host.slots.inject('plugins.bundle.config', () => host.slots.register({
|
|
213
|
+
name: 'plugins.bundle.config',
|
|
214
|
+
key: '@shuind/dsh-codex-harness',
|
|
215
|
+
locale: 'codex',
|
|
216
|
+
inject: injected,
|
|
217
|
+
}, DesktopSettingsCard)));
|
|
218
|
+
return dispose;
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
dispose();
|
|
222
|
+
throw error;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
export default { inject, apply };
|
|
229
|
+
//# sourceMappingURL=desktop.js.map
|