@michengai/dsh-codex-ui 0.2.56 → 0.2.57

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 CHANGED
@@ -201,8 +201,6 @@ pnpm build
201
201
  pnpm test
202
202
  ```
203
203
 
204
- ## Documentation and license
205
-
206
- Start from the [handoff index](docs/00-交接入口/00-阅读导航.md) for project status, architecture, and iteration notes.
204
+ ## License
207
205
 
208
206
  This project is licensed under [Apache License 2.0](LICENSE). Conversation-management workflow is informed by [Semidia/dsh-session-manager](https://github.com/Semidia/dsh-session-manager), but this plugin is implemented independently through public DSH slots and services.
package/README.zh-CN.md CHANGED
@@ -201,8 +201,6 @@ pnpm build
201
201
  pnpm test
202
202
  ```
203
203
 
204
- ## 文档与许可证
205
-
206
- 项目状态、技术架构和迭代记录从[文档交接入口](docs/00-交接入口/00-阅读导航.md)开始。
204
+ ## 许可证
207
205
 
208
206
  本项目采用 [Apache License 2.0](LICENSE)。会话管理工作流参考 [Semidia/dsh-session-manager](https://github.com/Semidia/dsh-session-manager),但本插件独立通过 DSH 公开插槽和服务实现。
package/dist/client.js CHANGED
@@ -3420,6 +3420,10 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
3420
3420
  //#endregion
3421
3421
  //#region src/dependencies.ts
3422
3422
  const MANAGED_DEPENDENCIES = [
3423
+ {
3424
+ id: "suite",
3425
+ packageName: "@michengai/dsh-codex-suite"
3426
+ },
3423
3427
  {
3424
3428
  id: "ui",
3425
3429
  packageName: "@michengai/dsh-codex-ui"
@@ -3780,7 +3784,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
3780
3784
  "about.feature.conversation": "保留原生消息、工具调用、输入、权限和模型选择,仅调整容器视觉",
3781
3785
  "about.feature.navigator": "当前会话提供轮次缩略导航,可快速跳转至每一次用户提问",
3782
3786
  "about.dependencies": "配套管理插件",
3783
- "about.dependenciesDescription": "可在此检查并更新本插件,以及专家、技能、归档、IM、定时任务和第三方插件市场;点击安装会从 npm 下载并写入当前 Web profile。",
3787
+ "about.dependenciesDescription": "可先安装 Codex 套件一键装齐配套插件,也可单独检查并更新专家、技能、归档、IM、定时任务和第三方插件市场。",
3784
3788
  "about.loading": "正在读取依赖安装状态…",
3785
3789
  "about.statusFailed": "暂时无法读取依赖安装状态。",
3786
3790
  "about.installed": "已安装",
@@ -3791,6 +3795,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
3791
3795
  "about.installing": "安装中",
3792
3796
  "about.installFailed": "依赖安装失败,请稍后重试。",
3793
3797
  "about.restartRequired": "依赖安装完成。请重启 DSH Web 服务以加载新插件。",
3798
+ "about.dependency.suite": "Codex 套件",
3794
3799
  "about.dependency.ui": "Codex UI",
3795
3800
  "about.dependency.experts": "专家管理",
3796
3801
  "about.dependency.skills": "技能管理",
@@ -3901,7 +3906,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
3901
3906
  "about.feature.conversation": "Keeps native messages, tool calls, composer, permissions, and model selection while refining the container visuals",
3902
3907
  "about.feature.navigator": "Navigate directly to each user prompt with the current conversation turn navigator",
3903
3908
  "about.dependencies": "Companion management plugins",
3904
- "about.dependenciesDescription": "Check and update this plugin here, along with the expert, skill, archive, IM, scheduled-task, and third-party marketplace companions. Installation downloads from npm and writes to the current Web profile.",
3909
+ "about.dependenciesDescription": "Install the Codex suite to get all companion plugins at once, or check and update the expert, skill, archive, IM, scheduled-task, and marketplace plugins individually.",
3905
3910
  "about.loading": "Loading dependency status…",
3906
3911
  "about.statusFailed": "Dependency status is temporarily unavailable.",
3907
3912
  "about.installed": "Installed",
@@ -3912,6 +3917,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
3912
3917
  "about.installing": "Installing",
3913
3918
  "about.installFailed": "Dependency installation failed. Try again later.",
3914
3919
  "about.restartRequired": "Installation is complete. Restart DSH Web to load the new plugin.",
3920
+ "about.dependency.suite": "Codex suite",
3915
3921
  "about.dependency.ui": "Codex UI",
3916
3922
  "about.dependency.experts": "Expert management",
3917
3923
  "about.dependency.skills": "Skill management",
package/dist/index.mjs CHANGED
@@ -5,6 +5,10 @@ import { resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  //#region src/dependencies.ts
7
7
  const MANAGED_DEPENDENCIES = [
8
+ {
9
+ id: "suite",
10
+ packageName: "@michengai/dsh-codex-suite"
11
+ },
8
12
  {
9
13
  id: "ui",
10
14
  packageName: "@michengai/dsh-codex-ui"
@@ -43,14 +47,6 @@ function profileDirectory() {
43
47
  if (process.env.DSH_PROFILE_DIR !== void 0) return process.env.DSH_PROFILE_DIR;
44
48
  return resolve(homedir(), ".dsh", "profiles", "web");
45
49
  }
46
- async function profileManifest() {
47
- try {
48
- return JSON.parse(await readFile(resolve(profileDirectory(), "package.json"), "utf8"));
49
- } catch (error) {
50
- if (error.code === "ENOENT") return {};
51
- throw error;
52
- }
53
- }
54
50
  async function installedPackageVersion(packageName) {
55
51
  try {
56
52
  const manifest = JSON.parse(await readFile(resolve(profileDirectory(), "node_modules", ...packageName.split("/"), "package.json"), "utf8"));
@@ -60,6 +56,10 @@ async function installedPackageVersion(packageName) {
60
56
  throw error;
61
57
  }
62
58
  }
59
+ /** 以 node_modules 实际版本为准;套件嵌套安装没有写进顶层 dependencies,也算已安装。 */
60
+ function isManagedPackageInstalled(input) {
61
+ return input.installedVersion !== void 0 && input.installedVersion !== "";
62
+ }
63
63
  /** npm latest 查询缓存有效期:避免每次打开“关于”页都打 7 个 registry 请求。 */
64
64
  const LATEST_CACHE_TTL_MS = 3e5;
65
65
  const latestCache = /* @__PURE__ */ new Map();
@@ -133,15 +133,9 @@ function newerVersion(installed, latest) {
133
133
  }
134
134
  /** 返回 Web profile 中固定管理插件的实际安装版本与 npm latest 状态。 */
135
135
  async function dependencyStatuses() {
136
- const manifest = await profileManifest();
137
136
  return Promise.all(MANAGED_DEPENDENCIES.map(async (dependency) => {
138
- if ((manifest.dependencies?.[dependency.packageName] ?? manifest.devDependencies?.[dependency.packageName]) === void 0) return {
139
- ...dependency,
140
- installed: false,
141
- updateAvailable: false
142
- };
143
137
  const version = await installedPackageVersion(dependency.packageName);
144
- if (version === void 0) return {
138
+ if (!isManagedPackageInstalled({ installedVersion: version })) return {
145
139
  ...dependency,
146
140
  installed: false,
147
141
  updateAvailable: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-ui",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "description": "以 Codex 风格重构 DSH Web 侧栏的独立客户端插件",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {