@michengai/dsh-codex-ui 1.1.49 → 2.0.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 +7 -0
- package/CHANGELOG.zh-CN.md +7 -0
- package/README.md +117 -112
- package/README.zh-CN.md +117 -112
- package/assets/icon.svg +25 -0
- package/assets/screenshots/conversation-light.png +0 -0
- package/assets/screenshots/conversation.png +0 -0
- package/assets/screenshots/session-menu.png +0 -0
- package/assets/screenshots/settings-about.png +0 -0
- package/assets/screenshots/sidebar-collapsed.png +0 -0
- package/assets/screenshots/sidebar.png +0 -0
- package/cordis.patch.yml +9 -1
- package/lib/business-api-CSNUY-u5.mjs +11 -0
- package/lib/client.js +6050 -12010
- package/lib/composer-plugin.d.mts +17 -0
- package/lib/composer-plugin.mjs +41 -0
- package/lib/index.mjs +6 -1300
- package/lib/profile-resolver-BlLPRcE8.mjs +66 -0
- package/lib/session-title-plugin.d.mts +1 -1
- package/lib/session-title-plugin.mjs +111 -389
- package/lib/settings-skin-plugin.d.mts +12 -0
- package/lib/settings-skin-plugin.mjs +34 -0
- package/lib/sidebar-plugin.d.mts +17 -0
- package/lib/sidebar-plugin.mjs +43 -0
- package/lib/theme-plugin.d.mts +17 -0
- package/lib/theme-plugin.mjs +43 -0
- package/locale/composer/en.json +6 -0
- package/locale/composer/zh.json +6 -0
- package/locale/en.json +1 -1
- package/locale/settings-skin/en.json +6 -0
- package/locale/settings-skin/zh.json +6 -0
- package/locale/sidebar/en.json +6 -0
- package/locale/sidebar/zh.json +6 -0
- package/locale/theme/en.json +6 -0
- package/locale/theme/zh.json +6 -0
- package/locale/zh.json +1 -1
- package/package.json +33 -10
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { t as CODEX_UI_API_ENDPOINTS } from "./business-api-CSNUY-u5.mjs";
|
|
2
|
+
import { t as isSubPluginDisabledOnDisk } from "./profile-resolver-BlLPRcE8.mjs";
|
|
3
|
+
//#region src/settings-skin-plugin.ts
|
|
4
|
+
const name = "codex-ui-settings-skin";
|
|
5
|
+
const inject = ["webServer"];
|
|
6
|
+
/**
|
|
7
|
+
* 原生设置皮肤子组件 (Host 侧)
|
|
8
|
+
* 挂载时通过 webServer 暴露 /api/michengai/dsh-codex-ui/settings-skin 端点;
|
|
9
|
+
* 当在 DSH 插件管理中停用此子组件时,此 fiber 被销毁或响应 enabled: false,客户端自动回退至 DSH 原生外观。
|
|
10
|
+
*/
|
|
11
|
+
function apply(ctx) {
|
|
12
|
+
const endpoint = CODEX_UI_API_ENDPOINTS.settingsSkin;
|
|
13
|
+
ctx.effect(() => {
|
|
14
|
+
const webServer = ctx.get("webServer");
|
|
15
|
+
if (!webServer || typeof webServer.register !== "function") return () => {};
|
|
16
|
+
const dispose = webServer.register({
|
|
17
|
+
kind: "exact",
|
|
18
|
+
path: endpoint,
|
|
19
|
+
handler: (_request, response) => {
|
|
20
|
+
const disabled = isSubPluginDisabledOnDisk("codex-ui-settings-skin", void 0, ctx);
|
|
21
|
+
response.writeHead(200, {
|
|
22
|
+
"content-type": "application/json; charset=utf-8",
|
|
23
|
+
"cache-control": "no-store"
|
|
24
|
+
});
|
|
25
|
+
response.end(JSON.stringify({ enabled: !disabled }));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return () => {
|
|
29
|
+
dispose?.();
|
|
30
|
+
};
|
|
31
|
+
}, "michengai-codex-ui: settings skin state");
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { apply, inject, name };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
//#region src/sidebar-plugin.d.ts
|
|
3
|
+
declare const name = "codex-ui-sidebar";
|
|
4
|
+
declare const inject: string[];
|
|
5
|
+
/**
|
|
6
|
+
* 检查 profile 的 cordis.patch.yml 中是否显式配置了 disabled: true。
|
|
7
|
+
* 与 composer / settings-skin 保持一致:停用后端点如实回报,客户端回退官方侧栏。
|
|
8
|
+
*/
|
|
9
|
+
declare function isSubPluginDisabledOnDisk(id: string, homeDir?: string, ctx?: Context): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 侧栏导航子组件 (Host 侧)
|
|
12
|
+
* 挂载时通过 webServer 暴露 /api/michengai/dsh-codex-ui/sidebar;
|
|
13
|
+
* 停用此子组件或端点不可达时,客户端关闭增强并回退 DSH 官方侧栏。
|
|
14
|
+
*/
|
|
15
|
+
declare function apply(ctx: Context): void;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { apply, inject, isSubPluginDisabledOnDisk, name };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { t as CODEX_UI_API_ENDPOINTS } from "./business-api-CSNUY-u5.mjs";
|
|
2
|
+
import { t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-BlLPRcE8.mjs";
|
|
3
|
+
//#region src/sidebar-plugin.ts
|
|
4
|
+
const name = "codex-ui-sidebar";
|
|
5
|
+
const inject = ["webServer"];
|
|
6
|
+
/** 子组件自身在 profile 配置里的 id。 */
|
|
7
|
+
const SUB_PLUGIN_ID = "codex-ui-sidebar";
|
|
8
|
+
/**
|
|
9
|
+
* 检查 profile 的 cordis.patch.yml 中是否显式配置了 disabled: true。
|
|
10
|
+
* 与 composer / settings-skin 保持一致:停用后端点如实回报,客户端回退官方侧栏。
|
|
11
|
+
*/
|
|
12
|
+
function isSubPluginDisabledOnDisk(id, homeDir, ctx) {
|
|
13
|
+
return isSubPluginDisabledOnDisk$1(id, homeDir, ctx);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 侧栏导航子组件 (Host 侧)
|
|
17
|
+
* 挂载时通过 webServer 暴露 /api/michengai/dsh-codex-ui/sidebar;
|
|
18
|
+
* 停用此子组件或端点不可达时,客户端关闭增强并回退 DSH 官方侧栏。
|
|
19
|
+
*/
|
|
20
|
+
function apply(ctx) {
|
|
21
|
+
const endpoint = CODEX_UI_API_ENDPOINTS.sidebar;
|
|
22
|
+
ctx.effect(() => {
|
|
23
|
+
const webServer = ctx.get("webServer");
|
|
24
|
+
if (!webServer || typeof webServer.register !== "function") return () => {};
|
|
25
|
+
const dispose = webServer.register({
|
|
26
|
+
kind: "exact",
|
|
27
|
+
path: endpoint,
|
|
28
|
+
handler: (_request, response) => {
|
|
29
|
+
const disabled = isSubPluginDisabledOnDisk(SUB_PLUGIN_ID, void 0, ctx);
|
|
30
|
+
response.writeHead(200, {
|
|
31
|
+
"content-type": "application/json; charset=utf-8",
|
|
32
|
+
"cache-control": "no-store"
|
|
33
|
+
});
|
|
34
|
+
response.end(JSON.stringify({ enabled: !disabled }));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return () => {
|
|
38
|
+
dispose?.();
|
|
39
|
+
};
|
|
40
|
+
}, "michengai-codex-ui: sidebar state");
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { apply, inject, isSubPluginDisabledOnDisk, name };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
//#region src/theme-plugin.d.ts
|
|
3
|
+
declare const name = "codex-ui-theme";
|
|
4
|
+
declare const inject: string[];
|
|
5
|
+
/**
|
|
6
|
+
* 检查 profile 的 cordis.patch.yml 中是否显式配置了 disabled: true。
|
|
7
|
+
* 与 sidebar / composer / settings-skin 保持一致:停用后端点如实回报,客户端回退官方主题与默认排版。
|
|
8
|
+
*/
|
|
9
|
+
declare function isSubPluginDisabledOnDisk(id: string, homeDir?: string, ctx?: Context): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 主题与外观子组件 (Host 侧)
|
|
12
|
+
* 挂载时通过 webServer 暴露 /api/michengai/dsh-codex-ui/theme;
|
|
13
|
+
* 停用此子组件或端点不可达时,客户端回退官方主题并关闭云母质感。
|
|
14
|
+
*/
|
|
15
|
+
declare function apply(ctx: Context): void;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { apply, inject, isSubPluginDisabledOnDisk, name };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { t as CODEX_UI_API_ENDPOINTS } from "./business-api-CSNUY-u5.mjs";
|
|
2
|
+
import { t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-BlLPRcE8.mjs";
|
|
3
|
+
//#region src/theme-plugin.ts
|
|
4
|
+
const name = "codex-ui-theme";
|
|
5
|
+
const inject = ["webServer"];
|
|
6
|
+
/** 子组件自身在 profile 配置里的 id。 */
|
|
7
|
+
const SUB_PLUGIN_ID = "codex-ui-theme";
|
|
8
|
+
/**
|
|
9
|
+
* 检查 profile 的 cordis.patch.yml 中是否显式配置了 disabled: true。
|
|
10
|
+
* 与 sidebar / composer / settings-skin 保持一致:停用后端点如实回报,客户端回退官方主题与默认排版。
|
|
11
|
+
*/
|
|
12
|
+
function isSubPluginDisabledOnDisk(id, homeDir, ctx) {
|
|
13
|
+
return isSubPluginDisabledOnDisk$1(id, homeDir, ctx);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 主题与外观子组件 (Host 侧)
|
|
17
|
+
* 挂载时通过 webServer 暴露 /api/michengai/dsh-codex-ui/theme;
|
|
18
|
+
* 停用此子组件或端点不可达时,客户端回退官方主题并关闭云母质感。
|
|
19
|
+
*/
|
|
20
|
+
function apply(ctx) {
|
|
21
|
+
const endpoint = CODEX_UI_API_ENDPOINTS.theme;
|
|
22
|
+
ctx.effect(() => {
|
|
23
|
+
const webServer = ctx.get("webServer");
|
|
24
|
+
if (!webServer || typeof webServer.register !== "function") return () => {};
|
|
25
|
+
const dispose = webServer.register({
|
|
26
|
+
kind: "exact",
|
|
27
|
+
path: endpoint,
|
|
28
|
+
handler: (_request, response) => {
|
|
29
|
+
const disabled = isSubPluginDisabledOnDisk(SUB_PLUGIN_ID, void 0, ctx);
|
|
30
|
+
response.writeHead(200, {
|
|
31
|
+
"content-type": "application/json; charset=utf-8",
|
|
32
|
+
"cache-control": "no-store"
|
|
33
|
+
});
|
|
34
|
+
response.end(JSON.stringify({ enabled: !disabled }));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return () => {
|
|
38
|
+
dispose?.();
|
|
39
|
+
};
|
|
40
|
+
}, "michengai-codex-ui: theme state");
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { apply, inject, isSubPluginDisabledOnDisk, name };
|
package/locale/en.json
CHANGED
package/locale/zh.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-codex-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "DSH Codex UI — 为 DeepSeek Harness
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "DSH Codex UI — 为 DeepSeek Harness 提供极速历史召回、全屏设置皮肤、原生物理毛玻璃换肤与模块化侧栏 · Input enhancement, settings skin, native glass theme, and modular sidebar for DSH",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|
|
@@ -35,9 +35,29 @@
|
|
|
35
35
|
"types": "./lib/session-title-plugin.d.mts",
|
|
36
36
|
"default": "./lib/session-title-plugin.mjs"
|
|
37
37
|
},
|
|
38
|
+
"./settings-skin": {
|
|
39
|
+
"types": "./lib/settings-skin-plugin.d.mts",
|
|
40
|
+
"default": "./lib/settings-skin-plugin.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./composer": {
|
|
43
|
+
"types": "./lib/composer-plugin.d.mts",
|
|
44
|
+
"default": "./lib/composer-plugin.mjs"
|
|
45
|
+
},
|
|
46
|
+
"./sidebar": {
|
|
47
|
+
"types": "./lib/sidebar-plugin.d.mts",
|
|
48
|
+
"default": "./lib/sidebar-plugin.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./theme": {
|
|
51
|
+
"types": "./lib/theme-plugin.d.mts",
|
|
52
|
+
"default": "./lib/theme-plugin.mjs"
|
|
53
|
+
},
|
|
38
54
|
"./package.json": "./package.json",
|
|
39
55
|
"./locale/*.json": "./locale/*.json",
|
|
40
|
-
"./session-title/locale/*.json": "./locale/session-title/*.json"
|
|
56
|
+
"./session-title/locale/*.json": "./locale/session-title/*.json",
|
|
57
|
+
"./settings-skin/locale/*.json": "./locale/settings-skin/*.json",
|
|
58
|
+
"./composer/locale/*.json": "./locale/composer/*.json",
|
|
59
|
+
"./sidebar/locale/*.json": "./locale/sidebar/*.json",
|
|
60
|
+
"./theme/locale/*.json": "./locale/theme/*.json"
|
|
41
61
|
},
|
|
42
62
|
"files": [
|
|
43
63
|
"lib",
|
|
@@ -56,13 +76,14 @@
|
|
|
56
76
|
},
|
|
57
77
|
"client": {
|
|
58
78
|
"inject": [
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-layout",
|
|
60
79
|
"@deepseek-ai/dsh-client-locale",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
61
81
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
62
82
|
"@deepseek-ai/dsh-client-ui-input-trigger",
|
|
83
|
+
"@deepseek-ai/dsh-session",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
63
85
|
"@deepseek-ai/dsh-client-ui-workspace",
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-
|
|
65
|
-
"@deepseek-ai/dsh-client-connection"
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-theme"
|
|
66
87
|
],
|
|
67
88
|
"platform": "web"
|
|
68
89
|
}
|
|
@@ -71,9 +92,8 @@
|
|
|
71
92
|
"build": "tsc --noEmit && tsdown",
|
|
72
93
|
"typecheck": "tsc --noEmit",
|
|
73
94
|
"test": "pnpm run typecheck && vitest run && tsdown && node tests/run-assertions.mjs && pnpm run test:layout",
|
|
74
|
-
"test:host": "node scripts/verify-settings
|
|
75
|
-
"test:
|
|
76
|
-
"test:layout": "node scripts/verify-workspace-drop-layout.mjs --run && node scripts/verify-sidebar-transition.mjs && node scripts/verify-sidebar-expand-control.mjs && node scripts/verify-sidebar-titlebar.mjs && node scripts/verify-composer-style.mjs && node scripts/verify-new-conversation.mjs && node scripts/verify-composer-tools.mjs && node scripts/verify-hero-width.mjs && node scripts/verify-settings-backdrop.mjs && node scripts/verify-settings-geometry.mjs && node scripts/verify-upstream-style-regressions.mjs && node scripts/verify-window-drag.mjs",
|
|
95
|
+
"test:host": "node scripts/verify-native-settings.mjs",
|
|
96
|
+
"test:layout": "node scripts/verify-new-conversation.mjs && node scripts/verify-hero-width.mjs",
|
|
77
97
|
"test:compat": "node scripts/run-compat-host.mjs",
|
|
78
98
|
"test:fallback-host": "node scripts/verify-plugin-fallback-host.mjs"
|
|
79
99
|
},
|
|
@@ -89,6 +109,7 @@
|
|
|
89
109
|
"@deepseek-ai/dsh-client-ui-settings-general": ">=0.2.0-rc.1 <0.3.0-0",
|
|
90
110
|
"@deepseek-ai/dsh-client-ui-sidebar": ">=0.2.0-rc.1 <0.3.0-0",
|
|
91
111
|
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.1 <0.3.0-0",
|
|
112
|
+
"@deepseek-ai/dsh-client-ui-theme": ">=0.2.0-rc.1 <0.3.0-0",
|
|
92
113
|
"@deepseek-ai/dsh-client-ui-workspace": ">=0.2.0-rc.1 <0.3.0-0",
|
|
93
114
|
"react": "^18.2.0",
|
|
94
115
|
"react-dom": "^18.2.0"
|
|
@@ -113,6 +134,7 @@
|
|
|
113
134
|
"@deepseek-ai/dsh-client-ui-settings-general": "0.2.1-rc.3",
|
|
114
135
|
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-rc.3",
|
|
115
136
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
|
|
137
|
+
"@deepseek-ai/dsh-client-ui-theme": "0.2.1-rc.3",
|
|
116
138
|
"@deepseek-ai/dsh-client-ui-workspace": "0.2.1-rc.3",
|
|
117
139
|
"@deepseek-ai/dsh-scope": "0.2.1-rc.3",
|
|
118
140
|
"@deepseek-ai/dsh-session": "0.2.1-rc.3",
|
|
@@ -139,5 +161,6 @@
|
|
|
139
161
|
},
|
|
140
162
|
"dependencies": {
|
|
141
163
|
"lucide-react": "^1.39.0"
|
|
142
|
-
}
|
|
164
|
+
},
|
|
165
|
+
"icon": "assets/icon.svg"
|
|
143
166
|
}
|