@qilin-agent/client-ui-conversation 3.1.6 → 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.
- package/README.i18n.yaml +2 -2
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/lib/client.js +473 -79
- package/lib/types/client/contract/composer-submission.d.ts +23 -0
- package/lib/types/client/contract/input.d.ts +9 -1
- package/lib/types/client/contract/slots.d.ts +50 -3
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/input/editor/keymap.d.ts +6 -2
- package/lib/types/client/input/editor/runtime.d.ts +14 -0
- package/lib/types/client/input/editor/view-binding.d.ts +1 -1
- package/lib/types/client/input/facade.d.ts +26 -3
- package/lib/types/client/input/hub.d.ts +0 -9
- package/lib/types/client/input/submission-analytics.d.ts +10 -0
- package/lib/types/client/locales.d.ts +10 -0
- package/lib/types/client/skeleton/ConversationSession.d.ts +1 -1
- package/lib/types/client/skeleton/InputBar.d.ts +1 -1
- package/lib/types/client/view-pins.d.ts +22 -0
- package/package.json +34 -32
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
/** Composer submission vocabulary shared by the input and settings domains. */
|
|
2
2
|
import type { BusyEnterBehavior } from '../../conversation-settings.ts';
|
|
3
|
+
import type { SessionId } from '@qilin-agent/session/types';
|
|
3
4
|
export type { BusyEnterBehavior } from '../../conversation-settings.ts';
|
|
4
5
|
/** Delivery mode requested for one ordinary composer message. */
|
|
5
6
|
export type InputSubmitMode = BusyEnterBehavior;
|
|
6
7
|
/** Keyboard gesture whose delivery mode the submission policy resolves. */
|
|
7
8
|
export type ComposerSubmitGesture = 'enter' | 'accelerated';
|
|
9
|
+
/** Session facts captured when a message submission starts, before asynchronous command arbitration. */
|
|
10
|
+
export interface MessageSubmissionState {
|
|
11
|
+
readonly sessionId?: SessionId;
|
|
12
|
+
readonly model?: {
|
|
13
|
+
readonly provider: string;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly effort?: string;
|
|
16
|
+
};
|
|
17
|
+
readonly runMode: 'default' | 'plan' | 'goal';
|
|
18
|
+
readonly running: boolean;
|
|
19
|
+
/** Whether the Session is still blank, so this message is its first. */
|
|
20
|
+
readonly newSession: boolean;
|
|
21
|
+
/** Agent preset id the Session records, when known. */
|
|
22
|
+
readonly agentPreset?: string;
|
|
23
|
+
}
|
|
24
|
+
/** Immutable occurrence and delivery intent carried by one composer attempt. */
|
|
25
|
+
export interface MessageSubmission {
|
|
26
|
+
readonly timestamp: number;
|
|
27
|
+
readonly source?: 'click' | 'enter';
|
|
28
|
+
readonly mode: InputSubmitMode;
|
|
29
|
+
readonly state?: MessageSubmissionState;
|
|
30
|
+
}
|
|
8
31
|
//# sourceMappingURL=composer-submission.d.ts.map
|
|
@@ -207,7 +207,7 @@ export interface SessionInputResolver {
|
|
|
207
207
|
/**
|
|
208
208
|
* Prepare the exact retained Session before navigation publishes it.
|
|
209
209
|
* @param binding - target Session generation, already retained by the caller.
|
|
210
|
-
* @param options - content to adopt and
|
|
210
|
+
* @param options - content to adopt and the handling of an existing draft.
|
|
211
211
|
* @returns applied, preserved, or blocked by a pending submission or disposal.
|
|
212
212
|
*/
|
|
213
213
|
requestDraftInitialization(binding: SessionBinding, options: DraftInitializationOptions): DraftInitializationResult;
|
|
@@ -215,7 +215,15 @@ export interface SessionInputResolver {
|
|
|
215
215
|
/** Initial text for a target Session; attachments remain under their existing owner. */
|
|
216
216
|
export interface DraftInitializationOptions {
|
|
217
217
|
readonly prompt?: string;
|
|
218
|
+
/** `true` acts as `whenDraftExists: 'replace'`; ignored when `whenDraftExists` is set. */
|
|
218
219
|
readonly clearPreviousDraft?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Handling of a target that already has text or attachments: `replace` swaps the text and
|
|
222
|
+
* inline references for the prompt (or clears them without one), `append` adds the prompt
|
|
223
|
+
* as new paragraphs after the existing text, and `keep` leaves the draft unchanged. Omitted,
|
|
224
|
+
* it is `replace` when `clearPreviousDraft` is true and `keep` otherwise.
|
|
225
|
+
*/
|
|
226
|
+
readonly whenDraftExists?: 'replace' | 'append' | 'keep';
|
|
219
227
|
}
|
|
220
228
|
/** An initialization request never waits for a React mount or a remote catalog. */
|
|
221
229
|
export type DraftInitializationResult = 'applied' | 'preserved' | 'blocked';
|
|
@@ -57,7 +57,7 @@ export interface ComposerAttachmentsOwnerProps {
|
|
|
57
57
|
/** Whether a document-level file drop may add attachments now. */
|
|
58
58
|
canAcceptDrop: boolean;
|
|
59
59
|
/** Add one dropped batch through the composer's validation path. */
|
|
60
|
-
onAddFiles: (files: readonly File[]) => void;
|
|
60
|
+
onAddFiles: (files: readonly File[], directories?: ReadonlySet<File>) => void;
|
|
61
61
|
/** Remove one draft attachment through the Conversation service. */
|
|
62
62
|
onRemoveAttachment: (id: DraftAttachmentId) => void;
|
|
63
63
|
/** Current per-draft upload states for file-kind attachments. */
|
|
@@ -181,6 +181,12 @@ declare module '@qilin-agent/client-ui-slots' {
|
|
|
181
181
|
scope: 'session';
|
|
182
182
|
owner: ConversationHeaderCornerOwnerProps;
|
|
183
183
|
};
|
|
184
|
+
/** Rows of the View tab row's More menu; the header shows More only while this list has registrations. */
|
|
185
|
+
'conversation.session.header.views.actions': {
|
|
186
|
+
kind: 'list';
|
|
187
|
+
scope: 'root';
|
|
188
|
+
owner: ConversationViewActionsOwnerProps;
|
|
189
|
+
};
|
|
184
190
|
/** Registered Conversation target Views, rendered one at a time. */
|
|
185
191
|
'conversation.view': {
|
|
186
192
|
kind: 'list';
|
|
@@ -427,12 +433,51 @@ export interface ConversationSessionInjected {
|
|
|
427
433
|
/** Select and activate one View while addressing an opaque focus request to it. */
|
|
428
434
|
openView: (view: string, focus: string) => void;
|
|
429
435
|
}
|
|
436
|
+
/** One customizable View tab listed in the More menu. */
|
|
437
|
+
export interface ConversationViewActionEntry {
|
|
438
|
+
/** View id. */
|
|
439
|
+
readonly id: string;
|
|
440
|
+
/** Resolved View label. */
|
|
441
|
+
readonly label: string;
|
|
442
|
+
/** False while the View is manually unpinned. A pinned View still enters More when the header's width budget cannot hold it. */
|
|
443
|
+
readonly pinned: boolean;
|
|
444
|
+
/** Whether this View is selected in this Session, independently of its pin state. */
|
|
445
|
+
readonly active?: boolean;
|
|
446
|
+
}
|
|
447
|
+
/** Owner share of the View tab row's More menu rows. */
|
|
448
|
+
export interface ConversationViewActionsOwnerProps {
|
|
449
|
+
/** Views outside the header in registration order. */
|
|
450
|
+
readonly entries: readonly ConversationViewActionEntry[];
|
|
451
|
+
/**
|
|
452
|
+
* Select a View in this Session without changing its pin state.
|
|
453
|
+
* @param id - Listed View id.
|
|
454
|
+
*/
|
|
455
|
+
readonly onOpen: (id: string) => void;
|
|
456
|
+
/**
|
|
457
|
+
* Pin or unpin a View in every Session.
|
|
458
|
+
* @param id - Listed View id.
|
|
459
|
+
* @param pinned - Whether the View is manually pinned; the width budget can still fold it into More.
|
|
460
|
+
*/
|
|
461
|
+
readonly onPinnedChange: (id: string, pinned: boolean) => void;
|
|
462
|
+
/** Close the More menu. */
|
|
463
|
+
readonly onDismiss: () => void;
|
|
464
|
+
}
|
|
430
465
|
/** Business callbacks injected into the strict Session header. */
|
|
431
466
|
export interface ConversationSessionHeaderInjected {
|
|
432
467
|
/** Package-owned View roster source bound only for the Conversation header. */
|
|
433
468
|
readonly hooks: {
|
|
434
469
|
readonly conversationViews: ObservableSnapshot<readonly ViewTab[]>;
|
|
470
|
+
/** Ids of unpinned View tabs held in memory and shared by every Session until plugin reload. */
|
|
471
|
+
readonly entryPins: ObservableSnapshot<readonly string[]>;
|
|
472
|
+
/** Whether `conversation.session.header.views.actions` has registrations. */
|
|
473
|
+
readonly entryActions: ObservableSnapshot<boolean>;
|
|
435
474
|
};
|
|
475
|
+
/**
|
|
476
|
+
* Pin or unpin one View tab in every Session; Chat is ignored.
|
|
477
|
+
* @param id - View id.
|
|
478
|
+
* @param pinned - Whether the View is manually pinned; the width budget can still fold it into More.
|
|
479
|
+
*/
|
|
480
|
+
setPinned: (id: string, pinned: boolean) => void;
|
|
436
481
|
/** Select a Session through the Session Controller. */
|
|
437
482
|
open: (sessionId: SessionId) => void;
|
|
438
483
|
/** Select and activate one registered Conversation View. */
|
|
@@ -459,7 +504,7 @@ export interface ComposerBarOwnerProps {
|
|
|
459
504
|
/** Package-private operations injected into the resident composer bar. */
|
|
460
505
|
export interface ComposerBarInjected {
|
|
461
506
|
keyboard: ComposerKeyboard | undefined;
|
|
462
|
-
addFiles: ((files: readonly File[]) => string | null) | undefined;
|
|
507
|
+
addFiles: ((files: readonly File[], directories?: ReadonlySet<File>) => string | null) | undefined;
|
|
463
508
|
removeAttachment: ((id: DraftAttachmentId) => void) | undefined;
|
|
464
509
|
resolveDraftAttachments: ((ids: readonly DraftAttachmentId[]) => readonly ComposerAttachment[]) | undefined;
|
|
465
510
|
/** Restart one failed file upload; absent without a session. */
|
|
@@ -467,6 +512,8 @@ export interface ComposerBarInjected {
|
|
|
467
512
|
toggleCommandMenu: ((selection: EditSelection) => void) | undefined;
|
|
468
513
|
stop: (() => void) | undefined;
|
|
469
514
|
hooks: {
|
|
515
|
+
/** Readable sequence while the fixed Stop command is registered. */
|
|
516
|
+
stopShortcut: ObservableSnapshot<readonly string[]>;
|
|
470
517
|
/**
|
|
471
518
|
* Live busy-state submission preference: the delivery mode plain Enter
|
|
472
519
|
* and the primary Send button use while the addressed agent is busy.
|
|
@@ -535,7 +582,7 @@ export type ConversationWidthControlsProps = FactoryLocalComponentPropsOf<'conve
|
|
|
535
582
|
/** Full props of the strict Session body. */
|
|
536
583
|
export type ConversationSessionSlotProps = PropsRuntime<'conversation.session'> & PropsRenderSlots<'conversation.view'> & PropsStore<ConversationStore> & InjectFace<ConversationSessionInjected>;
|
|
537
584
|
/** Full props of the strict Session header. */
|
|
538
|
-
export type ConversationSessionHeaderSlotProps = PropsRuntime<'conversation.session.header'> & PropsRenderSlots<'conversation.session.header.lineage' | 'conversation.session.header.actions' | 'conversation.session.header.utilities' | 'conversation.session.header.corner'> & PropsStore<ConversationStore> & InjectFace<ConversationSessionHeaderInjected> & PropsLocale<'conversation'>;
|
|
585
|
+
export type ConversationSessionHeaderSlotProps = PropsRuntime<'conversation.session.header'> & PropsRenderSlots<'conversation.session.header.lineage' | 'conversation.session.header.actions' | 'conversation.session.header.utilities' | 'conversation.session.header.corner' | 'conversation.session.header.views.actions'> & PropsStore<ConversationStore> & InjectFace<ConversationSessionHeaderInjected> & PropsLocale<'conversation'>;
|
|
539
586
|
/** Full props of the draft-attachment renderer. */
|
|
540
587
|
export type ComposerAttachmentsProps = PropsRuntime<'conversation.input.attachments'> & PropsLocale<'conversation'>;
|
|
541
588
|
/** Owner share common to blank-session Workspace pickers. */
|
|
@@ -24,7 +24,7 @@ export { ConversationLocationIndex } from './conversation/location-index.ts';
|
|
|
24
24
|
export type { ConversationLocationDataChange } from './conversation/location-index.ts';
|
|
25
25
|
export { ConversationViewRegistry } from './conversation/view-registry.ts';
|
|
26
26
|
export type { ConversationKey } from './locales.ts';
|
|
27
|
-
export type { ComposerAttachment, ComposerAttachmentsOwnerProps, ComposerAttachmentsProps, ComposerFileAttachment, ComposerImageAttachment, DraftFileUpload, DraftFileUploads, ComposerBarInjected, ComposerBarOwnerProps, ComposerBarProps, ComposerChainProps, ConversationHeaderActionOwnerProps, ConversationHeaderCornerOwnerProps, ConversationHeaderLineageOwnerProps, ConversationContentInputProps, ConversationContentProps, ConversationInjected, ConversationSessionHeaderInjected, ConversationSessionHeaderSlotProps, ConversationSessionInjected, ConversationSessionSlotProps, ConversationSlotProps, ConversationViewsProps, ConversationWidthControlsInputProps, ConversationWidthControlsProps, ConversationStore, ConvViewOwnerProps, ConvViewProps, EmptyWorkspaceOwnerProps, HeroAgentPresetOwnerProps, HeroBrandMarkOwnerProps, InputControlOwnerProps, InputZone, MessageImageLoader, MessageImageSource, MessageImagesOwnerProps, RenderMessageImages, UseConversation, UseConversationViews, } from './contract/slots.ts';
|
|
27
|
+
export type { ComposerAttachment, ComposerAttachmentsOwnerProps, ComposerAttachmentsProps, ComposerFileAttachment, ComposerImageAttachment, DraftFileUpload, DraftFileUploads, ComposerBarInjected, ComposerBarOwnerProps, ComposerBarProps, ComposerChainProps, ConversationHeaderActionOwnerProps, ConversationHeaderCornerOwnerProps, ConversationHeaderLineageOwnerProps, ConversationContentInputProps, ConversationContentProps, ConversationInjected, ConversationSessionHeaderInjected, ConversationSessionHeaderSlotProps, ConversationSessionInjected, ConversationSessionSlotProps, ConversationSlotProps, ConversationViewActionEntry, ConversationViewActionsOwnerProps, ConversationViewsProps, ConversationWidthControlsInputProps, ConversationWidthControlsProps, ConversationStore, ConvViewOwnerProps, ConvViewProps, EmptyWorkspaceOwnerProps, HeroAgentPresetOwnerProps, HeroBrandMarkOwnerProps, InputControlOwnerProps, InputZone, MessageImageLoader, MessageImageSource, MessageImagesOwnerProps, RenderMessageImages, UseConversation, UseConversationViews, } from './contract/slots.ts';
|
|
28
28
|
export type { BeginCommandRequest, CommandClaim, ConsumeTokenRequest, DraftAttachmentId, DraftInitializationOptions, DraftInitializationResult, InputActions, InputState, InsertReferenceRequest, InsertTextRequest, PickOutcome, SessionInput, SessionInputResolver, SubmitAttachment, SubmitOutcome, } from './contract/input.ts';
|
|
29
29
|
export type { ArbitrateKey, ArbitrateOutcome, DraftInput, DraftReference, DraftSnapshot, ReferenceInsert, TokenSpan } from './contract/draft-editor.ts';
|
|
30
30
|
export type { ComposerBlock, ComposerBlocks } from './contract/composer-blocks.ts';
|
|
@@ -28,8 +28,12 @@ export interface ComposerKeymapHandlers {
|
|
|
28
28
|
canSubmit(): boolean;
|
|
29
29
|
/** The Enter gesture after every guard passed; `accelerated` = Ctrl/Cmd held. */
|
|
30
30
|
submit(accelerated: boolean): void;
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Pasted files with directory metadata supplied by the clipboard entry API.
|
|
33
|
+
* @param files - browser files in clipboard order.
|
|
34
|
+
* @param directories - known directory members; absent when no entry identifies a directory.
|
|
35
|
+
*/
|
|
36
|
+
intakeFiles(files: readonly File[], directories?: ReadonlySet<File>): void;
|
|
33
37
|
/** Pasted plain text (sanitized insertion through the shell). */
|
|
34
38
|
pasteText(text: string): void;
|
|
35
39
|
}
|
|
@@ -62,6 +62,14 @@ export declare class DraftEditorRuntime {
|
|
|
62
62
|
* @param text - the full next draft.
|
|
63
63
|
*/
|
|
64
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;
|
|
65
73
|
/**
|
|
66
74
|
* Insert pasted plain text over the current editor selection
|
|
67
75
|
* (placeholder-sanitized). The paste event's own default is suppressed by
|
|
@@ -113,6 +121,12 @@ export declare class DraftEditorRuntime {
|
|
|
113
121
|
* @returns whether the range mapped and the edit applied.
|
|
114
122
|
*/
|
|
115
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;
|
|
116
130
|
/**
|
|
117
131
|
* Clear committed content using the model's suffix decision inside the editor update.
|
|
118
132
|
* @param prefixLength - returns the clipboard-prefix length to remove, or null to clear the root.
|
|
@@ -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'];
|
|
@@ -14,7 +14,7 @@ import { type ObservableSnapshot, type SnapshotStore } from '@qilin-agent/client
|
|
|
14
14
|
import type { LexicalEditor } from 'lexical';
|
|
15
15
|
import type { CommandClaim, ConsumeTokenRequest, DraftAttachmentId, DraftInitializationOptions, DraftInitializationResult, InputActions, InputNotice, InputState, InputTriggerController, SessionInput, SubmitAttachment, SubmitOutcome } from '../contract/input.ts';
|
|
16
16
|
import type { ArbitrateKey, ArbitrateOutcome, ComposerKeyboard, DraftInput, DraftSnapshot, ReferenceInsert, TokenSpan } from '../contract/draft-editor.ts';
|
|
17
|
-
import type { InputSubmitMode } from '../contract/composer-submission.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 +
|
|
@@ -125,13 +129,21 @@ export declare class SessionInputShell implements SessionInput {
|
|
|
125
129
|
persistCurrentDraft(): void;
|
|
126
130
|
/**
|
|
127
131
|
* Apply one new-task request to this already-initialized input model.
|
|
128
|
-
* @param options -
|
|
129
|
-
* @returns
|
|
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.
|
|
130
135
|
*/
|
|
131
136
|
requestDraftInitialization(options: DraftInitializationOptions): DraftInitializationResult;
|
|
132
137
|
private draftInitializationBlocked;
|
|
133
138
|
/** Append ordered attachment ids unless an admission transaction is locked. */
|
|
134
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;
|
|
135
147
|
/**
|
|
136
148
|
* Remove one attachment id from this draft. Busy admission phases refuse, like
|
|
137
149
|
* {@link addAttachments}: a removal landing while a command submit serializes
|
|
@@ -310,6 +322,17 @@ export declare class SessionInputShell implements SessionInput {
|
|
|
310
322
|
* its editor snapshot. Chip-free drafts skip the async detour.
|
|
311
323
|
*/
|
|
312
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;
|
|
313
336
|
/** Settle one detached default send independently of other sends. */
|
|
314
337
|
private settleSink;
|
|
315
338
|
/** Restore one failed detached send without overwriting text entered after a restoration. */
|
|
@@ -1,12 +1,3 @@
|
|
|
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';
|
|
@@ -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;
|
|
@@ -72,6 +75,8 @@ export declare const zh: {
|
|
|
72
75
|
'hero.greeting.evening': string;
|
|
73
76
|
'hero.chooseWorkspace': string;
|
|
74
77
|
'session.hierarchy': string;
|
|
78
|
+
'session.moreViews': string;
|
|
79
|
+
'session.moreViewsCurrent': string;
|
|
75
80
|
'todo.title': string;
|
|
76
81
|
'todo.progress.done': string;
|
|
77
82
|
'todo.progress.active': string;
|
|
@@ -407,6 +412,9 @@ export declare const en: {
|
|
|
407
412
|
'attachment.dropTitle': string;
|
|
408
413
|
'attachment.dropDesc': string;
|
|
409
414
|
'attachment.dropBlocked': string;
|
|
415
|
+
'attachment.directoryDesktopOnly': string;
|
|
416
|
+
'attachment.pathUnavailable': string;
|
|
417
|
+
'attachment.pathUnsupported': string;
|
|
410
418
|
'image.pending': string;
|
|
411
419
|
'image.openOriginal': string;
|
|
412
420
|
'image.openOriginalLabel': string;
|
|
@@ -450,6 +458,8 @@ export declare const en: {
|
|
|
450
458
|
'hero.greeting.evening': string;
|
|
451
459
|
'hero.chooseWorkspace': string;
|
|
452
460
|
'session.hierarchy': string;
|
|
461
|
+
'session.moreViews': string;
|
|
462
|
+
'session.moreViewsCurrent': string;
|
|
453
463
|
'todo.title': string;
|
|
454
464
|
'todo.progress.done': string;
|
|
455
465
|
'todo.progress.active': 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.
|
|
@@ -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
|
|
@@ -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
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-conversation",
|
|
3
3
|
"description": "Target-neutral Conversation assembly, shell, composer, queue, and view navigation",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.7",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -64,38 +64,40 @@
|
|
|
64
64
|
"react": "^18.2.0",
|
|
65
65
|
"react-dom": "^18.2.0",
|
|
66
66
|
"zod": "^4.4.3",
|
|
67
|
-
"@qilin-agent/
|
|
68
|
-
"@qilin-agent/
|
|
69
|
-
"@qilin-agent/api-session-controller": "3.1.
|
|
70
|
-
"@qilin-agent/
|
|
71
|
-
"@qilin-agent/
|
|
72
|
-
"@qilin-agent/brand": "3.1.
|
|
73
|
-
"@qilin-agent/client-
|
|
74
|
-
"@qilin-agent/client-
|
|
75
|
-
"@qilin-agent/client-shortcuts": "3.1.
|
|
76
|
-
"@qilin-agent/client-store": "3.1.
|
|
77
|
-
"@qilin-agent/client-
|
|
78
|
-
"@qilin-agent/client-
|
|
79
|
-
"@qilin-agent/client-
|
|
80
|
-
"@qilin-agent/
|
|
81
|
-
"@qilin-agent/
|
|
82
|
-
"@qilin-agent/client-ui-
|
|
83
|
-
"@qilin-agent/client-ui-
|
|
84
|
-
"@qilin-agent/
|
|
85
|
-
"@qilin-agent/
|
|
67
|
+
"@qilin-agent/api-remotes": "3.1.7",
|
|
68
|
+
"@qilin-agent/agent": "3.1.7",
|
|
69
|
+
"@qilin-agent/api-session-controller": "3.1.7",
|
|
70
|
+
"@qilin-agent/attachment": "3.1.7",
|
|
71
|
+
"@qilin-agent/api-workspace-controller": "3.1.7",
|
|
72
|
+
"@qilin-agent/brand": "3.1.7",
|
|
73
|
+
"@qilin-agent/client-file-upload": "3.1.7",
|
|
74
|
+
"@qilin-agent/client-locale": "3.1.7",
|
|
75
|
+
"@qilin-agent/client-shortcuts": "3.1.7",
|
|
76
|
+
"@qilin-agent/client-store": "3.1.7",
|
|
77
|
+
"@qilin-agent/client-test-runtime": "3.1.7",
|
|
78
|
+
"@qilin-agent/client-ui-layout": "3.1.7",
|
|
79
|
+
"@qilin-agent/client-product-analytics": "3.1.7",
|
|
80
|
+
"@qilin-agent/goal": "3.1.7",
|
|
81
|
+
"@qilin-agent/plan-mode": "3.1.7",
|
|
82
|
+
"@qilin-agent/client-ui-primitives": "3.1.7",
|
|
83
|
+
"@qilin-agent/client-ui-renderer": "3.1.7",
|
|
84
|
+
"@qilin-agent/client-ui-session": "3.1.7",
|
|
85
|
+
"@qilin-agent/client-ui-workspace": "3.1.7",
|
|
86
|
+
"@qilin-agent/client-ui-slots": "3.1.7",
|
|
87
|
+
"@qilin-agent/commands": "3.1.7",
|
|
88
|
+
"@qilin-agent/client-ui-settings": "3.1.7",
|
|
89
|
+
"@qilin-agent/file-reference": "3.1.7",
|
|
86
90
|
"@qilin-agent/kylin": "~4.0.5",
|
|
87
|
-
"@qilin-agent/
|
|
88
|
-
"@qilin-agent/llm": "3.1.
|
|
89
|
-
"@qilin-agent/session": "3.1.
|
|
90
|
-
"@qilin-agent/
|
|
91
|
-
"@qilin-agent/
|
|
92
|
-
"@qilin-agent/
|
|
93
|
-
"@qilin-agent/util-
|
|
94
|
-
"@qilin-agent/
|
|
95
|
-
"@qilin-agent/
|
|
96
|
-
"@qilin-agent/
|
|
97
|
-
"@qilin-agent/util-workspace-path": "3.1.6",
|
|
98
|
-
"@qilin-agent/workspace": "3.1.6"
|
|
91
|
+
"@qilin-agent/llm": "3.1.7",
|
|
92
|
+
"@qilin-agent/llm-retry": "3.1.7",
|
|
93
|
+
"@qilin-agent/session": "3.1.7",
|
|
94
|
+
"@qilin-agent/token-meter": "3.1.7",
|
|
95
|
+
"@qilin-agent/tool-todo": "3.1.7",
|
|
96
|
+
"@qilin-agent/util-values": "3.1.7",
|
|
97
|
+
"@qilin-agent/util-crypto": "3.1.7",
|
|
98
|
+
"@qilin-agent/settings": "3.1.7",
|
|
99
|
+
"@qilin-agent/util-workspace-path": "3.1.7",
|
|
100
|
+
"@qilin-agent/workspace": "3.1.7"
|
|
99
101
|
},
|
|
100
102
|
"files": [
|
|
101
103
|
"lib/index.js",
|