@restregular/dsh-powerup 0.19.9 → 0.19.10
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 +49 -7
- package/client.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ panel list into an adaptive icon grid with drag sorting, folders, a
|
|
|
9
9
|
back-to-conversation tile, and restart/close tiles. It also adds a
|
|
10
10
|
**task-progress panel** with three-layer requirements and browsable history, a
|
|
11
11
|
**direct-ask button** for one-shot model answers without an Agent, and
|
|
12
|
-
**quick-reply options** that let the Agent offer tappable text buttons
|
|
13
|
-
|
|
12
|
+
**quick-reply options** that let the Agent offer tappable text buttons under its
|
|
13
|
+
last reply.
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
@@ -123,11 +123,29 @@ of tappable options for the current session:
|
|
|
123
123
|
] }
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
Each entry has a `label` (the short button text) and a `message` (the full text
|
|
127
|
+
sent when it is tapped). A short instruction for this tool is injected into the
|
|
128
|
+
system prompt, so the Agent knows when and how to offer options without extra
|
|
129
|
+
setup.
|
|
130
|
+
|
|
131
|
+
- **Where they appear.** Up to 8 options render as stacked buttons directly
|
|
132
|
+
above the copy / like / dislike / branch actions of the **last assistant
|
|
133
|
+
message** — visually attached to the reply they follow. The buttons follow
|
|
134
|
+
the newest message as the conversation advances.
|
|
135
|
+
- **What a tap does.** Tapping an option sends its `message` as a normal user
|
|
136
|
+
message through the session controller. It is a real message: it enters the
|
|
137
|
+
transcript and the Agent responds to it.
|
|
138
|
+
- **When they clear.** The options disappear as soon as the user sends *any*
|
|
139
|
+
message — tapping an option, pressing Enter in the composer, or clicking the
|
|
140
|
+
host's Send button. The Agent can also pass an empty `options` array to clear
|
|
141
|
+
them immediately, without waiting for a message.
|
|
142
|
+
- **Scoped and safe.** Options are keyed by session id, so one conversation's
|
|
143
|
+
buttons never leak into another. A version guard prevents a stale clear from
|
|
144
|
+
erasing a newer set of options.
|
|
145
|
+
- **Toggle.** The **Quick reply options** switch on the Power-Up page controls
|
|
146
|
+
both halves: turning it off removes the tool from the Agent and withdraws the
|
|
147
|
+
injected system-prompt section; turning it back on restores both. The switch
|
|
148
|
+
is kept in sync between the browser and the Host and persists across restarts.
|
|
131
149
|
|
|
132
150
|
### Sidebar launcher
|
|
133
151
|
|
|
@@ -533,6 +551,30 @@ system "busy Enter" preference:
|
|
|
533
551
|
Plain Shift+Enter still inserts a newline, IME composition and slash/mention
|
|
534
552
|
menus are left to the host, and an empty draft keeps the host's retry behavior.
|
|
535
553
|
|
|
554
|
+
### Quick replies implementation notes
|
|
555
|
+
|
|
556
|
+
The Agent publishes options through a Host tool; the browser only renders them.
|
|
557
|
+
`powerup_quick_replies` writes a bounded, session-keyed record to
|
|
558
|
+
`~/.dsh/dsh-powerup/quick-replies.json` (at most 8 options) and derives the
|
|
559
|
+
calling session from `exec.agent.id`. A short how-to section is registered with
|
|
560
|
+
`ctx.systemPrompt.section` so the tool is discoverable without a setup step.
|
|
561
|
+
|
|
562
|
+
On the Client side, a `conversation.input.right` contribution polls the
|
|
563
|
+
`/dsh-powerup/api/quick-replies` route and portals a mount node into the host's
|
|
564
|
+
last `[data-turn-tail]` — the container around the assistant message's
|
|
565
|
+
`IconActions` row — inserted before its first child so the options sit above
|
|
566
|
+
the copy/like buttons. The mount re-elects the tail as new turns arrive. A
|
|
567
|
+
capture-phase click listener on the host Send button and a capture-phase keydown
|
|
568
|
+
listener on Enter clear the options through the Host (version-guarded), so any
|
|
569
|
+
user message retires them; tapping an option sends it via `session.prompt` and
|
|
570
|
+
clears them the same way.
|
|
571
|
+
|
|
572
|
+
Disabling the feature is a real teardown, not just visual hiding: the Client
|
|
573
|
+
POSTs the switch to the Host, whose controller unregisters the tool and disposes
|
|
574
|
+
the prompt section together; re-enabling re-registers both. The effects follow
|
|
575
|
+
the host's `ctx.effect` contract (registration in the effect body, disposal
|
|
576
|
+
returned as the cleanup), so a toggle cannot leave stale registrations behind.
|
|
577
|
+
|
|
536
578
|
## Development
|
|
537
579
|
|
|
538
580
|
```bash
|
package/client.js
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
const requirementCreateDraft = { workspaceId: null, title: '', text: '', scope: 'current' };
|
|
86
86
|
/** Fallback bucket when the hero cannot resolve an owning workspace yet. */
|
|
87
87
|
const UNSCOPED_WORKSPACE = '__unscoped__';
|
|
88
|
-
const VERSION = '0.19.
|
|
88
|
+
const VERSION = '0.19.10';
|
|
89
89
|
const MENU_GAP = 8;
|
|
90
90
|
const MENU_WIDTH = 248;
|
|
91
91
|
/** Reference scheme understood by the Host's `powerup_step_read` tool. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restregular/dsh-powerup",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.10",
|
|
4
4
|
"description": "为 DeepSeek Harness 提供一组可选的小型增强:轨迹右键菜单与步骤引用、后台任务停止原因、插件一键安装、侧边栏图标网格、会话切换、定位当前会话、工作区提示词、旁路模型生成的结构化任务进度;所有功能均可在 Power-Up 页面独立开关。 · Opt-in upgrades for DeepSeek Harness: Trajectory context menu and step references, job stop reasons, one-click plugin install, an adaptive sidebar launcher, session switching, locating the current session, workspace prompts, and non-blocking model-generated structured task progress — each toggled independently on the Power-Up page.",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|