dsh-assist-chat 0.1.0 → 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/README.md CHANGED
@@ -2,60 +2,84 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- Side chat for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
5
+ **Side chat for DeepSeek Harness.** Ask a follow-up without derailing what you are working on.
6
6
 
7
- A right-dock seat that **branches the conversation you are in**: it carries the main thread history up to the moment you open it, so "that error above" and "the file we just edited" already make sense — then continues on its own branch without rewriting, interrupting, or derailing the main transcript.
7
+ Opens a second conversation in the right dock that **already knows everything the main thread knows** — your current task, the error you just hit, the file you just edited. Ask your question there, get your answer, and the main thread stays exactly as it was.
8
8
 
9
- The panel does not reimplement chat. It mounts the product own Conversation surface, so streaming, markdown, tool cards, approvals, Stop and the composer behave exactly like the main conversation.
9
+ ## The problem it solves
10
10
 
11
- Inspired by the side chat in ZCode (`zai-org/ZCode`): same shape — a tab in the right side pane backed by a real, parallel child conversation. Not a modal, and it never takes over the main area.
11
+ You are mid-task. Something occurs to you that is not part of the task:
12
12
 
13
- ## Why
13
+ - "what does this error actually mean?"
14
+ - "would this approach even work?"
15
+ - "what is that function supposed to do?"
14
16
 
15
- You are mid-task and want to ask something tangential: a design question, a sanity check, "what does this error actually mean". Opening a new conversation loses the context; typing in the main thread derails it and rewrites the transcript you were about to hand off.
17
+ You have three options today, and two of them are bad:
16
18
 
17
- A side chat is the third option. It forks the current conversation, so it knows what the main thread knows, and it runs beside it.
19
+ | Option | Knows your context | Keeps your main thread clean |
20
+ | --- | --- | --- |
21
+ | Open a new conversation | ❌ You re-explain everything from scratch | ✅ |
22
+ | Just ask in the main thread | ✅ | ❌ The question and answer get written into the transcript you were about to hand off, and the agent gets derailed |
23
+ | **Side chat** | ✅ It forks the conversation | ✅ Nothing you say reaches the main thread |
18
24
 
19
- ## Features
25
+ A side chat is the third option done properly. It is the same idea as the side chat in [ZCode](https://github.com/zai-org/ZCode): a tab in the right dock, backed by a real, parallel conversation — not a modal, and it never takes over the main area.
20
26
 
21
- - **Branch, not blank slate** — every opening forks the main conversation as it is *right now*.
22
- - **Isolated by construction** — its own Session, its own agent, its own transcript. Nothing you say here lands in the main thread.
23
- - **Native chat surface** — messages, streaming, tool calls, code blocks, Stop, composer: all inherited, none reimplemented.
24
- - **Per-conversation** — a branch of conversation A never surfaces while you are looking at B.
25
- - **Tab lifecycle = branch lifecycle** — one branch while the tab is open (survives tab switches and dock collapse), retired when you close the tab.
26
- - **No catalog noise** — the branch row is hidden from the left session list while alive, and archived once you close it.
27
+ ## What it feels like
27
28
 
28
- ## Install
29
+ 1. You are in a conversation with some history. A **Side chat** button sits in the session header.
30
+ 2. Click it. The right dock opens with a tab called **Side chat**, containing a copy of that conversation — every message from before is already there.
31
+ 3. Ask your question. It answers using the full context you already built up.
32
+ 4. Close the tab. Your main conversation never noticed a thing.
29
33
 
30
- ### From the dsh market
34
+ The panel is not a reimplementation of chat: it mounts the product own Conversation surface, so streaming, markdown, tool cards, approvals, Stop and the composer behave exactly like the main conversation.
31
35
 
32
- Search for `dsh-assist-chat` under **Plugins → Discover**, or add an index source and install from there.
36
+ ## Features
33
37
 
34
- ### From npm
38
+ - **A branch, not a blank slate** — every opening forks the main conversation as it is right now, so no re-explaining.
39
+ - **Genuinely isolated** — its own Session, its own agent, its own transcript. Nothing leaks into the main thread.
40
+ - **Native chat surface** — messages, streaming, tool calls, code blocks, Stop, composer: all inherited, none redrawn.
41
+ - **One branch per conversation** — conversation A side chat never appears while you are looking at B.
42
+ - **Tab lifecycle is branch lifecycle** — one branch while the tab is open (survives tab switches and dock collapse), retired when you close the tab.
43
+ - **No clutter** — the branch is hidden from the left session list while alive, and archived once you close it.
44
+
45
+ ## Install
35
46
 
36
47
  ```sh
48
+ # from npm (recommended)
37
49
  dsh plugin --profile desktop add dsh-assist-chat
38
- ```
39
-
40
- ### From a local checkout
41
50
 
42
- Point the profile at this directory:
51
+ # or straight from the repository
52
+ dsh plugin --profile desktop add github:sleep123937/dsh-assist-chat
43
53
 
44
- ```sh
54
+ # or point at a local checkout
45
55
  dsh plugin --profile desktop add link:/absolute/path/to/dsh-assist-chat
46
56
  ```
47
57
 
48
- Either way the package ships its own `cordis.patch.yml`, so the loader entry is inserted by the package itself. **Restart DeepSeek Harness afterwards.**
58
+ Use `--profile web` instead of `--profile desktop` if you run the browser build. **Restart DeepSeek Harness afterwards** — the button appears in the session header.
59
+
60
+ ## FAQ
61
+
62
+ **Why can I not find it in the left session list?**
63
+ By design. The branch exists as a real Session (it has to, to have its own agent), but its catalog row is hidden while the tab is open, so your list stays clean. Close the tab and it is archived.
49
64
 
50
- ## Usage
65
+ **Does it see what I say in the main thread afterwards?**
66
+ No. A fork is a snapshot: the branch knows the conversation up to the moment you opened it. If you want the newer context, close the tab and open a fresh one.
51
67
 
52
- 1. Open a conversation that already has some history.
53
- 2. Click **Side chat** in the session header (the same entry is on the right sidebar guide page).
54
- 3. The dock opens with a branch of that conversation. Ask away.
55
- 4. Close the tab when done. Opening it again later forks a fresh copy of whatever the main thread looks like by then.
68
+ **Does anything I ask here pollute the main conversation?**
69
+ No. Separate Session, separate transcript. The main thread is byte-for-byte unchanged.
70
+
71
+ **Can I keep several open?**
72
+ Yes — the dock supports tabs and split panes. Each branch is tied to the conversation it was forked from.
73
+
74
+ **Why did my message disappear once?**
75
+ If a branch gets archived while its tab is still open, DSH rejects its model steps silently. This plugin only archives on tab close, and attempts to restore a branch that is somehow still archived. If you ever see it, reopen the tab.
56
76
 
57
77
  ## How it works
58
78
 
79
+ *This section is for people reading the source. You do not need it to use the plugin.*
80
+
81
+ Registered pieces:
82
+
59
83
  | Piece | Registration |
60
84
  | --- | --- |
61
85
  | Tab type | `ctx.sidebarRightTabs.register({ id, kind: "assistchat", keepMounted: true, guide })` |
@@ -63,26 +87,19 @@ Either way the package ships its own `cordis.patch.yml`, so the loader entry is
63
87
  | Chat surface | `renderFactorySlot("conversation.content", { variant: "embedded", phase, hero }, { slots: { views: FixedChatView } })` |
64
88
  | Entry point | `conversation.session.header.actions` — a list seat; `.corner` is single and already taken |
65
89
 
66
- ### Session lifecycle
67
-
68
- 1. Resolve the conversation on screen: `ctx.get("uiWorkspace").mainReference.sessionId`.
69
- 2. `ctx.get("sessions").fork({ sessionId, increaseTitle: true })` — the child inherits the full transcript. A blank parent falls back to `create({ workspaceId })`.
70
- 3. `ctx.get("sessions").retain(id, { source, signal })` yields the SessionReference the provider needs.
71
- 4. On unmount (tab closed): release the reference, then archive the branch.
72
-
73
- The parent id travels through the tab navigation params (`openTab(kind, { params: { parent } })`). The dock layout is stored per Session, so branch identity is keyed the same way.
90
+ Branch lifecycle: resolve the conversation on screen (`uiWorkspace.mainReference.sessionId`) → `sessions.fork({ sessionId, increaseTitle: true })` → `sessions.retain(...)` → release and archive on unmount. The parent id rides the tab navigation params, so the dock keeps the branch bound to its own conversation.
74
91
 
75
92
  ### Two things that will bite you
76
93
 
77
94
  **Never archive a branch that is still in use.** DSH ships an `archived-session-gate` that rejects every `agent/pre-step` of an archived Session. Messages are accepted into the queue and then silently vanish, with no error at all. Archiving is only safe *after* the tab closes.
78
95
 
79
- **Which forces hiding to be presentation-only.** The left catalog renders one row per Session with a stable `data-row-key="session:<id>"`, so a plugin can mark the rows it minted and hide them with `display: none`. That keeps the Session fully writable. Trade-offs: the "expand N more" counter still counts hidden rows, and the trick is tied to the row-key convention.
96
+ **Which forces hiding to be presentation-only.** The catalog renders one row per Session carrying `data-row-key="session:<id>"`, so the plugin marks the rows it minted and hides them with `display: none`. The Session stays fully writable. Trade-offs: the "expand N more" counter still counts hidden rows, and the trick is tied to that row-key convention.
80
97
 
81
98
  ## Compatibility
82
99
 
83
100
  - DeepSeek Harness `>= 0.2.0` (`engines.dsh`).
84
- - Client plugin API only — no host-side code, no patched DSH files.
85
- - A branch is visible in the catalog while its tab is open, and archived when the tab closes.
101
+ - Client plugin API only: no host-side code, no patched DSH files.
102
+ - Tested on 0.2.1-rc.3, desktop profile.
86
103
 
87
104
  ## Development
88
105
 
@@ -93,6 +110,16 @@ npm run check # syntax only
93
110
 
94
111
  `test/smoke.cjs` runs the shipped Client module in a `vm` sandbox with a mock React and a mock Cordis context. No GUI needed.
95
112
 
113
+ ## Feedback
114
+
115
+ Bugs, ideas and "this does not work on my machine" are all welcome:
116
+
117
+ - [Report a bug](https://github.com/sleep123937/dsh-assist-chat/issues/new?template=bug_report.yml)
118
+ - [Request a feature](https://github.com/sleep123937/dsh-assist-chat/issues/new?template=feature_request.yml)
119
+ - [Browse existing issues](https://github.com/sleep123937/dsh-assist-chat/issues)
120
+
121
+ Prefer email? Write to **zousleep@163.com**.
122
+
96
123
  ## License
97
124
 
98
125
  MIT
package/README.zh.md CHANGED
@@ -91,6 +91,16 @@ npm run check # 只查语法
91
91
 
92
92
  `test/smoke.cjs` 用 `vm` + mock React + mock Cordis context 跑真实的 Client 模块,不需要开 GUI。
93
93
 
94
+ ## 反馈
95
+
96
+ 遇到问题、有想法、或者「在我机器上跑不起来」,都欢迎:
97
+
98
+ - [报告问题](https://github.com/sleep123937/dsh-assist-chat/issues/new?template=bug_report.yml)
99
+ - [提个建议](https://github.com/sleep123937/dsh-assist-chat/issues/new?template=feature_request.yml)
100
+ - [看看别人提了什么](https://github.com/sleep123937/dsh-assist-chat/issues)
101
+
102
+ 不想用 GitHub 也行,直接发邮件到 **zousleep@163.com**。
103
+
94
104
  ## 许可
95
105
 
96
106
  MIT
package/locale/en.json CHANGED
@@ -1,4 +1,8 @@
1
1
  {
2
+ "meta": {
3
+ "title": "Side chat",
4
+ "description": "Branch the current conversation into the right dock. Ask a follow-up without derailing the main thread — the branch already knows everything the main conversation knows."
5
+ },
2
6
  "tab.title": "Side chat",
3
7
  "guide.title": "Side chat",
4
8
  "guide.description": "Open a side conversation isolated from the main thread",
package/locale/zh.json CHANGED
@@ -1,4 +1,8 @@
1
1
  {
2
+ "meta": {
3
+ "title": "辅助对话",
4
+ "description": "在右侧栏开一条当前对话的分支。追问不会打断主线——分支已经知道主对话知道的一切。"
5
+ },
2
6
  "tab.title": "辅助对话",
3
7
  "guide.title": "辅助对话",
4
8
  "guide.description": "开一个与主对话隔离的旁支会话,随时追问而不打断主线",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-assist-chat",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Side chat for DeepSeek Harness: a right-dock seat that branches the current conversation, so you can ask follow-ups without derailing the main thread. 右侧栏辅助对话:从当前会话 fork 一条旁支,追问不打断主线。",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -55,7 +55,7 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "author": "sleep123937 <1347351715@qq.com> (https://github.com/sleep123937)",
58
+ "author": "sleep123937 <zousleep@163.com> (https://github.com/sleep123937)",
59
59
  "repository": {
60
60
  "type": "git",
61
61
  "url": "git+https://github.com/sleep123937/dsh-assist-chat.git"