@deepseek-ai/dsh-client-ui-conversation 0.2.1-alpha.1 → 0.2.1-alpha.3

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.
@@ -5,6 +5,16 @@ import type { ConversationGroupData, ConversationGroupedView, ConversationGroupI
5
5
  export interface ConversationMatchResult {
6
6
  readonly id: string;
7
7
  readonly role: 'start' | 'update';
8
+ /**
9
+ * Claim this event on the Definition's target: no other Definition of the
10
+ * same target receives it, and that target's unmatched-event fallback does
11
+ * not run. Definitions of other targets and Definitions without a target
12
+ * still receive it. Two claims on one target, or a claim from a Definition
13
+ * without a target, throw during dispatch. A claim returned by the fallback
14
+ * itself has no effect, because the fallback runs only when no Definition of
15
+ * its target matched.
16
+ */
17
+ readonly exclusive?: true;
8
18
  }
9
19
  /** Merge-extensible business values published against one Turn. */
10
20
  export interface ConversationTurnDataMap {
@@ -122,8 +122,9 @@ export type ModelRetryNode = LlmRetryEventData & {
122
122
  retryState: 'scheduled' | 'started' | 'cancelled';
123
123
  };
124
124
  /**
125
- * Durable terminal failure for a turn that ended with an error reason; the
126
- * turn's settled retry chain renders separately and never replaces this node.
125
+ * Durable terminal notice for a turn that ended with an error, a sign-out
126
+ * cancellation, or an interruption by a DSH stop; the turn's settled retry
127
+ * chain renders separately and never replaces this node.
127
128
  */
128
129
  export interface TurnErrorNode {
129
130
  kind: 'turn-error';
@@ -135,7 +136,11 @@ export interface TurnErrorNode {
135
136
  step: number;
136
137
  /** Sanitized provider message; empty when a known code owns localized copy. */
137
138
  message: string;
138
- /** Stable provider failure code, when recorded. */
139
+ /**
140
+ * Stable provider failure code when recorded, or a Client display code:
141
+ * `ACCOUNT_SIGNED_OUT` for a sign-out cancellation, `INTERRUPTED` for a
142
+ * turn closed after DSH stopped.
143
+ */
139
144
  code?: string;
140
145
  }
141
146
  /** Durable notice for a turn ended by the per-request output-token cap. */
@@ -83,8 +83,9 @@ interface RequestViewBase {
83
83
  startedAt: number;
84
84
  completedAt: number | null;
85
85
  status: 'running' | 'complete' | 'error';
86
+ /** Failure detail; with assistant retry metadata, the last failed attempt even while running or after recovery. */
86
87
  error?: string;
87
- /** Stable provider code for localized presentation of known failures. */
88
+ /** Stable provider code for `error`, including retained attempt failures, for localized presentation. */
88
89
  errorCode?: string;
89
90
  providerMetadata?: AssistantProviderMetadataView;
90
91
  requestConfig?: AssistantRequestConfig;
@@ -3,6 +3,7 @@ import type { ReactNode, RefObject } from 'react';
3
3
  import type { FileAttachmentRef, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
4
4
  import type { SessionSnapshot } from '@deepseek-ai/dsh-api-session-controller/client';
5
5
  import type { FileUploadReceiptId } from '@deepseek-ai/dsh-client-file-upload/client';
6
+ import type { ImageLightboxLabels } from '@deepseek-ai/dsh-client-ui-primitives';
6
7
  import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client';
7
8
  import type { MaybeSnapshotSelectorHook, ObservableSnapshot, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-store';
8
9
  import type { FactoryComponentPropsOf, FactoryLocalComponentPropsOf, InjectFace, PropsLocale, PropsRenderFactories, PropsRenderSlots, PropsRuntime, PropsStore } from '@deepseek-ai/dsh-client-ui-slots';
@@ -16,6 +17,7 @@ import type { createConversationStore } from '../stores.ts';
16
17
  import type { BusyEnterBehavior } from './composer-submission.ts';
17
18
  import type { ConversationSnapshot } from './snapshot.ts';
18
19
  import type { ViewTab } from './views.ts';
20
+ import type { UserTextDocumentInput, UserTextEvaluator, UserTextId, UserTextNode } from './user-text.ts';
19
21
  /** Browser-owned draft attachment that has not crossed the durable Host boundary. */
20
22
  export type ComposerAttachment = ComposerImageAttachment | ComposerFileAttachment;
21
23
  /** Browser-owned image, base64-encoded into the prompt at send time. */
@@ -110,14 +112,88 @@ export interface MessageImagesOwnerProps {
110
112
  /** Fixed, uncropped thumbnail for an attachment list row. */
111
113
  thumbnail?: boolean;
112
114
  }
113
- /** Slot-backed renderer used by Conversation targets without importing an attachment implementation. */
114
- export type RenderMessageImages = (owner: Omit<MessageImagesOwnerProps, 'loadImage'>) => ReactNode;
115
+ /** Message-image strings the owner resolves from its own locale namespace. */
116
+ export interface MessageImageLabels {
117
+ /** Fallback display name for an unnamed image. */
118
+ image: string;
119
+ /** Thumbnail tooltip inviting the original-image preview. */
120
+ open: string;
121
+ /** Accessible thumbnail label; receives the image's display name. */
122
+ openNamed: (label: string) => string;
123
+ /** Loading placeholder shown until bytes resolve. */
124
+ loading: string;
125
+ /** Retry-control label shown when the load fails. */
126
+ loadFailed: string;
127
+ /** Lightbox strings forwarded to the opened preview. */
128
+ lightbox: ImageLightboxLabels;
129
+ }
130
+ /** Root-scoped image gallery input with explicit reading authority and optional caller copy. */
131
+ export interface MessageImagesContentInput extends MessageImagesOwnerProps {
132
+ readonly labels?: MessageImageLabels;
133
+ }
134
+ /** Transform inputs and independently controlled rendering behavior. */
135
+ export interface UserTextInput extends UserTextDocumentInput {
136
+ /** Enable renderer-owned reference actions; omitted values keep references read-only. */
137
+ readonly interactive?: boolean;
138
+ /** Use CSS single-line overflow ellipsis without shortening source text. */
139
+ readonly ellipsis?: boolean;
140
+ }
141
+ /** Rule invalidation and document evaluation supplied by the data layer. */
142
+ export interface UserTextInjected {
143
+ hooks: {
144
+ userTextRevision: ObservableSnapshot<number>;
145
+ };
146
+ /** Each invocation creates a caller-owned data-layer cache without registry subscriptions. */
147
+ createUserTextEvaluator: () => UserTextEvaluator;
148
+ /** Report a failed rule while the original text remains visible. */
149
+ reportTransformFailure: (error: unknown) => void;
150
+ }
151
+ /** JSON-only owner data common to every business text node. */
152
+ export interface UserTextNodeOwnerProps {
153
+ readonly raw: string;
154
+ readonly interactive: boolean;
155
+ }
156
+ /** Complete props for the selected business node, including its Session scope. */
157
+ export type UserTextNodeProps<Id extends UserTextId = UserTextId> = PropsRuntime<'conversation.user.text.node', Id>;
115
158
  /** Selector hook over the current Session's assembled Conversation. */
116
159
  export type UseConversation = SnapshotSelectorHook<ConversationSnapshot>;
117
160
  /** Selector hook over the registered Conversation View roster. */
118
161
  export type UseConversationViews = SnapshotSelectorHook<readonly ViewTab[]>;
119
162
  declare module '@deepseek-ai/dsh-client-ui-slots' {
163
+ interface SlotFactoryMap {
164
+ /** Parse one original text and render its business nodes through the owned keyed Slot. */
165
+ 'conversation.user.text': {
166
+ scope: 'session';
167
+ props: UserTextInput;
168
+ inject: UserTextInjected;
169
+ children: {
170
+ 'conversation.user.text.node': {
171
+ kind: 'keyed';
172
+ scope: 'session';
173
+ inline: true;
174
+ };
175
+ };
176
+ };
177
+ /** Official reusable gallery, with explicit authorized loading and optional caller copy. */
178
+ 'conversation.images.content': {
179
+ scope: 'root';
180
+ props: MessageImagesContentInput;
181
+ locale: 'conversation';
182
+ };
183
+ }
120
184
  interface SlotMap {
185
+ /** One business-owned inline renderer for a pure JSON text node. */
186
+ 'conversation.user.text.node': {
187
+ kind: 'keyed';
188
+ scope: 'session';
189
+ inline: true;
190
+ owner: UserTextNodeOwnerProps;
191
+ keyProps: {
192
+ [Id in UserTextId]: {
193
+ node: UserTextNode<Id>;
194
+ };
195
+ };
196
+ };
121
197
  /** Conversation shell beneath its root-scoped main-panel entry. */
122
198
  'main.conversation': {
123
199
  kind: 'single';
@@ -210,6 +286,11 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
210
286
  scope: 'session-maybe';
211
287
  owner: HeroAgentPresetOwnerProps;
212
288
  };
289
+ /** Compact options right-aligned in the New Session row after the workspace and preset controls; rendered only with a Session. */
290
+ 'conversation.hero.options': {
291
+ kind: 'list';
292
+ scope: 'session';
293
+ };
213
294
  /** Full-width entries above the composer card. */
214
295
  'conversation.input.dock': {
215
296
  kind: 'list';
@@ -311,6 +392,10 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
311
392
  kind: 'single';
312
393
  scope: 'session-maybe';
313
394
  };
395
+ 'conversation.hero.options': {
396
+ kind: 'list';
397
+ scope: 'session';
398
+ };
314
399
  };
315
400
  inject: ConversationInjected;
316
401
  locale: 'conversation';
@@ -0,0 +1,60 @@
1
+ /** Readonly JSON candidates, forward matching, and tracked caller Facts. */
2
+ import type { UserTextDataMap, UserTextFacts } from '../index.ts';
3
+ /** Registered business IDs plus the document-owned `text` ID. */
4
+ export type UserTextId = Extract<keyof UserTextDataMap, string>;
5
+ type JsonPayload<T> = T extends string | number | boolean | null ? T : T extends (...args: never[]) => unknown ? never : T extends readonly unknown[] ? {
6
+ readonly [K in keyof T]: JsonPayload<T[K]>;
7
+ } : T extends object ? {
8
+ readonly [K in keyof T]: JsonPayload<T[K]>;
9
+ } : never;
10
+ /** Original UTF-16 text and readonly Facts; absence is observable through `context.read`. */
11
+ export interface UserTextDocumentInput {
12
+ readonly text: string;
13
+ readonly facts: Readonly<Partial<UserTextFacts>>;
14
+ }
15
+ /** Discriminated JSON node over a nonempty half-open UTF-16 range in the original text. */
16
+ export type UserTextNode<K extends UserTextId = UserTextId> = {
17
+ [Id in K]: {
18
+ readonly id: Id;
19
+ readonly start: number;
20
+ readonly end: number;
21
+ readonly data: JsonPayload<UserTextDataMap[Id]>;
22
+ };
23
+ }[K];
24
+ /** Facts reader valid only during its owning synchronous query; never retain it. */
25
+ export interface UserTextTransformContext {
26
+ /**
27
+ * Record a field dependency, including an absent value; throws after the call returns or throws.
28
+ * @param key - field of the caller's readonly Facts snapshot.
29
+ * @returns the borrowed readonly value, or undefined when absent.
30
+ */
31
+ read<K extends keyof UserTextFacts>(key: K): UserTextFacts[K] | undefined;
32
+ }
33
+ /** One forward matcher for business references or Text replacements; order only resolves same-start candidates. */
34
+ export interface UserTextRule<out Id extends string = string> {
35
+ readonly id: Id;
36
+ /** Finite ascending priority; equal values use stable ID ordering, never plugin load order. */
37
+ readonly order: number;
38
+ /**
39
+ * Find one nearest original-text candidate at or after `from`, resolving own same-start alternatives deterministically.
40
+ * Search uses original lexical boundaries, not the beginning of a sliced suffix. Queries are independent of accepted nodes.
41
+ * @param text - complete original text; neither this string nor caller Facts may be mutated.
42
+ * @param from - inclusive original UTF-16 start offset, advancing within one reconciliation.
43
+ * @param context - synchronous Facts reader; all retained queries contribute dependencies.
44
+ * @returns one nonempty node using this rule's ID or `text`, or undefined when no later candidate exists.
45
+ * Text candidates preserve the exact source substring and may supply `data.display`.
46
+ */
47
+ match(this: void, text: string, from: number, context: UserTextTransformContext): (UserTextNode & {
48
+ readonly id: Id;
49
+ }) | UserTextNode<'text'> | undefined;
50
+ }
51
+ /**
52
+ * Reconcile one document using current rules and independently cached candidate queries.
53
+ * Reentrant calls throw. Failures carry ruleId and cause without publishing partial output;
54
+ * failed queries retry when their offset, definition, original text, or read Facts change.
55
+ * @param input - original text and readonly JSON Facts; fields are compared with Object.is.
56
+ * @returns readonly nodes covering the text, or [] for empty text; equivalent results retain identities.
57
+ */
58
+ export type UserTextEvaluator = (input: UserTextDocumentInput) => readonly UserTextNode[];
59
+ export {};
60
+ //# sourceMappingURL=user-text.d.ts.map
@@ -44,6 +44,9 @@ export declare class ConversationNodeAssembler implements ConversationViewSnapsh
44
44
  private readonly groups;
45
45
  private readonly pendingGroupStores;
46
46
  private readonly activeTargets;
47
+ /** Matches of the event in dispatch, kept by index; dispatch is not reentrant and reuses both arrays. */
48
+ private readonly matchedDefinitions;
49
+ private readonly matchedResults;
47
50
  private hasMore;
48
51
  private replacePending;
49
52
  private timelineDirty;
@@ -11,6 +11,7 @@ import { type SystemPromptState } from '../contract/system-prompt.ts';
11
11
  import { ConversationEventRegistry } from './event-registry.ts';
12
12
  import { ConversationViewRegistry } from './view-registry.ts';
13
13
  import { ConversationGroupRegistry } from './group-registry.ts';
14
+ import { UserTextRegistry } from './user-text-registry.ts';
14
15
  /** Observable faces published for one Session's Conversation assembly. */
15
16
  export interface ConversationBinding {
16
17
  readonly snapshot: ObservableSnapshot<ConversationSnapshot>;
@@ -42,6 +43,8 @@ export declare class UiConversation extends Service {
42
43
  readonly views: ConversationViewRegistry;
43
44
  /** Business grouping rules over already materialized target Nodes. */
44
45
  readonly groups: ConversationGroupRegistry;
46
+ /** Pure text rules and parser snapshots, independent of durable Session assembly. */
47
+ readonly userText: UserTextRegistry;
45
48
  private readonly bindings;
46
49
  private readonly images;
47
50
  /**
@@ -0,0 +1,21 @@
1
+ import type { UserTextDocumentInput, UserTextNode, UserTextRule } from '../contract/user-text.ts';
2
+ /** Data-layer cache owned by one caller; initialization and refresh share one reconciliation. */
3
+ export declare class UserTextDocument {
4
+ private text;
5
+ private rules;
6
+ private initial;
7
+ private output;
8
+ private readonly matchers;
9
+ private complete;
10
+ private evaluating;
11
+ /**
12
+ * Reconcile original text using current rule definitions and valid query records.
13
+ * @param input - original text and readonly Facts, compared by fields actually read.
14
+ * @param rules - unique definitions ordered by ascending order and stable ID.
15
+ * @returns complete readonly nodes; failures retain caches but publish no partial result.
16
+ */
17
+ evaluate(input: UserTextDocumentInput, rules: readonly UserTextRule[]): readonly UserTextNode[];
18
+ private prepare;
19
+ private reconcile;
20
+ }
21
+ //# sourceMappingURL=user-text-document.d.ts.map
@@ -0,0 +1,26 @@
1
+ /** Effect-owned user-text rules and their revision; document caches belong only to evaluator callers. */
2
+ import type { UserTextEvaluator, UserTextRule } from '../contract/user-text.ts';
3
+ import { ConversationDefinitionRegistry } from './definition-registry.ts';
4
+ /** Observable rule revision with no retained documents or document subscriptions. */
5
+ export declare class UserTextRegistry extends ConversationDefinitionRegistry<UserTextRule> {
6
+ private rules;
7
+ private revision;
8
+ /**
9
+ * Register a uniquely named rule; invalid IDs, duplicate IDs and non-finite order throw before publication.
10
+ * @param rule - readonly synchronous candidate matcher with a nonempty ID other than the reserved `text` ID.
11
+ * @returns idempotent disposer; removal synchronously publishes a new revision.
12
+ */
13
+ register(rule: UserTextRule): () => void;
14
+ /**
15
+ * Create an independent document evaluator; it reads current rules at each call and never subscribes.
16
+ * @returns callback owning its document cache, released when the caller releases the callback.
17
+ */
18
+ createEvaluator(): UserTextEvaluator;
19
+ /**
20
+ * Read the observable rule revision.
21
+ * @returns monotonic revision, stable until a successful registration or disposal.
22
+ */
23
+ getSnapshot(): number;
24
+ protected refresh(): void;
25
+ }
26
+ //# sourceMappingURL=user-text-registry.d.ts.map
@@ -1,4 +1,23 @@
1
- /** Browser Conversation assemble core, React adapter, shell, and input plugin. */
1
+ /** Browser Conversation assemble core, React adapter, shell, input, and text projection plugin. */
2
+ export type {} from './user-text/session-reference-rule.ts';
3
+ /** Declaration-merged node payloads; IDs also identify the corresponding keyed renderer. */
4
+ export interface UserTextDataMap {
5
+ text: {
6
+ /** Exact original substring; display transforms never change source text or UTF-16 coordinates. */
7
+ readonly text: string;
8
+ /** Optional display-only text; absence renders the original substring, while an empty string hides it. */
9
+ readonly display?: string;
10
+ };
11
+ }
12
+ /** Caller-supplied JSON business facts and text-transform flags, never services or actions; absent flags are disabled. */
13
+ export interface UserTextFacts {
14
+ /** Collapse whitespace runs in ordinary display text to one space. */
15
+ readonly collapseWhitespace: boolean;
16
+ /** Remove display whitespace only at the document's outer edges, without crossing business nodes. */
17
+ readonly trimWhitespace: boolean;
18
+ }
19
+ export type { UserTextDocumentInput, UserTextEvaluator, UserTextId, UserTextNode, UserTextRule, UserTextTransformContext, } from './contract/user-text.ts';
20
+ export type { UserTextRegistry } from './conversation/user-text-registry.ts';
2
21
  export { apply, Config, inject } from './apply.ts';
3
22
  export type { Config as ConversationConfig } from './apply.ts';
4
23
  export { UiConversation } from './conversation/assembly.ts';
@@ -24,7 +43,7 @@ export { ConversationLocationIndex } from './conversation/location-index.ts';
24
43
  export type { ConversationLocationDataChange } from './conversation/location-index.ts';
25
44
  export { ConversationViewRegistry } from './conversation/view-registry.ts';
26
45
  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';
46
+ 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, MessageImageLabels, MessageImageLoader, MessageImageSource, MessageImagesContentInput, MessageImagesOwnerProps, UseConversation, UserTextInput, UserTextInjected, UserTextNodeOwnerProps, UserTextNodeProps, UseConversationViews, } from './contract/slots.ts';
28
47
  export type { BeginCommandRequest, CommandClaim, ConsumeTokenRequest, DraftAttachmentId, DraftInitializationOptions, DraftInitializationResult, InputActions, InputState, InsertReferenceRequest, InsertTextRequest, PickOutcome, SessionInput, SessionInputResolver, SubmitAttachment, SubmitOutcome, } from './contract/input.ts';
29
48
  export type { ArbitrateKey, ArbitrateOutcome, DraftInput, DraftReference, DraftSnapshot, ReferenceInsert, TokenSpan } from './contract/draft-editor.ts';
30
49
  export type { ComposerBlock, ComposerBlocks } from './contract/composer-blocks.ts';
@@ -302,9 +302,12 @@ export declare const zh: {
302
302
  'row.preparing': string;
303
303
  'row.failed': string;
304
304
  'row.stopped': string;
305
+ 'row.commandArguments': string;
305
306
  'row.input': string;
306
307
  'row.output': string;
307
308
  'row.inspect': string;
309
+ 'row.imageSize': string;
310
+ 'row.imageSizeDownscaled': string;
308
311
  'tool.title.search': string;
309
312
  'tool.title.read': string;
310
313
  'tool.title.bash': string;
@@ -363,6 +366,7 @@ export declare const zh: {
363
366
  'terminal.signal': string;
364
367
  'terminal.exitCode': string;
365
368
  'terminal.noExitCode': string;
369
+ 'terminal.commandLine': string;
366
370
  'terminal.running': string;
367
371
  'terminal.failed': string;
368
372
  'terminal.done': string;
@@ -676,9 +680,12 @@ export declare const en: {
676
680
  'row.preparing': string;
677
681
  'row.failed': string;
678
682
  'row.stopped': string;
683
+ 'row.commandArguments': string;
679
684
  'row.input': string;
680
685
  'row.output': string;
681
686
  'row.inspect': string;
687
+ 'row.imageSize': string;
688
+ 'row.imageSizeDownscaled': string;
682
689
  'tool.title.search': string;
683
690
  'tool.title.read': string;
684
691
  'tool.title.bash': string;
@@ -737,6 +744,7 @@ export declare const en: {
737
744
  'terminal.signal': string;
738
745
  'terminal.exitCode': string;
739
746
  'terminal.noExitCode': string;
747
+ 'terminal.commandLine': string;
740
748
  'terminal.running': string;
741
749
  'terminal.failed': string;
742
750
  'terminal.done': string;
@@ -1,6 +1,6 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
3
- import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { PropsLocale, PropsRenderFactories, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
4
4
  import type { QueueAction } from '@deepseek-ai/dsh-api-session-controller/types';
5
5
  import type { MessageId } from '@deepseek-ai/dsh-llm/brand';
6
6
  /** Queue operations injected by the session-scoped registration. */
@@ -11,13 +11,13 @@ export interface QueueDockInjected {
11
11
  loadImage: (attachment: ImageAttachmentRef) => Promise<string>;
12
12
  }
13
13
  /** Full props of a dock entry: InputZone owner share + session standard kit + global seat + the locale seat. */
14
- export type QueueDockProps = PropsRuntime<'conversation.input.dock'> & QueueDockInjected & PropsLocale<'conversation'>;
14
+ export type QueueDockProps = PropsRuntime<'conversation.input.dock'> & QueueDockInjected & PropsLocale<'conversation'> & PropsRenderFactories;
15
15
  /**
16
16
  * Queue strip: one item renders directly; multiple items default to a
17
17
  * collapsible count header; an empty queue renders nothing. Local queued submissions
18
18
  * show sending status and disabled actions until their Host queue rows arrive.
19
19
  */
20
- export declare function QueueDock({ useSession, useProjection, updateQueue, notify, loadImage, t }: QueueDockProps): import("react").JSX.Element | null;
20
+ export declare function QueueDock({ useSession, useProjection, updateQueue, notify, loadImage, renderFactorySlot, t }: QueueDockProps): import("react").JSX.Element | null;
21
21
  /** Registers queue actions backed by the session-scoped conversation service. */
22
22
  export declare const queueDockEntry: {
23
23
  name: string;
@@ -0,0 +1,22 @@
1
+ import type { FactoryComponentPropsOf } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { UserTextNodeProps } from '../contract/slots.ts';
3
+ /**
4
+ * Render original text through pure matching rules and business-owned node Slots.
5
+ * A failed parse retains the entire original text and reports the rule error.
6
+ * @param props - original text, confirmed facts, display policy, and framework seats.
7
+ * @returns ordered inline nodes with raw-text fallbacks for missing registrations.
8
+ */
9
+ export declare function UserText({ text, facts, interactive, ellipsis, useUserTextRevision, createUserTextEvaluator, reportTransformFailure, renderSlot, }: FactoryComponentPropsOf<'conversation.user.text'>): import("react").JSX.Element;
10
+ /**
11
+ * Display an unmatched substring without business interpretation.
12
+ * @param props - parser-produced plain-text node.
13
+ * @returns its inline text.
14
+ */
15
+ export declare function PlainUserText({ node }: UserTextNodeProps<'text'>): import("react").JSX.Element;
16
+ /**
17
+ * Display a confirmed Session label without inventing navigation behavior.
18
+ * @param props - Session reference JSON and its original spelling.
19
+ * @returns the existing non-interactive Session chip.
20
+ */
21
+ export declare function SessionReference({ node, raw }: UserTextNodeProps<'session'>): import("react").JSX.Element;
22
+ //# sourceMappingURL=UserText.d.ts.map
@@ -0,0 +1,15 @@
1
+ /** Original-text Session candidates with explicit wire spelling and longest known labels. */
2
+ import type { UserTextRule } from '@deepseek-ai/dsh-client-ui-conversation/client';
3
+ declare module '@deepseek-ai/dsh-client-ui-conversation/client' {
4
+ interface UserTextDataMap {
5
+ session: {
6
+ readonly label: string;
7
+ };
8
+ }
9
+ interface UserTextFacts {
10
+ sessionLabels: readonly string[];
11
+ }
12
+ }
13
+ /** Find the nearest Session reference; bare labels read their Facts only at a non-wire @ position. */
14
+ export declare const sessionReferenceRule: UserTextRule<'session'>;
15
+ //# sourceMappingURL=session-reference-rule.d.ts.map
@@ -0,0 +1,7 @@
1
+ /** Whitespace candidates use the same cursor, priority and Facts cache as reference candidates. */
2
+ import type { UserTextRule } from '../contract/user-text.ts';
3
+ /** Offer the next whitespace run whose display collapses to one space. */
4
+ export declare const collapseWhitespaceRule: UserTextRule<'text.collapse-whitespace'>;
5
+ /** Offer original document-edge whitespace, winning same-start collisions with collapse. */
6
+ export declare const trimWhitespaceRule: UserTextRule<'text.trim-whitespace'>;
7
+ //# sourceMappingURL=whitespace-rules.d.ts.map
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "ui-conversation"
4
+ }
5
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "会话界面框架",
4
+ "description": "组织对话内容、输入框、消息队列和视图导航。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-conversation",
3
3
  "description": "Target-neutral Conversation assembly, shell, composer, queue, and view navigation",
4
- "version": "0.2.1-alpha.1",
4
+ "version": "0.2.1-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -23,7 +23,8 @@
23
23
  "default": "./lib/client.js"
24
24
  },
25
25
  "./src/*": "./src/*",
26
- "./package.json": "./package.json"
26
+ "./package.json": "./package.json",
27
+ "./locale/*.json": "./locale/*.json"
27
28
  },
28
29
  "dsh": {
29
30
  "client": {
@@ -42,60 +43,59 @@
42
43
  },
43
44
  "license": "MIT",
44
45
  "dependencies": {
45
- "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
46
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.2"
46
47
  },
47
48
  "peerDependencies": {
48
- "@deepseek-ai/cordis": "~4.0.5-alpha.1"
49
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2"
49
50
  },
50
51
  "devDependencies": {
51
- "@types/react": "~18.3.1",
52
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
53
+ "@deepseek-ai/dsh-api-remotes": "0.2.1-alpha.3",
54
+ "@deepseek-ai/dsh-api-session-controller": "0.2.1-alpha.3",
55
+ "@deepseek-ai/dsh-api-workspace-controller": "0.2.1-alpha.3",
56
+ "@deepseek-ai/dsh-attachment": "0.2.1-alpha.3",
57
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.3",
58
+ "@deepseek-ai/dsh-client-locale": "0.2.1-alpha.3",
59
+ "@deepseek-ai/dsh-client-file-upload": "0.2.1-alpha.3",
60
+ "@deepseek-ai/dsh-client-store": "0.2.1-alpha.3",
61
+ "@deepseek-ai/dsh-client-test-runtime": "0.2.1-alpha.3",
62
+ "@deepseek-ai/dsh-client-ui-layout": "0.2.1-alpha.3",
63
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.3",
64
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.3",
65
+ "@deepseek-ai/dsh-client-ui-session": "0.2.1-alpha.3",
66
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.1-alpha.3",
67
+ "@deepseek-ai/dsh-client-ui-workspace": "0.2.1-alpha.3",
68
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.3",
69
+ "@deepseek-ai/dsh-commands": "0.2.1-alpha.3",
70
+ "@deepseek-ai/dsh-goal": "0.2.1-alpha.3",
71
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
72
+ "@deepseek-ai/dsh-llm-retry": "0.2.1-alpha.3",
73
+ "@deepseek-ai/dsh-plan-mode": "0.2.1-alpha.3",
74
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
75
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.3",
76
+ "@deepseek-ai/dsh-token-meter": "0.2.1-alpha.3",
77
+ "@deepseek-ai/dsh-tool-todo": "0.2.1-alpha.3",
78
+ "@deepseek-ai/dsh-util-crypto": "0.2.1-alpha.3",
79
+ "@deepseek-ai/dsh-workspace": "0.2.1-alpha.3",
80
+ "@deepseek-ai/dsh-file-reference": "0.2.1-alpha.3",
81
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.3",
52
82
  "react": "^18.2.0",
53
83
  "@lexical/headless": "^0.49.0",
54
84
  "react-dom": "^18.2.0",
55
- "@types/react-dom": "~18.3.0",
56
- "zod": "^4.4.3",
85
+ "zod": "4.4.3",
57
86
  "lexical": "^0.49.0",
58
87
  "clsx": "^2.0.0",
59
88
  "@lexical/utils": "^0.49.0",
60
89
  "@lexical/text": "^0.49.0",
61
90
  "@lexical/plain-text": "^0.49.0",
62
91
  "@lexical/history": "^0.49.0",
63
- "@deepseek-ai/dsh-api-session-controller": "0.2.1-alpha.1",
64
- "@deepseek-ai/dsh-api-remotes": "0.2.1-alpha.1",
65
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
66
- "@deepseek-ai/dsh-api-workspace-controller": "0.2.1-alpha.1",
67
- "@deepseek-ai/dsh-attachment": "0.2.1-alpha.1",
68
- "@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
69
- "@deepseek-ai/dsh-client-file-upload": "0.2.1-alpha.1",
70
- "@deepseek-ai/dsh-client-store": "0.2.1-alpha.1",
71
- "@deepseek-ai/dsh-client-test-runtime": "0.2.1-alpha.1",
72
- "@deepseek-ai/dsh-client-ui-layout": "0.2.1-alpha.1",
73
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.1",
74
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.1",
75
- "@deepseek-ai/dsh-client-locale": "0.2.1-alpha.1",
76
- "@deepseek-ai/dsh-client-ui-settings": "0.2.1-alpha.1",
77
- "@deepseek-ai/dsh-client-ui-workspace": "0.2.1-alpha.1",
78
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.1",
79
- "@deepseek-ai/dsh-commands": "0.2.1-alpha.1",
80
- "@deepseek-ai/dsh-goal": "0.2.1-alpha.1",
81
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
82
- "@deepseek-ai/dsh-client-ui-session": "0.2.1-alpha.1",
83
- "@deepseek-ai/dsh-plan-mode": "0.2.1-alpha.1",
84
- "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
85
- "@deepseek-ai/dsh-util-values": "0.2.1-alpha.1",
86
- "@deepseek-ai/dsh-token-meter": "0.2.1-alpha.1",
87
- "@deepseek-ai/dsh-tool-todo": "0.2.1-alpha.1",
88
- "@deepseek-ai/dsh-util-crypto": "0.2.1-alpha.1",
89
- "@deepseek-ai/dsh-workspace": "0.2.1-alpha.1",
90
- "@deepseek-ai/dsh-file-reference": "0.2.1-alpha.1",
91
- "@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.1",
92
- "@deepseek-ai/dsh-llm-retry": "0.2.1-alpha.1",
93
- "@deepseek-ai/dsh-settings": "0.2.1-alpha.1",
94
- "@deepseek-ai/dsh-client-shortcuts": "0.2.1-alpha.1",
95
- "@deepseek-ai/dsh-client-product-analytics": "0.2.1-alpha.1",
96
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.1"
92
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
93
+ "@deepseek-ai/dsh-settings": "0.2.1-alpha.3",
94
+ "@deepseek-ai/dsh-client-shortcuts": "0.2.1-alpha.3",
95
+ "@deepseek-ai/dsh-client-product-analytics": "0.2.1-alpha.3"
97
96
  },
98
97
  "files": [
98
+ "locale/*.json",
99
99
  "lib/index.js",
100
100
  "lib/client.js",
101
101
  "lib/types/**/*.d.ts"