dsh-windows-tray 1.0.0 → 1.0.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/README.md +9 -1
- package/docs/system-tray-guide.md +1 -1
- package/install.ps1 +9 -2
- package/launcher/dsh-lib.ps1 +1 -1
- package/package.json +36 -36
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ dsh 默认在终端前台运行 `dsh web`——必须留着一个命令行窗口
|
|
|
52
52
|
|
|
53
53
|
## 快速开始
|
|
54
54
|
|
|
55
|
-
前置:Windows 10/11 + [PowerShell 7](https://github.com/PowerShell/PowerShell/releases)
|
|
55
|
+
前置:Windows 10/11 + [PowerShell 7](https://github.com/PowerShell/PowerShell/releases)(7.x;缺失时自动回退 Windows PowerShell 5.1)+ Node.js **≥ 18** + 已安装 dsh(任意位置)。
|
|
56
56
|
|
|
57
57
|
```powershell
|
|
58
58
|
# 1. 全局安装
|
|
@@ -93,6 +93,14 @@ dsh-tray # 重启托盘(或右键「退出托盘」后重
|
|
|
93
93
|
|
|
94
94
|
> 部署目录固定为 `~\.dsh\launcher`,重装/更新都会覆盖旧文件,不会残留;`dsh-tray info` 可查看当前版本与部署状态。
|
|
95
95
|
|
|
96
|
+
## 卸载
|
|
97
|
+
|
|
98
|
+
```powershell
|
|
99
|
+
npm rm -g dsh-windows-tray # ① 移除 npm 包本体
|
|
100
|
+
# ② 删除快捷方式: 启动文件夹 + 桌面 各一个「DSH 系统托盘.lnk」
|
|
101
|
+
# ③ 删除部署目录 ~\.dsh\launcher (如与 dsh 控制台共用, 确认无需保留再删)
|
|
102
|
+
```
|
|
103
|
+
|
|
96
104
|
## 工作原理
|
|
97
105
|
|
|
98
106
|
```
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## 一、安装与部署
|
|
9
9
|
|
|
10
|
-
前置:Windows 10/11 + [PowerShell 7](https://github.com/PowerShell/PowerShell/releases)
|
|
10
|
+
前置:Windows 10/11 + [PowerShell 7](https://github.com/PowerShell/PowerShell/releases)(7.x;缺失时自动回退 Windows PowerShell 5.1)+ Node.js **≥ 18** + 已安装 dsh(任意位置)。
|
|
11
11
|
|
|
12
12
|
```powershell
|
|
13
13
|
# 1. 全局安装
|
package/install.ps1
CHANGED
|
@@ -40,7 +40,10 @@ if (-not $PwshPath) {
|
|
|
40
40
|
elseif (Test-Path 'D:\Program Files (x86)\PowerShell-7.6.4\pwsh.exe') { $PwshPath = 'D:\Program Files (x86)\PowerShell-7.6.4\pwsh.exe' }
|
|
41
41
|
}
|
|
42
42
|
if (-not $PwshPath -or -not (Test-Path $PwshPath)) { throw "未找到 pwsh (PowerShell 7)。请用 -PwshPath 指定。" }
|
|
43
|
-
|
|
43
|
+
# 版本校验: 托盘常驻进程依赖 PowerShell 7.x (5.1 只能降级运行)
|
|
44
|
+
$pwshVer = & $PwshPath -NoProfile -Command '$PSVersionTable.PSVersion.ToString()' 2>$null
|
|
45
|
+
if ($pwshVer -notmatch '^7\.') { throw "pwsh 必须是 PowerShell 7.x (检测到: $pwshVer)。请安装 PowerShell 7 或用 -PwshPath 指定。" }
|
|
46
|
+
Write-Host "[2/5] pwsh: $PwshPath (v$pwshVer)" -ForegroundColor Green
|
|
44
47
|
|
|
45
48
|
# 3) 探测 node
|
|
46
49
|
if (-not $NodePath) {
|
|
@@ -49,7 +52,11 @@ if (-not $NodePath) {
|
|
|
49
52
|
elseif (Test-Path 'C:\Program Files\nodejs\node.exe') { $NodePath = 'C:\Program Files\nodejs\node.exe' }
|
|
50
53
|
}
|
|
51
54
|
if (-not $NodePath -or -not (Test-Path $NodePath)) { throw "未找到 node.exe。请用 -NodePath 指定。" }
|
|
52
|
-
|
|
55
|
+
# 版本校验: 需要 ≥ 18 (dsh 本体运行要求)
|
|
56
|
+
$nodeVer = & $NodePath -v 2>$null
|
|
57
|
+
if ($nodeVer -notmatch '^v(\d+)\.') { throw "无法识别 node 版本 (检测到: $nodeVer)。请用 -NodePath 指定有效 node.exe。" }
|
|
58
|
+
if ([int]$Matches[1] -lt 18) { throw "node 必须 ≥ 18 (检测到: $nodeVer)。请升级 Node.js 或用 -NodePath 指定。" }
|
|
59
|
+
Write-Host "[3/5] node: $NodePath (v$($Matches[1]))" -ForegroundColor Green
|
|
53
60
|
|
|
54
61
|
# 4) 安装到 ~\.dsh\launcher
|
|
55
62
|
New-Item -ItemType Directory -Force -Path $dst | Out-Null
|
package/launcher/dsh-lib.ps1
CHANGED
|
@@ -12,7 +12,7 @@ $URL = "http://127.0.0.1:$PORT"
|
|
|
12
12
|
$LOG_DIR = "$env:USERPROFILE\.dsh\logs"
|
|
13
13
|
$WT = "$env:LOCALAPPDATA\Microsoft\WindowsApps\wt.exe"
|
|
14
14
|
$PWSH = 'D:\Program Files (x86)\PowerShell-7.6.4\pwsh.exe'
|
|
15
|
-
$TRAY_VERSION = '1.0.
|
|
15
|
+
$TRAY_VERSION = '1.0.1' # 托盘版本 (与 npm 包版本同步, 用于日志/排查)
|
|
16
16
|
$TRAY_PKG = 'dsh-windows-tray' # npm 包名 (托盘自更新)
|
|
17
17
|
$TRAY_SCRIPT = Join-Path $PSScriptRoot 'dsh-tray.ps1'
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-windows-tray",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "DSH (DeepSeek Harness) Windows 系统托盘: 蓝/灰鲸鱼状态图标 + Web/TUI 一键启停控制。纯 PowerShell + WinForms, 零依赖。",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "jankin_lv",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"dsh",
|
|
9
|
-
"deepseek",
|
|
10
|
-
"harness",
|
|
11
|
-
"tray",
|
|
12
|
-
"notifyicon",
|
|
13
|
-
"windows",
|
|
14
|
-
"powershell",
|
|
15
|
-
"system-tray"
|
|
16
|
-
],
|
|
17
|
-
"os": [
|
|
18
|
-
"win32"
|
|
19
|
-
],
|
|
20
|
-
"engines": {
|
|
21
|
-
"node": ">=18"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"launcher/",
|
|
25
|
-
"build/",
|
|
26
|
-
"docs/",
|
|
27
|
-
"bin/",
|
|
28
|
-
"install.ps1",
|
|
29
|
-
"README.md",
|
|
30
|
-
"LICENSE"
|
|
31
|
-
],
|
|
32
|
-
"bin": {
|
|
33
|
-
"dsh-tray": "bin/dsh-tray.js"
|
|
34
|
-
},
|
|
35
|
-
"private": false
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-windows-tray",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "DSH (DeepSeek Harness) Windows 系统托盘: 蓝/灰鲸鱼状态图标 + Web/TUI 一键启停控制。纯 PowerShell + WinForms, 零依赖。",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "jankin_lv",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"dsh",
|
|
9
|
+
"deepseek",
|
|
10
|
+
"harness",
|
|
11
|
+
"tray",
|
|
12
|
+
"notifyicon",
|
|
13
|
+
"windows",
|
|
14
|
+
"powershell",
|
|
15
|
+
"system-tray"
|
|
16
|
+
],
|
|
17
|
+
"os": [
|
|
18
|
+
"win32"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"launcher/",
|
|
25
|
+
"build/",
|
|
26
|
+
"docs/",
|
|
27
|
+
"bin/",
|
|
28
|
+
"install.ps1",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"bin": {
|
|
33
|
+
"dsh-tray": "bin/dsh-tray.js"
|
|
34
|
+
},
|
|
35
|
+
"private": false
|
|
36
|
+
}
|