@michengai/dsh-codex-ui 0.2.65 → 0.2.66

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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -83,7 +83,7 @@ function resolveDshPluginTarget(installing, _declared = []) {
83
83
  function isOfficialRuntimePackage(packageName) {
84
84
  return packageName === "@deepseek-ai/dsh" || packageName.startsWith("@deepseek-ai/dsh-");
85
85
  }
86
- /** 从全局 npm 安装的 dsh CLI 入口反推出包根目录;源码启动不匹配该目录结构。 */
86
+ /** 从全局 npm 安装的 dsh CLI 入口反推出包含 node_modules 的运行时目录;源码启动不匹配该目录结构。 */
87
87
  function resolveDshRuntimeRoot(entry = process.argv[1], cwd = process.cwd()) {
88
88
  if (entry === void 0 || entry === "") return void 0;
89
89
  const cliEntry = resolveDshCliEntry(entry, cwd);
@@ -95,7 +95,9 @@ function resolveDshRuntimeRoot(entry = process.argv[1], cwd = process.cwd()) {
95
95
  const index = cliEntry.toLowerCase().lastIndexOf(marker.toLowerCase());
96
96
  if (index === -1) return void 0;
97
97
  const end = index + marker.length;
98
- return end === cliEntry.length || cliEntry[end] === sep ? cliEntry.slice(0, end) : void 0;
98
+ if (end !== cliEntry.length && cliEntry[end] !== sep) return void 0;
99
+ const root = cliEntry.slice(0, index);
100
+ return root.endsWith(sep) ? root.slice(0, -1) : root;
99
101
  }
100
102
  function packageLookupRoots(packageName) {
101
103
  if (!isOfficialRuntimePackage(packageName)) return [profileDirectory()];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-ui",
3
- "version": "0.2.65",
3
+ "version": "0.2.66",
4
4
  "description": "以 Codex 风格重构 DSH Web 侧栏的独立客户端插件",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {