@funniki/dsh-session-toolkit 0.1.0 → 0.1.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/LICENSE CHANGED
@@ -1,21 +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.
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,51 +1,51 @@
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 保留上游许可证和第三方声明,随组件一起分发。
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 CHANGED
@@ -1,26 +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
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 CHANGED
@@ -1,11 +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>
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 CHANGED
@@ -4,17 +4,19 @@ param(
4
4
  [switch]$SkipChecks
5
5
  )
6
6
 
7
- # Installs dsh-session-toolkit and its five components into one DSH profile.
7
+ # Installs the pack into one DSH profile, one command, both channels.
8
8
  #
9
- # Works for BOTH distribution channels from the same script:
10
- # * extracted zip — the five components sit in ./node_modules/ and are
11
- # installed from there (link:, keep this folder in place);
12
- # * npm package — no bundled copies are present, so the published
13
- # @funniki/dsh-session-toolkit-* names are installed from
14
- # the registry instead.
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).
15
13
  #
16
- # Six installs are required either way: a bundle row resolves its `name` from the
17
- # PROFILE root, so the pack alone leaves all five rows unable to import.
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.
18
20
 
19
21
  $ErrorActionPreference = "Stop"
20
22
 
@@ -42,7 +44,6 @@ if (-not $dsh) {
42
44
  if (-not $dsh) {
43
45
  throw "DeepSeek Harness CLI was not found. Install DSH or put dsh on PATH."
44
46
  }
45
-
46
47
  if (-not (Test-Path -LiteralPath (Join-Path $pluginRoot "package.json"))) {
47
48
  throw "package.json is missing next to install.ps1."
48
49
  }
@@ -56,58 +57,67 @@ function Add-ProfilePackage {
56
57
  }
57
58
  }
58
59
 
59
- # The pack itself: this folder when it is a local package, the registry otherwise.
60
- if ((Get-Content -LiteralPath (Join-Path $pluginRoot "package.json") -Raw | ConvertFrom-Json).name -eq $packName) {
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) {
61
63
  Add-ProfilePackage -Target $pluginRoot
62
64
  } else {
63
65
  Add-ProfilePackage -Target $packName
64
66
  }
65
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 = @()
66
74
  foreach ($component in $components) {
67
- $bundled = Join-Path $pluginRoot "node_modules/$component"
68
- if (Test-Path -LiteralPath (Join-Path $bundled "package.json")) {
69
- Add-ProfilePackage -Target $bundled
70
- } else {
71
- Add-ProfilePackage -Target $component
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
+ }
72
92
  }
73
93
  }
74
94
 
75
95
  if ($SkipChecks) {
76
96
  Write-Host ""
77
- Write-Host "Installed into profile '$Profile' (post-install checks skipped)."
97
+ Write-Host "Installed $packName into profile '$Profile' (post-install checks skipped)."
78
98
  return
79
99
  }
80
100
 
81
- $dshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $HOME ".dsh" }
82
- $profileDir = Join-Path (Join-Path $dshHome "profiles") $Profile
83
101
  $profileManifestPath = Join-Path $profileDir "package.json"
84
- $lockfilePath = Join-Path $profileDir "pnpm-lock.yaml"
85
-
86
102
  if (-not (Test-Path -LiteralPath $profileManifestPath)) {
87
103
  throw "Profile manifest not found: $profileManifestPath"
88
104
  }
89
-
90
105
  $manifest = Get-Content -LiteralPath $profileManifestPath -Raw | ConvertFrom-Json
91
- $bundles = @($manifest.dsh.profile.bundles)
92
- if ($bundles -notcontains $packName) {
106
+ if (-not (($manifest.dsh.profile.bundles) -contains $packName)) {
93
107
  throw "Profile did not register $packName as a bundle."
94
108
  }
95
109
  foreach ($component in $components) {
96
- if (-not $manifest.dependencies.PSObject.Properties[$component]) {
97
- throw "Profile dependency was not recorded: $component"
110
+ if (-not (Test-Path -LiteralPath (Join-Path $nodeModules $component))) {
111
+ throw "Component is still not resolvable from the profile root: $component"
98
112
  }
99
113
  }
100
114
 
101
- # The whole point of 0.1.0: no Harness core copy inside the profile.
102
- $duplicateCore = Join-Path $profileDir "node_modules\@deepseek-ai\dsh-tools"
115
+ # The whole point of 0.1.x: no Harness core copy inside the profile.
116
+ $duplicateCore = Join-Path $nodeModules "@deepseek-ai\dsh-tools"
103
117
  if (Test-Path -LiteralPath $duplicateCore) {
104
118
  throw "Duplicate core package detected: $duplicateCore. Remove it before starting DSH."
105
119
  }
106
- if ((Test-Path -LiteralPath $lockfilePath) -and
107
- ((Get-Content -LiteralPath $lockfilePath -Raw) -match "(?m)^\s*'@deepseek-ai/dsh-tools@")) {
108
- throw "pnpm-lock.yaml still resolves @deepseek-ai/dsh-tools at the profile root."
109
- }
110
120
 
111
121
  Write-Host ""
112
- Write-Host "Installed $packName and all five components into profile '$Profile'."
122
+ Write-Host "Installed $packName and its five components into profile '$Profile'."
113
123
  Write-Host "Restart DSH, or disable and re-enable the bundle in Plugins if it is already running."
package/lib/index.js CHANGED
@@ -1,13 +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 {};
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 CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Session Enhancements",
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
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Session Enhancements",
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
+ }
6
+ }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "会话功能增强",
4
- "description": "为会话提供更顺手的管理能力:删除已归档会话、把会话移动到其他工作区、备份未发送的文字与图片,并支持中文关键词搜索历史消息。"
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "会话功能增强",
4
+ "description": "为会话提供更顺手的管理能力:删除已归档会话、把会话移动到其他工作区、备份未发送的文字与图片,并支持中文关键词搜索历史消息。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funniki/dsh-session-toolkit",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
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
5
  "license": "MIT",
6
6
  "author": "funniki",
@@ -28,6 +28,13 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
+ "dependencies": {
32
+ "@funniki/dsh-session-toolkit-archived-session-delete": "^0.1.2",
33
+ "@funniki/dsh-session-toolkit-auto-paste": "^0.1.2",
34
+ "@funniki/dsh-session-toolkit-session-history-search": "^0.1.2",
35
+ "@funniki/dsh-session-toolkit-session-move": "^0.1.2",
36
+ "@funniki/dsh-session-toolkit-unsent-content-guard": "^0.1.2"
37
+ },
31
38
  "dsh": {
32
39
  "bundle": {
33
40
  "patch": "./cordis.patch.yml"
@@ -1,89 +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
- 必须同时把这五个组件加入 profile 依赖。安装脚本已经处理了这一步。
20
-
21
- ## 系统要求
22
-
23
- - DeepSeek Harness 桌面端,版本 `>= 0.2.0`(0.2.1-rc.5 已验证)
24
- - Windows PowerShell 5.1 或更高(`install.ps1`)
25
- - 无需 Node、无需构建;五个组件已随包内 `node_modules/@funniki/` 带好,
26
- 组件自身零第三方依赖,包内不再有 `@deepseek-ai/*` 依赖树
27
-
28
- ## 推荐安装(zip 渠道)
29
-
30
- 1. 把压缩包解压到固定目录,例如:
31
- `C:\Users\<你>\dsh-plugins\dsh-session-toolkit-0.1.0`
32
- > DSH 以链接方式安装本地目录;安装后不要移动或删除这个目录。
33
- 2. 在解压目录运行:
34
-
35
- ```powershell
36
- powershell -ExecutionPolicy Bypass -File .\install.ps1
37
- ```
38
-
39
- 3. 重启 DSH,或在插件页先把「会话功能增强」关闭再打开。
40
- 4. 打开「插件 → 会话功能增强」,确认:
41
-
42
- ```text
43
- 共 5 个 · 5 运行中
44
- ```
45
-
46
- ## 安装(npm 渠道)
47
-
48
- 不改用 zip 时,这个脚本也能直接装:包里没有本地组件副本,它会自动从 registry 装
49
- `@funniki/*` 的六个包。手动版本是逐条执行:
50
-
51
- ```powershell
52
- $dsh = "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd"
53
-
54
- & $dsh plugin --profile desktop add @funniki/dsh-session-toolkit
55
- foreach ($name in @(
56
- "@funniki/dsh-session-toolkit-archived-session-delete",
57
- "@funniki/dsh-session-toolkit-session-move",
58
- "@funniki/dsh-session-toolkit-unsent-content-guard",
59
- "@funniki/dsh-session-toolkit-session-history-search",
60
- "@funniki/dsh-session-toolkit-auto-paste"
61
- )) {
62
- & $dsh plugin --profile desktop add $name
63
- }
64
- ```
65
-
66
- ## 装完检查
67
-
68
- 安装脚本在结束前会自动核对:bundle 已注册、6 个依赖已记录、profile 里没有重复的核心包。
69
- 想再手动确认一遍:
70
-
71
- ```powershell
72
- $profileDir = Join-Path $HOME ".dsh\profiles\desktop"
73
- Test-Path (Join-Path $profileDir "node_modules\@deepseek-ai\dsh-tools") # 应为 False
74
- ```
75
-
76
- ## 使用入口
77
-
78
- - 已归档会话行悬停 → 红色删除按钮;会话菜单 →「删除已归档会话」
79
- - 会话「...」菜单 →「移动到工作区…」(需要至少两个工作区)
80
- - 输入框下方 →「未发送备份」胶囊
81
- - 输入框「搜索历史」或 `Ctrl+Shift+K`
82
- - 粘贴超过阈值的长文本 → 自动保存到工作区 `pastes/`,输入框留一张带预览的卡片
83
-
84
- ## 数据位置
85
-
86
- - 删除/移动会话:`%USERPROFILE%\.dsh\session-workspace-move\`
87
- - 未发送内容备份:`%USERPROFILE%\.dsh\unsent-content\`
88
- - 长文粘贴阈值:`%USERPROFILE%\.dsh\auto-paste\user-config.json`
89
- - 卸载插件不会自动删除这些数据。
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
+ - 卸载插件不会自动删除这些数据。