xechat-dsh 0.1.1 → 0.2.2
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/INSTALL.md +10 -1
- package/LICENSE +21 -21
- package/README.md +25 -8
- package/install.bat +61 -61
- package/lib/client.js +415 -24
- package/lib/client.js.map +1 -1
- package/lib/xechat-app.css +77 -63
- package/lib/xechat-app.js +45 -27
- package/package.json +1 -1
package/INSTALL.md
CHANGED
|
@@ -20,7 +20,16 @@ DSH(DeepSeek Harness)侧边栏聊天插件。本文分「普通用户安装
|
|
|
20
20
|
预构建包已把 Vue 应用、CSS 与插件壳全部打进去,**安装时不需要执行任何构建脚本**,
|
|
21
21
|
因此可以跳过 pnpm ≥10 的 `allowBuilds` 构建授权步骤。
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### 最快方式:npm
|
|
24
|
+
|
|
25
|
+
包里已经是预构建产物,装的时候不会跑任何构建脚本:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh plugin --profile web add xechat-dsh # Web
|
|
29
|
+
dsh plugin --profile desktop add xechat-dsh # 桌面端(Electron)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 次快方式:一键脚本
|
|
24
33
|
|
|
25
34
|
仓库根目录有三个等价脚本,按你的系统选一个。它们会**先检查环境、再安装、最后用
|
|
26
35
|
dsh 自己的解析器验证**,任何一步失败都会明确告诉你要改什么。
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 chargeduck
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 chargeduck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# xechat-dsh
|
|
2
2
|
|
|
3
|
+
[](https://dshfind.com/zh/plugins/chargeduck/xechat-dsh?ref=badge) [](https://awesome-dsh-plugin.com)
|
|
4
|
+
|
|
3
5
|
> XEChat 的 DeepSeek Harness 侧边栏客户端:可停靠的摸鱼聊天面板,写代码时鱼塘不掉线。
|
|
4
6
|
|
|
5
7
|
`xechat-dsh` 是 `xechat-web` 的 DSH 移植版。与原版不同,它不依赖任何 IDE 插件宿主,
|
|
@@ -18,7 +20,23 @@
|
|
|
18
20
|
|
|
19
21
|
## 安装
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
已发布到 npm,一条命令装好(装的是预构建产物,不会触发任何构建脚本):
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
dsh plugin --profile web add xechat-dsh
|
|
27
|
+
|
|
28
|
+
# 桌面端(Electron)把 profile 换成 desktop
|
|
29
|
+
dsh plugin --profile desktop add xechat-dsh
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
不经过 npm,也可以装仓库里打好的 tarball(`npm pack` 产物,含预构建 `lib/`):
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
# 钉版本:dsh plugin --profile desktop add xechat-dsh@0.2.1
|
|
36
|
+
dsh plugin --profile web add ./xechat-dsh-0.2.1.tgz
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
仓库根目录另有一键脚本,会校验环境并验证安装结果:
|
|
22
40
|
|
|
23
41
|
```sh
|
|
24
42
|
# macOS / Linux
|
|
@@ -28,20 +46,19 @@
|
|
|
28
46
|
install.bat
|
|
29
47
|
```
|
|
30
48
|
|
|
31
|
-
|
|
49
|
+
从源码安装(构建产物已提交进仓库,拉下来即可运行):
|
|
32
50
|
|
|
33
51
|
```sh
|
|
34
|
-
# 预构建包,跳过构建授权步骤
|
|
35
|
-
dsh plugin --profile web add https://github.com/chargeduck/xechat-dsh/releases/latest/download/xechat-dsh.tgz
|
|
36
|
-
|
|
37
|
-
# 从源码安装
|
|
38
52
|
dsh plugin --profile web add https://github.com/chargeduck/xechat-dsh
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
本地开发时链接源码目录:
|
|
39
56
|
|
|
40
|
-
|
|
57
|
+
```sh
|
|
41
58
|
dsh plugin --profile web add link:/absolute/path/to/xechat-dsh
|
|
42
59
|
```
|
|
43
60
|
|
|
44
|
-
安装后**重启 `dsh web
|
|
61
|
+
安装后**重启 `dsh web`**(桌面端重启应用)并刷新页面。侧边栏出现在视口右侧,点击活动栏第一条图标开合。
|
|
45
62
|
|
|
46
63
|
详细说明见 [INSTALL.md](./INSTALL.md)。
|
|
47
64
|
|
package/install.bat
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
chcp 65001 >nul 2>&1
|
|
3
|
-
rem ===========================================================================
|
|
4
|
-
rem xechat-dsh installer (Windows)
|
|
5
|
-
rem
|
|
6
|
-
rem This .bat is only a launcher for install.ps1 - the real logic lives in
|
|
7
|
-
rem PowerShell so that environment probing, error handling and verification
|
|
8
|
-
rem exist in exactly one place. Two implementations would drift apart and
|
|
9
|
-
rem every bug would have to be fixed twice.
|
|
10
|
-
rem
|
|
11
|
-
rem NOTE: keep this file ASCII-only. cmd.exe reads .bat in the OEM codepage
|
|
12
|
-
rem (GBK on zh-CN Windows), so UTF-8 Chinese comments get mangled into
|
|
13
|
-
rem commands and the script fails with "'xxx' is not recognized".
|
|
14
|
-
rem
|
|
15
|
-
rem Usage:
|
|
16
|
-
rem install.bat install into the web profile
|
|
17
|
-
rem install.bat -Profile desktop install into the desktop profile
|
|
18
|
-
rem install.bat -Tgz xechat-dsh-0.1.0.tgz
|
|
19
|
-
rem install.bat -DryRun check environment only
|
|
20
|
-
rem install.bat -Uninstall uninstall
|
|
21
|
-
rem ===========================================================================
|
|
22
|
-
|
|
23
|
-
setlocal EnableExtensions
|
|
24
|
-
|
|
25
|
-
set "SCRIPT_DIR=%~dp0"
|
|
26
|
-
set "PS1=%SCRIPT_DIR%install.ps1"
|
|
27
|
-
|
|
28
|
-
if not exist "%PS1%" (
|
|
29
|
-
echo [X] install.ps1 not found
|
|
30
|
-
echo It should sit next to this file: %SCRIPT_DIR%
|
|
31
|
-
exit /b 1
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
rem Prefer pwsh (PowerShell 7+), fall back to the bundled powershell (5.1)
|
|
35
|
-
set "PS_EXE="
|
|
36
|
-
where pwsh >nul 2>&1 && set "PS_EXE=pwsh"
|
|
37
|
-
if not defined PS_EXE (
|
|
38
|
-
where powershell >nul 2>&1 && set "PS_EXE=powershell"
|
|
39
|
-
)
|
|
40
|
-
if not defined PS_EXE (
|
|
41
|
-
echo [X] PowerShell not found
|
|
42
|
-
echo Windows 10/11 ships powershell.exe; install PowerShell 7 if it is really missing
|
|
43
|
-
exit /b 1
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
rem -NoProfile : avoid aliases / policies from the user profile
|
|
47
|
-
rem -ExecutionPolicy Bypass : applies to this process only, changes no system setting
|
|
48
|
-
"%PS_EXE%" -NoProfile -ExecutionPolicy Bypass -File "%PS1%" %*
|
|
49
|
-
|
|
50
|
-
set "RC=%ERRORLEVEL%"
|
|
51
|
-
if not "%RC%"=="0" (
|
|
52
|
-
echo.
|
|
53
|
-
echo Installer exited with code %RC%. See the messages above.
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
rem When launched by double-click the window would vanish instantly; wait for input
|
|
57
|
-
if "%~1"=="" (
|
|
58
|
-
echo.
|
|
59
|
-
pause
|
|
60
|
-
)
|
|
61
|
-
exit /b %RC%
|
|
1
|
+
@echo off
|
|
2
|
+
chcp 65001 >nul 2>&1
|
|
3
|
+
rem ===========================================================================
|
|
4
|
+
rem xechat-dsh installer (Windows)
|
|
5
|
+
rem
|
|
6
|
+
rem This .bat is only a launcher for install.ps1 - the real logic lives in
|
|
7
|
+
rem PowerShell so that environment probing, error handling and verification
|
|
8
|
+
rem exist in exactly one place. Two implementations would drift apart and
|
|
9
|
+
rem every bug would have to be fixed twice.
|
|
10
|
+
rem
|
|
11
|
+
rem NOTE: keep this file ASCII-only. cmd.exe reads .bat in the OEM codepage
|
|
12
|
+
rem (GBK on zh-CN Windows), so UTF-8 Chinese comments get mangled into
|
|
13
|
+
rem commands and the script fails with "'xxx' is not recognized".
|
|
14
|
+
rem
|
|
15
|
+
rem Usage:
|
|
16
|
+
rem install.bat install into the web profile
|
|
17
|
+
rem install.bat -Profile desktop install into the desktop profile
|
|
18
|
+
rem install.bat -Tgz xechat-dsh-0.1.0.tgz
|
|
19
|
+
rem install.bat -DryRun check environment only
|
|
20
|
+
rem install.bat -Uninstall uninstall
|
|
21
|
+
rem ===========================================================================
|
|
22
|
+
|
|
23
|
+
setlocal EnableExtensions
|
|
24
|
+
|
|
25
|
+
set "SCRIPT_DIR=%~dp0"
|
|
26
|
+
set "PS1=%SCRIPT_DIR%install.ps1"
|
|
27
|
+
|
|
28
|
+
if not exist "%PS1%" (
|
|
29
|
+
echo [X] install.ps1 not found
|
|
30
|
+
echo It should sit next to this file: %SCRIPT_DIR%
|
|
31
|
+
exit /b 1
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
rem Prefer pwsh (PowerShell 7+), fall back to the bundled powershell (5.1)
|
|
35
|
+
set "PS_EXE="
|
|
36
|
+
where pwsh >nul 2>&1 && set "PS_EXE=pwsh"
|
|
37
|
+
if not defined PS_EXE (
|
|
38
|
+
where powershell >nul 2>&1 && set "PS_EXE=powershell"
|
|
39
|
+
)
|
|
40
|
+
if not defined PS_EXE (
|
|
41
|
+
echo [X] PowerShell not found
|
|
42
|
+
echo Windows 10/11 ships powershell.exe; install PowerShell 7 if it is really missing
|
|
43
|
+
exit /b 1
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
rem -NoProfile : avoid aliases / policies from the user profile
|
|
47
|
+
rem -ExecutionPolicy Bypass : applies to this process only, changes no system setting
|
|
48
|
+
"%PS_EXE%" -NoProfile -ExecutionPolicy Bypass -File "%PS1%" %*
|
|
49
|
+
|
|
50
|
+
set "RC=%ERRORLEVEL%"
|
|
51
|
+
if not "%RC%"=="0" (
|
|
52
|
+
echo.
|
|
53
|
+
echo Installer exited with code %RC%. See the messages above.
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
rem When launched by double-click the window would vanish instantly; wait for input
|
|
57
|
+
if "%~1"=="" (
|
|
58
|
+
echo.
|
|
59
|
+
pause
|
|
60
|
+
)
|
|
61
|
+
exit /b %RC%
|