dsh-composer-plus 0.6.1 → 0.7.0
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 +61 -29
- package/client.js +25 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,53 +1,85 @@
|
|
|
1
1
|
# dsh-composer-plus
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-composer-plus)
|
|
4
|
+
[](https://github.com/furkancak1r/dsh-composer-plus/actions/workflows/test.yml)
|
|
5
|
+
[](LICENSE)
|
|
4
6
|
|
|
5
|
-
-
|
|
6
|
-
- **Plan mode toggle** – while the chat is in plan mode, `Shift+Tab` leaves it (same as clicking the plan chip). Otherwise it adds `/plan ` to the start of the draft, even when it already has text; press it again to remove that leading `/plan`. The rest of the draft, file references and attachments stay intact, and the caret ends up at the end. It never sends. An open `/` or `@` menu keeps `Shift+Tab` for closing itself.
|
|
7
|
-
- **One-click Continue** – when a turn has stopped and the composer is empty, the Send button becomes **▶**; one click sends `continue`. Hidden on a blank chat, while running, in subagent views, or once you type or attach something.
|
|
8
|
-
- **Copy deeplink** – right-click a session in the sidebar (or use its `…` menu) and pick **Copy deeplink** (label follows dsh's language: English or Chinese). You get a link like `dsh-session:InNlc3Npb24t…`; paste it into another chat and dsh attaches that session as read-only context.
|
|
9
|
-
- **Allow for this chat (Auto Review)** – when Auto Review denies a call and asks you, the approval card gets an **Allow for this chat** button next to Reject / Allow once. It allows this call and every later Auto Review ask for the **same exact tool in the same chat**, with any arguments (e.g. any read-only SQL query on one database tool). Other tools, other chats and non-Auto-Review approvals still ask. A header chip (“N tool(s) allowed · Revoke”) lists the grants and revokes them in one click. Grants are saved by the plugin's Host half (`$DSH_HOME/storages/dsh-composer-plus/grants.json`, user-only permissions), so they survive a restart until you revoke them. If the tool can write, the grant covers any write too.
|
|
10
|
-
- **Changes panel** – a Codex-style **Changes** page in the right sidebar (open it from the sidebar's `+` guide). Pick **Uncommitted**, **Unstaged**, **Staged** or **Branch** (your branch vs. its upstream, from their merge base) to list changed files with `+/-` counts and expand any file for its diff; **Last Turn** opens dsh's own review of the latest turn. It refreshes while visible. Git runs read-only on the Host in the chat's own folder.
|
|
11
|
-
- **Background notifications** – while the dsh window is not focused, you get an OS notification titled with the chat name when a turn finishes (with the reply's first line), or when a chat waits for an approval (names the tool), a question (shows it) or a plan review. The Dock/taskbar badge counts chats waiting for you. Clicking it brings dsh to the front and opens that chat. Notifications stay in Notification Center until clicked; a newer one for the same chat replaces the older. Subagent chats don't notify on their own (the parent chat does). Text follows dsh's language (English or Chinese).
|
|
12
|
-
- **Drag-and-drop queue reordering** – queued messages get a grip (⠿) at the left. Drag a row to a new position (drop line shown, `Esc` cancels), or focus the grip and press `↑` / `↓`.
|
|
7
|
+
Codex-style quality-of-life features for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh) desktop and web UI: a Changes panel, input history, a plan-mode shortcut, one-click Continue, queue drag-and-drop, session deeplinks, per-chat Auto Review grants and background notifications.
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
Unofficial community plugin. No external network calls.
|
|
15
10
|
|
|
16
11
|
## Install
|
|
17
12
|
|
|
18
|
-
**Desktop app:** Settings → Plugins → **Add plugin
|
|
13
|
+
**Desktop app:** Settings → Plugins → **Add plugin** → enter `dsh-composer-plus` → **Enable now**.
|
|
14
|
+
You can also paste `https://github.com/furkancak1r/dsh-composer-plus` instead of the npm name.
|
|
19
15
|
|
|
20
|
-
**Web / CLI
|
|
16
|
+
**Web / CLI profile:**
|
|
21
17
|
|
|
22
18
|
```sh
|
|
23
19
|
dsh plugin --profile web add dsh-composer-plus
|
|
24
20
|
```
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
Then restart dsh. (The CLI can't install into the desktop profile; the app manages it.)
|
|
23
|
+
|
|
24
|
+
> dsh's pnpm skips versions younger than 24 hours. Right after a release, add the version: `dsh-composer-plus@0.7.0`.
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
| Feature | How to use it |
|
|
29
|
+
|---|---|
|
|
30
|
+
| **Changes panel** | Right sidebar → `+` → **Changes**. Pick **Uncommitted**, **Unstaged**, **Staged** or **Branch** to see changed files with `+/-` counts; click a file for its diff. **Last Turn** opens dsh's own review of the latest turn. |
|
|
31
|
+
| **Input history** | In an empty composer, press `↑` / `↓` to walk through messages you sent, like a terminal. |
|
|
32
|
+
| **Plan mode shortcut** | `Shift+Tab` adds `/plan ` to the start of the draft (press again to remove it). If the chat is already in plan mode, `Shift+Tab` leaves it. |
|
|
33
|
+
| **One-click Continue** | When a turn has stopped and the composer is empty, Send turns into **▶**. One click sends “continue” in dsh's language (`continue` / `继续`). |
|
|
34
|
+
| **Queue drag-and-drop** | Queued messages get a grip (⠿). Drag to reorder, or focus the grip and press `↑` / `↓`. `Esc` cancels. |
|
|
35
|
+
| **Copy deeplink** | Right-click a chat in the sidebar → **Copy deeplink**. Paste the `dsh-session:…` link into another chat to attach that chat as read-only context. |
|
|
36
|
+
| **Allow for this chat** | When Auto Review asks you, the approval card gets **Allow for this chat**: the same tool in the same chat is allowed from then on, with any arguments. A header chip lists the grants and revokes them. Grants survive a restart. |
|
|
37
|
+
| **Background notifications** | While dsh is in the background you get a notification when a turn finishes (first line of the reply), or when a chat needs an approval (tool name), an answer (the question) or a plan review. The Dock/taskbar badge counts waiting chats. Clicking opens that chat. |
|
|
27
38
|
|
|
28
|
-
|
|
39
|
+
All text — buttons, tooltips, notices, notifications and the Continue message — follows the language selected in dsh (English or Chinese, the two languages dsh ships). Switching the language in dsh settings updates it live.
|
|
29
40
|
|
|
30
|
-
##
|
|
41
|
+
## Keyboard shortcuts
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
| Key | Where | Action |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `↑` / `↓` | empty composer | previous / next sent message |
|
|
46
|
+
| `Shift+Tab` | composer | add/remove `/plan `, or leave plan mode |
|
|
47
|
+
| `↑` / `↓` | focused queue grip | move the queued message |
|
|
48
|
+
| `Esc` | while dragging | cancel the move |
|
|
49
|
+
|
|
50
|
+
An open `/` or `@` menu keeps these keys for itself.
|
|
51
|
+
|
|
52
|
+
## Compatibility
|
|
53
|
+
|
|
54
|
+
Tested on dsh `0.2.0-rc.2` (desktop and web) and `0.2.1-alpha.2` (web). CI runs the tests on every push.
|
|
40
55
|
|
|
41
|
-
##
|
|
56
|
+
## Privacy and security
|
|
57
|
+
|
|
58
|
+
- **Changes panel:** git runs read-only on your machine, in the chat's own folder, through dsh's authenticated `/api` channel. It never commits, stages or fetches, and only shows paths git itself listed.
|
|
59
|
+
- **Allow for this chat:** grants are stored in `$DSH_HOME/storages/dsh-composer-plus/grants.json` (owner-only permissions). A grant covers **one exact tool in one chat**. If that tool can write, the grant covers any write too. Revoke it from the header chip.
|
|
60
|
+
- Auto Review still runs on every call; review failures are never auto-allowed.
|
|
61
|
+
|
|
62
|
+
## Troubleshooting
|
|
63
|
+
|
|
64
|
+
- **No notifications on macOS:** System Settings → Notifications → DeepSeek Harness → allow. Choose **Alerts** to keep them on screen.
|
|
65
|
+
- **▶, queue grips, Allow for this chat or right-click missing after a dsh update:** these attach to dsh's current HTML because dsh has no slot for them yet. If dsh changes that markup they hide themselves; nothing else breaks. Please open an [issue](https://github.com/furkancak1r/dsh-composer-plus/issues).
|
|
66
|
+
- **Install fails right after a release:** add the version (`dsh-composer-plus@0.7.0`), see the install note above.
|
|
67
|
+
|
|
68
|
+
## Limits
|
|
69
|
+
|
|
70
|
+
- dsh's queue has no `move` action, so a reorder rewrites the affected rows' text. If the agent picks up a row mid-move, the move is undone and nothing is lost. Messages with images or files can't be moved.
|
|
71
|
+
- A deeplink works inside chats; clicking it does not open the chat.
|
|
72
|
+
- A notification sent before a restart only brings dsh to the front when clicked.
|
|
73
|
+
- Built-in support is requested upstream: queue `move` in [#773](https://github.com/deepseek-ai/deepseek-harness/discussions/773), a Continue state in [#9269](https://github.com/deepseek-ai/deepseek-harness/discussions/9269).
|
|
74
|
+
|
|
75
|
+
## Development
|
|
42
76
|
|
|
43
77
|
```sh
|
|
44
78
|
npm test
|
|
45
79
|
```
|
|
46
80
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Runs the real `client.js` against a fake React/DOM (/plan toggle, deeplink format and right-click, Continue, queue drag, Auto Review grants including persistence across a restart, notification bodies and Dock badge) and the real `index.js` against a temporary git repository (every Changes mode, rename parsing, untracked files, refusal of paths git did not list, grants file).
|
|
81
|
+
The tests run the real `client.js` against a fake React/DOM and the real `index.js` (Host half) against a temporary git repository. `node test/browser-history.mjs '<dsh web URL with ?token=…>'` checks input history in a real browser against a throwaway `dsh web` with its own `DSH_HOME`.
|
|
50
82
|
|
|
51
|
-
|
|
83
|
+
## License
|
|
52
84
|
|
|
53
|
-
MIT
|
|
85
|
+
MIT
|
package/client.js
CHANGED
|
@@ -196,7 +196,6 @@ window.__ModuleLoader__.load({
|
|
|
196
196
|
return React.createElement('span', { ref: anchor, hidden: true });
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
const CONTINUE_TEXT = 'continue';
|
|
200
199
|
/** Dictionary namespace for this plugin's menu copy; dsh ships `en` and `zh`. */
|
|
201
200
|
const LOCALE_NS = 'dsh-composer-plus';
|
|
202
201
|
let createPortal;
|
|
@@ -212,7 +211,7 @@ window.__ModuleLoader__.load({
|
|
|
212
211
|
* Send turns into a play button that submits "continue". Send is not a slot, so the play button is
|
|
213
212
|
* portaled into Send's row with Send's own class and Send is hidden meanwhile.
|
|
214
213
|
* Hidden on a blank chat, while running, in subagent views, or as soon as the user types or attaches. */
|
|
215
|
-
function ContinueButton({ useSession, useInput, inputActions }) {
|
|
214
|
+
function ContinueButton({ useSession, useInput, inputActions, t }) {
|
|
216
215
|
const show = useSession((s) => s !== undefined && !s.blank && !s.running && s.subagent === null && !s.removed);
|
|
217
216
|
const idle = useInput((s) => s !== undefined && s.phase === 'plain' && s.draft.trim() === '' && s.attachmentIds.length === 0);
|
|
218
217
|
const visible = show && idle && inputActions !== undefined;
|
|
@@ -228,15 +227,17 @@ window.__ModuleLoader__.load({
|
|
|
228
227
|
const anchor = React.createElement('span', { ref: anchorRef, hidden: true, 'aria-hidden': true });
|
|
229
228
|
if (!visible || host === null) return anchor;
|
|
230
229
|
const onClick = () => {
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
// The sent message follows dsh's language, so the model reads it in the user's own language.
|
|
231
|
+
const text = t('continue.message');
|
|
232
|
+
if (React.flushSync !== undefined) React.flushSync(() => inputActions.setDraft(text));
|
|
233
|
+
else inputActions.setDraft(text);
|
|
233
234
|
inputActions.submit();
|
|
234
235
|
};
|
|
235
236
|
const button = React.createElement('button', {
|
|
236
237
|
type: 'button',
|
|
237
238
|
className: host.className,
|
|
238
|
-
title: '
|
|
239
|
-
'aria-label': '
|
|
239
|
+
title: t('continue.label'),
|
|
240
|
+
'aria-label': t('continue.label'),
|
|
240
241
|
onMouseDown: (event) => event.preventDefault(),
|
|
241
242
|
onClick,
|
|
242
243
|
}, React.createElement('svg', { viewBox: '0 0 16 16', width: 16, height: 16, 'aria-hidden': true },
|
|
@@ -255,7 +256,7 @@ window.__ModuleLoader__.load({
|
|
|
255
256
|
* so nothing is lost or duplicated.
|
|
256
257
|
* shortcut: grips are portaled into QueueDock rows found in the DOM; if a dsh update changes that markup the
|
|
257
258
|
* grips just stop appearing — upgrade when dsh exposes a queue row slot or a native move action. */
|
|
258
|
-
function QueueReorder({ useSession, useProjection, updateQueue, notify }) {
|
|
259
|
+
function QueueReorder({ useSession, useProjection, updateQueue, notify, t }) {
|
|
259
260
|
const inbox = useProjection('inbox');
|
|
260
261
|
const pending = useSession((s) => (s === undefined ? undefined : s.pendingSubmissions));
|
|
261
262
|
const mutable = useSession((s) => s !== undefined && (s.subagent === null || s.subagent.address.mode === 'continuable'));
|
|
@@ -320,7 +321,7 @@ window.__ModuleLoader__.load({
|
|
|
320
321
|
}
|
|
321
322
|
} catch {
|
|
322
323
|
for (const change of done.reverse()) await edit(change.row, change.prev).catch(() => undefined);
|
|
323
|
-
notify('error', '
|
|
324
|
+
notify('error', t('queue.failed'));
|
|
324
325
|
} finally {
|
|
325
326
|
setBusy(false);
|
|
326
327
|
}
|
|
@@ -375,8 +376,8 @@ window.__ModuleLoader__.load({
|
|
|
375
376
|
const draggable = texts[index] !== null && !busy;
|
|
376
377
|
const grip = React.createElement('button', {
|
|
377
378
|
type: 'button',
|
|
378
|
-
title: draggable ? '
|
|
379
|
-
'aria-label': '
|
|
379
|
+
title: draggable ? t('queue.drag') : t('queue.locked'),
|
|
380
|
+
'aria-label': t('queue.grip'),
|
|
380
381
|
disabled: !draggable,
|
|
381
382
|
onPointerDown: (event) => startDrag(index, event),
|
|
382
383
|
onKeyDown: (event) => {
|
|
@@ -683,6 +684,7 @@ window.__ModuleLoader__.load({
|
|
|
683
684
|
name: 'conversation.input.dock',
|
|
684
685
|
id: 'queue-reorder',
|
|
685
686
|
order: 21,
|
|
687
|
+
locale: LOCALE_NS,
|
|
686
688
|
inject: (sessionId) => {
|
|
687
689
|
const actx = ctx.sessions.scope(sessionId);
|
|
688
690
|
const conversation = actx === undefined ? undefined : actx.get('conversation');
|
|
@@ -713,9 +715,16 @@ window.__ModuleLoader__.load({
|
|
|
713
715
|
name: 'conversation.input.right',
|
|
714
716
|
id: 'composer-continue',
|
|
715
717
|
order: 1000,
|
|
718
|
+
locale: LOCALE_NS,
|
|
716
719
|
}, ContinueButton));
|
|
717
720
|
if (ctx.locale !== undefined) ctx.effect(() => ctx.locale.register(LOCALE_NS, {
|
|
718
721
|
en: {
|
|
722
|
+
'continue.label': 'Continue',
|
|
723
|
+
'continue.message': 'continue',
|
|
724
|
+
'queue.drag': 'Drag to reorder (or ↑/↓)',
|
|
725
|
+
'queue.locked': 'Messages with images/files cannot be moved',
|
|
726
|
+
'queue.grip': 'Reorder queued message',
|
|
727
|
+
'queue.failed': 'Reorder failed: a message may have already started sending.',
|
|
719
728
|
copyDeeplink: 'Copy deeplink',
|
|
720
729
|
allowChat: 'Allow for this chat',
|
|
721
730
|
allowChatTitle: 'Allow {toolName} without asking for the rest of this chat, with any arguments. If the tool can write, that includes any write.',
|
|
@@ -750,6 +759,12 @@ window.__ModuleLoader__.load({
|
|
|
750
759
|
'changes.refresh': 'Refresh',
|
|
751
760
|
},
|
|
752
761
|
zh: {
|
|
762
|
+
'continue.label': '继续',
|
|
763
|
+
'continue.message': '继续',
|
|
764
|
+
'queue.drag': '拖动以排序(或按 ↑/↓)',
|
|
765
|
+
'queue.locked': '含图片或文件的消息无法移动',
|
|
766
|
+
'queue.grip': '调整排队消息顺序',
|
|
767
|
+
'queue.failed': '排序失败:某条消息可能已开始发送。',
|
|
753
768
|
copyDeeplink: '复制深层链接',
|
|
754
769
|
allowChat: '本对话内允许',
|
|
755
770
|
allowChatTitle: '本对话剩余时间内,{toolName} 的任何参数调用都无需再询问。若该工具可写入,也包括任何写入操作。',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-composer-plus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "DeepSeek Harness helpers: Codex-style Changes panel, input history, Shift+Tab /plan, one-click Continue, queue drag-and-drop, Copy deeplink, Auto Review allow-for-chat, background notifications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|