dsh-side-chat-plus 0.4.0-alpha.1 → 0.4.1-alpha.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/CHANGELOG.md +14 -0
- package/README.md +10 -16
- package/README.zh.md +7 -10
- package/docs/official-sidebar-assessment.md +32 -0
- package/dsh.plugin.json +2 -2
- package/lib/client-registry.js +149 -116
- package/lib/client-registry.js.map +1 -1
- package/lib/client.js +155 -122
- package/lib/client.js.map +1 -1
- package/lib/index.js +110 -28
- package/lib/types/context-types.d.ts +62 -11
- package/lib/types/index.d.ts +3 -0
- package/lib/types/settings-shared.d.ts +1 -3
- package/package.json +45 -42
- package/src/client/attachments/AttachmentRail.tsx +6 -6
- package/src/client/attachments/ImageLightbox.tsx +2 -2
- package/src/client/index.tsx +76 -36
- package/src/context-types.ts +62 -8
- package/src/index.ts +130 -30
- package/src/settings-shared.ts +1 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 0.4.1-alpha.1
|
|
2
|
+
|
|
3
|
+
- 适配 DSH `0.1.7-alpha.1`,最低版本声明同步为 `^0.1.7-0`。
|
|
4
|
+
- 修复侧边聊天在 0.1.7 下“发出去没有任何回复”的问题:0.1.7 新增的 archived-session 门禁会对归档会话的
|
|
5
|
+
`agent/pre-step` 直接返回 `reject`,整轮以 `blocked` 结束(不发请求)。现在改为“推理期间临时取消归档、
|
|
6
|
+
本轮 settle 后重新归档”,既可继续正常回答,又保持默认隐藏(宿主创建的会话不占工作区记录,因此即使在这段
|
|
7
|
+
窗口里也不会出现在左侧工作区,最多落在「未分组」)。
|
|
8
|
+
- “带回主会话”改用 V4 producer-owned source,保持与官方迁移旧消息后的身份一致,修复旧 `kind: plugin` 格式被拒绝的问题。
|
|
9
|
+
- 偏好通过插件导出的 volatile Config 和实际 Loader entry id 保存至当前 Profile,支持实时更新和修订冲突检查。
|
|
10
|
+
- 迁移 agent-preset-registry 依赖及新版 Regular 图标;侧栏优先使用公共 sidebarRightTabs 服务。
|
|
11
|
+
- 本地、CI、发布统一锁定新版依赖;新增 V3→V4 缺失轮次结束记录、历史过滤、上下文注入及设置回归测试。
|
|
12
|
+
- 官方侧边对话复用评估见 [方案说明](docs/official-sidebar-assessment.md)。本次保留现有聊天区,尚未替换成官方 Conversation。
|
|
13
|
+
|
|
14
|
+
旧设置服务的自定义 namespace 已取消。新版本设置归属于 Profile 中的插件条目;官方一次性导入无法映射旧自定义 namespace 时,需在插件设置页重新保存偏好。
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# dsh-side-chat — 侧边聊天 (Side chat)
|
|
2
2
|
|
|
3
|
+
Targets DSH **0.1.7-alpha.1**. See [compatibility changes](CHANGELOG.md).
|
|
4
|
+
|
|
3
5
|
An **enhanced version of a Codex-style side chat** for
|
|
4
6
|
[DSH](https://www.deepseek.com): a dedicated, agentic chat in a right-side
|
|
5
7
|
panel, scoped to the conversation it was started from and aware of its
|
|
@@ -23,7 +25,12 @@ through first, then bring the answer back and answer the dialog.
|
|
|
23
25
|
into the side chat automatically.
|
|
24
26
|
- **Per-conversation isolation.** Each side chat is a hidden ordinary DSH
|
|
25
27
|
session (`meta.parentSession` links it to the conversation that started it,
|
|
26
|
-
and the session is archived so it
|
|
28
|
+
and the session is archived so it stays out of the main session list).
|
|
29
|
+
DSH 0.1.7 refuses a model step to an archived session, so the archive is
|
|
30
|
+
lifted for exactly as long as a side-chat turn is running and restored when
|
|
31
|
+
it settles. A host-created session is never accounted to a Workspace, so even
|
|
32
|
+
in that window it can only surface under the sidebar's *Ungrouped* bucket,
|
|
33
|
+
never under the workspace it was started from.
|
|
27
34
|
Every conversation gets its own side chat.
|
|
28
35
|
- **Inherits main-conversation context.** The side chat is aware of the
|
|
29
36
|
conversation it was started from and its working directory, and inherits the
|
|
@@ -99,11 +106,7 @@ and you never have to answer before you're ready.
|
|
|
99
106
|
|
|
100
107
|
- [Node.js](https://nodejs.org) ≥ 20
|
|
101
108
|
- [pnpm](https://pnpm.io)
|
|
102
|
-
- DSH
|
|
103
|
-
`0.1.5-alpha.2` and `0.1.6-alpha.1`. Where those lines differ (`catalog()` vs
|
|
104
|
-
`selectFor()` on permission presets, the added `maxImageDimension` image
|
|
105
|
-
limit, the `IconSendOutline16` icon removal) the plugin feature-detects and
|
|
106
|
-
serves both.
|
|
109
|
+
- DSH `0.1.7-alpha.1` (`^0.1.7-0`).
|
|
107
110
|
- `pnpm build` ends with `check-seed-exports`, which compares the client
|
|
108
111
|
bundle's frozen-module-table imports against a real DSH install. Set
|
|
109
112
|
`DSH_INSTALL` (or pass `--shell`) when the install is not discoverable via
|
|
@@ -136,16 +139,7 @@ The package name is `dsh-side-chat-plus` (the plain `dsh-side-chat` name on npm
|
|
|
136
139
|
belongs to a different maintainer, so the release is published under the
|
|
137
140
|
`-plus` name).
|
|
138
141
|
|
|
139
|
-
> **Registry dependencies.**
|
|
140
|
-
> `0.1.2` API line) are published to npm as prereleases (`0.1.2-rc.1`) and, in a
|
|
141
|
-
> few cases, declare internal dependencies with a plain `>=0.1.2` range that
|
|
142
|
-
> npm/pnpm refuses to match against a prerelease. The developer `pnpm-workspace.yaml`
|
|
143
|
-
> therefore points the `@deepseek-ai/dsh-*` packages at a local harness checkout
|
|
144
|
-
> (absolute `D:/code/...` paths that exist only on the maintainer's machine). CI
|
|
145
|
-
> swaps that file for one whose overrides pin every `@deepseek-ai/dsh-*`
|
|
146
|
-
> dependency to `0.1.2-rc.1`, so installs resolve from the registry. On another
|
|
147
|
-
> machine, point the overrides at your own harness clone or use the CI workspace
|
|
148
|
-
> file as a template.
|
|
142
|
+
> **Registry dependencies.** Local and CI builds use exact DSH `0.1.7-alpha.1` development dependencies and the checked-in lockfile. No local harness checkout or CI-only overrides are required.
|
|
149
143
|
|
|
150
144
|
## Deploy
|
|
151
145
|
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# dsh-side-chat — 侧边聊天(Side chat)
|
|
2
2
|
|
|
3
|
+
当前适配 DSH **0.1.7-alpha.1**,详见[兼容性变更](CHANGELOG.md)。
|
|
4
|
+
|
|
3
5
|
一个 [DSH](https://www.deepseek.com) 网页插件,**Codex 式侧边聊天的强化版本**:
|
|
4
6
|
在右侧面板提供按主会话隔离的独立聊天,具备 Codex 式的智能体能力——继承主会话的
|
|
5
7
|
工具集、模型、思考难度与权限预设,能感知所在工作目录;选中对话内容即可提问,AI 回复
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
选中的内容会自动带入侧边聊天。
|
|
18
20
|
- **按主会话隔离。** 每个侧边聊天都是一个隐藏的普通 DSH 会话(通过
|
|
19
21
|
`meta.parentSession` 关联发起它的主会话,并被归档,因此不会出现在主会话列表中)。
|
|
22
|
+
DSH 0.1.7 不再允许已归档会话进入模型步,因此侧边聊天在回答期间会临时取消归档,
|
|
23
|
+
该轮结束后立即恢复归档。宿主创建的会话不占任何工作区记录,所以即使在这段窗口里,
|
|
24
|
+
它也只可能落在侧栏的「未分组」里,永远不会出现在发起它的工作区下。
|
|
20
25
|
每个主会话各自拥有自己的侧边聊天。
|
|
21
26
|
- **继承主会话上下文。** 侧边聊天能感知它的发起会话与所在工作目录,并默认继承主会话的
|
|
22
27
|
工具集、模型、思考难度与权限预设,可以像主会话一样作用于同一个工作区。
|
|
@@ -66,10 +71,7 @@ Codex 式能力之上,额外支持针对当前**问题弹框**的侧边聊天
|
|
|
66
71
|
|
|
67
72
|
- [Node.js](https://nodejs.org) ≥ 20
|
|
68
73
|
- [pnpm](https://pnpm.io)
|
|
69
|
-
- DSH
|
|
70
|
-
`0.1.6-alpha.1` 上验证。两代存在差异的地方(权限预设的 `catalog()` 与
|
|
71
|
-
`selectFor()`、新增的 `maxImageDimension` 图片上限、被移除的
|
|
72
|
-
`IconSendOutline16` 图标)插件都做了特性探测,两代都能服务。
|
|
74
|
+
- DSH `0.1.7-alpha.1` (`^0.1.7-0`).
|
|
73
75
|
- `pnpm build` 最后会跑 `check-seed-exports`:把客户端 bundle 对冻结模块表的
|
|
74
76
|
引用与一份真实 DSH 安装做比对。若 `dsh` 不在 `PATH` 上而探测不到安装目录,
|
|
75
77
|
可设 `DSH_INSTALL`(或传 `--shell`);找不到目标时会跳过而不是失败。
|
|
@@ -97,12 +99,7 @@ pnpm build
|
|
|
97
99
|
|
|
98
100
|
包名为 `dsh-side-chat-plus`(npm 上的裸名 `dsh-side-chat` 属于另一维护者,因此发布以 `-plus` 命名)。
|
|
99
101
|
|
|
100
|
-
> **registry 依赖说明。**
|
|
101
|
-
> (`0.1.2-rc.1`)发布,且个别包内部用普通 `>=0.1.2` 范围引用同系列包,npm/pnpm 不会把
|
|
102
|
-
> 预发布版本当作满足该范围。因此开发用的 `pnpm-workspace.yaml` 把 `@deepseek-ai/dsh-*` 指向
|
|
103
|
-
> 本地 harness checkout(绝对路径 `D:/code/...`,仅存在于维护者本机)。CI 会把该文件替换成
|
|
104
|
-
> overrides 将每个 `@deepseek-ai/dsh-*` 依赖固定到 `0.1.2-rc.1` 的版本,从而让安装从 registry
|
|
105
|
-
> 解析。在其他机器上,把 overrides 指向你自己的 harness 克隆,或直接以 CI 的 workspace 文件为模板。
|
|
102
|
+
> **registry 依赖说明。** 本地和 CI 使用精确的 DSH `0.1.7-alpha.1` 开发依赖和同一份锁文件,无需本地 harness checkout 或 CI 专用 overrides。
|
|
106
103
|
|
|
107
104
|
## 部署
|
|
108
105
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# DSH 0.1.7-alpha.1 官方侧边对话与 Side chat Plus
|
|
2
|
+
|
|
3
|
+
核对对象:本机实际安装的 `@deepseek-ai/dsh-*` 0.1.7-alpha.1 发布包及其类型声明。
|
|
4
|
+
|
|
5
|
+
结论:可以组合。当前继续使用官方右侧栏承载插件面板;后续适合复用官方的会话订阅和 Conversation 渲染层。官方现成的子代理侧边对话不能直接替代本插件。
|
|
6
|
+
|
|
7
|
+
## 能力对照
|
|
8
|
+
|
|
9
|
+
| 需求 | 官方现成侧边对话 | 组合方式 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| 右侧栏标签、分栏、浮动与布局保存 | 由 sidebar-right 提供 | 当前插件已经接入;优先使用公共 sidebarRightTabs 服务 |
|
|
12
|
+
| 完整聊天、工具结果、审批、提问与输入区 | 复用正式 Conversation 界面,具体能力取决于所绑定会话和已装插件 | 后续用 SessionProvider + conversation.content 的 embedded 变体承载普通会话 |
|
|
13
|
+
| 新建按主会话隔离的隐藏普通会话 | 官方资源处理器面向已经存在的子代理 | 保留插件自己的创建、关联和隐藏逻辑 |
|
|
14
|
+
| 连续对话 | 子代理依 mode 区分;one-shot/unknown 会只读 | 保留普通会话身份,不能把 childId 拼成子代理资源地址冒充子代理 |
|
|
15
|
+
| 继承模型、思考难度、权限和预设 | 展示层本身不负责创建与继承 | 保留插件的 host 创建逻辑,后续核对官方输入区配置行为 |
|
|
16
|
+
| 选中文本发起提问、发送前暂存、自定义追加提示词 | 子代理侧边视图没有这些专属流程 | 保留选区入口和插件偏好 |
|
|
17
|
+
| 查阅工作区/主会话开关 | 没有本插件对应的提示词开关 | 保留插件消息构造逻辑;它是提示词约束,并非文件访问权限边界 |
|
|
18
|
+
| 选中或整段带回、AI 总结后带回、草稿/上下文两种模式 | 不是官方侧边视图提供的操作 | 通过额外操作区或消息扩展保留 |
|
|
19
|
+
|
|
20
|
+
## 核对到的正式接口
|
|
21
|
+
|
|
22
|
+
- `dsh-client-ui-subagent/lib/types/client/sidebar-chat/index.d.ts`:官方资源协议是 `dsh-resource://subagentchat/session/`,地址包含直接父会话、子会话和 mode。
|
|
23
|
+
- 同包 `lib/client.js` 的 `registerSidebarChat`:注册 `sidebar.right.pane.tab`,以 `sessions.retain(address, ...)` 持有子代理引用,在关闭时释放。
|
|
24
|
+
- 同包 `ConversationSlotPanel`:通过 `SessionProvider` 绑定目标会话,再渲染 `conversation.content`,传 `variant: 'embedded'`,固定聊天视图。
|
|
25
|
+
- `dsh-api-session-controller/lib/types/client/contract/sessions.d.ts`:公共 `retain(target, options)` 接口。普通会话应使用普通 SessionTarget,不使用 SubagentAddress。
|
|
26
|
+
- `dsh-api-session-controller/lib/client.js`:子代理地址走 `remote.subagents.prompt` 与 `interruptByParent`,所以冒充子代理不仅影响外观,也会改变发送和取消的路由。
|
|
27
|
+
|
|
28
|
+
## 后续替换边界
|
|
29
|
+
|
|
30
|
+
保留 host 层的普通会话、模型权限继承、查阅提示和带回 API。将自绘聊天历史和输入区替换为官方嵌入 Conversation,并保留插件的专属操作。必须先验证:归档普通会话 retain 后不被自动恢复到主列表;主/侧会话切换不串消息与草稿;审批和提问绑定正确;关闭面板只释放视图、不误停后台任务;查阅开关对后续官方输入消息继续生效;带回始终指向创建时的主会话。
|
|
31
|
+
|
|
32
|
+
本次兼容性修复没有把自绘聊天区直接替换成官方组件,上述完整组合仍是后续实现方案。
|
package/dsh.plugin.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-side-chat-plus",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1-alpha.1",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"description": "选中对话内容 → 在侧边聊天中提问:按主会话隔离的隐藏普通会话,继承模型/思考难度/权限(可调),带「需要时查工作区/主会话」开关;可停靠到新版右侧栏或使用经典浮动面板。",
|
|
6
6
|
"engines": {
|
|
7
|
-
"dsh": "^0.1.
|
|
7
|
+
"dsh": "^0.1.7-0"
|
|
8
8
|
},
|
|
9
9
|
"contributes": {
|
|
10
10
|
"tools": [],
|