dsh-ide-window 0.1.0 → 0.1.1

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/AGENTS.md CHANGED
@@ -312,8 +312,8 @@ dsh plugin --profile desktop add link:~/dev/dsh-ide-window
312
312
  1. **DSH 重启后历史轮次没有改动摘要**(Host 内存态,官方卡片同样消失)——这是 DSH 自身行为,插件不做补偿。
313
313
  2. **「添加到智能体上下文」是降级实现**:复制 `@相对路径` 并提示粘贴;DSH 未开放插件的对话草稿插入 API。
314
314
  3. **分享前待办**(用户已知,尚未做):
315
- - 包名 `@local/dsh-ide-window` 建议改成唯一 scope(如 `@simons-jiang/dsh-ide-window`)
316
- - 补 `LICENSE`(package.json 已声明 MIT 但无文件)
315
+ - ~~包名改为可发布的名字~~(已改为 `dsh-ide-window` 并发布到 npm)
316
+ - ~~补 `LICENSE`~~(已补 MIT)
317
317
  - ~~加 `engines.dsh` 版本约束~~(已加,锁 `0.2.2-rc.3`)
318
318
  4. **每次改 `src/` 都要重新构建并提交 `client.js`**,否则别人装上跑的是旧代码。
319
319
  5. 插件需要 `webServer` 服务:在没有 web 服务的 profile 里会显示 `pending (waiting for service: webServer)`,属正常。
@@ -80,13 +80,33 @@ Write-Host " pnpm:$pnpmCommand $pnpmVersion"
80
80
  # ---- 1. pipeline packages ---------------------------------------------------
81
81
 
82
82
  Step "安装 LSP 管道包($lspVersion)"
83
- Push-Location $profileDir
84
- try {
85
- $all = @($pnpmArgs) + @('add') + @($packages)
86
- & $pnpmCommand @all | Out-Null
87
- if ($LASTEXITCODE -ne 0) { Fail 'pnpm add 失败,请检查网络或代理。' }
88
- } finally {
89
- Pop-Location
83
+
84
+ # Run pnpm with its output captured: the npm error code (a store mismatch, a
85
+ # blocked registry, a missing version) is the only useful clue, and it was being
86
+ # swallowed before.
87
+ function Install-Packages([string[]]$Arguments) {
88
+ Push-Location $profileDir
89
+ try {
90
+ $all = @($pnpmArgs) + $Arguments
91
+ $output = & $pnpmCommand @all 2>&1
92
+ $code = $LASTEXITCODE
93
+ return [pscustomobject]@{ Code = $code; Output = ($output | Out-String).Trim() }
94
+ } finally {
95
+ Pop-Location
96
+ }
97
+ }
98
+
99
+ $attempt = Install-Packages (@('add') + @($packages))
100
+ if ($attempt.Code -ne 0) {
101
+ Write-Host ' 第一次安装失败,pnpm 输出如下:' -ForegroundColor Yellow
102
+ Write-Host $attempt.Output
103
+ Write-Host ' 改用 npmmirror 镜像重试…' -ForegroundColor Yellow
104
+ $attempt = Install-Packages (@('add', '--registry', 'https://registry.npmmirror.com') + @($packages))
105
+ }
106
+ if ($attempt.Code -ne 0) {
107
+ Write-Host ' 镜像也失败,pnpm 输出如下:' -ForegroundColor Red
108
+ Write-Host $attempt.Output
109
+ Fail "pnpm add 失败(exit $($attempt.Code)):看上面的 npm 错误码。ERR_PNPM_UNEXPECTED_STORE 表示 pnpm 的 store 版本和 profile 里的不一致;EAI_AGAIN/ETIMEDOUT/ECONNREFUSED 是网络或代理。"
90
110
  }
91
111
  Write-Host ' 已安装:@deepseek-ai/dsh-lsp、dsh-lsp-stdio'
92
112
 
package/install.ps1 CHANGED
@@ -86,11 +86,16 @@ function Invoke-Pnpm([string[]]$Arguments, [string]$WorkDir) {
86
86
  Push-Location $WorkDir
87
87
  try {
88
88
  $all = @($pnpmArgs) + @($Arguments)
89
- & $pnpmCommand @all
90
- if ($LASTEXITCODE -ne 0) { throw "pnpm 执行失败(exit $LASTEXITCODE)" }
89
+ $output = & $pnpmCommand @all 2>&1
90
+ $code = $LASTEXITCODE
91
91
  } finally {
92
92
  Pop-Location
93
93
  }
94
+ if ($code -ne 0) {
95
+ Write-Host ' pnpm 输出:' -ForegroundColor Yellow
96
+ Write-Host ($output | Out-String).Trim()
97
+ throw "pnpm 执行失败(exit $code)"
98
+ }
94
99
  }
95
100
 
96
101
  # ---- 2. checkout ------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ide-window",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "IDEA-style code workspace for DeepSeek Harness: a centre panel with a workspace file tree, editor tabs and live-updating source, while the left navigation column hides.",
5
5
  "type": "module",
6
6
  "icon": "icon.svg",