@qilin-agent/client-ui-conversation 3.1.5 → 3.1.7

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.
Files changed (39) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +7 -3
  3. package/README.zh.md +7 -3
  4. package/lib/client.js +5147 -454
  5. package/lib/index.js +13 -9
  6. package/lib/types/client/contract/composer-submission.d.ts +23 -0
  7. package/lib/types/client/contract/conversation.d.ts +10 -0
  8. package/lib/types/client/contract/draft-editor.d.ts +23 -0
  9. package/lib/types/client/contract/input.d.ts +42 -10
  10. package/lib/types/client/contract/records.d.ts +8 -3
  11. package/lib/types/client/contract/slots.d.ts +61 -5
  12. package/lib/types/client/contract/views.d.ts +2 -1
  13. package/lib/types/client/conversation/assembler.d.ts +3 -0
  14. package/lib/types/client/draft.d.ts +22 -0
  15. package/lib/types/client/index.d.ts +3 -3
  16. package/lib/types/client/input/decorations.d.ts +1 -1
  17. package/lib/types/client/input/editor/CommandChip.d.ts +13 -0
  18. package/lib/types/client/input/editor/command-chip-node.d.ts +87 -0
  19. package/lib/types/client/input/editor/command-chip-selection.d.ts +20 -0
  20. package/lib/types/client/input/editor/keymap.d.ts +6 -2
  21. package/lib/types/client/input/editor/projection.d.ts +3 -0
  22. package/lib/types/client/input/editor/runtime.d.ts +33 -11
  23. package/lib/types/client/input/editor/text-ref.d.ts +2 -7
  24. package/lib/types/client/input/editor/view-binding.d.ts +1 -1
  25. package/lib/types/client/input/facade.d.ts +74 -18
  26. package/lib/types/client/input/hub.d.ts +2 -10
  27. package/lib/types/client/input/machine.d.ts +9 -5
  28. package/lib/types/client/input/submission-analytics.d.ts +10 -0
  29. package/lib/types/client/locales.d.ts +12 -16
  30. package/lib/types/client/skeleton/ConversationSession.d.ts +1 -1
  31. package/lib/types/client/skeleton/DefaultConversationViews.d.ts +2 -2
  32. package/lib/types/client/skeleton/InputBar.d.ts +1 -1
  33. package/lib/types/client/stores.d.ts +8 -1
  34. package/lib/types/client/view-pins.d.ts +22 -0
  35. package/lib/types/conversation-settings.d.ts +4 -0
  36. package/lib/types/index.d.ts +20 -5
  37. package/package.json +37 -35
  38. package/lib/types/client/input/editor/claim-decor.d.ts +0 -23
  39. package/lib/types/client/settings/ContentWidthRow.d.ts +0 -26
@@ -1,7 +1,8 @@
1
1
  /** The Composer model's private Lexical editor, projections, and node operations. */
2
2
  import type { ObservableSnapshot } from '@qilin-agent/client-store';
3
3
  import type { LexicalEditor } from 'lexical';
4
- import type { Occurrence, ReferenceInsert } from '../../contract/draft-editor.ts';
4
+ import type { DraftReference, ReferenceInsert } from '../../contract/draft-editor.ts';
5
+ import type { CommandClaim } from '../../contract/input.ts';
5
6
  import type { EditorProjection } from './projection.ts';
6
7
  import type { DetectSpan } from './span-map.ts';
7
8
  type Lexicon = ReadonlyMap<'/' | '@', readonly string[]>;
@@ -9,7 +10,6 @@ type Lexicon = ReadonlyMap<'/' | '@', readonly string[]>;
9
10
  interface DraftEditorRuntimeDeps {
10
11
  readonly onUpdate: () => void;
11
12
  readonly openReference: (source: string | undefined, reference: Pick<ReferenceInsert, 'ref' | 'appearance'>) => boolean;
12
- readonly activeClaimToken: () => string | null;
13
13
  readonly lexicon: () => Lexicon;
14
14
  readonly resolveLexicon: () => ObservableSnapshot<Lexicon> | undefined;
15
15
  }
@@ -24,6 +24,7 @@ export declare class DraftEditorRuntime {
24
24
  private occurrenceSeq;
25
25
  /** Live lexicon subscription disposer; undefined until the controller resolves. */
26
26
  private lexiconOff;
27
+ private lexiconSource;
27
28
  /** @param deps - model callbacks used by editor listeners and transforms. */
28
29
  constructor(deps: DraftEditorRuntimeDeps);
29
30
  /**
@@ -44,12 +45,10 @@ export declare class DraftEditorRuntime {
44
45
  */
45
46
  private applyEdit;
46
47
  /**
47
- * Subscribe the text-ref re-scan to the controller's lexicon once the
48
- * controller resolves. The deps thunk cannot resolve at construction (the
49
- * shell is created inside the sessions provide materialization), so the
50
- * first interactive updates retry until it can.
48
+ * Reconnect decorations when the optional trigger provider changes.
49
+ * The rescan reads the current editor and does not replace its content.
51
50
  */
52
- private ensureLexiconSubscription;
51
+ refreshLexiconSubscription(): void;
53
52
  /**
54
53
  * Re-project inside the existing editor update callback.
55
54
  * @returns the projection preceding this read.
@@ -63,6 +62,14 @@ export declare class DraftEditorRuntime {
63
62
  * @param text - the full next draft.
64
63
  */
65
64
  setDraft(text: string): void;
65
+ /**
66
+ * Add plain text after the current draft as new paragraphs, keeping its text
67
+ * and references; an empty draft takes the text as its whole content.
68
+ * Placeholder-sanitized; the caret lands at the end; merged into history
69
+ * like {@link setDraft}.
70
+ * @param text - plain text to add.
71
+ */
72
+ appendDraft(text: string): void;
66
73
  /**
67
74
  * Insert pasted plain text over the current editor selection
68
75
  * (placeholder-sanitized). The paste event's own default is suppressed by
@@ -103,19 +110,34 @@ export declare class DraftEditorRuntime {
103
110
  * @returns whether the range mapped and the edit applied.
104
111
  */
105
112
  insertReference(span: DetectSpan, ref: ReferenceInsert, tail: string): boolean;
106
- /** Refresh claim-token decoration after the model's claim changes. */
107
- refreshClaimDecoration(): void;
113
+ /**
114
+ * Replace a span with a command chip followed by the claim token's
115
+ * argument separator, unless the separator already follows.
116
+ * @param span - detect-coordinate range.
117
+ * @param claim - the command claim the chip anchors.
118
+ * @param tail - the character following the range before editing.
119
+ * @param mergeHistory - merge into the previous history entry (a restored
120
+ * draft's chip is part of its seed, not an undoable step).
121
+ * @returns whether the range mapped and the edit applied.
122
+ */
123
+ insertCommand(span: DetectSpan, claim: CommandClaim, tail: string, mergeHistory?: boolean): boolean;
124
+ /**
125
+ * Insert an ordered file-reference batch after the live selection without deleting it.
126
+ * @param references - validated references in source order.
127
+ * @returns whether the live insertion position accepted the batch.
128
+ */
129
+ insertFileReferences(references: readonly ReferenceInsert[]): boolean;
108
130
  /**
109
131
  * Clear committed content using the model's suffix decision inside the editor update.
110
132
  * @param prefixLength - returns the clipboard-prefix length to remove, or null to clear the root.
111
133
  */
112
134
  clearCommittedDraft(prefixLength: (clipboardText: string) => number | null): void;
113
135
  /**
114
- * Rebuild one model-selected failure snapshot, creating fresh reference nodes.
136
+ * Import semantic content or a model-selected failure snapshot with fresh reference nodes.
115
137
  * @param draft - clipboard text.
116
138
  * @param occurrences - reference occurrences in clipboard order.
117
139
  */
118
- restoreDraft(draft: string, occurrences: readonly Occurrence[]): void;
140
+ restoreDraft(draft: string, occurrences: readonly DraftReference[]): void;
119
141
  /** Cut the editor's undo history after a committed clear or restoration. */
120
142
  clearHistory(): void;
121
143
  }
@@ -28,17 +28,12 @@ export declare class TextRefNode extends TextNode {
28
28
  canInsertTextBefore(): boolean;
29
29
  }
30
30
  /**
31
- * Register the plain-text reference entity transform. The claim decoration
32
- * has precedence on the leading-token seat: while a command claim holds, the
33
- * claimed token must stay a plain TextNode (transforms register per concrete
34
- * node class, so a TextRefNode would never receive the TextNode claim
35
- * transform and the warn color would be lost).
31
+ * Register the plain-text reference entity transform.
36
32
  * @param editor - the shell-owned editor.
37
33
  * @param lexiconOf - live per-trigger name-roll accessor (the controller's aggregated store).
38
- * @param activeToken - live claim token accessor; null while unclaimed.
39
34
  * @returns the unregister disposer.
40
35
  */
41
- export declare function registerTextRefDecoration(editor: LexicalEditor, lexiconOf: () => ReadonlyMap<'/' | '@', readonly string[]>, activeToken: () => string | null): () => void;
36
+ export declare function registerTextRefDecoration(editor: LexicalEditor, lexiconOf: () => ReadonlyMap<'/' | '@', readonly string[]>): () => void;
42
37
  /**
43
38
  * Force a re-scan of the whole document (transforms only visit dirty nodes;
44
39
  * a lexicon roll change dirties nothing on its own). Queued, not discrete —
@@ -11,7 +11,7 @@ interface DraftViewGate {
11
11
  running: boolean;
12
12
  steeringAvailable: boolean;
13
13
  busyEnter: BusyEnterBehavior;
14
- intakeFiles: (files: readonly File[]) => void;
14
+ intakeFiles: (files: readonly File[], directories?: ReadonlySet<File>) => void;
15
15
  uploadsPending: boolean;
16
16
  showToast: (text: string) => void;
17
17
  t: ComposerBarProps['t'];
@@ -12,9 +12,9 @@ import type { Context } from '@qilin-agent/kylin';
12
12
  import type { InboxState } from '@qilin-agent/agent/types';
13
13
  import { type ObservableSnapshot, type SnapshotStore } from '@qilin-agent/client-store';
14
14
  import type { LexicalEditor } from 'lexical';
15
- import type { CommandClaim, ConsumeTokenRequest, DraftAttachmentId, InputActions, InputNotice, InputState, InputTriggerController, SessionInput, SubmitAttachment, SubmitOutcome } from '../contract/input.ts';
16
- import type { ArbitrateKey, ArbitrateOutcome, ComposerKeyboard, ReferenceInsert, TokenSpan } from '../contract/draft-editor.ts';
17
- import type { InputSubmitMode } from '../contract/composer-submission.ts';
15
+ import type { CommandClaim, ConsumeTokenRequest, DraftAttachmentId, DraftInitializationOptions, DraftInitializationResult, InputActions, InputNotice, InputState, InputTriggerController, SessionInput, SubmitAttachment, SubmitOutcome } from '../contract/input.ts';
16
+ import type { ArbitrateKey, ArbitrateOutcome, ComposerKeyboard, DraftInput, DraftSnapshot, ReferenceInsert, TokenSpan } from '../contract/draft-editor.ts';
17
+ import type { InputSubmitMode, MessageSubmission, MessageSubmissionState } from '../contract/composer-submission.ts';
18
18
  /** Popup face the shell needs (dismissal only; typed structurally to avoid a value import). */
19
19
  export interface PopupDismissFace {
20
20
  dismiss(): void;
@@ -50,6 +50,10 @@ export interface SessionInputDeps {
50
50
  /** Localized composer notice for a claimed command that does not accept attachments. */
51
51
  unsupportedNotice(token: string): string;
52
52
  };
53
+ /** Capture the Session facts an ordinary-message notification reports; optional observations cannot interrupt submission. */
54
+ submissionState?: () => MessageSubmissionState;
55
+ /** Receive the ordinary-message occurrence once, before reference serialization. */
56
+ messageSubmitted?: (submission: MessageSubmission) => void;
53
57
  }
54
58
  /**
55
59
  * The per-session input facade: scoped-event application verbs +
@@ -72,11 +76,16 @@ export declare class SessionInputShell implements SessionInput {
72
76
  private rev;
73
77
  private readonly unregister;
74
78
  private noticeSeq;
75
- private lastMirroredDraft;
79
+ private lastPublishedDraft;
80
+ private draftSnapshotCache;
76
81
  private attachmentIds;
77
82
  private disposed;
78
- /** Draft persistence mirror (Conversation store write; receives the clipboard projection). */
79
- private mirrorFn;
83
+ /** Conversation store writer for the current semantic document. */
84
+ private persistDraft;
85
+ /** A restored draft's command token waiting for the trigger pipeline, with the revision its restore produced. */
86
+ private pendingCommand;
87
+ /** The in-flight claim resolution for a restored command chip. */
88
+ private commandRestore;
80
89
  /** The mounted composer's file-picker opener (scoped pick-files event target). */
81
90
  private filePicker;
82
91
  /** Default sends retained until admission settles or scope disposal releases their attachments. */
@@ -91,17 +100,50 @@ export declare class SessionInputShell implements SessionInput {
91
100
  private readonly attachmentFlights;
92
101
  private readonly unsubscribeInbox;
93
102
  constructor(deps: SessionInputDeps);
94
- /** Re-project, run the claim watch, publish, and feed trigger tracking after every editor commit. */
103
+ /** Re-project, sync the claim with the leading command chip, publish, and feed trigger tracking after every editor commit. */
95
104
  private onEditorUpdate;
96
105
  /**
97
106
  * Replace the whole draft (persisted-draft seed and programmatic writes).
98
107
  * Placeholder-sanitized; newlines split paragraphs; the caret lands at the
99
108
  * end. Merged into history so a seed is not an undoable step of its own.
100
- * @param text - the full next draft.
109
+ * @param text - plain text or the complete semantic document.
101
110
  */
102
- setDraft(text: string): void;
111
+ setDraft(text: DraftInput): void;
112
+ /**
113
+ * Reconnect optional catalog notifications and resume a pending command
114
+ * chip restore without waiting for another edit.
115
+ */
116
+ refreshLexiconSubscription(): void;
117
+ /**
118
+ * Rebuild the command chip a restored draft carried once the trigger
119
+ * pipeline can resolve its claim. The rebuild applies only at the revision
120
+ * the restore produced: an edit made while the claim resolves keeps the
121
+ * literal token, which Enter still adjudicates as the command.
122
+ */
123
+ private restoreCommand;
124
+ /** Drop a pending or in-flight command chip restore. */
125
+ private cancelCommandRestore;
126
+ /** Current semantic document, stable until its content revision changes. */
127
+ get draftSnapshot(): DraftSnapshot;
128
+ /** Persist the latest document without changing the editor or binding a writer. */
129
+ persistCurrentDraft(): void;
130
+ /**
131
+ * Apply one new-task request to this already-initialized input model.
132
+ * @param options - content to adopt and the handling of an existing draft.
133
+ * @returns applied when the requested text is adopted, even if unchanged;
134
+ * preserved when the current draft is kept; blocked after disposal or during a pending submission.
135
+ */
136
+ requestDraftInitialization(options: DraftInitializationOptions): DraftInitializationResult;
137
+ private draftInitializationBlocked;
103
138
  /** Append ordered attachment ids unless an admission transaction is locked. */
104
139
  addAttachments(ids: readonly DraftAttachmentId[]): boolean;
140
+ /**
141
+ * Add validated file references and attachment ids while admission is editable.
142
+ * @param references - reference chips in source order.
143
+ * @param ids - newly allocated attachment ids.
144
+ * @returns false when admission is locked or the editor refuses the insertion.
145
+ */
146
+ addFiles(references: readonly ReferenceInsert[], ids: readonly DraftAttachmentId[]): boolean;
105
147
  /**
106
148
  * Remove one attachment id from this draft. Busy admission phases refuse, like
107
149
  * {@link addAttachments}: a removal landing while a command submit serializes
@@ -182,6 +224,14 @@ export declare class SessionInputShell implements SessionInput {
182
224
  * @returns whether the edit applied (phase, span CAS, and leading guard passed).
183
225
  */
184
226
  beginCommand(claim: CommandClaim, span: TokenSpan): boolean;
227
+ /**
228
+ * Replace [0, span.end) with the command chip and enter claimed.
229
+ * @param claim - the command claim the chip anchors.
230
+ * @param span - pick-time span snapshot (detect coordinates).
231
+ * @param mergeHistory - merge the edit into the previous history entry.
232
+ * @returns whether the edit applied.
233
+ */
234
+ private applyClaim;
185
235
  /**
186
236
  * Apply one reference insertion (scoped insert-reference event listener
187
237
  * body): the editor replaces the span with one chip node, followed by a
@@ -234,14 +284,11 @@ export declare class SessionInputShell implements SessionInput {
234
284
  /** Read the live input state (guard derivation reads here). */
235
285
  get snapshot(): InputState;
236
286
  /**
237
- * Bind the draft persistence mirror (Conversation store write). Adopt-on-bind: the
238
- * store draft may hold a persisted value from a previous mount; the caller
239
- * seeds it via setDraft BEFORE binding, and afterwards every editor-adopted
240
- * draft mirrors out.
241
- * @param write - store draft write.
287
+ * Bind the Conversation store writer without importing or saving content.
288
+ * @param write - semantic draft writer; persistCurrentDraft flushes the initial value.
242
289
  * @returns the unbind disposer.
243
290
  */
244
- bindMirror(write: (text: string) => void): () => void;
291
+ bindDraftPersistence(write: (draft: DraftSnapshot) => void): () => void;
245
292
  /**
246
293
  * Bind the mounted composer's file action and live intake availability.
247
294
  * @param picker - availability query and native file-dialog opener.
@@ -258,9 +305,7 @@ export declare class SessionInputShell implements SessionInput {
258
305
  * @returns whether the opener was called.
259
306
  */
260
307
  pickFiles(): boolean;
261
- /** The claim token the decoration transform styles; null while unclaimed. */
262
- private activeClaimToken;
263
- /** Dispatch + execute, refreshing the claim decoration when the styled token flips. */
308
+ /** Dispatch one machine event and execute its effects. */
264
309
  private dispatchRun;
265
310
  private run;
266
311
  private execute;
@@ -277,6 +322,17 @@ export declare class SessionInputShell implements SessionInput {
277
322
  * its editor snapshot. Chip-free drafts skip the async detour.
278
323
  */
279
324
  private sinkSerialized;
325
+ /**
326
+ * Capture the notification's Session facts; an observation failure leaves them unknown.
327
+ * @param mode - delivery mode requested for this attempt.
328
+ * @returns the immutable occurrence.
329
+ */
330
+ private submissionFor;
331
+ /**
332
+ * Hand one occurrence to the notification consumer; a consumer failure cannot interrupt sending.
333
+ * @param submission - captured occurrence.
334
+ */
335
+ private notifySubmission;
280
336
  /** Settle one detached default send independently of other sends. */
281
337
  private settleSink;
282
338
  /** Restore one failed detached send without overwriting text entered after a restoration. */
@@ -1,17 +1,8 @@
1
- /**
2
- * InputHub: the SessionInputResolver implementation (`ctx.conversation.input`) — one
3
- * SessionInputShell per session, created inside the uiSession 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 scoped input-mutation
7
- * listeners on each Session context and owns the default-sink choreography: every session is a
8
- * real host entity, so the sink is one unconditional prompt path.
9
- */
10
1
  import type { Context } from '@qilin-agent/kylin';
11
2
  import type { SessionBinding } from '@qilin-agent/api-session-controller/client';
12
3
  import type { SessionId } from '@qilin-agent/session/types';
13
4
  import type { TranslateNS } from '@qilin-agent/client-locale/client';
14
- import type { InputTriggerController, SessionInputResolver, SessionInput } from '../contract/input.ts';
5
+ import type { DraftInitializationOptions, DraftInitializationResult, InputTriggerController, SessionInputResolver, SessionInput } from '../contract/input.ts';
15
6
  import type { ComposerKeyboard } from '../contract/draft-editor.ts';
16
7
  import { SessionInputShell } from './facade.ts';
17
8
  /** Session-addressed input facade registry (SessionInputResolver face + composer-layer extras). */
@@ -30,6 +21,7 @@ export declare class InputHub implements SessionInputResolver {
30
21
  * @returns the resident per-session facade.
31
22
  */
32
23
  for(actx: Context): SessionInput;
24
+ requestDraftInitialization(binding: SessionBinding, options: DraftInitializationOptions): DraftInitializationResult;
33
25
  /**
34
26
  * Resident shell for one session binding — the provide-channel entry
35
27
  * (called during scope materialization, BEFORE the scope record is
@@ -20,10 +20,14 @@ export declare class SubmitMachine {
20
20
  * @returns effects for the SessionInput shell, in execution order.
21
21
  */
22
22
  dispatch(ev: InputEvent): readonly InputEffect[];
23
- /** The complete command name retains its claim with or without the argument separator. */
24
- private onDraftChanged;
25
- /** The editor applied a claim-token replacement; busy phases refuse another claim. */
26
- private onClaim;
23
+ /**
24
+ * Outside a transaction the claim follows the document's leading command
25
+ * chip: deleting or displacing the chip releases it, and a history restore
26
+ * of the chip re-enters claimed. The claim event applies the same rule to a
27
+ * chip the editor just inserted, before its update commits; busy phases
28
+ * refuse both.
29
+ */
30
+ private followCommand;
27
31
  /** Mint an attempt and controller without assigning its lifecycle owner. */
28
32
  private mintAttempt;
29
33
  /** Mint the frozen command/adjudication attempt. */
@@ -35,7 +39,7 @@ export declare class SubmitMachine {
35
39
  private onEnter;
36
40
  private onAdjudicated;
37
41
  private onAdjudicationFailed;
38
- /** Claimed command settlement retains the frozen transaction semantics. */
42
+ /** Claimed command settlement; after a failure the claim follows the leading command chip again. */
39
43
  private onSubmitSettled;
40
44
  /** Settle one ordinary send independently of current phase and other detached sends. */
41
45
  private onSinkSettled;
@@ -0,0 +1,10 @@
1
+ /** Maps ordinary message occurrences to Desktop product events. */
2
+ import type { Context } from '@qilin-agent/kylin';
3
+ import type { MessageSubmission } from '../contract/composer-submission.ts';
4
+ /**
5
+ * Report the original message occurrence without reading newer Session facts.
6
+ * @param ctx - client context.
7
+ * @param submission - occurrence, delivery mode, and captured Session facts.
8
+ */
9
+ export declare function reportMessageSubmission(ctx: Context, submission: MessageSubmission): void;
10
+ //# sourceMappingURL=submission-analytics.d.ts.map
@@ -29,6 +29,9 @@ export declare const zh: {
29
29
  'attachment.dropTitle': string;
30
30
  'attachment.dropDesc': string;
31
31
  'attachment.dropBlocked': string;
32
+ 'attachment.directoryDesktopOnly': string;
33
+ 'attachment.pathUnavailable': string;
34
+ 'attachment.pathUnsupported': string;
32
35
  'image.pending': string;
33
36
  'image.openOriginal': string;
34
37
  'image.openOriginalLabel': string;
@@ -65,14 +68,6 @@ export declare const zh: {
65
68
  'settings.enter.description': string;
66
69
  'settings.enter.queue': string;
67
70
  'settings.enter.steer': string;
68
- 'settings.width.title': string;
69
- 'settings.width.description': string;
70
- 'settings.width.adaptive': string;
71
- 'settings.width.unit': string;
72
- 'settings.width.increase': string;
73
- 'settings.width.decrease': string;
74
- 'settings.width.customize': string;
75
- 'settings.width.reset': string;
76
71
  'hero.headline': string;
77
72
  'hero.tagline': string;
78
73
  'hero.greeting.morning': string;
@@ -80,6 +75,8 @@ export declare const zh: {
80
75
  'hero.greeting.evening': string;
81
76
  'hero.chooseWorkspace': string;
82
77
  'session.hierarchy': string;
78
+ 'session.moreViews': string;
79
+ 'session.moreViewsCurrent': string;
83
80
  'todo.title': string;
84
81
  'todo.progress.done': string;
85
82
  'todo.progress.active': string;
@@ -110,6 +107,7 @@ export declare const zh: {
110
107
  'row.stopped': string;
111
108
  'row.input': string;
112
109
  'row.output': string;
110
+ 'row.commandArguments': string;
113
111
  'row.inspect': string;
114
112
  'tool.title.search': string;
115
113
  'tool.title.read': string;
@@ -414,6 +412,9 @@ export declare const en: {
414
412
  'attachment.dropTitle': string;
415
413
  'attachment.dropDesc': string;
416
414
  'attachment.dropBlocked': string;
415
+ 'attachment.directoryDesktopOnly': string;
416
+ 'attachment.pathUnavailable': string;
417
+ 'attachment.pathUnsupported': string;
417
418
  'image.pending': string;
418
419
  'image.openOriginal': string;
419
420
  'image.openOriginalLabel': string;
@@ -450,14 +451,6 @@ export declare const en: {
450
451
  'settings.enter.description': string;
451
452
  'settings.enter.queue': string;
452
453
  'settings.enter.steer': string;
453
- 'settings.width.title': string;
454
- 'settings.width.description': string;
455
- 'settings.width.adaptive': string;
456
- 'settings.width.unit': string;
457
- 'settings.width.increase': string;
458
- 'settings.width.decrease': string;
459
- 'settings.width.customize': string;
460
- 'settings.width.reset': string;
461
454
  'hero.headline': string;
462
455
  'hero.tagline': string;
463
456
  'hero.greeting.morning': string;
@@ -465,6 +458,8 @@ export declare const en: {
465
458
  'hero.greeting.evening': string;
466
459
  'hero.chooseWorkspace': string;
467
460
  'session.hierarchy': string;
461
+ 'session.moreViews': string;
462
+ 'session.moreViewsCurrent': string;
468
463
  'todo.title': string;
469
464
  'todo.progress.done': string;
470
465
  'todo.progress.active': string;
@@ -495,6 +490,7 @@ export declare const en: {
495
490
  'row.stopped': string;
496
491
  'row.input': string;
497
492
  'row.output': string;
493
+ 'row.commandArguments': string;
498
494
  'row.inspect': string;
499
495
  'tool.title.search': string;
500
496
  'tool.title.read': string;
@@ -10,7 +10,7 @@ export type ConversationSessionHeaderProps = ConversationSessionHeaderSlotProps;
10
10
  * @param props - Session identity, parent-owned chrome visibility, view ledger, navigation, render, and locale shares.
11
11
  * @returns the title row and, with more than one View, the tab strip.
12
12
  */
13
- export declare function ConversationSessionHeader({ sessionId, hideChrome, useSessions, useConversationViews, useStore, renderSlot, open, selectView, t, }: ConversationSessionHeaderProps): import("react").JSX.Element;
13
+ export declare function ConversationSessionHeader({ sessionId, hideChrome, useSessions, useConversationViews, useStore, renderSlot, open, selectView, setPinned, t, useEntryPins, useEntryActions, }: ConversationSessionHeaderProps): import("react").JSX.Element;
14
14
  /**
15
15
  * Renders the active Session view inside the resident scrollport and keeps
16
16
  * the input draft mirrored while blank Hero chrome is visible.
@@ -1,9 +1,9 @@
1
1
  import type { ConversationSessionSlotProps } from '../contract/slots.ts';
2
2
  /**
3
3
  * Renders the active Session view inside the resident scrollport and keeps
4
- * the input draft mirrored while blank Hero chrome is visible.
4
+ * the input draft persisted while blank Hero chrome is visible.
5
5
  * @param props - Strict Session input/store, view ledger, and render shares.
6
6
  * @returns the active view area, or null while the Session remains blank.
7
7
  */
8
- export declare function DefaultConversationViews({ view, useSession, useConversation, useConversationViews, useInput, inputActions, useStore, actions, renderSlot, bindDraftMirror, openView, }: ConversationSessionSlotProps): import("react").JSX.Element | null;
8
+ export declare function DefaultConversationViews({ view, useSession, useConversation, useConversationViews, inputActions, useStore, actions, renderSlot, bindDraftPersistence, openView, }: ConversationSessionSlotProps): import("react").JSX.Element | null;
9
9
  //# sourceMappingURL=DefaultConversationViews.d.ts.map
@@ -14,5 +14,5 @@
14
14
  */
15
15
  import type { ComposerBarProps } from '../contract/slots.ts';
16
16
  export type InputBarProps = ComposerBarProps;
17
- export declare const InputBar: import("react").MemoExoticComponent<({ useSession, useInput, inputActions, keyboard, addFiles, removeAttachment, resolveDraftAttachments, retryFileUpload, toggleCommandMenu, stop, t, renderSlot, useBusyEnter, useFileUploads, useNotices, useLexicon, useMenuLauncher, useProjection, sessionId, variant, disabled: inert, blocked, workspacePickerOpen, onRequestWorkspace, placeholder, accessory, }: InputBarProps) => import("react").JSX.Element>;
17
+ export declare const InputBar: import("react").MemoExoticComponent<({ useSession, useInput, inputActions, keyboard, addFiles, removeAttachment, resolveDraftAttachments, retryFileUpload, toggleCommandMenu, stop, t, renderSlot, useBusyEnter, useFileUploads, useNotices, useLexicon, useMenuLauncher, useStopShortcut, useProjection, sessionId, variant, disabled: inert, blocked, workspacePickerOpen, onRequestWorkspace, placeholder, accessory, }: InputBarProps) => import("react").JSX.Element>;
18
18
  //# sourceMappingURL=InputBar.d.ts.map
@@ -2,9 +2,10 @@
2
2
  import { type EngineStoreHandle } from '@qilin-agent/client-store';
3
3
  import type { SessionId } from '@qilin-agent/session/types';
4
4
  import type { ConversationStoreState } from './contract/views.ts';
5
+ import type { DraftInput, DraftSnapshot } from './contract/draft-editor.ts';
5
6
  /** Declared write set for the Conversation shell. */
6
7
  type ConversationActions = {
7
- setDraft: (draft: ConversationStoreState, text: string) => void;
8
+ setDraft: (draft: ConversationStoreState, text: DraftInput) => void;
8
9
  setView: (draft: ConversationStoreState, view: string) => void;
9
10
  openView: (draft: ConversationStoreState, view: string, focus: string) => void;
10
11
  completeViewRequest: (draft: ConversationStoreState) => void;
@@ -14,6 +15,12 @@ type ConversationActions = {
14
15
  * @returns the store handle.
15
16
  */
16
17
  export declare function createConversationStore(): EngineStoreHandle<ConversationStoreState, ConversationActions>;
18
+ /**
19
+ * Read a Session's draft before its input source is published to React.
20
+ * @param sessionId - Session-scoped persistence suffix.
21
+ * @returns saved semantic content, or an empty document when storage is absent or invalid.
22
+ */
23
+ export declare function readConversationDraft(sessionId: SessionId): DraftSnapshot;
17
24
  /**
18
25
  * Read the persisted View preference before the Slot store is materialized.
19
26
  * @param sessionId - Session-scoped persistence suffix.
@@ -0,0 +1,22 @@
1
+ /** In-memory pin choices for the Conversation View tabs. */
2
+ import { type ObservableSnapshot } from '@qilin-agent/client-store';
3
+ /** View whose tab always shows and never enters the customization list. */
4
+ export declare const FIXED_VIEW_ID = "chat";
5
+ /** Unpinned View ids and their only mutation. */
6
+ export interface ViewPins {
7
+ /** Unpinned View ids; ids of Views that are not registered stay listed. */
8
+ readonly unpinned: ObservableSnapshot<readonly string[]>;
9
+ /**
10
+ * Pin or unpin one View tab; the fixed View is ignored. A pinned tab still
11
+ * enters More when the header's width budget cannot hold it.
12
+ * @param id - View id.
13
+ * @param pinned - Whether the tab is manually pinned.
14
+ */
15
+ readonly setPinned: (id: string, pinned: boolean) => void;
16
+ }
17
+ /**
18
+ * Create the in-memory View pin list; the snapshot keeps its reference until the list changes.
19
+ * @returns Unpinned View ids and the pin mutation.
20
+ */
21
+ export declare function createViewPins(): ViewPins;
22
+ //# sourceMappingURL=view-pins.d.ts.map
@@ -34,5 +34,9 @@ export interface ConversationSettings {
34
34
  contentWidth: number;
35
35
  }
36
36
  /** Durable conversation schema; also the wire envelope the browser scope validates against. */
37
+ export declare const ConversationSettingsFields: {
38
+ busyEnter: z<"queue" | "steer", "queue" | "steer", "defined">;
39
+ contentWidth: z<number, number, "defined">;
40
+ };
37
41
  export declare const ConversationSettingsSchema: z<ConversationSettings>;
38
42
  //# sourceMappingURL=conversation-settings.d.ts.map
@@ -1,9 +1,24 @@
1
- /** Host registration for browser conversation preferences. */
2
- import type { Context } from '@qilin-agent/kylin';
1
+ import type { Volatile, Context } from '@qilin-agent/kylin';
2
+ import type { BusyEnterBehavior } from './conversation-settings.ts';
3
+ import z from '@qilin-agent/schemastery';
3
4
  export { BUSY_ENTER_BEHAVIORS, BUSY_ENTER_FIELD, CONVERSATION_SETTINGS_NAMESPACE, CONTENT_WIDTH_ADAPTIVE, CONTENT_WIDTH_FIELD, CONTENT_WIDTH_MAX, CONTENT_WIDTH_MIN, CONTENT_WIDTH_STEP, DEFAULT_BUSY_ENTER_BEHAVIOR, DEFAULT_CONTENT_WIDTH, type BusyEnterBehavior, type ConversationSettings, } from './conversation-settings.ts';
4
- /**
5
- * Register the durable conversation section when a settings provider exists.
6
- * @param ctx - Host context whose optional settings service owns the section.
5
+ /** Runtime preferences projected to the browser. */
6
+ export interface Config {
7
+ /** Enter key behavior while a turn is running. */
8
+ busyEnter: Volatile<BusyEnterBehavior>;
9
+ /** Transcript content width in px, or 0 for the layout's adaptive clamp. */
10
+ contentWidth: Volatile<number>;
11
+ }
12
+ /** Live preferences projected to the browser. */
13
+ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
14
+ busyEnter: z<"queue" | "steer", "queue" | "steer", "volatile-defined">;
15
+ contentWidth: z<number, number, "volatile-defined">;
16
+ }>>, Schemastery.ObjectT<NoInfer<{
17
+ busyEnter: z<"queue" | "steer", "queue" | "steer", "volatile-defined">;
18
+ contentWidth: z<number, number, "volatile-defined">;
19
+ }>>, "plain">;
20
+ /** Host preferences are consumed through the configuration form projection.
21
+ * @param ctx Plugin context used for optional settings presentation.
7
22
  */
8
23
  export declare function apply(ctx: Context): void;
9
24
  //# sourceMappingURL=index.d.ts.map