@funniki/dsh-session-toolkit 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +51 -3
- package/cordis.patch.yml +26 -0
- package/icon.svg +11 -0
- package/install.ps1 +123 -0
- package/lib/index.js +13 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +40 -3
- package//345/256/211/350/243/205/350/257/264/346/230/216.md +100 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 funniki
|
|
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,3 +1,51 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# 会话功能增强 · dsh-session-toolkit 0.1.0
|
|
2
|
+
|
|
3
|
+
给 DeepSeek Harness 增加五个会话与输入功能。插件列表中显示一个「会话功能增强」条目,五个组件保留各自的名称、图标和开关。
|
|
4
|
+
|
|
5
|
+
主包和五个组件均为 **0.1.0**,不附带 `@deepseek-ai/*`、`zod` 等第三方运行时依赖。宿主端使用 Node 内置模块,浏览器端使用 DSH 提供的 React。
|
|
6
|
+
|
|
7
|
+
| 组件 | 用途 |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `@funniki/dsh-session-toolkit-archived-session-delete` | 永久删除已归档会话及其日志 |
|
|
10
|
+
| `@funniki/dsh-session-toolkit-session-move` | 跨工作区移动会话,支持备份、校验、失败回滚及空闲会话热迁移 |
|
|
11
|
+
| `@funniki/dsh-session-toolkit-unsent-content-guard` | 备份未发送的文字与图片 |
|
|
12
|
+
| `@funniki/dsh-session-toolkit-session-history-search` | 按关键词搜索历史消息,支持中文 |
|
|
13
|
+
| `@funniki/dsh-session-toolkit-auto-paste` | 将长文本保存为工作区中的 Markdown 或文本附件,并在输入框显示引用卡片 |
|
|
14
|
+
|
|
15
|
+
## 安装
|
|
16
|
+
|
|
17
|
+
**必须把主包和五个组件都安装到同一个 DSH profile。** 只添加外层目录不会自动安装五个组件,会出现「未运行」或 `Cannot find package`。
|
|
18
|
+
|
|
19
|
+
1. 从 [GitHub Releases](https://github.com/Funniki/dsh-session-toolkit/releases) 下载 `dsh-session-toolkit-0.1.0.zip`。
|
|
20
|
+
2. 解压到固定目录,进入包含本说明、`package.json` 和 `install.ps1` 的那一层。
|
|
21
|
+
3. Windows 下运行:
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
powershell -ExecutionPolicy Bypass -File .\install.ps1
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
安装到其他 profile 时可加 `-Profile <名称>`。脚本会依次安装主包和五个组件。
|
|
28
|
+
4. 重启 DSH,或在插件页关闭再启用「会话功能增强」,然后确认五个组件均已运行。
|
|
29
|
+
|
|
30
|
+
本地安装采用目录链接,安装后请保留解压目录的位置和内容。手动安装及排查步骤见同目录的 [安装说明](安装说明.md)。
|
|
31
|
+
|
|
32
|
+
本版本通过 GitHub Release 的 ZIP 分发;npm 渠道另行发布。GitHub 自动生成的 Source code 压缩包是源码,不等同于安装包。
|
|
33
|
+
|
|
34
|
+
## 配置
|
|
35
|
+
|
|
36
|
+
长文本转换默认阈值为 500 字符,单次大小上限为 1 MiB。可以在「设置 → 通用 → 大段粘贴阈值」中修改阈值;用户设置保存在 `$DSH_HOME/auto-paste/user-config.json`。部署默认值由 `cordis.patch.yml` 中的 `minChars`、`maxBytes` 控制。
|
|
37
|
+
|
|
38
|
+
零依赖实现不再提供原先依赖 schemastery 的自动生成配置表单。
|
|
39
|
+
|
|
40
|
+
## 兼容性与使用边界
|
|
41
|
+
|
|
42
|
+
- 已验证环境为 DSH `0.2.1-rc.5`、V4 会话日志格式。其他版本需要另行验证。
|
|
43
|
+
- 会话运行中请等待当前轮次结束后再移动;空闲的已打开会话支持热迁移,无法直接迁移时可能需要重启后处理。
|
|
44
|
+
- 删除已归档会话不可恢复。
|
|
45
|
+
- 卸载插件不会自动删除迁移备份、未发送内容备份或工作区中的 `pastes/` 文件。
|
|
46
|
+
|
|
47
|
+
## 开发与许可证
|
|
48
|
+
|
|
49
|
+
源码、构建方式和验证脚本见 [GitHub 仓库](https://github.com/Funniki/dsh-session-toolkit)。组件源码在仓库的 `components/` 中,发布时由构建脚本同步到本目录的 `node_modules/`。
|
|
50
|
+
|
|
51
|
+
MIT,见 [LICENSE](LICENSE)。auto-paste 保留上游许可证和第三方声明,随组件一起分发。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Bundle patch: one plugin pack with five components.
|
|
2
|
+
#
|
|
3
|
+
# Each row names one PUBLISHED component package, so every component keeps its
|
|
4
|
+
# own display metadata (title, description, icon) and its own browser half.
|
|
5
|
+
# The names are scoped on purpose: a bundle row resolves from the profile root,
|
|
6
|
+
# and a bare `dsh-auto-paste` would collide with the upstream plugin of that
|
|
7
|
+
# name. The five component packages are installed as profile dependencies of
|
|
8
|
+
# this pack (install.ps1 does it); they are not separate bundles.
|
|
9
|
+
- insert:
|
|
10
|
+
- id: archived-session-delete
|
|
11
|
+
name: '@funniki/dsh-session-toolkit-archived-session-delete'
|
|
12
|
+
config: {}
|
|
13
|
+
- id: session-move
|
|
14
|
+
name: '@funniki/dsh-session-toolkit-session-move'
|
|
15
|
+
config: {}
|
|
16
|
+
- id: unsent-content-guard
|
|
17
|
+
name: '@funniki/dsh-session-toolkit-unsent-content-guard'
|
|
18
|
+
config: {}
|
|
19
|
+
- id: session-history-search
|
|
20
|
+
name: '@funniki/dsh-session-toolkit-session-history-search'
|
|
21
|
+
config: {}
|
|
22
|
+
- id: auto-paste
|
|
23
|
+
name: '@funniki/dsh-session-toolkit-auto-paste'
|
|
24
|
+
config:
|
|
25
|
+
minChars: 500
|
|
26
|
+
maxBytes: 1048576
|
package/icon.svg
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="2.5" y="2.5" width="31" height="31" rx="9" fill="url(#session-enhancements-bg)" />
|
|
3
|
+
<path d="M17.5 8 L19.76 15.24 L27 17.5 L19.76 19.76 L17.5 27 L15.24 19.76 L8 17.5 L15.24 15.24 Z" fill="#FFFFFF" />
|
|
4
|
+
<path d="M26.5 21.3 L27.49 24.51 L30.7 25.5 L27.49 26.49 L26.5 29.7 L25.51 26.49 L22.3 25.5 L25.51 24.51 Z" fill="#FFFFFF" fill-opacity="0.92" />
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="session-enhancements-bg" x1="2.5" y1="2.5" x2="33.5" y2="33.5" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="#74B3FF" />
|
|
8
|
+
<stop offset="1" stop-color="#5560F2" />
|
|
9
|
+
</linearGradient>
|
|
10
|
+
</defs>
|
|
11
|
+
</svg>
|
package/install.ps1
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
[CmdletBinding()]
|
|
2
|
+
param(
|
|
3
|
+
[string]$Profile = "desktop",
|
|
4
|
+
[switch]$SkipChecks
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
# Installs the pack into one DSH profile, one command, both channels.
|
|
8
|
+
#
|
|
9
|
+
# Since 0.1.1 the pack declares the five components as its own dependencies, and
|
|
10
|
+
# DSH profiles install with `nodeLinker: hoisted` — so the components land at the
|
|
11
|
+
# profile ROOT, which is exactly where a bundle row resolves its `name`. That is
|
|
12
|
+
# why installing the pack alone is enough now (0.1.0 needed six separate adds).
|
|
13
|
+
#
|
|
14
|
+
# This script therefore:
|
|
15
|
+
# 1. installs the pack (from this folder when it is the extracted zip, from the
|
|
16
|
+
# registry when it came out of npm);
|
|
17
|
+
# 2. checks that all five rows are resolvable from the profile root;
|
|
18
|
+
# 3. only if one is not (a profile switched to the isolated linker), installs
|
|
19
|
+
# that component explicitly as a fallback.
|
|
20
|
+
|
|
21
|
+
$ErrorActionPreference = "Stop"
|
|
22
|
+
|
|
23
|
+
$pluginRoot = $PSScriptRoot
|
|
24
|
+
$packName = "@funniki/dsh-session-toolkit"
|
|
25
|
+
$components = @(
|
|
26
|
+
"@funniki/dsh-session-toolkit-archived-session-delete",
|
|
27
|
+
"@funniki/dsh-session-toolkit-session-move",
|
|
28
|
+
"@funniki/dsh-session-toolkit-unsent-content-guard",
|
|
29
|
+
"@funniki/dsh-session-toolkit-session-history-search",
|
|
30
|
+
"@funniki/dsh-session-toolkit-auto-paste"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
$dsh = @(
|
|
34
|
+
(Join-Path $env:LOCALAPPDATA "Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd"),
|
|
35
|
+
(Join-Path $env:ProgramFiles "DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd")
|
|
36
|
+
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
|
37
|
+
|
|
38
|
+
if (-not $dsh) {
|
|
39
|
+
$command = Get-Command dsh -ErrorAction SilentlyContinue
|
|
40
|
+
if ($command) {
|
|
41
|
+
$dsh = $command.Source
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (-not $dsh) {
|
|
45
|
+
throw "DeepSeek Harness CLI was not found. Install DSH or put dsh on PATH."
|
|
46
|
+
}
|
|
47
|
+
if (-not (Test-Path -LiteralPath (Join-Path $pluginRoot "package.json"))) {
|
|
48
|
+
throw "package.json is missing next to install.ps1."
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function Add-ProfilePackage {
|
|
52
|
+
param([Parameter(Mandatory)][string]$Target)
|
|
53
|
+
Write-Host "Adding $Target"
|
|
54
|
+
& $dsh plugin --profile $Profile add $Target
|
|
55
|
+
if ($LASTEXITCODE -ne 0) {
|
|
56
|
+
throw "dsh plugin add failed for $Target (exit $LASTEXITCODE)."
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# 1. The pack: this folder when it is the extracted zip, the registry otherwise.
|
|
61
|
+
$thisPackage = Get-Content -LiteralPath (Join-Path $pluginRoot "package.json") -Raw | ConvertFrom-Json
|
|
62
|
+
if ($thisPackage.name -eq $packName) {
|
|
63
|
+
Add-ProfilePackage -Target $pluginRoot
|
|
64
|
+
} else {
|
|
65
|
+
Add-ProfilePackage -Target $packName
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
$dshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $HOME ".dsh" }
|
|
69
|
+
$profileDir = Join-Path (Join-Path $dshHome "profiles") $Profile
|
|
70
|
+
$nodeModules = Join-Path $profileDir "node_modules"
|
|
71
|
+
|
|
72
|
+
# 2. Do all five rows resolve from the profile root? (That is where the loader looks.)
|
|
73
|
+
$missing = @()
|
|
74
|
+
foreach ($component in $components) {
|
|
75
|
+
if (-not (Test-Path -LiteralPath (Join-Path $nodeModules $component))) {
|
|
76
|
+
$missing += $component
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# 3. Fallback for a profile that is not hoisted: install each missing component.
|
|
81
|
+
if ($missing.Count -gt 0) {
|
|
82
|
+
Write-Host ""
|
|
83
|
+
Write-Host "These components did not arrive with the pack (profile is not using the hoisted linker):"
|
|
84
|
+
foreach ($component in $missing) { Write-Host " $component" }
|
|
85
|
+
foreach ($component in $missing) {
|
|
86
|
+
$bundled = Join-Path $pluginRoot "node_modules/$component"
|
|
87
|
+
if (Test-Path -LiteralPath (Join-Path $bundled "package.json")) {
|
|
88
|
+
Add-ProfilePackage -Target $bundled
|
|
89
|
+
} else {
|
|
90
|
+
Add-ProfilePackage -Target $component
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if ($SkipChecks) {
|
|
96
|
+
Write-Host ""
|
|
97
|
+
Write-Host "Installed $packName into profile '$Profile' (post-install checks skipped)."
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
$profileManifestPath = Join-Path $profileDir "package.json"
|
|
102
|
+
if (-not (Test-Path -LiteralPath $profileManifestPath)) {
|
|
103
|
+
throw "Profile manifest not found: $profileManifestPath"
|
|
104
|
+
}
|
|
105
|
+
$manifest = Get-Content -LiteralPath $profileManifestPath -Raw | ConvertFrom-Json
|
|
106
|
+
if (-not (($manifest.dsh.profile.bundles) -contains $packName)) {
|
|
107
|
+
throw "Profile did not register $packName as a bundle."
|
|
108
|
+
}
|
|
109
|
+
foreach ($component in $components) {
|
|
110
|
+
if (-not (Test-Path -LiteralPath (Join-Path $nodeModules $component))) {
|
|
111
|
+
throw "Component is still not resolvable from the profile root: $component"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
# The whole point of 0.1.x: no Harness core copy inside the profile.
|
|
116
|
+
$duplicateCore = Join-Path $nodeModules "@deepseek-ai\dsh-tools"
|
|
117
|
+
if (Test-Path -LiteralPath $duplicateCore) {
|
|
118
|
+
throw "Duplicate core package detected: $duplicateCore. Remove it before starting DSH."
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
Write-Host ""
|
|
122
|
+
Write-Host "Installed $packName and its five components into profile '$Profile'."
|
|
123
|
+
Write-Host "Restart DSH, or disable and re-enable the bundle in Plugins if it is already running."
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Session Enhancements pack.
|
|
3
|
+
*
|
|
4
|
+
* This package is a bundle (pack) only: its `cordis.patch.yml` inserts the
|
|
5
|
+
* three component rows, each naming one original plugin package. The pack has
|
|
6
|
+
* no plugin row of its own, so this module exists only to keep the package a
|
|
7
|
+
* valid module entry; adding another component is a matter of appending one
|
|
8
|
+
* `- id/name` row to `cordis.patch.yml` and installing that component package
|
|
9
|
+
* into the profile (see README).
|
|
10
|
+
*
|
|
11
|
+
* @module dsh-session-toolkit
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funniki/dsh-session-toolkit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Handier Session management: delete archived Sessions, move a Session to another Workspace, back up unsent composer text and images, and search past messages by keyword (Chinese supported).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "funniki",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/funniki/dsh-session-toolkit.git"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "lib/index.js",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./lib/index.js",
|
|
15
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
16
|
+
"./locale/*.json": "./locale/*.json",
|
|
17
|
+
"./icon": "./icon.svg",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib/index.js",
|
|
22
|
+
"cordis.patch.yml",
|
|
23
|
+
"install.ps1",
|
|
24
|
+
"locale/*.json",
|
|
25
|
+
"icon.svg",
|
|
26
|
+
"安装说明.md"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@funniki/dsh-session-toolkit-archived-session-delete": "^0.1.1",
|
|
33
|
+
"@funniki/dsh-session-toolkit-auto-paste": "^0.1.1",
|
|
34
|
+
"@funniki/dsh-session-toolkit-session-history-search": "^0.1.1",
|
|
35
|
+
"@funniki/dsh-session-toolkit-session-move": "^0.1.1",
|
|
36
|
+
"@funniki/dsh-session-toolkit-unsent-content-guard": "^0.1.1"
|
|
37
|
+
},
|
|
38
|
+
"dsh": {
|
|
39
|
+
"bundle": {
|
|
40
|
+
"patch": "./cordis.patch.yml"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
6
43
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# 会话功能增强(dsh-session-toolkit)安装说明
|
|
2
|
+
|
|
3
|
+
这是一个 **DSH 插件包**:插件列表里出现一个「会话功能增强」条目,里面包含五个组件,
|
|
4
|
+
每个组件保留自己的名称、图标和独立开关。
|
|
5
|
+
|
|
6
|
+
当前版本 `0.1.0`,npm 上为 `@funniki/dsh-session-toolkit` 及五个
|
|
7
|
+
`@funniki/dsh-session-toolkit-*` 组件包。
|
|
8
|
+
|
|
9
|
+
## 重要:不要只安装外层
|
|
10
|
+
|
|
11
|
+
DSH 按 **profile 根目录** 解析 bundle 里的组件包名,不会读取外层包自己的
|
|
12
|
+
`node_modules`。所以只安装 `@funniki/dsh-session-toolkit` 会让五个组件显示“未运行”,并报:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
ERR_MODULE_NOT_FOUND: Cannot find package '@funniki/dsh-session-toolkit-archived-session-delete'
|
|
16
|
+
imported from C:\Users\<你>\.dsh\profiles\desktop\
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
从 `0.1.1` 起,pack 把这五个组件声明成了自己的 `dependencies`,而 DSH 的 profile 用
|
|
20
|
+
`nodeLinker: hoisted`,组件会被平铺到 profile 根目录 —— 也就是行解析包名的位置。
|
|
21
|
+
所以插件页只填 `@funniki/dsh-session-toolkit` 就够了,安装脚本也会先尝试这一条。
|
|
22
|
+
|
|
23
|
+
> ⚠️ 不要用仓库目录直接安装:本地安装会记成 `link:`,插件页「卸载」会连带清空链接目标里的文件。
|
|
24
|
+
> 仓库只用于开发和构建;安装请走 npm,或把 zip 解压到独立目录再装。
|
|
25
|
+
|
|
26
|
+
## 系统要求
|
|
27
|
+
|
|
28
|
+
- DeepSeek Harness 桌面端,版本 `>= 0.2.0`(0.2.1-rc.5 已验证)
|
|
29
|
+
- Windows PowerShell 5.1 或更高(`install.ps1`)
|
|
30
|
+
- 无需 Node、无需构建;五个组件已随包内 `node_modules/@funniki/` 带好,
|
|
31
|
+
组件自身零第三方依赖,包内不再有 `@deepseek-ai/*` 依赖树
|
|
32
|
+
|
|
33
|
+
## 推荐安装(zip 渠道)
|
|
34
|
+
|
|
35
|
+
1. 把压缩包解压到固定目录,例如:
|
|
36
|
+
`C:\Users\<你>\dsh-plugins\dsh-session-toolkit-0.1.0`
|
|
37
|
+
> DSH 以链接方式安装本地目录;安装后不要移动或删除这个目录。
|
|
38
|
+
2. 在解压目录运行:
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
powershell -ExecutionPolicy Bypass -File .\install.ps1
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
3. 重启 DSH,或在插件页先把「会话功能增强」关闭再打开。
|
|
45
|
+
4. 打开「插件 → 会话功能增强」,确认:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
共 5 个 · 5 运行中
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 安装(npm 渠道)
|
|
52
|
+
|
|
53
|
+
不改用 zip 时,这个脚本也能直接装:包里没有本地组件副本,它会自动从 registry 装。
|
|
54
|
+
0.1.1 起一条命令就够(组件是 pack 的依赖):
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
& "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add @funniki/dsh-session-toolkit
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
下面逐条版本等价,作为兜底(例如 profile 不是 hoisted 布局时):
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
$dsh = "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd"
|
|
64
|
+
|
|
65
|
+
& $dsh plugin --profile desktop add @funniki/dsh-session-toolkit
|
|
66
|
+
foreach ($name in @(
|
|
67
|
+
"@funniki/dsh-session-toolkit-archived-session-delete",
|
|
68
|
+
"@funniki/dsh-session-toolkit-session-move",
|
|
69
|
+
"@funniki/dsh-session-toolkit-unsent-content-guard",
|
|
70
|
+
"@funniki/dsh-session-toolkit-session-history-search",
|
|
71
|
+
"@funniki/dsh-session-toolkit-auto-paste"
|
|
72
|
+
)) {
|
|
73
|
+
& $dsh plugin --profile desktop add $name
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 装完检查
|
|
78
|
+
|
|
79
|
+
安装脚本在结束前会自动核对:bundle 已注册、6 个依赖已记录、profile 里没有重复的核心包。
|
|
80
|
+
想再手动确认一遍:
|
|
81
|
+
|
|
82
|
+
```powershell
|
|
83
|
+
$profileDir = Join-Path $HOME ".dsh\profiles\desktop"
|
|
84
|
+
Test-Path (Join-Path $profileDir "node_modules\@deepseek-ai\dsh-tools") # 应为 False
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 使用入口
|
|
88
|
+
|
|
89
|
+
- 已归档会话行悬停 → 红色删除按钮;会话菜单 →「删除已归档会话」
|
|
90
|
+
- 会话「...」菜单 →「移动到工作区…」(需要至少两个工作区)
|
|
91
|
+
- 输入框下方 →「未发送备份」胶囊
|
|
92
|
+
- 输入框「搜索历史」或 `Ctrl+Shift+K`
|
|
93
|
+
- 粘贴超过阈值的长文本 → 自动保存到工作区 `pastes/`,输入框留一张带预览的卡片
|
|
94
|
+
|
|
95
|
+
## 数据位置
|
|
96
|
+
|
|
97
|
+
- 删除/移动会话:`%USERPROFILE%\.dsh\session-workspace-move\`
|
|
98
|
+
- 未发送内容备份:`%USERPROFILE%\.dsh\unsent-content\`
|
|
99
|
+
- 长文粘贴阈值:`%USERPROFILE%\.dsh\auto-paste\user-config.json`
|
|
100
|
+
- 卸载插件不会自动删除这些数据。
|