@deepseek-ai/dsh-client-ui-conversation 0.0.1-rc.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/LICENSE +28 -0
- package/README.i18n.yaml +6 -0
- package/README.md +65 -0
- package/README.zh.md +65 -0
- package/lib/client.js +9612 -0
- package/lib/index.js +28 -0
- package/lib/invariant.js +25 -0
- package/lib/types/client/apply.d.ts +16 -0
- package/lib/types/client/chat/AssistantMarkdown.d.ts +19 -0
- package/lib/types/client/chat/AssistantNodeView.d.ts +4 -0
- package/lib/types/client/chat/ChatNodeSeat.d.ts +11 -0
- package/lib/types/client/chat/ChatView.d.ts +7 -0
- package/lib/types/client/chat/CommandNodeView.d.ts +9 -0
- package/lib/types/client/chat/CompactionCommandCard.d.ts +8 -0
- package/lib/types/client/chat/CompactionItem.d.ts +19 -0
- package/lib/types/client/chat/ContextBody.d.ts +130 -0
- package/lib/types/client/chat/ContextInjectionRow.d.ts +26 -0
- package/lib/types/client/chat/GenericCommandCard.d.ts +9 -0
- package/lib/types/client/chat/MessageIconActions.d.ts +30 -0
- package/lib/types/client/chat/MessageImage.d.ts +20 -0
- package/lib/types/client/chat/MessageItem.d.ts +27 -0
- package/lib/types/client/chat/ReasoningRow.d.ts +14 -0
- package/lib/types/client/chat/StatsLine.d.ts +83 -0
- package/lib/types/client/chat/TurnTailNodeView.d.ts +7 -0
- package/lib/types/client/chat/message-chrome.d.ts +49 -0
- package/lib/types/client/chat/register-node-renderers.d.ts +7 -0
- package/lib/types/client/chat/tool-node-reader.d.ts +16 -0
- package/lib/types/client/chat/turn-assistant.d.ts +8 -0
- package/lib/types/client/chat/turn-metrics.d.ts +38 -0
- package/lib/types/client/chat/use-calendar-day.d.ts +6 -0
- package/lib/types/client/chat/use-throttled-visual-update.d.ts +8 -0
- package/lib/types/client/contract/chat-nodes.d.ts +68 -0
- package/lib/types/client/contract/composer-submission.d.ts +8 -0
- package/lib/types/client/contract/queue.d.ts +9 -0
- package/lib/types/client/contract/slots.d.ts +614 -0
- package/lib/types/client/contract/views.d.ts +39 -0
- package/lib/types/client/conversation-nodes/assistant.d.ts +35 -0
- package/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +28 -0
- package/lib/types/client/conversation-nodes/command.d.ts +54 -0
- package/lib/types/client/conversation-nodes/common.d.ts +37 -0
- package/lib/types/client/conversation-nodes/compaction.d.ts +21 -0
- package/lib/types/client/conversation-nodes/fallback.d.ts +16 -0
- package/lib/types/client/conversation-nodes/inbox.d.ts +21 -0
- package/lib/types/client/conversation-nodes/message.d.ts +22 -0
- package/lib/types/client/conversation-nodes/register.d.ts +7 -0
- package/lib/types/client/conversation-nodes/retry.d.ts +23 -0
- package/lib/types/client/conversation-nodes/tool.d.ts +23 -0
- package/lib/types/client/conversation-nodes/turn-error.d.ts +27 -0
- package/lib/types/client/conversation-nodes/turn-tail.d.ts +28 -0
- package/lib/types/client/index.d.ts +29 -0
- package/lib/types/client/input/blocks.d.ts +57 -0
- package/lib/types/client/input/contract.d.ts +333 -0
- package/lib/types/client/input/decorations.d.ts +63 -0
- package/lib/types/client/input/facade.d.ts +219 -0
- package/lib/types/client/input/hub.d.ts +88 -0
- package/lib/types/client/input/machine.d.ts +114 -0
- package/lib/types/client/input/submission-policy.d.ts +46 -0
- package/lib/types/client/locales.d.ts +312 -0
- package/lib/types/client/queue/QueueDock.d.ts +29 -0
- package/lib/types/client/queue/store.d.ts +19 -0
- package/lib/types/client/service.d.ts +148 -0
- package/lib/types/client/settings/EnterBehaviorRow.d.ts +21 -0
- package/lib/types/client/skeleton/ApprovalPanel.d.ts +13 -0
- package/lib/types/client/skeleton/ContextMeter.d.ts +14 -0
- package/lib/types/client/skeleton/ConversationRoot.d.ts +5 -0
- package/lib/types/client/skeleton/ConversationSession.d.ts +20 -0
- package/lib/types/client/skeleton/DetailsPanel.d.ts +5 -0
- package/lib/types/client/skeleton/EmptyHero.d.ts +55 -0
- package/lib/types/client/skeleton/ImageLightbox.d.ts +9 -0
- package/lib/types/client/skeleton/InputBar.d.ts +16 -0
- package/lib/types/client/skeleton/PermissionSelect.d.ts +11 -0
- package/lib/types/client/skeleton/TodoPanel.d.ts +28 -0
- package/lib/types/client/stores.d.ts +22 -0
- package/lib/types/index.d.ts +9 -0
- package/lib/types/invariant.d.ts +16 -0
- package/lib/types/submission-settings.d.ts +20 -0
- package/package.json +105 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InputHub: the InputService implementation (`ctx.conversation.input`) — one
|
|
3
|
+
* SessionInputShell per session, created inside the sessions provide
|
|
4
|
+
* materialization (the 'input' standard-kit entry IS the
|
|
5
|
+
* creation trigger) and torn down by the scope disposer (instance-and-scope
|
|
6
|
+
* share one lifecycle). The hub registers the three scoped input-mutation
|
|
7
|
+
* listeners on each session's actx (the sole consumer side of the ui-slash
|
|
8
|
+
* bail events) and owns the default-sink choreography: every session is a
|
|
9
|
+
* real host entity, so the sink is one unconditional prompt path.
|
|
10
|
+
*/
|
|
11
|
+
import type { ClientContext, SessionBinding, SessionId } from '@deepseek-ai/dsh-client-runtime/client';
|
|
12
|
+
import type { SlashController } from '@deepseek-ai/dsh-client-ui-slash/client';
|
|
13
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-locale/client';
|
|
14
|
+
import type { ComposerKeyboard, InputService, SessionInput } from './contract.ts';
|
|
15
|
+
import { SessionInputShell } from './facade.ts';
|
|
16
|
+
/** Session-addressed input facade registry (InputService face + composer-layer extras). */
|
|
17
|
+
export declare class InputHub implements InputService {
|
|
18
|
+
private readonly rootCtx;
|
|
19
|
+
private readonly t;
|
|
20
|
+
private readonly shells;
|
|
21
|
+
/**
|
|
22
|
+
* @param ctx - client root context (services resolved lazily per call — boot order stays free).
|
|
23
|
+
* @param t - conversation-namespace translate thunk (reads the active locale at call time).
|
|
24
|
+
*/
|
|
25
|
+
constructor(rootCtx: ClientContext, t: TranslateNS<'conversation'>);
|
|
26
|
+
/**
|
|
27
|
+
* Resolve the facade for one session-scope ctx (InputService face).
|
|
28
|
+
* @param actx - session-scope context.
|
|
29
|
+
* @returns the resident per-session facade.
|
|
30
|
+
*/
|
|
31
|
+
for(actx: ClientContext): SessionInput;
|
|
32
|
+
/**
|
|
33
|
+
* Resident shell for one session binding — the provide-channel entry
|
|
34
|
+
* (called during scope materialization, BEFORE the scope record is
|
|
35
|
+
* queryable, hence binding-fed and hence the thunked slash/popup deps).
|
|
36
|
+
* Wires the scoped event listeners + teardown into the session scope.
|
|
37
|
+
* @param binding - session assembly handle.
|
|
38
|
+
* @returns the shell.
|
|
39
|
+
*/
|
|
40
|
+
shellFor(binding: SessionBinding): SessionInputShell;
|
|
41
|
+
/**
|
|
42
|
+
* Resident shell by session id (service-face path; the provide channel has
|
|
43
|
+
* normally created it already — this covers direct id-addressed access).
|
|
44
|
+
* @param id - session id.
|
|
45
|
+
* @returns the shell.
|
|
46
|
+
*/
|
|
47
|
+
shell(id: SessionId): SessionInputShell;
|
|
48
|
+
/**
|
|
49
|
+
* The InputBar-exclusive keyboard command face: the shell
|
|
50
|
+
* satisfies it structurally; package-internal — handed through the
|
|
51
|
+
* composer-bar entry's inject, never across a plugin boundary.
|
|
52
|
+
* @param id - session id.
|
|
53
|
+
* @returns the shell as the keyboard face.
|
|
54
|
+
*/
|
|
55
|
+
keyboard(id: SessionId): ComposerKeyboard;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the optional slash controller for composer chrome that launches
|
|
58
|
+
* the shared candidate menu without typing a trigger.
|
|
59
|
+
* @param id - session id.
|
|
60
|
+
* @returns the resident controller, or undefined when ui-slash is absent.
|
|
61
|
+
*/
|
|
62
|
+
slash(id: SessionId): SlashController | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Default sink: optimistic clear + prompt. The session is always a real
|
|
65
|
+
* host entity (materialized when its workspace was picked), so there is
|
|
66
|
+
* exactly one path; a failed first prompt is an ordinary prompt failure
|
|
67
|
+
* (error strip via promptError, draft restored only while untouched).
|
|
68
|
+
*/
|
|
69
|
+
private sink;
|
|
70
|
+
/**
|
|
71
|
+
* Steer every still-pending queued message into the running turn, in FIFO
|
|
72
|
+
* order — the same strict-steer operation as the queue dock's per-row
|
|
73
|
+
* button. A turn closing mid-way (`steer-unavailable`) or a row already
|
|
74
|
+
* claimed by the agent (`queue-item-not-found`) converges silently, while a
|
|
75
|
+
* genuine failure surfaces as one composer notice. Repeated triggers
|
|
76
|
+
* (e.g. two rapid empty-draft chords) rely on that `queue-item-not-found`
|
|
77
|
+
* convergence: the snapshot may still list a row the host already steered,
|
|
78
|
+
* and the duplicate strict steer is a silent no-op.
|
|
79
|
+
* @param session - the addressed host session.
|
|
80
|
+
* @param shell - the resident shell (notice outlet).
|
|
81
|
+
*/
|
|
82
|
+
private steerQueue;
|
|
83
|
+
private controller;
|
|
84
|
+
private popup;
|
|
85
|
+
private sessions;
|
|
86
|
+
private conversation;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=hub.d.ts.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { InputEffect, InputEvent, InputMachineOptions, InputState } from './contract.ts';
|
|
2
|
+
/** The object-replacement character backing every chip occurrence in the draft. */
|
|
3
|
+
export declare const PLACEHOLDER = "\uFFFC";
|
|
4
|
+
/**
|
|
5
|
+
* Expand the draft's placeholders into their occurrences' clipboard text
|
|
6
|
+
* (the persistence mirror and clipboard both write this
|
|
7
|
+
* projection — U+FFFC never leaves the machine). Table order is offset
|
|
8
|
+
* order, so one linear walk pairs placeholders with entries.
|
|
9
|
+
* @param state - published input state.
|
|
10
|
+
* @returns the plain-text projection of the draft.
|
|
11
|
+
*/
|
|
12
|
+
export declare function projectClipboard(state: Pick<InputState, 'draft' | 'occurrences'>): string;
|
|
13
|
+
/**
|
|
14
|
+
* Pure input machine, one instance per session (per-session isolation is by
|
|
15
|
+
* construction). The machine constructs one AbortController per SubmitAttempt
|
|
16
|
+
* at enter time and aborts it itself on release; the shell never aborts, it
|
|
17
|
+
* only observes attempt.signal on its adjudicate/submit promises. Stale
|
|
18
|
+
* attempts (any adjudicated / adjudication-failed / submit-settled whose seq
|
|
19
|
+
* is not the in-flight one) are dropped: same state, zero effects.
|
|
20
|
+
*/
|
|
21
|
+
export declare class InputMachine {
|
|
22
|
+
private draft;
|
|
23
|
+
private draftRev;
|
|
24
|
+
private phase;
|
|
25
|
+
private claim;
|
|
26
|
+
private occurrences;
|
|
27
|
+
private occurrenceSeq;
|
|
28
|
+
private seq;
|
|
29
|
+
private inflight;
|
|
30
|
+
private log;
|
|
31
|
+
private redoStack;
|
|
32
|
+
/** Open single-char typing run: the next contiguous char within the window coalesces. */
|
|
33
|
+
private typingRun;
|
|
34
|
+
private paste;
|
|
35
|
+
private pasteSeq;
|
|
36
|
+
private readonly mergeWindowMs;
|
|
37
|
+
private readonly now;
|
|
38
|
+
constructor(options?: InputMachineOptions);
|
|
39
|
+
/** Read-only snapshot of the machine state (queue always empty at this tier). */
|
|
40
|
+
get state(): InputState;
|
|
41
|
+
/**
|
|
42
|
+
* Feed one event through the machine.
|
|
43
|
+
* @param ev - Input event; the single write path for all input state.
|
|
44
|
+
* @returns Effects for the shell to execute in order; empty on no-ops, locks, and dropped stale events.
|
|
45
|
+
*/
|
|
46
|
+
dispatch(ev: InputEvent): readonly InputEffect[];
|
|
47
|
+
/** Adopt a new draft: bump the revision (the span-CAS invalidation point). */
|
|
48
|
+
private adopt;
|
|
49
|
+
/** Push one undo unit (before-state), trim the ring, and cut the redo chain. */
|
|
50
|
+
private pushTxn;
|
|
51
|
+
/**
|
|
52
|
+
* Reconcile the occurrence table with one edit (old-draft coordinates):
|
|
53
|
+
* entries past the range shift by the length delta; entries whose
|
|
54
|
+
* placeholder sits inside the replaced range go away whole (a
|
|
55
|
+
* deletion/replacement intersecting a placeholder acts on the whole chip).
|
|
56
|
+
*/
|
|
57
|
+
private reconcile;
|
|
58
|
+
/** Claimed integrity watch: any mutation that breaks the token prefix releases the claim. */
|
|
59
|
+
private watchClaim;
|
|
60
|
+
/** Mint one occurrence at a draft offset. */
|
|
61
|
+
private mint;
|
|
62
|
+
/** Splice minted entries into the offset-sorted table. */
|
|
63
|
+
private withMinted;
|
|
64
|
+
private onDraftChanged;
|
|
65
|
+
/** Span CAS: revision equality (content identity follows) plus bounds sanity. */
|
|
66
|
+
private casOk;
|
|
67
|
+
private onBeginCommand;
|
|
68
|
+
private onInsertRef;
|
|
69
|
+
/**
|
|
70
|
+
* Shared chip-insertion transaction: replace [span) with one placeholder
|
|
71
|
+
* occurrence (insert-ref and paste-upgrade both land here). A separating
|
|
72
|
+
* space follows the chip unless one is already next.
|
|
73
|
+
* @returns the inserted length (placeholder plus optional gap).
|
|
74
|
+
*/
|
|
75
|
+
private replaceSpanWithChip;
|
|
76
|
+
/**
|
|
77
|
+
* Guarded token deletion after business success (popup settle / menu-pick
|
|
78
|
+
* execute). No effect signals success: the caller reads the draftRev
|
|
79
|
+
* advance off the published state (same currency as the other bail verbs).
|
|
80
|
+
*/
|
|
81
|
+
private onConsumeToken;
|
|
82
|
+
/**
|
|
83
|
+
* Owner-resolution style bits: exactly the listed occurrences render
|
|
84
|
+
* invalid. Not a transaction — the draft, revision, and undo log are
|
|
85
|
+
* untouched (invalidation never deletes or rewrites chips).
|
|
86
|
+
*/
|
|
87
|
+
private onSetInvalid;
|
|
88
|
+
private onUndo;
|
|
89
|
+
private onRedo;
|
|
90
|
+
/**
|
|
91
|
+
* Paste as one transaction: the text (U+FFFC-sanitized) replaces the
|
|
92
|
+
* selection; hot-snapshot sync matches componentize inside the SAME
|
|
93
|
+
* transaction (one undo returns to pre-paste); a match attempt opens for
|
|
94
|
+
* the async remainder while the phase still accepts reference mutations.
|
|
95
|
+
*/
|
|
96
|
+
private onPasteBegin;
|
|
97
|
+
/**
|
|
98
|
+
* Async match landed: upgrade one pasted token to a chip as an INDEPENDENT
|
|
99
|
+
* transaction (undo #1 → the token text, undo #2 → pre-paste). The attempt
|
|
100
|
+
* stays current — later tokens re-CAS against the advanced draftRev.
|
|
101
|
+
*/
|
|
102
|
+
private onPasteUpgrade;
|
|
103
|
+
/** Mint the next SubmitAttempt and take the in-flight slot. */
|
|
104
|
+
private beginAttempt;
|
|
105
|
+
private onEnter;
|
|
106
|
+
private onAdjudicated;
|
|
107
|
+
private onAdjudicationFailed;
|
|
108
|
+
private onSubmitSettled;
|
|
109
|
+
/** Ordinary send accepted: clear as a commit (no undo unit; sent content
|
|
110
|
+
* must not be resurrectable — same discipline as submit-settled success). */
|
|
111
|
+
private onSendCommitted;
|
|
112
|
+
private onRelease;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=machine.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composer submission policy. It owns the live busy-Enter
|
|
3
|
+
* preference and resolves keyboard gestures into queue/steer delivery modes;
|
|
4
|
+
* Host and Agent keep the actual delivery-window authority.
|
|
5
|
+
*/
|
|
6
|
+
import { type SettingsScope, type SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
|
|
7
|
+
import type { BusyEnterBehavior, ComposerSubmitGesture, InputSubmitMode } from '../contract/composer-submission.ts';
|
|
8
|
+
import type { ConversationSettings } from '../../submission-settings.ts';
|
|
9
|
+
export { DEFAULT_BUSY_ENTER_BEHAVIOR } from '../../submission-settings.ts';
|
|
10
|
+
/**
|
|
11
|
+
* Busy-Enter policy used by both the composer inject face and its Settings row.
|
|
12
|
+
* Direct `steer` is intentionally best-effort: AgentLoop turns a closed-window
|
|
13
|
+
* submission into the next waking Queue item.
|
|
14
|
+
*/
|
|
15
|
+
export declare class ComposerSubmissionPolicy {
|
|
16
|
+
/** Reactive preference source for the Settings row. */
|
|
17
|
+
readonly busyEnter: SnapshotStore<BusyEnterBehavior>;
|
|
18
|
+
private readonly host;
|
|
19
|
+
/**
|
|
20
|
+
* @param host - durable preference scope owned by the providing plugin;
|
|
21
|
+
* absent compositions stay process-local. The adoption subscription shares
|
|
22
|
+
* the scope's plugin lifetime — a disposed scope never publishes again, so
|
|
23
|
+
* the policy needs no release hook.
|
|
24
|
+
*/
|
|
25
|
+
constructor(host?: SettingsScope<ConversationSettings>);
|
|
26
|
+
/**
|
|
27
|
+
* Resolve one keyboard gesture without changing state.
|
|
28
|
+
* @param running - whether the addressed agent currently reports busy.
|
|
29
|
+
* @param gesture - plain Enter or the Cmd/Ctrl-accelerated chord.
|
|
30
|
+
* @param steeringAvailable - whether this session transport supports steering.
|
|
31
|
+
* @returns Queue outside steer-capable busy state; otherwise the preferred mode or its opposite.
|
|
32
|
+
*/
|
|
33
|
+
resolve(running: boolean, gesture: ComposerSubmitGesture, steeringAvailable: boolean): InputSubmitMode;
|
|
34
|
+
/**
|
|
35
|
+
* Change the plain-Enter behavior used during busy state; the live value
|
|
36
|
+
* publishes before the durable write starts.
|
|
37
|
+
* @param behavior - Queue or Steer.
|
|
38
|
+
*/
|
|
39
|
+
setBusyEnter(behavior: BusyEnterBehavior): void;
|
|
40
|
+
/**
|
|
41
|
+
* Adopt the scope's accepted durable behavior without writing it back.
|
|
42
|
+
* @param host - the constructor-narrowed scope driving this adoption.
|
|
43
|
+
*/
|
|
44
|
+
private adopt;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=submission-policy.d.ts.map
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/** `conversation` namespace dictionaries. */
|
|
2
|
+
/** Dictionary namespace owned by this plugin. */
|
|
3
|
+
export declare const NS = "conversation";
|
|
4
|
+
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
5
|
+
export declare const zh: {
|
|
6
|
+
'view.chat': string;
|
|
7
|
+
'hint.plan': string;
|
|
8
|
+
'hint.goal': string;
|
|
9
|
+
'hint.goal.active': string;
|
|
10
|
+
'placeholder.plan': string;
|
|
11
|
+
'placeholder.default': string;
|
|
12
|
+
'placeholder.unavailable': string;
|
|
13
|
+
'placeholder.parentOffline': string;
|
|
14
|
+
'placeholder.hero': string;
|
|
15
|
+
'placeholder.workspace': string;
|
|
16
|
+
'input.commands': string;
|
|
17
|
+
'input.stop': string;
|
|
18
|
+
'input.send': string;
|
|
19
|
+
'placeholder.steerQueue': string;
|
|
20
|
+
'input.accessMode': string;
|
|
21
|
+
'image.dropHint': string;
|
|
22
|
+
'image.pending': string;
|
|
23
|
+
'image.openOriginal': string;
|
|
24
|
+
'image.openOriginalLabel': string;
|
|
25
|
+
'image.remove': string;
|
|
26
|
+
'image.original': string;
|
|
27
|
+
'image.label': string;
|
|
28
|
+
'image.loadFailed': string;
|
|
29
|
+
'image.loading': string;
|
|
30
|
+
'image.preview': string;
|
|
31
|
+
'image.closePreview': string;
|
|
32
|
+
'image.serviceUnavailable': string;
|
|
33
|
+
'image.unsupportedType': string;
|
|
34
|
+
'image.unknownType': string;
|
|
35
|
+
'context.aria': string;
|
|
36
|
+
'context.used': string;
|
|
37
|
+
'context.system': string;
|
|
38
|
+
'context.tools': string;
|
|
39
|
+
'context.messages': string;
|
|
40
|
+
'stats.counts': string;
|
|
41
|
+
'stats.llm': string;
|
|
42
|
+
'stats.toolCall': string;
|
|
43
|
+
'stats.ttftAverage': string;
|
|
44
|
+
'stats.tokensPerSecond': string;
|
|
45
|
+
'stats.cacheHit': string;
|
|
46
|
+
'stats.tokens': string;
|
|
47
|
+
'settings.enter.title': string;
|
|
48
|
+
'settings.enter.description': string;
|
|
49
|
+
'settings.enter.queue': string;
|
|
50
|
+
'settings.enter.steer': string;
|
|
51
|
+
'access.confirm.title': string;
|
|
52
|
+
'access.confirm.description': string;
|
|
53
|
+
'access.confirm.acknowledge': string;
|
|
54
|
+
'access.confirm.cancel': string;
|
|
55
|
+
'access.confirm.enable': string;
|
|
56
|
+
'hero.headline': string;
|
|
57
|
+
'hero.preview': string;
|
|
58
|
+
'hero.chooseWorkspace': string;
|
|
59
|
+
'session.hierarchy': string;
|
|
60
|
+
'details.title': string;
|
|
61
|
+
'details.close': string;
|
|
62
|
+
'details.empty': string;
|
|
63
|
+
'details.notInWindow': string;
|
|
64
|
+
'details.input': string;
|
|
65
|
+
'details.output': string;
|
|
66
|
+
'details.running': string;
|
|
67
|
+
'todo.title': string;
|
|
68
|
+
'todo.progress.done': string;
|
|
69
|
+
'todo.progress.active': string;
|
|
70
|
+
'todo.progress.pending': string;
|
|
71
|
+
'todo.rowTitle': string;
|
|
72
|
+
'todo.completed': string;
|
|
73
|
+
'chat.loadingHistory': string;
|
|
74
|
+
'chat.loadError': string;
|
|
75
|
+
'chat.loadOlder': string;
|
|
76
|
+
'chat.toBottom': string;
|
|
77
|
+
'message.extraBlock': string;
|
|
78
|
+
'message.contextInjection': string;
|
|
79
|
+
'message.contextRecall': string;
|
|
80
|
+
'message.context.instructions.loaded': string;
|
|
81
|
+
'message.context.instructions.added': string;
|
|
82
|
+
'message.context.instructions.updated': string;
|
|
83
|
+
'message.context.instructions.removed': string;
|
|
84
|
+
'message.context.catalog.replaced': string;
|
|
85
|
+
'message.context.catalog.more': string;
|
|
86
|
+
'message.context.snapshot.supersedes': string;
|
|
87
|
+
'message.context.relay.from': string;
|
|
88
|
+
'message.context.recall.counts': string;
|
|
89
|
+
'message.context.recall.truncated': string;
|
|
90
|
+
'message.compaction': string;
|
|
91
|
+
'message.compaction.running': string;
|
|
92
|
+
'message.compaction.completed': string;
|
|
93
|
+
'message.compaction.expand': string;
|
|
94
|
+
'message.compaction.unavailable': string;
|
|
95
|
+
'message.unknownSurface': string;
|
|
96
|
+
'message.unknownBlock': string;
|
|
97
|
+
'message.stopped': string;
|
|
98
|
+
'message.branch': string;
|
|
99
|
+
'message.branchUnavailable': string;
|
|
100
|
+
'message.retry.active': string;
|
|
101
|
+
'message.retry.cancelled': string;
|
|
102
|
+
'message.retry.started': string;
|
|
103
|
+
'message.retry.scheduled': string;
|
|
104
|
+
'message.retry.status': string;
|
|
105
|
+
'message.retry.delay': string;
|
|
106
|
+
'message.retry.failure': string;
|
|
107
|
+
'message.turnError': string;
|
|
108
|
+
'message.ranFor': string;
|
|
109
|
+
'message.ttft': string;
|
|
110
|
+
'message.tokensPerSecond': string;
|
|
111
|
+
'duration.seconds': string;
|
|
112
|
+
'duration.minutes': string;
|
|
113
|
+
'command.running': string;
|
|
114
|
+
'command.failed': string;
|
|
115
|
+
'command.done': string;
|
|
116
|
+
'command.title': string;
|
|
117
|
+
'approval.waiting': string;
|
|
118
|
+
'approval.detail.aria': string;
|
|
119
|
+
'approval.escalation': string;
|
|
120
|
+
'approval.reject': string;
|
|
121
|
+
'approval.allowOnce': string;
|
|
122
|
+
'ask.rowTitle': string;
|
|
123
|
+
'ask.waiting': string;
|
|
124
|
+
'ask.cancelled': string;
|
|
125
|
+
'ask.interrupted': string;
|
|
126
|
+
'ask.answered': string;
|
|
127
|
+
'bash.running': string;
|
|
128
|
+
'bash.failed': string;
|
|
129
|
+
'bash.stopped': string;
|
|
130
|
+
'row.running': string;
|
|
131
|
+
'row.failed': string;
|
|
132
|
+
'row.stopped': string;
|
|
133
|
+
'queue.count': string;
|
|
134
|
+
'queue.edit': string;
|
|
135
|
+
'queue.edit.unsupported': string;
|
|
136
|
+
'queue.save': string;
|
|
137
|
+
'queue.cancelEdit': string;
|
|
138
|
+
'queue.remove': string;
|
|
139
|
+
'queue.steer': string;
|
|
140
|
+
'queue.steer.unavailable': string;
|
|
141
|
+
'queue.editFailed': string;
|
|
142
|
+
'queue.removeFailed': string;
|
|
143
|
+
'queue.steerFailed': string;
|
|
144
|
+
'terminal.signal': string;
|
|
145
|
+
'terminal.exitCode': string;
|
|
146
|
+
'terminal.running': string;
|
|
147
|
+
'terminal.failed': string;
|
|
148
|
+
'terminal.done': string;
|
|
149
|
+
'terminal.noOutput': string;
|
|
150
|
+
'terminal.collapseAria': string;
|
|
151
|
+
'terminal.expandAria': string;
|
|
152
|
+
'terminal.expandRest': string;
|
|
153
|
+
'json.truncated': string;
|
|
154
|
+
'clock.md': string;
|
|
155
|
+
'clock.ymd': string;
|
|
156
|
+
};
|
|
157
|
+
/** The conversation namespace key union. */
|
|
158
|
+
export type ConversationKey = keyof typeof zh;
|
|
159
|
+
/** English dictionary, checked complete against the zh key set. */
|
|
160
|
+
export declare const en: {
|
|
161
|
+
'view.chat': string;
|
|
162
|
+
'hint.plan': string;
|
|
163
|
+
'hint.goal': string;
|
|
164
|
+
'hint.goal.active': string;
|
|
165
|
+
'placeholder.plan': string;
|
|
166
|
+
'placeholder.default': string;
|
|
167
|
+
'placeholder.unavailable': string;
|
|
168
|
+
'placeholder.parentOffline': string;
|
|
169
|
+
'placeholder.hero': string;
|
|
170
|
+
'placeholder.workspace': string;
|
|
171
|
+
'input.commands': string;
|
|
172
|
+
'input.stop': string;
|
|
173
|
+
'input.send': string;
|
|
174
|
+
'placeholder.steerQueue': string;
|
|
175
|
+
'input.accessMode': string;
|
|
176
|
+
'image.dropHint': string;
|
|
177
|
+
'image.pending': string;
|
|
178
|
+
'image.openOriginal': string;
|
|
179
|
+
'image.openOriginalLabel': string;
|
|
180
|
+
'image.remove': string;
|
|
181
|
+
'image.original': string;
|
|
182
|
+
'image.label': string;
|
|
183
|
+
'image.loadFailed': string;
|
|
184
|
+
'image.loading': string;
|
|
185
|
+
'image.preview': string;
|
|
186
|
+
'image.closePreview': string;
|
|
187
|
+
'image.serviceUnavailable': string;
|
|
188
|
+
'image.unsupportedType': string;
|
|
189
|
+
'image.unknownType': string;
|
|
190
|
+
'context.aria': string;
|
|
191
|
+
'context.used': string;
|
|
192
|
+
'context.system': string;
|
|
193
|
+
'context.tools': string;
|
|
194
|
+
'context.messages': string;
|
|
195
|
+
'stats.counts': string;
|
|
196
|
+
'stats.llm': string;
|
|
197
|
+
'stats.toolCall': string;
|
|
198
|
+
'stats.ttftAverage': string;
|
|
199
|
+
'stats.tokensPerSecond': string;
|
|
200
|
+
'stats.cacheHit': string;
|
|
201
|
+
'stats.tokens': string;
|
|
202
|
+
'settings.enter.title': string;
|
|
203
|
+
'settings.enter.description': string;
|
|
204
|
+
'settings.enter.queue': string;
|
|
205
|
+
'settings.enter.steer': string;
|
|
206
|
+
'access.confirm.title': string;
|
|
207
|
+
'access.confirm.description': string;
|
|
208
|
+
'access.confirm.acknowledge': string;
|
|
209
|
+
'access.confirm.cancel': string;
|
|
210
|
+
'access.confirm.enable': string;
|
|
211
|
+
'hero.headline': string;
|
|
212
|
+
'hero.preview': string;
|
|
213
|
+
'hero.chooseWorkspace': string;
|
|
214
|
+
'session.hierarchy': string;
|
|
215
|
+
'details.title': string;
|
|
216
|
+
'details.close': string;
|
|
217
|
+
'details.empty': string;
|
|
218
|
+
'details.notInWindow': string;
|
|
219
|
+
'details.input': string;
|
|
220
|
+
'details.output': string;
|
|
221
|
+
'details.running': string;
|
|
222
|
+
'todo.title': string;
|
|
223
|
+
'todo.progress.done': string;
|
|
224
|
+
'todo.progress.active': string;
|
|
225
|
+
'todo.progress.pending': string;
|
|
226
|
+
'todo.rowTitle': string;
|
|
227
|
+
'todo.completed': string;
|
|
228
|
+
'chat.loadingHistory': string;
|
|
229
|
+
'chat.loadError': string;
|
|
230
|
+
'chat.loadOlder': string;
|
|
231
|
+
'chat.toBottom': string;
|
|
232
|
+
'message.extraBlock': string;
|
|
233
|
+
'message.contextInjection': string;
|
|
234
|
+
'message.contextRecall': string;
|
|
235
|
+
'message.context.instructions.loaded': string;
|
|
236
|
+
'message.context.instructions.added': string;
|
|
237
|
+
'message.context.instructions.updated': string;
|
|
238
|
+
'message.context.instructions.removed': string;
|
|
239
|
+
'message.context.catalog.replaced': string;
|
|
240
|
+
'message.context.catalog.more': string;
|
|
241
|
+
'message.context.snapshot.supersedes': string;
|
|
242
|
+
'message.context.relay.from': string;
|
|
243
|
+
'message.context.recall.counts': string;
|
|
244
|
+
'message.context.recall.truncated': string;
|
|
245
|
+
'message.compaction': string;
|
|
246
|
+
'message.compaction.running': string;
|
|
247
|
+
'message.compaction.completed': string;
|
|
248
|
+
'message.compaction.expand': string;
|
|
249
|
+
'message.compaction.unavailable': string;
|
|
250
|
+
'message.unknownSurface': string;
|
|
251
|
+
'message.unknownBlock': string;
|
|
252
|
+
'message.stopped': string;
|
|
253
|
+
'message.branch': string;
|
|
254
|
+
'message.branchUnavailable': string;
|
|
255
|
+
'message.retry.active': string;
|
|
256
|
+
'message.retry.cancelled': string;
|
|
257
|
+
'message.retry.started': string;
|
|
258
|
+
'message.retry.scheduled': string;
|
|
259
|
+
'message.retry.status': string;
|
|
260
|
+
'message.retry.delay': string;
|
|
261
|
+
'message.retry.failure': string;
|
|
262
|
+
'message.turnError': string;
|
|
263
|
+
'message.ranFor': string;
|
|
264
|
+
'message.ttft': string;
|
|
265
|
+
'message.tokensPerSecond': string;
|
|
266
|
+
'duration.seconds': string;
|
|
267
|
+
'duration.minutes': string;
|
|
268
|
+
'command.running': string;
|
|
269
|
+
'command.failed': string;
|
|
270
|
+
'command.done': string;
|
|
271
|
+
'command.title': string;
|
|
272
|
+
'approval.waiting': string;
|
|
273
|
+
'approval.detail.aria': string;
|
|
274
|
+
'approval.escalation': string;
|
|
275
|
+
'approval.reject': string;
|
|
276
|
+
'approval.allowOnce': string;
|
|
277
|
+
'ask.rowTitle': string;
|
|
278
|
+
'ask.waiting': string;
|
|
279
|
+
'ask.cancelled': string;
|
|
280
|
+
'ask.interrupted': string;
|
|
281
|
+
'ask.answered': string;
|
|
282
|
+
'bash.running': string;
|
|
283
|
+
'bash.failed': string;
|
|
284
|
+
'bash.stopped': string;
|
|
285
|
+
'row.running': string;
|
|
286
|
+
'row.failed': string;
|
|
287
|
+
'row.stopped': string;
|
|
288
|
+
'queue.count': string;
|
|
289
|
+
'queue.edit': string;
|
|
290
|
+
'queue.edit.unsupported': string;
|
|
291
|
+
'queue.save': string;
|
|
292
|
+
'queue.cancelEdit': string;
|
|
293
|
+
'queue.remove': string;
|
|
294
|
+
'queue.steer': string;
|
|
295
|
+
'queue.steer.unavailable': string;
|
|
296
|
+
'queue.editFailed': string;
|
|
297
|
+
'queue.removeFailed': string;
|
|
298
|
+
'queue.steerFailed': string;
|
|
299
|
+
'terminal.signal': string;
|
|
300
|
+
'terminal.exitCode': string;
|
|
301
|
+
'terminal.running': string;
|
|
302
|
+
'terminal.failed': string;
|
|
303
|
+
'terminal.done': string;
|
|
304
|
+
'terminal.noOutput': string;
|
|
305
|
+
'terminal.collapseAria': string;
|
|
306
|
+
'terminal.expandAria': string;
|
|
307
|
+
'terminal.expandRest': string;
|
|
308
|
+
'json.truncated': string;
|
|
309
|
+
'clock.md': string;
|
|
310
|
+
'clock.ymd': string;
|
|
311
|
+
};
|
|
312
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { QueueAction, QueueItemId } from '../contract/queue.ts';
|
|
4
|
+
/** Queue operations injected by the session-scoped registration. */
|
|
5
|
+
export interface QueueDockInjected {
|
|
6
|
+
updateQueue: (itemId: QueueItemId, action: QueueAction) => Promise<void>;
|
|
7
|
+
notify: (level: 'info' | 'error', text: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/** Full props of a dock entry: InputZone owner share + session standard kit + global seat + the locale seat. */
|
|
10
|
+
export type QueueDockProps = PropsRuntime<'conversation.input.dock'> & QueueDockInjected & PropsLocale<'conversation'>;
|
|
11
|
+
/**
|
|
12
|
+
* Queue strip: one item renders directly; multiple items default to a
|
|
13
|
+
* collapsible count header; an empty queue renders nothing.
|
|
14
|
+
*/
|
|
15
|
+
export declare function QueueDock({ useSession, updateQueue, notify, t }: QueueDockProps): import("react").JSX.Element | null;
|
|
16
|
+
/**
|
|
17
|
+
* The dock entry as a plain registrant plugin. The conversation service is
|
|
18
|
+
* the action contract; the slot declaration has an independent lifecycle boundary.
|
|
19
|
+
*/
|
|
20
|
+
export declare const queueDockEntry: {
|
|
21
|
+
name: string;
|
|
22
|
+
inject: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Register the queue strip as the terminal input-dock entry (order 20).
|
|
25
|
+
* @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
|
|
26
|
+
*/
|
|
27
|
+
apply(ctx: Context): void;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=QueueDock.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Queue read face for the InputState.queue projection (frozen contract in
|
|
3
|
+
* ../input/contract.ts): a uSES-compatible observable over one session's
|
|
4
|
+
* transient inbox rows. The Session snapshot already keeps the queue array
|
|
5
|
+
* reference-stable across unrelated snapshot swaps, so this is a pure
|
|
6
|
+
* projection — no second store, no copy.
|
|
7
|
+
*/
|
|
8
|
+
import type { ObservableSnapshot, SessionFace } from '@deepseek-ai/dsh-client-runtime/client';
|
|
9
|
+
import type { QueuedMessage } from '../input/contract.ts';
|
|
10
|
+
/**
|
|
11
|
+
* Project a session's transient inbox rows as a bare observable (subscribe/getSnapshot).
|
|
12
|
+
* The wiring layer overlays this onto InputState.queue; the runtime
|
|
13
|
+
* QueuedMessage and the input-contract QueuedMessage are structurally
|
|
14
|
+
* identical.
|
|
15
|
+
* @param session - the resident session face.
|
|
16
|
+
* @returns the queue read face (snapshot reference stable while the queue is unchanged).
|
|
17
|
+
*/
|
|
18
|
+
export declare function queueReadFaceOf(session: SessionFace): ObservableSnapshot<readonly QueuedMessage[]>;
|
|
19
|
+
//# sourceMappingURL=store.d.ts.map
|