@michengai/dsh-codex-ui 2.0.11 → 2.0.12

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.
@@ -51,7 +51,7 @@ const zh = {
51
51
  "about.feedback": "问题反馈",
52
52
  "about.checkUpdate": "检查更新",
53
53
  "about.checking": "正在检查更新…",
54
- "about.description": "输入框增强、全屏设置工作台美化与生态插件管理。",
54
+ "about.description": "输入框增强、全屏设置工作台美化、桌面窗口菜单与生态插件管理。",
55
55
  "about.features": "包含子插件与功能",
56
56
  "about.feature.composer.name": "输入框增强 (Composer)",
57
57
  "about.feature.composer": "终端风格输入历史(↑/↓)快捷召回、自适应宽度调节与会话建议卡片",
@@ -65,6 +65,23 @@ const zh = {
65
65
  "about.feature.theme": "内置 Codex 经典黑白与 Catppuccin 色盘,支持悬浮云母磨砂质感",
66
66
  "about.feature.dependencies.name": "配套生态管理 (Dependencies)",
67
67
  "about.feature.dependencies": "深度集成 DSH 官方与第三方生态插件集中管理与一键批量更新",
68
+ "about.feature.desktopMenu.name": "桌面窗口菜单 (Desktop Menus)",
69
+ "about.feature.desktopMenu": "在系统原生菜单栏追加帮助入口,并提供页面刷新与重启",
70
+ "desktopMenu.help": "帮助",
71
+ "desktopMenu.help.reloadPage": "刷新页面",
72
+ "desktopMenu.help.restartAppHost": "重启应用与 Host",
73
+ "desktopMenu.help.restartConfirm": "将退出并重新打开 DeepSeek Harness,正在运行的任务会被中断。继续?",
74
+ "desktopMenu.restart.quitting": "正在退出并重新打开 DeepSeek Harness…",
75
+ "desktopMenu.restart.relaunched": "已重新启动。",
76
+ "desktopMenu.restart.cancelled": "应用没有退出,本次重启已取消。",
77
+ "desktopMenu.restart.launchFailed": "应用已退出,但没能自动重新打开,请手动启动。",
78
+ "desktopMenu.restart.timeout": "没有在预期时间内完成重启,请确认应用是否还在。",
79
+ "desktopMenu.restart.busy": "已有重启正在进行中,请稍候。",
80
+ "desktopMenu.restart.failed": "重启失败",
81
+ "desktopMenu.restart.unreachable": "连不上宿主,重启通道不可用。",
82
+ "desktopMenu.restart.unsupportedDesktopOnly": "当前不是桌面版,无法重启应用。",
83
+ "desktopMenu.restart.unsupportedMissingApp": "找不到 DeepSeek Harness 的可执行文件,无法重启。",
84
+ "desktopMenu.restart.close": "关闭",
68
85
  "about.dependencies": "配套管理插件",
69
86
  "about.dependenciesDescription": "每个配套插件均支持独立按需安装与一键批量同步升级。",
70
87
  "about.loading": "正在读取依赖安装状态…",
@@ -220,7 +237,7 @@ const en = {
220
237
  "about.feedback": "Issues",
221
238
  "about.checkUpdate": "Check for updates",
222
239
  "about.checking": "Checking…",
223
- "about.description": "Input enhancement, fullscreen settings workbench skin, and ecosystem plugin management.",
240
+ "about.description": "Input enhancement, fullscreen settings workbench skin, desktop titlebar menu, and ecosystem plugin management.",
224
241
  "about.features": "Built-in Sub-plugins & Capabilities",
225
242
  "about.feature.composer.name": "Composer Enhancements",
226
243
  "about.feature.composer": "Terminal-style input history (↑/↓), adaptive width resizing, and starter suggestions",
@@ -234,6 +251,23 @@ const en = {
234
251
  "about.feature.theme": "Built-in Codex dark/light & Catppuccin palettes with floating mica glassmorphism",
235
252
  "about.feature.dependencies.name": "Companion Dependencies",
236
253
  "about.feature.dependencies": "Integrated management, live healthcheck, and one-click updates for DSH plugins",
254
+ "about.feature.desktopMenu.name": "Desktop Window Menus",
255
+ "about.feature.desktopMenu": "Adds a Help entry to the native menubar with page reload and restart",
256
+ "desktopMenu.help": "Help",
257
+ "desktopMenu.help.reloadPage": "Reload Page",
258
+ "desktopMenu.help.restartAppHost": "Restart App and Host",
259
+ "desktopMenu.help.restartConfirm": "DeepSeek Harness will close and reopen; running tasks will be interrupted. Continue?",
260
+ "desktopMenu.restart.quitting": "Closing and reopening DeepSeek Harness…",
261
+ "desktopMenu.restart.relaunched": "Restarted.",
262
+ "desktopMenu.restart.cancelled": "The app did not exit; this restart was cancelled.",
263
+ "desktopMenu.restart.launchFailed": "The app exited but could not be reopened automatically.",
264
+ "desktopMenu.restart.timeout": "The restart did not finish in time; please check the app.",
265
+ "desktopMenu.restart.busy": "A restart is already in progress. Please wait.",
266
+ "desktopMenu.restart.failed": "Restart failed",
267
+ "desktopMenu.restart.unreachable": "Cannot reach the Host; the restart channel is unavailable.",
268
+ "desktopMenu.restart.unsupportedDesktopOnly": "This is not the desktop app, so it cannot be restarted.",
269
+ "desktopMenu.restart.unsupportedMissingApp": "Cannot locate the DeepSeek Harness executable, so it cannot be restarted.",
270
+ "desktopMenu.restart.close": "Close",
237
271
  "about.dependencies": "Companion management plugins",
238
272
  "about.dependenciesDescription": "Install or update each companion plugin individually, or synchronize all versions in one click.",
239
273
  "about.loading": "Loading dependency status…",
@@ -1,4 +1,4 @@
1
- import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk } from "./profile-resolver-D81fBy52.mjs";
1
+ import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk } from "./profile-resolver-B1VNepo_.mjs";
2
2
  //#region src/settings-skin-plugin.ts
3
3
  const name = "codex-ui-settings-skin";
4
4
  const inject = ["webServer"];
@@ -1,4 +1,4 @@
1
- import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-D81fBy52.mjs";
1
+ import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-B1VNepo_.mjs";
2
2
  //#region src/sidebar-plugin.ts
3
3
  const name = "codex-ui-sidebar";
4
4
  const inject = ["webServer"];
@@ -1,4 +1,4 @@
1
- import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-D81fBy52.mjs";
1
+ import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-B1VNepo_.mjs";
2
2
  //#region src/theme-plugin.ts
3
3
  const name = "codex-ui-theme";
4
4
  const inject = ["webServer"];
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Codex Desktop Menus",
4
+ "description": "Desktop titlebar menu enhancement with native page reload and app restart."
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Codex 桌面窗口菜单",
4
+ "description": "官方桌面端标题栏菜单增强,提供原生页面重载与应用平滑重启。"
5
+ }
6
+ }
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Codex UI",
4
- "description": "Input enhancements, fullscreen settings workbench skin, and ecosystem plugin management."
4
+ "description": "Input enhancements, fullscreen settings workbench skin, desktop titlebar menu, and ecosystem plugin management."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Codex UI",
4
- "description": "输入框历史与自适应增强、全屏设置工作台美化与生态插件管理。"
4
+ "description": "输入框历史与自适应增强、全屏设置工作台美化、桌面窗口菜单与生态插件管理。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-ui",
3
- "version": "2.0.11",
4
- "description": "DSH Codex UI — 为 DeepSeek Harness 提供极速历史召回、全屏设置皮肤、原生物理毛玻璃换肤与模块化侧栏 · Input enhancement, settings skin, native glass theme, and modular sidebar for DSH",
3
+ "version": "2.0.12",
4
+ "description": "DSH Codex UI — 为 DeepSeek Harness 提供极速历史召回、全屏设置皮肤、原生物理毛玻璃换肤、模块化侧栏与桌面原生窗口菜单 · Input enhancement, settings skin, native glass theme, modular sidebar, and desktop titlebar menu for DSH",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -51,13 +51,18 @@
51
51
  "types": "./lib/theme-plugin.d.mts",
52
52
  "default": "./lib/theme-plugin.mjs"
53
53
  },
54
+ "./desktop-menu": {
55
+ "types": "./lib/desktop-menu-plugin.d.mts",
56
+ "default": "./lib/desktop-menu-plugin.mjs"
57
+ },
54
58
  "./package.json": "./package.json",
55
59
  "./locale/*.json": "./locale/*.json",
56
60
  "./session-title/locale/*.json": "./locale/session-title/*.json",
57
61
  "./settings-skin/locale/*.json": "./locale/settings-skin/*.json",
58
62
  "./composer/locale/*.json": "./locale/composer/*.json",
59
63
  "./sidebar/locale/*.json": "./locale/sidebar/*.json",
60
- "./theme/locale/*.json": "./locale/theme/*.json"
64
+ "./theme/locale/*.json": "./locale/theme/*.json",
65
+ "./desktop-menu/locale/*.json": "./locale/desktop-menu/*.json"
61
66
  },
62
67
  "files": [
63
68
  "lib",
@@ -1,11 +0,0 @@
1
- //#region src/business-api.ts
2
- const CODEX_UI_API_BASE = "/api/michengai/dsh-codex-ui";
3
- const CODEX_UI_API_ENDPOINTS = Object.freeze({
4
- dependencies: `${CODEX_UI_API_BASE}/dependencies`,
5
- settingsSkin: `${CODEX_UI_API_BASE}/settings-skin`,
6
- composer: `${CODEX_UI_API_BASE}/composer`,
7
- sidebar: `${CODEX_UI_API_BASE}/sidebar`,
8
- theme: `${CODEX_UI_API_BASE}/theme`
9
- });
10
- //#endregion
11
- export { CODEX_UI_API_ENDPOINTS as t };
@@ -1,73 +0,0 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { homedir } from "node:os";
3
- import { basename, isAbsolute, join, resolve } from "node:path";
4
- //#region src/profile-resolver.ts
5
- /**
6
- * 健壮解析当前 DSH 实例的 Profile 信息:
7
- * 优先级:
8
- * 1. Cordis 服务 profileContext(官方运行时注入,最权威)
9
- * 2. 环境变量 DSH_PROFILE_DIR
10
- * 3. 命令行参数 --profile <name>
11
- * 4. 环境变量 DSH_PROFILE
12
- * 5. 兜底默认值 'web'
13
- */
14
- function resolveCurrentProfile(ctx, customHomeDir) {
15
- const homeDir = customHomeDir ?? process.env.DSH_HOME ?? join(homedir(), ".dsh");
16
- let profileName;
17
- let profileDir;
18
- try {
19
- const launched = ctx?.get?.("profileContext");
20
- if (typeof launched?.name === "string" && launched.name.trim()) profileName = launched.name.trim();
21
- if (typeof launched?.dir === "string" && isAbsolute(launched.dir)) profileDir = resolve(launched.dir);
22
- } catch {}
23
- if (!profileDir && process.env.DSH_PROFILE_DIR) try {
24
- profileDir = resolve(process.env.DSH_PROFILE_DIR);
25
- if (!profileName) profileName = basename(profileDir);
26
- } catch {}
27
- if (!profileName && typeof process !== "undefined" && Array.isArray(process.argv)) {
28
- const argv = process.argv;
29
- for (let i = 0; i < argv.length; i++) {
30
- const arg = argv[i];
31
- if (arg === "--profile" && argv[i + 1]) {
32
- profileName = argv[i + 1].trim();
33
- break;
34
- }
35
- if (typeof arg === "string" && arg.startsWith("--profile=")) {
36
- profileName = arg.slice(10).trim();
37
- break;
38
- }
39
- }
40
- }
41
- if (!profileName && process.env.DSH_PROFILE) profileName = process.env.DSH_PROFILE.trim();
42
- if (!profileName) profileName = "web";
43
- if (!profileDir) profileDir = join(homeDir, "profiles", profileName);
44
- return {
45
- profileName,
46
- profileDir,
47
- homeDir
48
- };
49
- }
50
- /**
51
- * 严格基于当前 Profile 检查 cordis.patch.yml 中是否显式配置了 disabled: true。
52
- * 杜绝跨 Profile 串读(绝不扫描非当前 Profile 的目录)。
53
- */
54
- function isSubPluginDisabledOnDisk(id, homeDir, ctx) {
55
- try {
56
- const { profileDir } = resolveCurrentProfile(ctx, homeDir);
57
- const patchPath = join(profileDir, "cordis.patch.yml");
58
- if (existsSync(patchPath)) {
59
- const itemBlocks = readFileSync(patchPath, "utf8").split(/(?:\r?\n)(?=-\s+)/);
60
- for (let i = itemBlocks.length - 1; i >= 0; i--) {
61
- const block = itemBlocks[i];
62
- if (new RegExp(`(?:^|\\s)id:\\s*['"]?${id}['"]?(?:\\s|$)`, "m").test(block)) {
63
- if (/(?:^|\s)disabled:\s*true(?:\s|$)/m.test(block)) return true;
64
- if (/(?:^|\s)disabled:\s*false(?:\\s|$)/m.test(block)) return false;
65
- return false;
66
- }
67
- }
68
- }
69
- } catch {}
70
- return false;
71
- }
72
- //#endregion
73
- export { isSubPluginDisabledOnDisk as t };