dsh-input-traffic 0.1.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/LICENSE +21 -0
- package/README.en.md +202 -0
- package/README.md +202 -0
- package/cordis.patch.yml +11 -0
- package/lib/client.js +920 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +5 -0
- package/lib/types/client/freeze-button.d.ts +10 -0
- package/lib/types/client/freeze-button.d.ts.map +1 -0
- package/lib/types/client/freeze-button.js +51 -0
- package/lib/types/client/freeze-button.js.map +1 -0
- package/lib/types/client/freeze-store.d.ts +24 -0
- package/lib/types/client/freeze-store.d.ts.map +1 -0
- package/lib/types/client/freeze-store.js +24 -0
- package/lib/types/client/freeze-store.js.map +1 -0
- package/lib/types/client/hide-enter-row.d.ts +17 -0
- package/lib/types/client/hide-enter-row.d.ts.map +1 -0
- package/lib/types/client/hide-enter-row.js +5 -0
- package/lib/types/client/hide-enter-row.js.map +1 -0
- package/lib/types/client/index.d.ts +25 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +80 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/locales.d.ts +54 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/locales.js +96 -0
- package/lib/types/client/locales.js.map +1 -0
- package/lib/types/client/steer-queue-dock.d.ts +59 -0
- package/lib/types/client/steer-queue-dock.d.ts.map +1 -0
- package/lib/types/client/steer-queue-dock.js +320 -0
- package/lib/types/client/steer-queue-dock.js.map +1 -0
- package/lib/types/index.d.ts +11 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +5 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/invariant.d.ts +12 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +12 -0
- package/lib/types/invariant.js.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
/** One mutation accepted by the conversation queue verb. */
|
|
3
|
+
export type SteerQueueAction = {
|
|
4
|
+
kind: 'edit';
|
|
5
|
+
content: readonly {
|
|
6
|
+
type: 'text';
|
|
7
|
+
text: string;
|
|
8
|
+
}[];
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'remove';
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'steer';
|
|
13
|
+
};
|
|
14
|
+
/** Queue operations injected by the session-scoped registration. */
|
|
15
|
+
export interface SteerQueueDockInjected {
|
|
16
|
+
updateQueue: (itemId: string, action: SteerQueueAction) => Promise<void>;
|
|
17
|
+
/** Cancel the current turn while preserving the pending queue. */
|
|
18
|
+
cancel: () => Promise<void>;
|
|
19
|
+
/** Re-send one plain-text message as a queued follow-up (the revoke path). */
|
|
20
|
+
send: (text: string) => Promise<void>;
|
|
21
|
+
/** Back-fill the composer draft (the pull-back-to-composer edit path). */
|
|
22
|
+
setDraft: (text: string) => void;
|
|
23
|
+
notify: (level: 'info' | 'error', text: string) => void;
|
|
24
|
+
}
|
|
25
|
+
/** Full props of a dock entry: InputZone owner share + session standard kit + global seat + the locale seat. */
|
|
26
|
+
export type SteerQueueDockProps = PropsRuntime<'conversation.input.dock'> & SteerQueueDockInjected & PropsLocale<'steer'>;
|
|
27
|
+
/** The planning tier of one queued row. */
|
|
28
|
+
export type SteerTier = 'now' | 'next' | 'later';
|
|
29
|
+
/**
|
|
30
|
+
* Resolve the action sequence for one planning button press. Pure so the
|
|
31
|
+
* button wiring and its tests share one truth.
|
|
32
|
+
* @param tier - the pressed planning tier.
|
|
33
|
+
* @returns the queue mutation (red re-uses a steer-shaped action for the
|
|
34
|
+
* yellow branch; the red branch performs cancel + remove + resend instead).
|
|
35
|
+
*/
|
|
36
|
+
export declare function planActionFor(tier: SteerTier): {
|
|
37
|
+
action: SteerQueueAction;
|
|
38
|
+
interruptFirst: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Project the tier badge of one inbox row from its placement. Pure so the
|
|
42
|
+
* row rendering and its tests share one truth.
|
|
43
|
+
* @param placement - the inbox projection placement.
|
|
44
|
+
* @returns the tier badge, or null for non-visible context rows.
|
|
45
|
+
*/
|
|
46
|
+
export declare function badgeFor(placement: 'queued' | 'steering' | 'context'): SteerTier | null;
|
|
47
|
+
/**
|
|
48
|
+
* Auto-grow one edit textarea to its content. The CSS max-height caps the
|
|
49
|
+
* growth; beyond it the textarea scrolls internally. Height is reset first so
|
|
50
|
+
* shrink (deleting lines) also tracks the content.
|
|
51
|
+
* @param el - the textarea to resize in place.
|
|
52
|
+
*/
|
|
53
|
+
export declare function resizeEditor(el: HTMLTextAreaElement): void;
|
|
54
|
+
/**
|
|
55
|
+
* Queue strip with three-tier planning: one item renders directly; multiple
|
|
56
|
+
* items default to a collapsible count header; an empty queue renders nothing.
|
|
57
|
+
*/
|
|
58
|
+
export declare function SteerQueueDock({ useSession, input, updateQueue, cancel, send, setDraft, notify, t }: SteerQueueDockProps): import("react").JSX.Element | null;
|
|
59
|
+
//# sourceMappingURL=steer-queue-dock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steer-queue-dock.d.ts","sourceRoot":"","sources":["../../../src/client/steer-queue-dock.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAYjF,4DAA4D;AAC5D,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAKrB,oEAAoE;AACpE,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,M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|
|
2
|
+
/**
|
|
3
|
+
* Three-tier steering queue dock: the shadowing replacement for the official
|
|
4
|
+
* `conversation.input.dock` entry (same cell id `queue`, priority -1, so the
|
|
5
|
+
* lower priority wins and the official QueueDock never renders while this
|
|
6
|
+
* plugin is mounted).
|
|
7
|
+
*
|
|
8
|
+
* Every queued row carries three planning buttons:
|
|
9
|
+
* - green (later, the default state): the row already queues for the next
|
|
10
|
+
* turn —plain Enter keeps feeding rows here; pressing green on a row that
|
|
11
|
+
* was already steered (yellow) revokes the insertion and pulls it back to
|
|
12
|
+
* later (the yellow flow is reversible);
|
|
13
|
+
* - yellow (next): strict-steer the row into the running turn, consumed at
|
|
14
|
+
* the next step boundary (after the current action finishes);
|
|
15
|
+
* - red (now): cancel the running turn, then remove the row and re-send its
|
|
16
|
+
* text as a fresh message —the re-send arms the harness wake latch (the
|
|
17
|
+
* converged driver restarts) and the interrupted input is processed as the
|
|
18
|
+
* next turn's input. A plain steer after cancel would re-insert a message
|
|
19
|
+
* that is already pending in next-turn and the inbox rejects it.
|
|
20
|
+
*
|
|
21
|
+
* The toolbar also exposes a queue-level "cancel and clear" that stops the
|
|
22
|
+
* current run and removes every queued row, plus a session-level
|
|
23
|
+
* freeze/resume toggle for the peak-hour scenario: freeze stops the current
|
|
24
|
+
* run while preserving the queue (keepInbox), resume re-arms the driver by
|
|
25
|
+
* re-sending the first queued row so the preserved work continues.
|
|
26
|
+
*/
|
|
27
|
+
import { useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
28
|
+
import { IconCheckOutline16, IconChevronDownOutline14, IconChevronUpOutline14, IconCloseOutline16, IconEditOutline16, IconQueueOutline14, IconRightUpOutline16, IconTrashOutline16, Tooltip, } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
29
|
+
import { freezeStore } from "./freeze-store.js";
|
|
30
|
+
import css from './steer-queue-dock.module.css';
|
|
31
|
+
/** Busy marker for a whole-queue rebuild (reorder); locks every row action. */
|
|
32
|
+
const REORDER_MARK = '__reorder__';
|
|
33
|
+
/**
|
|
34
|
+
* Resolve the action sequence for one planning button press. Pure so the
|
|
35
|
+
* button wiring and its tests share one truth.
|
|
36
|
+
* @param tier - the pressed planning tier.
|
|
37
|
+
* @returns the queue mutation (red re-uses a steer-shaped action for the
|
|
38
|
+
* yellow branch; the red branch performs cancel + remove + resend instead).
|
|
39
|
+
*/
|
|
40
|
+
export function planActionFor(tier) {
|
|
41
|
+
if (tier === 'later')
|
|
42
|
+
return { action: { kind: 'steer' }, interruptFirst: false };
|
|
43
|
+
// Yellow steers only; red cancels the running turn first, then steers.
|
|
44
|
+
return { action: { kind: 'steer' }, interruptFirst: tier === 'now' };
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Project the tier badge of one inbox row from its placement. Pure so the
|
|
48
|
+
* row rendering and its tests share one truth.
|
|
49
|
+
* @param placement - the inbox projection placement.
|
|
50
|
+
* @returns the tier badge, or null for non-visible context rows.
|
|
51
|
+
*/
|
|
52
|
+
export function badgeFor(placement) {
|
|
53
|
+
if (placement === 'steering')
|
|
54
|
+
return 'next';
|
|
55
|
+
if (placement === 'queued')
|
|
56
|
+
return 'later';
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Auto-grow one edit textarea to its content. The CSS max-height caps the
|
|
61
|
+
* growth; beyond it the textarea scrolls internally. Height is reset first so
|
|
62
|
+
* shrink (deleting lines) also tracks the content.
|
|
63
|
+
* @param el - the textarea to resize in place.
|
|
64
|
+
*/
|
|
65
|
+
export function resizeEditor(el) {
|
|
66
|
+
el.style.height = 'auto';
|
|
67
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Queue strip with three-tier planning: one item renders directly; multiple
|
|
71
|
+
* items default to a collapsible count header; an empty queue renders nothing.
|
|
72
|
+
*/
|
|
73
|
+
export function SteerQueueDock({ useSession, input, updateQueue, cancel, send, setDraft, notify, t }) {
|
|
74
|
+
const inbox = useSession(s => s.queue);
|
|
75
|
+
const queue = useMemo(() => inbox.filter(row => row.placement === 'queued'), [inbox]);
|
|
76
|
+
const steering = useMemo(() => inbox.filter(row => row.placement === 'steering'), [inbox]);
|
|
77
|
+
const running = useSession(s => s.running);
|
|
78
|
+
const queueMutable = useSession(s => s.subagent === null);
|
|
79
|
+
const [editing, setEditing] = useState(null);
|
|
80
|
+
const [busy, setBusy] = useState(null);
|
|
81
|
+
const [clearing, setClearing] = useState(false);
|
|
82
|
+
const [collapsed, setCollapsed] = useState(true);
|
|
83
|
+
// Session-level freeze lives in the composer-right control; the dock reads
|
|
84
|
+
// the shared store for the banner and inert states.
|
|
85
|
+
const { frozen } = useSyncExternalStore(freezeStore.subscribe, freezeStore.getSnapshot);
|
|
86
|
+
const listId = useId();
|
|
87
|
+
// The edit textarea; grown to its content on entry and on every input.
|
|
88
|
+
const editorRef = useRef(null);
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (queue.length === 0 && !collapsed)
|
|
91
|
+
setCollapsed(true);
|
|
92
|
+
if (editing !== null && (!queueMutable || !queue.some(row => row.id === editing.id)))
|
|
93
|
+
setEditing(null);
|
|
94
|
+
}, [collapsed, editing, queue, queueMutable]);
|
|
95
|
+
// Grow the editor to its full content when a row enters edit mode.
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (editing === null)
|
|
98
|
+
return;
|
|
99
|
+
const el = editorRef.current;
|
|
100
|
+
if (el !== null)
|
|
101
|
+
resizeEditor(el);
|
|
102
|
+
}, [editing?.id]);
|
|
103
|
+
// The dock stays mounted while the agent runs (the freeze entry must be
|
|
104
|
+
// reachable before any message queues), and while any row is pending.
|
|
105
|
+
if (queue.length === 0 && steering.length === 0 && !running)
|
|
106
|
+
return null;
|
|
107
|
+
const interactionActive = queueMutable && (editing !== null || busy !== null || clearing);
|
|
108
|
+
const expanded = !collapsed || interactionActive;
|
|
109
|
+
const listVisible = queue.length === 1 || expanded;
|
|
110
|
+
const planDisabled = !queueMutable || !running || frozen;
|
|
111
|
+
const nothingPending = queue.length === 0 && steering.length === 0;
|
|
112
|
+
// Reordering rebuilds the queue by re-sending texts; non-text rows cannot
|
|
113
|
+
// be re-sent, so sorting is disabled while any such row is queued.
|
|
114
|
+
const reorderUnsupported = queue.some(row => row.text === null);
|
|
115
|
+
// Pull-back-to-composer is only offered when the composer draft is empty:
|
|
116
|
+
// the pulled message back-fills the draft, so an occupied composer would be
|
|
117
|
+
// overwritten. Steered (yellow/red) rows never offer it — once inserted,
|
|
118
|
+
// they are not deeply re-edited.
|
|
119
|
+
const composerEmpty = input.draft.trim() === '';
|
|
120
|
+
const applyAction = async (itemId, action, failure) => {
|
|
121
|
+
setBusy(itemId);
|
|
122
|
+
try {
|
|
123
|
+
await updateQueue(itemId, action);
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
notify('error', failure);
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
setBusy(current => current === itemId ? null : current);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const saveEdit = async () => {
|
|
135
|
+
if (editing === null || editing.text.trim() === '')
|
|
136
|
+
return;
|
|
137
|
+
const itemId = editing.id;
|
|
138
|
+
const text = editing.text;
|
|
139
|
+
setBusy(itemId);
|
|
140
|
+
try {
|
|
141
|
+
await updateQueue(itemId, { kind: 'edit', content: [{ type: 'text', text }] });
|
|
142
|
+
setEditing(null);
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
// The edit failed (the agent may have claimed the row mid-edit): fall
|
|
146
|
+
// back to the composer so the edited content is never lost. Only when
|
|
147
|
+
// the composer is free — an occupied draft must not be overwritten.
|
|
148
|
+
if (input.draft.trim() === '') {
|
|
149
|
+
setDraft(text);
|
|
150
|
+
setEditing(null);
|
|
151
|
+
notify('error', t('queue.editFailed.pulledBack'));
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
notify('error', t('queue.editFailed'));
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
setBusy(current => current === itemId ? null : current);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const steerRow = async (row, tier) => {
|
|
162
|
+
setBusy(row.id);
|
|
163
|
+
try {
|
|
164
|
+
if (tier === 'now') {
|
|
165
|
+
// Interrupt, then re-submit: cancel stops the current run (keepInbox),
|
|
166
|
+
// the row is removed so its identity cannot collide, and re-sending
|
|
167
|
+
// the text arms the harness wake latch (the converged driver restarts
|
|
168
|
+
// and processes it as the next turn's input). A plain steer after
|
|
169
|
+
// cancel would re-insert a message already pending in next-turn and
|
|
170
|
+
// the inbox rejects the duplicate.
|
|
171
|
+
await cancel();
|
|
172
|
+
await updateQueue(row.id, { kind: 'remove' });
|
|
173
|
+
if (row.text !== null)
|
|
174
|
+
await send(row.text);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
await updateQueue(row.id, { kind: 'steer' });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
notify('error', tier === 'now' ? t('steer.nowFailed') : t('steer.nextFailed'));
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
setBusy(current => current === row.id ? null : current);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Revoke a steered (yellow) or interrupting (red) row back to later: remove
|
|
189
|
+
* the admitted row and re-send its text as a queued follow-up, so it lands
|
|
190
|
+
* in next-turn again (the yellow flow is reversible).
|
|
191
|
+
*/
|
|
192
|
+
const revokeToLater = async (row) => {
|
|
193
|
+
if (row.text === null)
|
|
194
|
+
return;
|
|
195
|
+
setBusy(row.id);
|
|
196
|
+
try {
|
|
197
|
+
await updateQueue(row.id, { kind: 'remove' });
|
|
198
|
+
await send(row.text);
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
notify('error', t('steer.revokeFailed'));
|
|
202
|
+
}
|
|
203
|
+
finally {
|
|
204
|
+
setBusy(current => current === row.id ? null : current);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Move one queued row up/down in the FIFO order. The queue is rebuilt in
|
|
209
|
+
* the new order: every queued row is removed and re-sent sequentially
|
|
210
|
+
* (plain-text rows only), so the agent's next-turn list matches the
|
|
211
|
+
* reordered view.
|
|
212
|
+
*/
|
|
213
|
+
const reorder = async (rowId, delta) => {
|
|
214
|
+
const rows = queue;
|
|
215
|
+
const index = rows.findIndex(row => row.id === rowId);
|
|
216
|
+
const target = index + delta;
|
|
217
|
+
if (index < 0 || target < 0 || target >= rows.length)
|
|
218
|
+
return;
|
|
219
|
+
const next = [...rows];
|
|
220
|
+
const swapped = next[index];
|
|
221
|
+
next[index] = next[target];
|
|
222
|
+
next[target] = swapped;
|
|
223
|
+
if (next.some(row => row.text === null)) {
|
|
224
|
+
notify('error', t('steer.reorder.unsupported'));
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
setBusy(REORDER_MARK);
|
|
228
|
+
try {
|
|
229
|
+
for (const row of rows)
|
|
230
|
+
await updateQueue(row.id, { kind: 'remove' });
|
|
231
|
+
for (const row of next)
|
|
232
|
+
await send(row.text);
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
notify('error', t('steer.reorderFailed'));
|
|
236
|
+
}
|
|
237
|
+
finally {
|
|
238
|
+
setBusy(null);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Pull one queued row back into the composer draft for editing: the text
|
|
243
|
+
* back-fills the input box and the row leaves the queue; the user edits and
|
|
244
|
+
* resubmits it as a fresh message.
|
|
245
|
+
*/
|
|
246
|
+
const pullBackToComposer = async (row) => {
|
|
247
|
+
if (row.text === null)
|
|
248
|
+
return;
|
|
249
|
+
setDraft(row.text);
|
|
250
|
+
setBusy(row.id);
|
|
251
|
+
try {
|
|
252
|
+
await updateQueue(row.id, { kind: 'remove' });
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
255
|
+
notify('error', t('steer.pullBackFailed'));
|
|
256
|
+
}
|
|
257
|
+
finally {
|
|
258
|
+
setBusy(current => current === row.id ? null : current);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
const clearAll = async () => {
|
|
262
|
+
setClearing(true);
|
|
263
|
+
// Cancel the current run and clear every pending row (queued and
|
|
264
|
+
// steering alike). Removal races the agent claiming rows;
|
|
265
|
+
// item-not-found is a normal convergence and must not surface.
|
|
266
|
+
const pending = [...queue, ...steering];
|
|
267
|
+
try {
|
|
268
|
+
await cancel();
|
|
269
|
+
await Promise.all(pending.map(row => updateQueue(row.id, { kind: 'remove' }).catch(() => undefined)));
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
notify('error', t('steer.clearFailed'));
|
|
273
|
+
}
|
|
274
|
+
finally {
|
|
275
|
+
setClearing(false);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
return (_jsx("div", { className: css.dock, "data-steer-dock": "", children: _jsxs("div", { className: css.panel, children: [_jsxs("div", { className: css.toolbar, children: [_jsxs("button", { type: "button", className: css.header, "aria-controls": listId, "aria-expanded": expanded, disabled: queue.length <= 1 || interactionActive, onClick: () => { setCollapsed(value => !value); }, children: [_jsx("span", { className: css.lead, "aria-hidden": true, children: _jsx(IconQueueOutline14, {}) }), queue.length > 0 && (_jsx("span", { className: css.count, children: t('queue.count', { n: queue.length }) })), queue.length > 1 && (_jsx("span", { className: css.chevron, "aria-hidden": true, children: expanded ? _jsx(IconChevronDownOutline14, {}) : _jsx(IconChevronUpOutline14, {}) }))] }), _jsx("div", { className: css.toolbarActions, children: _jsx(Tooltip, { label: t('steer.clear'), side: "top", delayMs: 500, children: _jsxs("button", { type: "button", className: css.clear, "aria-label": t('steer.clear'), disabled: clearing || busy !== null || nothingPending, onClick: () => { void clearAll(); }, children: [_jsx(IconTrashOutline16, { size: 14 }), _jsx("span", { className: css.clearLabel, children: t('steer.clear') })] }) }) })] }), frozen && (_jsx("div", { className: css.frozenBanner, role: "status", children: t('steer.frozen') })), _jsx("ul", { id: listId, className: css.list, hidden: !listVisible, children: listVisible && queue.map(row => (_jsxs("li", { className: css.row, "data-tier": badgeFor('queued') ?? undefined, "data-editing": editing?.id === row.id ? '' : undefined, children: [queue.length === 1 && _jsx("span", { className: css.lead, "aria-hidden": true, children: _jsx(IconQueueOutline14, {}) }), _jsx(SteerBadge, { tier: badgeFor('queued'), t: t }), editing?.id === row.id
|
|
279
|
+
? (_jsx("textarea", { ref: editorRef, autoFocus: true, className: css.editor, "aria-label": t('queue.edit'), rows: 1, value: editing.text, onChange: (event) => { setEditing({ id: row.id, text: event.currentTarget.value }); }, onInput: (event) => { resizeEditor(event.currentTarget); }, onKeyDown: (event) => {
|
|
280
|
+
if (event.key === 'Escape') {
|
|
281
|
+
setEditing(null);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
// Plain Enter saves; Shift+Enter keeps editing (newline).
|
|
285
|
+
if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {
|
|
286
|
+
event.preventDefault();
|
|
287
|
+
void saveEdit();
|
|
288
|
+
}
|
|
289
|
+
} }))
|
|
290
|
+
: _jsx("span", { className: css.preview, children: row.preview }), queueMutable && _jsx("div", { className: css.actions, children: editing?.id === row.id
|
|
291
|
+
? (_jsxs(_Fragment, { children: [_jsx(Tooltip, { label: t('queue.save'), side: "bottom", delayMs: 500, children: _jsx("button", { type: "button", className: css.action, "aria-label": t('queue.save'), disabled: busy !== null || editing.text.trim() === '', onClick: () => { void saveEdit(); }, children: _jsx(IconCheckOutline16, { size: 14 }) }) }), _jsx(Tooltip, { label: t('queue.cancelEdit'), side: "bottom", delayMs: 500, children: _jsx("button", { type: "button", className: css.action, "aria-label": t('queue.cancelEdit'), disabled: busy !== null, onClick: () => { setEditing(null); }, children: _jsx(IconCloseOutline16, { size: 14 }) }) })] }))
|
|
292
|
+
: (_jsxs(_Fragment, { children: [_jsx(Tooltip, { label: t('steer.moveUp'), side: "bottom", delayMs: 500, disabled: frozen || reorderUnsupported, children: _jsx("button", { type: "button", className: css.action, "aria-label": t('steer.moveUp'), title: reorderUnsupported ? t('steer.reorder.unsupported') : undefined, disabled: busy !== null || frozen || reorderUnsupported, onClick: () => { void reorder(row.id, -1); }, children: _jsx(IconChevronUpOutline14, {}) }) }), _jsx(Tooltip, { label: t('steer.moveDown'), side: "bottom", delayMs: 500, disabled: frozen || reorderUnsupported, children: _jsx("button", { type: "button", className: css.action, "aria-label": t('steer.moveDown'), title: reorderUnsupported ? t('steer.reorder.unsupported') : undefined, disabled: busy !== null || frozen || reorderUnsupported, onClick: () => { void reorder(row.id, 1); }, children: _jsx(IconChevronDownOutline14, {}) }) }), _jsx(Tooltip, { label: t('steer.pullBack'), side: "bottom", delayMs: 500, disabled: row.text === null || !composerEmpty, children: _jsx("button", { type: "button", className: css.action, "aria-label": t('steer.pullBack'), title: row.text === null ? t('steer.pullBack.unsupported') : !composerEmpty ? t('steer.pullBack.composerBusy') : undefined, disabled: busy !== null || frozen || row.text === null || !composerEmpty, onClick: () => { void pullBackToComposer(row); }, children: _jsx(IconRightUpOutline16, {}) }) }), _jsx(Tooltip, { label: t('queue.edit'), side: "bottom", delayMs: 500, disabled: row.text === null, children: _jsx("button", { type: "button", className: css.action, "aria-label": t('queue.edit'), title: row.text === null ? t('queue.edit.unsupported') : undefined, disabled: busy !== null || row.text === null, onClick: () => {
|
|
293
|
+
if (row.text !== null)
|
|
294
|
+
setEditing({ id: row.id, text: row.text });
|
|
295
|
+
}, children: _jsx(IconEditOutline16, { size: 14 }) }) }), _jsx(Tooltip, { label: t('queue.remove'), side: "bottom", delayMs: 500, children: _jsx("button", { type: "button", className: css.action, "aria-label": t('queue.remove'), disabled: busy !== null, onClick: () => {
|
|
296
|
+
void applyAction(row.id, { kind: 'remove' }, t('queue.removeFailed'));
|
|
297
|
+
}, children: _jsx(IconTrashOutline16, { size: 14 }) }) }), _jsxs("span", { className: css.plan, role: "group", "aria-label": t('steer.later.aria'), children: [_jsx(Tooltip, { label: t('steer.now'), side: "bottom", delayMs: 500, disabled: planDisabled || row.text === null, children: _jsx("button", { type: "button", className: `${css.tier} ${css.tierNow}`, "aria-label": t('steer.now'), title: planDisabled ? t('steer.unavailable.running') : row.text === null ? t('steer.now.unsupported') : undefined, disabled: busy !== null || planDisabled || row.text === null, onClick: () => { void steerRow(row, 'now'); }, children: _jsx("span", { className: css.dot, "aria-hidden": true }) }) }), _jsx(Tooltip, { label: t('steer.next'), side: "bottom", delayMs: 500, disabled: planDisabled, children: _jsx("button", { type: "button", className: `${css.tier} ${css.tierNext}`, "aria-label": t('steer.next'), title: planDisabled ? t('steer.unavailable.running') : undefined, disabled: busy !== null || planDisabled, onClick: () => { void steerRow(row, 'next'); }, children: _jsx("span", { className: css.dot, "aria-hidden": true }) }) }), _jsx(Tooltip, { label: t('steer.later'), side: "bottom", delayMs: 500, children: _jsx("button", { type: "button", className: `${css.tier} ${css.tierLater}`, "aria-label": t('steer.later'), "aria-pressed": true, disabled: busy !== null || clearing, onClick: () => {
|
|
298
|
+
// Later is the default queue state; pressing it
|
|
299
|
+
// keeps the row queued (no-op by design).
|
|
300
|
+
}, children: _jsx("span", { className: css.dot, "aria-hidden": true }) }) })] })] })) })] }, row.id))) }), steering.length > 0 && (_jsx("ul", { className: css.steeringList, "data-steering-list": "", children: steering.map(row => (_jsxs("li", { className: css.row, "data-tier": badgeFor('steering') ?? undefined, children: [_jsx("span", { className: css.lead, "aria-hidden": true, children: _jsx(IconQueueOutline14, {}) }), _jsx(SteerBadge, { tier: badgeFor('steering'), t: t }), _jsx("span", { className: css.preview, children: row.preview }), _jsx("div", { className: css.actions, children: _jsx(Tooltip, { label: t('steer.revoke'), side: "bottom", delayMs: 500, disabled: row.text === null, children: _jsx("button", { type: "button", className: `${css.tier} ${css.tierLater}`, "aria-label": t('steer.revoke'), title: row.text === null ? t('steer.revoke.unsupported') : undefined, disabled: busy !== null || row.text === null || frozen, onClick: () => { void revokeToLater(row); }, children: _jsx("span", { className: css.dot, "aria-hidden": true }) }) }) })] }, row.id))) }))] }) }));
|
|
301
|
+
}
|
|
302
|
+
/** Badge label keys per tier. */
|
|
303
|
+
const BADGE_KEYS = {
|
|
304
|
+
now: 'steer.badge.now',
|
|
305
|
+
next: 'steer.badge.next',
|
|
306
|
+
later: 'steer.badge.later',
|
|
307
|
+
};
|
|
308
|
+
/** Badge tint classes per tier (present at bundle time; typed through the css-modules declaration). */
|
|
309
|
+
const BADGE_CLASSES = {
|
|
310
|
+
now: css.badgeNow,
|
|
311
|
+
next: css.badgeNext,
|
|
312
|
+
later: css.badgeLater,
|
|
313
|
+
};
|
|
314
|
+
/** One row's tier badge: colored dot + label; context rows render nothing. */
|
|
315
|
+
function SteerBadge({ tier, t }) {
|
|
316
|
+
if (tier === null)
|
|
317
|
+
return null;
|
|
318
|
+
return (_jsxs("span", { className: `${css.badge} ${BADGE_CLASSES[tier]}`, "data-badge": tier, children: [_jsx("span", { className: css.dot, "aria-hidden": true }), _jsx("span", { className: css.badgeLabel, children: t(BADGE_KEYS[tier]) })] }));
|
|
319
|
+
}
|
|
320
|
+
//# sourceMappingURL=steer-queue-dock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steer-queue-dock.js","sourceRoot":"","sources":["../../../src/client/steer-queue-dock.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAMzF,OAAO,EACL,kBAAkB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,kBAAkB,EACxF,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,OAAO,GACzF,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,C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3B,CAAA;AAED,uGAAuG;AACvG,MAAM,aAAa,GAA8B;IAC/C,GAAG,EAAE,GAAG,CAAC,QAAkB;IAC3B,IAAI,EAAE,GAAG,CAAC,SAAmB;IAC7B,KAAK,EAAE,GAAG,CAAC,UAAoB;CAChC,CAAA;AAED,8EAA8E;AAC9E,SAAS,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,EAA2D;IACtF,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC9B,OAAO,CACL,gBAAM,SAAS,EAAE,GAAG,GAAG,CAAC,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,gBAAc,IAAI,aACtE,eAAM,SAAS,EAAE,GAAG,CAAC,GAAG,wBAAgB,EACxC,eAAM,SAAS,EAAE,GAAG,CAAC,UAAU,YAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAQ,IACxD,CACR,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-input-traffic —node half.
|
|
3
|
+
*
|
|
4
|
+
* The node half is the Loader entry every client plugin must ship; it carries
|
|
5
|
+
* no host-side behavior. The browser half (src/client/index.ts) owns the
|
|
6
|
+
* whole takeover: the three-tier planning dock and the busy-Enter row hiding.
|
|
7
|
+
*/
|
|
8
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
9
|
+
/** @param ctx - host-side context; intentionally unused (client-plugin shape). */
|
|
10
|
+
export declare function apply(ctx: Context): void;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,kFAAkF;AAClF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAExC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,kFAAkF;AAClF,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,KAAK,GAAG,CAAA;AACV,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Companion invariant for the input-traffic client plugin.
|
|
3
|
+
*
|
|
4
|
+
* The takeover contract: the plugin owns the busy-Enter queue surface while
|
|
5
|
+
* the official composer keeps the Enter-as-queue path. If the conversation
|
|
6
|
+
* service or the input-dock declaration is absent, the plugin must not
|
|
7
|
+
* silently degrade to the official two-mode busy-Enter row —?the settings row
|
|
8
|
+
* it hides would otherwise leave the user with a preference the plugin no
|
|
9
|
+
* longer honours.
|
|
10
|
+
*/
|
|
11
|
+
export declare const STEER_INPUT_INVARIANT = "dsh-input-traffic requires the conversation service and the input-dock slot; refusing partial takeover";
|
|
12
|
+
//# sourceMappingURL=invariant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invariant.d.ts","sourceRoot":"","sources":["../../src/invariant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,2GAA2G,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Companion invariant for the input-traffic client plugin.
|
|
3
|
+
*
|
|
4
|
+
* The takeover contract: the plugin owns the busy-Enter queue surface while
|
|
5
|
+
* the official composer keeps the Enter-as-queue path. If the conversation
|
|
6
|
+
* service or the input-dock declaration is absent, the plugin must not
|
|
7
|
+
* silently degrade to the official two-mode busy-Enter row —?the settings row
|
|
8
|
+
* it hides would otherwise leave the user with a preference the plugin no
|
|
9
|
+
* longer honours.
|
|
10
|
+
*/
|
|
11
|
+
export const STEER_INPUT_INVARIANT = 'dsh-input-traffic requires the conversation service and the input-dock slot; refusing partial takeover';
|
|
12
|
+
//# sourceMappingURL=invariant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invariant.js","sourceRoot":"","sources":["../../src/invariant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,wGAAwG,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-input-traffic",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Three-tier (now/next/later) input steering for the DeepSeek Harness web GUI: replaces the busy-Enter queue dock with a red/yellow/green planning strip, hides the official busy-Enter behavior row, and keeps plain Enter as queue-later —a cordis client plugin, no dsh source changes, no PR required",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/drscrewdriver/dsh-input-traffic.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "lib/index.js",
|
|
11
|
+
"types": "lib/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./lib/types/index.d.ts",
|
|
15
|
+
"default": "./lib/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./client": {
|
|
18
|
+
"types": "./lib/types/client/index.d.ts",
|
|
19
|
+
"default": "./lib/client.js"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"lib/",
|
|
25
|
+
"cordis.patch.yml",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"dsh": {
|
|
29
|
+
"bundle": {
|
|
30
|
+
"patch": "./cordis.patch.yml"
|
|
31
|
+
},
|
|
32
|
+
"client": {
|
|
33
|
+
"inject": [
|
|
34
|
+
"@deepseek-ai/dsh-client-locale",
|
|
35
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
36
|
+
],
|
|
37
|
+
"platform": "web"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc -p tsconfig.json && tsdown",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\""
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=20"
|
|
47
|
+
},
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
51
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.5",
|
|
52
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.5",
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.5",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.5",
|
|
55
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.5",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.5"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"@deepseek-ai/cordis": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"@deepseek-ai/dsh-client-locale": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"@deepseek-ai/dsh-client-runtime": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-primitives": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-settings": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
78
|
+
"optional": true
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
|
|
84
|
+
"@testing-library/dom": "^10.4.1",
|
|
85
|
+
"@testing-library/react": "^16.3.2",
|
|
86
|
+
"@types/node": "^22.20.0",
|
|
87
|
+
"@types/react": "~18.3.1",
|
|
88
|
+
"@types/react-dom": "~18.3.1",
|
|
89
|
+
"jsdom": "^29.1.1",
|
|
90
|
+
"lightningcss": "^1.32.0",
|
|
91
|
+
"react": "^18.2.0",
|
|
92
|
+
"tsdown": "^0.22.2",
|
|
93
|
+
"typescript": "^6.0.3",
|
|
94
|
+
"vitest": "^4.1.8"
|
|
95
|
+
}
|
|
96
|
+
}
|