@deepseek-ai/dsh-client-ui-chat 0.1.6-alpha.2 → 0.1.7-alpha.2

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 (54) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +83 -10
  3. package/README.zh.md +81 -10
  4. package/lib/client.js +5260 -1541
  5. package/lib/index.js +37 -10
  6. package/lib/types/chat-settings.d.ts +41 -8
  7. package/lib/types/client/chat/AssistantMarkdown.d.ts +15 -12
  8. package/lib/types/client/chat/AssistantNodeView.d.ts +5 -2
  9. package/lib/types/client/chat/ChatGroupSeat.d.ts +14 -0
  10. package/lib/types/client/chat/ChatNodeSeat.d.ts +11 -5
  11. package/lib/types/client/chat/ChatView.d.ts +1 -1
  12. package/lib/types/client/chat/GenericCommandCard.d.ts +6 -1
  13. package/lib/types/client/chat/ReasoningRow.d.ts +11 -5
  14. package/lib/types/client/chat/StatsPills.d.ts +4 -4
  15. package/lib/types/client/chat/TurnNavigator.d.ts +11 -9
  16. package/lib/types/client/chat/TurnTailNodeView.d.ts +4 -4
  17. package/lib/types/client/chat/TurnTriggerNodeView.d.ts +4 -0
  18. package/lib/types/client/chat/TurnUsagePanel.d.ts +1 -16
  19. package/lib/types/client/chat/message-chrome.d.ts +9 -6
  20. package/lib/types/client/chat/register-node-renderers.d.ts +8 -1
  21. package/lib/types/client/chat/render-entry.d.ts +9 -0
  22. package/lib/types/client/chat/step-process.d.ts +11 -0
  23. package/lib/types/client/chat/turn-trigger.d.ts +15 -0
  24. package/lib/types/client/chat/use-chat-navigation.d.ts +69 -0
  25. package/lib/types/client/chat/use-chat-reading.d.ts +96 -0
  26. package/lib/types/client/chat/use-chat-scroll.d.ts +35 -0
  27. package/lib/types/client/chat/use-chat-viewport.d.ts +144 -0
  28. package/lib/types/client/chat/use-disclosure.d.ts +15 -0
  29. package/lib/types/client/chat/use-process-scroll.d.ts +23 -0
  30. package/lib/types/client/chat/use-scroll-follow.d.ts +105 -0
  31. package/lib/types/client/contract/chat-nodes.d.ts +0 -2
  32. package/lib/types/client/contract/chat-visibility.d.ts +9 -0
  33. package/lib/types/client/contract/process-groups.d.ts +23 -0
  34. package/lib/types/client/contract/slots.d.ts +55 -11
  35. package/lib/types/client/contract/snapshot.d.ts +14 -1
  36. package/lib/types/client/contract/turn-metrics.d.ts +1 -20
  37. package/lib/types/client/contract/turn-process.d.ts +7 -0
  38. package/lib/types/client/conversation-nodes/assistant.d.ts +1 -2
  39. package/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +9 -2
  40. package/lib/types/client/conversation-nodes/inbox.d.ts +16 -6
  41. package/lib/types/client/conversation-nodes/message.d.ts +5 -1
  42. package/lib/types/client/conversation-nodes/process-activity.d.ts +10 -0
  43. package/lib/types/client/conversation-nodes/process-groups.d.ts +27 -0
  44. package/lib/types/client/index.d.ts +3 -1
  45. package/lib/types/client/locale.d.ts +106 -12
  46. package/lib/types/client/performance-usage.d.ts +19 -0
  47. package/lib/types/client/presentation-policy.d.ts +35 -0
  48. package/lib/types/client/settings/LinkOpeningRow.d.ts +24 -0
  49. package/lib/types/client/settings/PerformanceUsageRow.d.ts +18 -0
  50. package/lib/types/client/settings/PreferenceRow.d.ts +17 -0
  51. package/lib/types/client/settings/TranscriptViewRow.d.ts +6 -6
  52. package/lib/types/client/transcript-view.d.ts +8 -5
  53. package/lib/types/index.d.ts +26 -4
  54. package/package.json +40 -37
@@ -1,11 +1,4 @@
1
- import type { AssistantMessageNode, ConversationNode } from '@deepseek-ai/dsh-client-ui-conversation/client';
2
- /** Latency and decode-throughput readings for one turn's footer. */
3
- export interface TurnMetrics {
4
- /** First-step TTFT in ms; absent when that step carries no recorded timing. */
5
- ttftMs?: number;
6
- /** Decode throughput over steps carrying both timing and provider usage. */
7
- tokensPerSecond?: number;
8
- }
1
+ import type { AssistantMessageNode } from '@deepseek-ai/dsh-client-ui-conversation/client';
9
2
  /** One assistant step's derivable latency facts; null marks an unrecorded part. */
10
3
  export interface StepReading {
11
4
  /** step/start → first token delta, in ms. */
@@ -22,17 +15,5 @@ type AssistantNode = AssistantMessageNode;
22
15
  * @returns Per-part readings with `null` for unrecorded values.
23
16
  */
24
17
  export declare function assistantStepReading(node: AssistantNode): StepReading;
25
- /**
26
- * Fold assistant nodes into per-turn footer metrics.
27
- *
28
- * TTFT is the turn's lowest-step request-dispatch-to-first-token reading, so
29
- * it is only meaningful when the turn's start is inside
30
- * the loaded window (the caller gates on `turnTimings`, which shares that
31
- * window). Throughput divides summed output tokens by summed decode wall time,
32
- * counting only steps that carry both.
33
- * @param nodes - Snapshot nodes of the loaded window.
34
- * @returns Turn number → available metrics; turns with none are absent.
35
- */
36
- export declare function deriveTurnMetrics(nodes: readonly ConversationNode[]): Map<number, TurnMetrics>;
37
18
  export {};
38
19
  //# sourceMappingURL=turn-metrics.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { ChatNode } from './chat-nodes.ts';
1
2
  /** Current process range and finalized answer boundary derived from one Turn. */
2
3
  export interface TurnProcessSpec {
3
4
  readonly turn: number;
@@ -30,4 +31,10 @@ export declare function sameTurnProcessSpec(left: TurnProcessSpec, right: TurnPr
30
31
  * @returns whether the call creates or forks a subagent.
31
32
  */
32
33
  export declare function isSubagentDelegationTool(name: string): boolean;
34
+ /**
35
+ * Keep live, stopped, and failed Turns open.
36
+ * @param node - Node carrying the owning Turn.
37
+ * @returns whether whole-Turn collapse is unavailable.
38
+ */
39
+ export declare function turnProcessAlwaysOpen(node: ChatNode | undefined): boolean;
33
40
  //# sourceMappingURL=turn-process.d.ts.map
@@ -21,11 +21,10 @@ interface AssistantState {
21
21
  readonly firstVisibleSeq: number | undefined;
22
22
  readonly firstVisibleTime: number | undefined;
23
23
  readonly firstTokenTime: number | undefined;
24
- readonly hidden: boolean;
25
24
  readonly final: ConversationMatch | undefined;
26
25
  readonly usage: unknown;
27
26
  }
28
- /** Per-step Assistant streaming/final/interruption Definition. */
27
+ /** Per-step Assistant lifecycle; materialized keys survive cleared stream content as hidden Nodes. */
29
28
  export declare const assistantDefinition: ConversationNodeDefinition<AssistantState>;
30
29
  /**
31
30
  * Register the Assistant lifecycle business contribution.
@@ -1,10 +1,10 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
- import type { ConversationTimelineSnapshot, ConversationViewBuilder, ConversationViewDefinition } from '@deepseek-ai/dsh-client-ui-conversation/client';
2
+ import type { ConversationTimelineSnapshot, ConversationViewBuilder, ConversationViewDefinition, ConversationGroupInput } from '@deepseek-ai/dsh-client-ui-conversation/client';
3
3
  import type { ChatConversationViewNode } from '../contract/chat-nodes.ts';
4
4
  import type { ChatNodeStore, ChatSnapshot } from '../contract/snapshot.ts';
5
5
  /**
6
6
  * Order visible Chat Nodes without changing existing relative order as process
7
- * eligibility changes. Opening human input precedes process candidates, while
7
+ * eligibility changes. Opening input precedes process candidates, while
8
8
  * each synthetic process control sits between them.
9
9
  * @param nodes - currently materialized Chat Nodes.
10
10
  * @returns visible Nodes in presentation order.
@@ -72,6 +72,10 @@ export declare class ChatSnapshotBuilder implements ConversationViewBuilder<Chat
72
72
  private readonly referenceLabels;
73
73
  private readonly skillNames;
74
74
  private order;
75
+ private latestGroupInput;
76
+ private readonly readGroupNode;
77
+ private readonly readGroupTurn;
78
+ private readonly readGroupPosition;
75
79
  /** Last published timeline: a Turn boundary can land without a new node. */
76
80
  private timeline;
77
81
  readonly empty: ChatSnapshot;
@@ -83,7 +87,10 @@ export declare class ChatSnapshotBuilder implements ConversationViewBuilder<Chat
83
87
  apply(input: {
84
88
  readonly upserts: readonly ChatConversationViewNode[];
85
89
  readonly timeline: ConversationTimelineSnapshot;
90
+ readonly changedTurns?: readonly number[];
86
91
  }): ChatSnapshot;
92
+ groupInput(): ConversationGroupInput<ChatConversationViewNode>;
93
+ publish(): void;
87
94
  private snapshot;
88
95
  }
89
96
  /** Chat target factory contributed to the Conversation view registry. */
@@ -1,28 +1,38 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { ConversationNodeDefinition } from '@deepseek-ai/dsh-client-ui-conversation/client';
3
+ interface InboxIdentity {
4
+ readonly id: string;
5
+ readonly source: {
6
+ readonly kind: string;
7
+ };
8
+ }
3
9
  interface PendingSnapshot {
4
10
  readonly kind: 'snapshot';
5
- readonly ids: readonly string[];
11
+ readonly ids: readonly InboxIdentity[];
6
12
  }
7
13
  interface PendingSplice {
8
14
  readonly kind: 'splice';
9
15
  readonly previous: PendingState;
10
16
  readonly start: number;
11
17
  readonly removedCount: number;
12
- readonly inserted: readonly string[];
18
+ readonly inserted: readonly InboxIdentity[];
13
19
  }
14
20
  type PendingState = PendingSnapshot | PendingSplice;
15
- /** Persistent next-step state after one durable Inbox splice. */
21
+ /** Persistent Inbox state after one durable Inbox splice. */
16
22
  export interface InboxState {
17
- /** Persistent splice chain materialized only when a next-step batch is claimed. */
23
+ /** Persistent splice chain materialized only when a batch is claimed. */
18
24
  readonly pending: PendingState;
19
25
  /** Message ids in the current claim, shared until the next claim. */
20
26
  readonly currentClaimed: ReadonlySet<string>;
27
+ readonly claimSeq: number;
28
+ readonly claimedHuman: boolean;
21
29
  }
22
- /** Persistent next-step Inbox state used to classify the current claimed batch as steering. */
30
+ /** Persistent next-step claims identify messages admitted into a running Turn. */
23
31
  export declare const nextStepInboxDefinition: ConversationNodeDefinition<InboxState>;
32
+ /** Persistent next-turn claims identify messages that wake a new Turn. */
33
+ export declare const nextTurnInboxDefinition: ConversationNodeDefinition<InboxState>;
24
34
  /**
25
- * Register the next-step Inbox state used by Chat message classification.
35
+ * Register the Inbox state used by Chat message classification.
26
36
  * @param ctx - owning UI Conversation context.
27
37
  */
28
38
  export declare function registerInboxConversationNodes(ctx: Context): void;
@@ -12,7 +12,9 @@ interface ReferencedSteeringMessageNode extends SteeringMessageNode {
12
12
  /** Skill names the same step's `skill-invocation` injections loaded. */
13
13
  readonly skillNames?: readonly string[];
14
14
  }
15
- type MessageNode = ReferencedUserMessageNode | ReferencedSteeringMessageNode | ContextMessageNode;
15
+ type MessageNode = ReferencedUserMessageNode | ReferencedSteeringMessageNode | (ContextMessageNode & {
16
+ readonly waking?: boolean;
17
+ });
16
18
  declare module '../contract/chat-nodes.ts' {
17
19
  interface ChatNodeDataMap {
18
20
  /** Ordinary turn-opening user message. */
@@ -21,6 +23,8 @@ declare module '../contract/chat-nodes.ts' {
21
23
  steering: ReferencedSteeringMessageNode;
22
24
  /** Non-user context injected into model history. */
23
25
  context: ContextMessageNode;
26
+ /** Non-human input that starts a Turn. */
27
+ 'turn-trigger': ContextMessageNode;
24
28
  }
25
29
  }
26
30
  /** User, steering, and injected-context message classification Definition. */
@@ -0,0 +1,10 @@
1
+ /** Tool-category and live-detail interpretation owned by Chat grouping. */
2
+ import type { ProcessActivitySummary } from '../contract/process-groups.ts';
3
+ import type { ChatNode } from '../contract/chat-nodes.ts';
4
+ /**
5
+ * Rank categories by distinct call count, breaking ties by first appearance.
6
+ * @param nodes - process members, including recursive tools.
7
+ * @returns all ranked categories and the latest running tool category and bounded task detail.
8
+ */
9
+ export declare function processActivity(nodes: readonly ChatNode[]): ProcessActivitySummary;
10
+ //# sourceMappingURL=process-activity.d.ts.map
@@ -0,0 +1,27 @@
1
+ import type { ConversationGroupDefinition, ConversationGroupInput, GroupUpdate } from '@deepseek-ai/dsh-client-ui-conversation/client';
2
+ import type { ChatConversationViewNode } from '../contract/chat-nodes.ts';
3
+ import type { ProcessGroupData } from '../contract/process-groups.ts';
4
+ type ProcessInput = ConversationGroupInput<ChatConversationViewNode>;
5
+ /** Session-local Turn results; ordinary updates never read other Turns' Node contents. */
6
+ export declare class ProcessState {
7
+ private turns;
8
+ private order;
9
+ private pending;
10
+ /**
11
+ * Consume one synchronous Builder input without retaining its readers.
12
+ * @param input - projected Node changes, indexed positions, and Turn lifecycle.
13
+ */
14
+ accept(input: ProcessInput): void;
15
+ private rootEntries;
16
+ /**
17
+ * Read pending output without advancing State.
18
+ * @returns the repeatable update for the last input batch.
19
+ */
20
+ output(): GroupUpdate<ProcessGroupData> | null;
21
+ }
22
+ /** Chat's registered business grouping; presentation modes never enter its State. */
23
+ export declare const processGroupDefinition: ConversationGroupDefinition<ChatConversationViewNode, ProcessState, ProcessGroupData> & {
24
+ readonly target: 'chat';
25
+ };
26
+ export {};
27
+ //# sourceMappingURL=process-groups.d.ts.map
@@ -17,7 +17,8 @@ export type { AssistantChatData, ChatConversationViewNode, ChatNode, ChatNodeKin
17
17
  export type { ChatStoreState, ToolCallId, TurnProcessViewEntry } from './contract/store.ts';
18
18
  export type { TranscriptViewRowInjected, TranscriptViewRowProps } from './settings/TranscriptViewRow.tsx';
19
19
  export type { TranscriptViewMode } from '../chat-settings.ts';
20
- export type { AssistantActionOwnerProps, ChatFileMentions, ChatNodeOwnerProps, ChatNodeTurnDataInjected, ChatNodeViewProps, ChatScrollPosition, ChatStore, ChatViewInjected, ChatViewSlotProps, CommandRowOwnerProps, CommandRowProps, MessageImagesProps, OpenFileOptions, TurnProcessOwnerProps, TurnTailOwnerProps, UseChat, UseChatNodeTurnData, } from './contract/slots.ts';
20
+ export type { ChatPresentationPolicy } from './presentation-policy.ts';
21
+ export type { AssistantActionOwnerProps, ChatFileMentions, ChatNodeHookContext, ChatNodeInjected, ChatNodeOwnerProps, ChatNodeViewProps, ChatScrollPosition, ChatStore, ChatViewInjected, ChatViewSlotProps, CommandRowOwnerProps, CommandRowProps, MessageImagesProps, OpenFileOptions, PresentationInjected, TurnProcessOwnerProps, TurnTailOwnerProps, UseChat, UseChatNodeTurnData, UseDisclosure, UsePresentation, } from './contract/slots.ts';
21
22
  export type { TurnProcessSpec, } from './contract/turn-process.ts';
22
23
  export type { ChatKey } from './locale.ts';
23
24
  export type { ConversationContext, ConversationContextOriginKind } from './model/conversation-context.ts';
@@ -33,4 +34,5 @@ declare module './contract/chat-nodes.ts' {
33
34
  interface ChatNodeDataMap extends PublicChatNodeDataMap {
34
35
  }
35
36
  }
37
+ export type { ProcessActivity, ProcessActivitySummary, ProcessGroupData } from './contract/process-groups.ts';
36
38
  //# sourceMappingURL=index.d.ts.map
@@ -3,6 +3,49 @@
3
3
  export declare const NS = "chat";
4
4
  /** Simplified Chinese dictionary and key-set source of truth. */
5
5
  export declare const zh: {
6
+ 'message.stepProcess.thinking': string;
7
+ 'message.stepProcess.read': string;
8
+ 'message.stepProcess.search': string;
9
+ 'message.stepProcess.edit': string;
10
+ 'message.stepProcess.commands': string;
11
+ 'message.stepProcess.code': string;
12
+ 'message.stepProcess.webSearch': string;
13
+ 'message.stepProcess.webFetch': string;
14
+ 'message.stepProcess.subagents': string;
15
+ 'message.stepProcess.plan': string;
16
+ 'message.stepProcess.questions': string;
17
+ 'message.stepProcess.tools': string;
18
+ 'message.stepProcess.done.thinking': string;
19
+ 'message.stepProcess.done.read': string;
20
+ 'message.stepProcess.done.search': string;
21
+ 'message.stepProcess.done.edit': string;
22
+ 'message.stepProcess.done.commands': string;
23
+ 'message.stepProcess.done.code': string;
24
+ 'message.stepProcess.done.webSearch': string;
25
+ 'message.stepProcess.done.webFetch': string;
26
+ 'message.stepProcess.done.subagents': string;
27
+ 'message.stepProcess.done.plan': string;
28
+ 'message.stepProcess.done.questions': string;
29
+ 'message.stepProcess.done.tools': string;
30
+ 'message.stepProcess.joinTwo': string;
31
+ 'message.stepProcess.comma': string;
32
+ 'message.stepProcess.sharedPrefix': string;
33
+ 'message.stepProcess.more': string;
34
+ 'message.trigger.request': string;
35
+ 'message.trigger.goal': string;
36
+ 'message.trigger.agent': string;
37
+ 'message.trigger.team': string;
38
+ 'message.trigger.subagent': string;
39
+ 'message.trigger.github': string;
40
+ 'message.trigger.webhook': string;
41
+ 'message.trigger.schedule': string;
42
+ 'message.trigger.job': string;
43
+ 'message.trigger.plugin': string;
44
+ 'message.trigger.explanation': string;
45
+ 'message.turnProcess.worked': string;
46
+ 'message.turnProcess.deepDivingFor': string;
47
+ 'message.turnProcess.took': string;
48
+ 'message.turnProcess.failed': string;
6
49
  'view.chat': string;
7
50
  'number.groupSeparator': string;
8
51
  'duration.compactSeconds': string;
@@ -25,10 +68,19 @@ export declare const zh: {
25
68
  'chat.turnNavigation.jump': string;
26
69
  'chat.turnNavigation.jumpLoad': string;
27
70
  'chat.turnNavigation.turn': string;
71
+ 'settings.performance.title': string;
72
+ 'settings.performance.description': string;
73
+ 'settings.performance.compact': string;
74
+ 'settings.performance.detailed': string;
75
+ 'settings.links.title': string;
76
+ 'settings.links.description': string;
77
+ 'settings.links.sidebar': string;
78
+ 'settings.links.newTab': string;
28
79
  'settings.transcript.title': string;
29
80
  'settings.transcript.description': string;
30
- 'settings.transcript.normal': string;
31
81
  'settings.transcript.compact': string;
82
+ 'settings.transcript.detailed': string;
83
+ 'settings.transcript.expanded': string;
32
84
  'fileOpen.title': string;
33
85
  'fileOpen.unknown': string;
34
86
  'message.extraBlock': string;
@@ -79,7 +131,6 @@ export declare const zh: {
79
131
  'message.turnError': string;
80
132
  'message.maxTokens': string;
81
133
  'message.maxTokens.hint': string;
82
- 'message.ranFor': string;
83
134
  'message.tokensPerSecond': string;
84
135
  'message.turnUsage.title': string;
85
136
  'message.turnUsage.consumed': string;
@@ -91,10 +142,6 @@ export declare const zh: {
91
142
  'message.turnUsage.output': string;
92
143
  'message.turnUsage.reasoning': string;
93
144
  'message.turnUsage.count': string;
94
- 'message.turnTime.title': string;
95
- 'message.turnTime.duration': string;
96
- 'message.turnTime.speed': string;
97
- 'message.turnTime.ttft': string;
98
145
  'duration.seconds': string;
99
146
  'duration.minutes': string;
100
147
  'duration.hours': string;
@@ -112,6 +159,49 @@ export declare const zh: {
112
159
  export type ChatKey = keyof typeof zh;
113
160
  /** English dictionary, checked against the Chinese key set. */
114
161
  export declare const en: {
162
+ 'message.stepProcess.thinking': string;
163
+ 'message.stepProcess.read': string;
164
+ 'message.stepProcess.search': string;
165
+ 'message.stepProcess.edit': string;
166
+ 'message.stepProcess.commands': string;
167
+ 'message.stepProcess.code': string;
168
+ 'message.stepProcess.webSearch': string;
169
+ 'message.stepProcess.webFetch': string;
170
+ 'message.stepProcess.subagents': string;
171
+ 'message.stepProcess.plan': string;
172
+ 'message.stepProcess.questions': string;
173
+ 'message.stepProcess.tools': string;
174
+ 'message.stepProcess.done.thinking': string;
175
+ 'message.stepProcess.done.read': string;
176
+ 'message.stepProcess.done.search': string;
177
+ 'message.stepProcess.done.edit': string;
178
+ 'message.stepProcess.done.commands': string;
179
+ 'message.stepProcess.done.code': string;
180
+ 'message.stepProcess.done.webSearch': string;
181
+ 'message.stepProcess.done.webFetch': string;
182
+ 'message.stepProcess.done.subagents': string;
183
+ 'message.stepProcess.done.plan': string;
184
+ 'message.stepProcess.done.questions': string;
185
+ 'message.stepProcess.done.tools': string;
186
+ 'message.stepProcess.joinTwo': string;
187
+ 'message.stepProcess.comma': string;
188
+ 'message.stepProcess.sharedPrefix': string;
189
+ 'message.stepProcess.more': string;
190
+ 'message.trigger.request': string;
191
+ 'message.trigger.goal': string;
192
+ 'message.trigger.agent': string;
193
+ 'message.trigger.team': string;
194
+ 'message.trigger.subagent': string;
195
+ 'message.trigger.github': string;
196
+ 'message.trigger.webhook': string;
197
+ 'message.trigger.schedule': string;
198
+ 'message.trigger.job': string;
199
+ 'message.trigger.plugin': string;
200
+ 'message.trigger.explanation': string;
201
+ 'message.turnProcess.worked': string;
202
+ 'message.turnProcess.deepDivingFor': string;
203
+ 'message.turnProcess.took': string;
204
+ 'message.turnProcess.failed': string;
115
205
  'view.chat': string;
116
206
  'number.groupSeparator': string;
117
207
  'duration.compactSeconds': string;
@@ -134,10 +224,19 @@ export declare const en: {
134
224
  'chat.turnNavigation.jump': string;
135
225
  'chat.turnNavigation.jumpLoad': string;
136
226
  'chat.turnNavigation.turn': string;
227
+ 'settings.performance.title': string;
228
+ 'settings.performance.description': string;
229
+ 'settings.performance.compact': string;
230
+ 'settings.performance.detailed': string;
231
+ 'settings.links.title': string;
232
+ 'settings.links.description': string;
233
+ 'settings.links.sidebar': string;
234
+ 'settings.links.newTab': string;
137
235
  'settings.transcript.title': string;
138
236
  'settings.transcript.description': string;
139
- 'settings.transcript.normal': string;
140
237
  'settings.transcript.compact': string;
238
+ 'settings.transcript.detailed': string;
239
+ 'settings.transcript.expanded': string;
141
240
  'fileOpen.title': string;
142
241
  'fileOpen.unknown': string;
143
242
  'message.extraBlock': string;
@@ -188,7 +287,6 @@ export declare const en: {
188
287
  'message.turnError': string;
189
288
  'message.maxTokens': string;
190
289
  'message.maxTokens.hint': string;
191
- 'message.ranFor': string;
192
290
  'message.tokensPerSecond': string;
193
291
  'message.turnUsage.title': string;
194
292
  'message.turnUsage.consumed': string;
@@ -200,10 +298,6 @@ export declare const en: {
200
298
  'message.turnUsage.output': string;
201
299
  'message.turnUsage.reasoning': string;
202
300
  'message.turnUsage.count': string;
203
- 'message.turnTime.title': string;
204
- 'message.turnTime.duration': string;
205
- 'message.turnTime.speed': string;
206
- 'message.turnTime.ttft': string;
207
301
  'duration.seconds': string;
208
302
  'duration.minutes': string;
209
303
  'duration.hours': string;
@@ -0,0 +1,19 @@
1
+ import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';
2
+ import { type ChatSettings, type PerformanceUsageMode } from '../chat-settings.ts';
3
+ /** Shared live preference for the settings row and chat statistics. */
4
+ export declare class PerformanceUsagePolicy {
5
+ private readonly host;
6
+ private readonly unsubscribe;
7
+ /** Current choice, reconciled with accepted Host settings when available. */
8
+ readonly mode: import("@deepseek-ai/dsh-client-store").SnapshotStore<"compact" | "detailed">;
9
+ /** @param host - Chat settings scope, durable on loopback and memory-only elsewhere. */
10
+ constructor(host: ConfigForm<ChatSettings>);
11
+ /** Release the accepted-value subscription. */
12
+ dispose(): void;
13
+ /**
14
+ * Publish a choice immediately and persist it when the scope supports writes.
15
+ * @param mode - Statistics detail selected by the user.
16
+ */
17
+ setMode(mode: PerformanceUsageMode): void;
18
+ }
19
+ //# sourceMappingURL=performance-usage.d.ts.map
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Runtime vocabulary derived from the persisted work-details mode. Renderers
3
+ * and seats select single fields of this policy; none of them compares the
4
+ * mode enum, so adding a mode changes only the table below.
5
+ */
6
+ import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
7
+ import type { TranscriptViewMode } from '../chat-settings.ts';
8
+ /** Presentation capabilities that one work-details mode enables. */
9
+ export interface ChatPresentationPolicy {
10
+ /** Mode this policy was derived from; for diagnostics, never for branching in renderers. */
11
+ readonly mode: TranscriptViewMode;
12
+ /** Whether a normally completed Turn folds its process rows behind the whole-Turn control. */
13
+ readonly foldCompletedTurns: boolean;
14
+ /** Whether running Turns' secondary groups expose a collapsible header; historical groups always do. */
15
+ readonly stepGrouping: 'collapsed' | 'none';
16
+ /** Show the running command, path, query, or reasoning detail in group titles. */
17
+ readonly liveProcessDetail: boolean;
18
+ /** Whether a settled reasoning row previews its first line beside the Think title. */
19
+ readonly settledReasoningPreview: boolean;
20
+ }
21
+ /**
22
+ * Resolve the policy constant for one mode. The same mode always yields the
23
+ * same object, so selectors over a policy see stable identities.
24
+ * @param mode - persisted work-details mode.
25
+ * @returns the mode's presentation policy.
26
+ */
27
+ export declare function presentationPolicyFor(mode: TranscriptViewMode): ChatPresentationPolicy;
28
+ /**
29
+ * Derive a policy observable from the mode observable without a subscription of
30
+ * its own: reads are a table lookup and change notifications are the mode's.
31
+ * @param mode - live work-details mode.
32
+ * @returns observable policy that changes exactly when the mode changes.
33
+ */
34
+ export declare function derivePresentationPolicy(mode: ObservableSnapshot<TranscriptViewMode>): ObservableSnapshot<ChatPresentationPolicy>;
35
+ //# sourceMappingURL=presentation-policy.d.ts.map
@@ -0,0 +1,24 @@
1
+ /** General Settings row for Chat HTTP(S) link destinations. */
2
+ import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
3
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
4
+ import type { LinkOpening } from '../../chat-settings.ts';
5
+ /** Registration-side link-opening preference. */
6
+ export interface LinkOpeningRowInjected {
7
+ hooks: {
8
+ /** Current destination, bound as useLinkOpening. */
9
+ linkOpening: ObservableSnapshot<LinkOpening>;
10
+ /** Whether the built-in browser is registered, bound as useBrowserAvailable. */
11
+ browserAvailable: ObservableSnapshot<boolean>;
12
+ };
13
+ /** Change the default destination for Chat HTTP(S) links. */
14
+ setLinkOpening: (destination: LinkOpening) => void;
15
+ }
16
+ /** Full Settings-row props. */
17
+ export type LinkOpeningRowProps = PropsRuntime<'settings.general.item'> & PropsLocale<'chat'> & InjectFace<LinkOpeningRowInjected>;
18
+ /**
19
+ * Render the link-opening destination selector.
20
+ * @param props - Composed Settings slot props.
21
+ * @returns The preference row.
22
+ */
23
+ export declare function LinkOpeningRow({ useLinkOpening, useBrowserAvailable, setLinkOpening, t }: LinkOpeningRowProps): import("react").JSX.Element | null;
24
+ //# sourceMappingURL=LinkOpeningRow.d.ts.map
@@ -0,0 +1,18 @@
1
+ /** General Settings row for performance and usage detail. */
2
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { PerformanceUsageMode } from '../../chat-settings.ts';
4
+ import type { PerformanceUsageInjected } from '../contract/slots.ts';
5
+ /** Registration-side performance and usage preference face. */
6
+ export interface PerformanceUsageRowInjected extends PerformanceUsageInjected {
7
+ /** Change the performance and usage detail. */
8
+ setPerformanceUsage: (mode: PerformanceUsageMode) => void;
9
+ }
10
+ /** Full Settings-row props. */
11
+ export type PerformanceUsageRowProps = PropsRuntime<'settings.general.item'> & PropsLocale<'chat'> & InjectFace<PerformanceUsageRowInjected>;
12
+ /**
13
+ * Render the performance and usage detail selector.
14
+ * @param props - composed Settings slot props.
15
+ * @returns the preference row.
16
+ */
17
+ export declare function PerformanceUsageRow({ usePerformanceUsage, setPerformanceUsage, t }: PerformanceUsageRowProps): import("react").JSX.Element;
18
+ //# sourceMappingURL=PerformanceUsageRow.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Render a preference label and its menu; selection restores focus before publishing the new value.
3
+ * @param props - localized copy, selected value, choices, and mutation callback.
4
+ * @returns the settings row.
5
+ */
6
+ export declare function PreferenceRow({ title, description, value, selectedLabel, options, onSelect }: {
7
+ title: string;
8
+ description: string;
9
+ value: string;
10
+ selectedLabel: string;
11
+ options: readonly {
12
+ id: string;
13
+ label: string;
14
+ }[];
15
+ onSelect: (value: string) => void;
16
+ }): import("react").JSX.Element;
17
+ //# sourceMappingURL=PreferenceRow.d.ts.map
@@ -1,20 +1,20 @@
1
- /** General Settings row for completed-Turn transcript presentation. */
1
+ /** General Settings row for work-details presentation. */
2
2
  import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
3
3
  import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
4
- import type { TranscriptViewMode } from '../../chat-settings.ts';
5
- /** Registration-side transcript preference face. */
4
+ import { type TranscriptViewMode } from '../../chat-settings.ts';
5
+ /** Registration-side work-details preference face. */
6
6
  export interface TranscriptViewRowInjected {
7
7
  hooks: {
8
- /** Persisted transcript preference bound as useTranscriptView. */
8
+ /** Persisted work-details preference bound as useTranscriptView. */
9
9
  transcriptView: SnapshotStore<TranscriptViewMode>;
10
10
  };
11
- /** Change the completed-Turn transcript presentation. */
11
+ /** Change the work-details presentation. */
12
12
  setTranscriptView: (mode: TranscriptViewMode) => void;
13
13
  }
14
14
  /** Full Settings-row props. */
15
15
  export type TranscriptViewRowProps = PropsRuntime<'settings.general.item'> & PropsLocale<'chat'> & InjectFace<TranscriptViewRowInjected>;
16
16
  /**
17
- * Render the completed-Turn transcript mode selector.
17
+ * Render the work-details mode selector.
18
18
  * @param props - composed Settings slot props.
19
19
  * @returns the preference row.
20
20
  */
@@ -1,19 +1,22 @@
1
- /** Host-backed completed-Turn transcript presentation policy. */
1
+ /** Host-backed work-details presentation policy. */
2
2
  import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
3
- import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
3
+ import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';
4
4
  import { type ChatSettings, type TranscriptViewMode } from '../chat-settings.ts';
5
- /** Live transcript preference consumed by Chat and its Settings row. */
5
+ /** Live work-details preference consumed by Chat and its Settings row. */
6
6
  export declare class TranscriptViewPolicy {
7
7
  private readonly host;
8
+ private readonly unsubscribe;
8
9
  /** Reactive current mode; defaults to Compact before Host settings arrive. */
9
10
  readonly mode: SnapshotStore<TranscriptViewMode>;
10
11
  /**
11
12
  * @param host - durable Chat settings scope.
12
13
  */
13
- constructor(host: SettingsScope<ChatSettings>);
14
+ constructor(host: ConfigForm<ChatSettings>);
15
+ /** Release the accepted-value subscription. */
16
+ dispose(): void;
14
17
  /**
15
18
  * Publish and persist one explicit user choice.
16
- * @param mode - Normal or Compact transcript presentation.
19
+ * @param mode - Compact, Detailed, or Expanded work details.
17
20
  */
18
21
  setMode(mode: TranscriptViewMode): void;
19
22
  /** Adopt the latest accepted Host section without writing it back. */
@@ -1,6 +1,28 @@
1
- /** Host registration for browser Chat preferences. */
2
- import type { Context } from '@deepseek-ai/cordis';
3
- export { CHAT_SETTINGS_NAMESPACE, DEFAULT_TRANSCRIPT_VIEW_MODE, TRANSCRIPT_VIEW_FIELD, TRANSCRIPT_VIEW_MODES, type ChatSettings, type TranscriptViewMode, } from './chat-settings.ts';
4
- /** Register the durable Chat settings section when a provider exists. */
1
+ import type { Volatile, Context } from '@deepseek-ai/cordis';
2
+ import type { LinkOpening, TranscriptViewMode, PerformanceUsageMode } from './chat-settings.ts';
3
+ import z from '@deepseek-ai/schemastery';
4
+ export { CHAT_SETTINGS_NAMESPACE, DEFAULT_TRANSCRIPT_VIEW_MODE, LEGACY_TRANSCRIPT_VIEW_MODE, TRANSCRIPT_VIEW_FIELD, TRANSCRIPT_VIEW_MODES, type ChatSettings, type TranscriptViewMode, } from './chat-settings.ts';
5
+ /** Runtime preferences projected to the browser. */
6
+ export interface Config {
7
+ /** Completed turn transcript presentation. */
8
+ transcriptView: Volatile<TranscriptViewMode>;
9
+ /** Performance and usage detail level. */
10
+ performanceUsage: Volatile<PerformanceUsageMode>;
11
+ /** Default destination for Chat HTTP(S) links. */
12
+ linkOpening: Volatile<LinkOpening>;
13
+ }
14
+ /** Live preferences projected to the browser. */
15
+ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
16
+ transcriptView: z<"compact" | "detailed" | "expanded" | "normal", "compact" | "detailed" | "expanded" | "normal", "volatile-defined">;
17
+ performanceUsage: z<"compact" | "detailed", "compact" | "detailed", "volatile-defined">;
18
+ linkOpening: z<"sidebar" | "new-tab", "sidebar" | "new-tab", "volatile-defined">;
19
+ }>>, Schemastery.ObjectT<NoInfer<{
20
+ transcriptView: z<"compact" | "detailed" | "expanded" | "normal", "compact" | "detailed" | "expanded" | "normal", "volatile-defined">;
21
+ performanceUsage: z<"compact" | "detailed", "compact" | "detailed", "volatile-defined">;
22
+ linkOpening: z<"sidebar" | "new-tab", "sidebar" | "new-tab", "volatile-defined">;
23
+ }>>, "plain">;
24
+ /** Host preferences are consumed through the configuration form projection.
25
+ * @param ctx Plugin context used for optional settings presentation.
26
+ */
5
27
  export declare function apply(ctx: Context): void;
6
28
  //# sourceMappingURL=index.d.ts.map