@deepseek-ai/dsh-client-ui-chat 0.2.0-rc.1 → 0.2.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Loop the tail every three seconds after a 0.3s delay.
3
- * @returns animated and resting contours switched by the reduced-motion stylesheet.
2
+ * Render the decorative running icon; the APNG asset owns its animation timing.
3
+ * @returns mask and static SVG selected by browser capabilities and accessibility preferences.
4
4
  */
5
5
  export declare function RunningWhaleTail(): import("react").JSX.Element;
6
6
  //# sourceMappingURL=RunningWhaleTail.d.ts.map
@@ -52,13 +52,20 @@ export declare function cacheHitPercent(usage: TokenUsageProjection): string | n
52
52
  * @returns billed input tokens.
53
53
  */
54
54
  export declare function billedInputTokens(usage: TokenUsageProjection): number;
55
- /** Props: the conversation-snapshot selector plus the projection read seat. */
56
- export interface StatsPillsProps extends InjectFace<PerformanceUsageInjected> {
55
+ type Translate = ChatViewSlotProps['t'];
56
+ /** Props shared by every composer stats pill: the conversation-snapshot selector plus the projection read seat. */
57
+ export interface StatPillProps extends InjectFace<PerformanceUsageInjected> {
57
58
  useChat: SnapshotSelectorHook<ChatSnapshot>;
58
59
  useProjection: UseProjection;
59
60
  /** The owning dock's locale seat. */
60
- t: ChatViewSlotProps['t'];
61
+ t: Translate;
61
62
  }
62
- export declare const StatsPills: import("react").MemoExoticComponent<({ useChat, useProjection, usePerformanceUsage, t }: StatsPillsProps) => import("react").JSX.Element | null>;
63
+ /**
64
+ * Turn and step counts with whole-session speed, opening the time and speed
65
+ * dialog; Compact keeps only the speed reading.
66
+ */
67
+ export declare const ActivityPill: import("react").MemoExoticComponent<({ useChat, useProjection, usePerformanceUsage, t }: StatPillProps) => import("react").JSX.Element | null>;
68
+ /** Whole-log token total and cache hit; Compact keeps only the cache hit. */
69
+ export declare const UsagePill: import("react").MemoExoticComponent<({ useProjection, usePerformanceUsage, t }: StatPillProps) => import("react").JSX.Element | null>;
63
70
  export {};
64
71
  //# sourceMappingURL=StatsPills.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import type { ChatNodeViewProps } from '../contract/slots.ts';
2
- /** Turn-level process disclosure controller. */
2
+ /** Settled Turn duration and process disclosure above its content. */
3
3
  export declare const TurnProcessNodeView: import("react").MemoExoticComponent<({ node, turnProcess, t, }: ChatNodeViewProps<"turn-process">) => import("react").JSX.Element | null>;
4
4
  //# sourceMappingURL=TurnProcessNodeView.d.ts.map
@@ -2,7 +2,7 @@ import type { Translate } from '@deepseek-ai/dsh-client-ui-slots';
2
2
  /** The date-template share of the conversation dictionary the clock consumes. */
3
3
  export type ClockTranslate = Translate<'clock.md' | 'clock.ymd'>;
4
4
  /** The elapsed-duration share of the conversation dictionary. */
5
- export type RunDurationTranslate = Translate<'duration.seconds' | 'duration.minutes' | 'duration.hours'>;
5
+ export type RunDurationTranslate = Translate<'duration.secondUnit' | 'duration.minuteUnit' | 'duration.hourUnit'>;
6
6
  /** Refresh interval for whole-second live run clocks. */
7
7
  export declare const LIVE_RUN_CLOCK_INTERVAL_MS = 1000;
8
8
  /**
@@ -17,23 +17,19 @@ export declare function startOfLocalDay(ms: number): number;
17
17
  * @returns Milliseconds until the following local midnight.
18
18
  */
19
19
  export declare function msUntilNextLocalMidnight(ms: number): number;
20
+ /** One numeric value or localized unit in an elapsed-time label. */
21
+ export interface RunDurationPart {
22
+ readonly text: string;
23
+ readonly numeric: boolean;
24
+ }
20
25
  /**
21
- * Localized elapsed-time label for the running conversation clock.
22
- * @param ms - Elapsed duration in milliseconds (negatives clamp to zero).
23
- * @param t - Translate seat supplying the duration templates.
24
- * @returns Display string in whole seconds; minutes and seconds once the
25
- * duration reaches a minute; hours, minutes, and seconds once it reaches an
26
- * hour, with the smaller units zero-padded.
26
+ * Build elapsed-time fragments for both live and completed Turn labels.
27
+ * @param ms - elapsed milliseconds; negatives clamp to zero and fractions floor.
28
+ * @param t - translate seat supplying units and their trailing spacing.
29
+ * @returns numbers and localized units in display order, without leading zeros;
30
+ * minutes start at 60 seconds and hours at 60 minutes.
27
31
  */
28
- export declare function formatRunDuration(ms: number, t: RunDurationTranslate): string;
29
- /**
30
- * Localized live elapsed time without padded seconds or early rollover.
31
- * @param ms - Elapsed duration in milliseconds (negatives clamp to zero).
32
- * @param t - Translate seat supplying the duration templates.
33
- * @returns Whole seconds without a leading zero; minutes start at 60 seconds
34
- * and hours start at exactly 60 minutes.
35
- */
36
- export declare function formatLiveRunDuration(ms: number, t: RunDurationTranslate): string;
32
+ export declare function formatRunDuration(ms: number, t: RunDurationTranslate): RunDurationPart[];
37
33
  /**
38
34
  * Decode-throughput figure: whole tokens from ten up, one decimal below.
39
35
  * @param tps - Tokens per second.
@@ -14,9 +14,7 @@ export interface StatDialogSeat {
14
14
  }
15
15
  /**
16
16
  * One trigger-anchored dialog seat: open state, viewport-clamped placement, outside-close.
17
- * @param controlled - external open state; when given the seat reads and writes
18
- * it instead of owning its own, letting sibling dialogs share one exclusive slot.
19
17
  * @returns the seat; spread `pos ?? MEASURE_STYLE` onto the portaled panel.
20
18
  */
21
- export declare function useStatDialog(controlled?: Pick<StatDialogSeat, 'open' | 'setOpen'>): StatDialogSeat;
19
+ export declare function useStatDialog(): StatDialogSeat;
22
20
  //# sourceMappingURL=stat-dialog.d.ts.map
@@ -2,7 +2,7 @@ import type { ConversationNode, ConversationTimelineSnapshot, PartialAssistant,
2
2
  import type { ChatConversationViewNode, ChatNodeDataMap, ChatNodeKind } from './chat-nodes.ts';
3
3
  import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
4
4
  import type { TurnProcessSpec } from './turn-process.ts';
5
- export type { AssistantBlock, AssistantMessageNode, AssistantProviderMetadataView, AssistantRequestConfig, AssistantTiming, CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode, ModelRetryNode, PartialAssistant, PreparingToolCall, RunningToolCall, StartedToolCall, SteeringMessageNode, TodoItem, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode, UnknownSurfaceNode, UserMessageNode, } from '@deepseek-ai/dsh-client-ui-conversation/client';
5
+ export type { AssistantBlock, AssistantMessageNode, AssistantProviderMetadataView, AssistantRequestConfig, AssistantTiming, CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode, ModelRetryNode, PartialAssistant, PreparingToolCall, RunningToolCall, StartedToolCall, SteeringMessageNode, TodoItem, ToolArgs, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode, UnknownSurfaceNode, UserMessageNode, } from '@deepseek-ai/dsh-client-ui-conversation/client';
6
6
  /** Per-key observable used by one mounted Chat Node Seat. */
7
7
  export interface ChatNodeSource {
8
8
  /** @returns the current Node for this source's stable key. */
@@ -75,7 +75,7 @@ export interface ChatTurnProcessPresentation {
75
75
  readonly hasInterleavedInput: boolean;
76
76
  readonly compactAnswer: boolean;
77
77
  }
78
- /** Compatibility projection backing StatsPills and the legacy top-level snapshot fields. */
78
+ /** Compatibility projection backing the composer stats pills (StatsPills.tsx) and the legacy top-level snapshot fields. */
79
79
  export interface LegacyConversationSlice {
80
80
  readonly nodes: readonly ConversationNode[];
81
81
  readonly turnTimings: ReadonlyMap<number, {
@@ -1,4 +1,3 @@
1
- /** Tool-category and live-detail interpretation owned by Chat grouping. */
2
1
  import type { ProcessActivitySummary } from '../contract/process-groups.ts';
3
2
  import type { ChatNode } from '../contract/chat-nodes.ts';
4
3
  /**
@@ -7,7 +7,8 @@ declare module '../contract/chat-nodes.ts' {
7
7
  }
8
8
  }
9
9
  interface ToolState {
10
- readonly root: ToolCallBlock;
10
+ /** Absent until a named delta or `tool/call` identifies the call. */
11
+ readonly root: ToolCallBlock | undefined;
11
12
  readonly children: ReadonlyMap<string, readonly ToolCallBlock[]>;
12
13
  readonly parents: ReadonlyMap<string, string>;
13
14
  }
@@ -12,7 +12,7 @@ export type {} from './conversation-nodes/turn-error.ts';
12
12
  export type {} from './conversation-nodes/turn-max-tokens.ts';
13
13
  export type {} from './conversation-nodes/turn-process.ts';
14
14
  export type {} from './conversation-nodes/turn-tail.ts';
15
- export type { AssistantBlock, AssistantMessageNode, AssistantProviderMetadataView, AssistantRequestConfig, AssistantTiming, ChatLocationNodeIndex, ChatNodeProcessSource, ChatNodeSource, ChatNodeStore, ChatSnapshot, ChatTurnNavigationIndex, ChatTurnProcessPresentation, CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode, LegacyConversationSlice, ModelRetryNode, PartialAssistant, PreparingToolCall, RunningToolCall, StartedToolCall, SteeringMessageNode, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode, TurnNavigationItem, UnknownSurfaceNode, UserMessageNode, } from './contract/snapshot.ts';
15
+ export type { AssistantBlock, AssistantMessageNode, AssistantProviderMetadataView, AssistantRequestConfig, AssistantTiming, ChatLocationNodeIndex, ChatNodeProcessSource, ChatNodeSource, ChatNodeStore, ChatSnapshot, ChatTurnNavigationIndex, ChatTurnProcessPresentation, CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode, LegacyConversationSlice, ModelRetryNode, PartialAssistant, PreparingToolCall, RunningToolCall, StartedToolCall, SteeringMessageNode, ToolArgs, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode, TurnNavigationItem, UnknownSurfaceNode, UserMessageNode, } from './contract/snapshot.ts';
16
16
  export type { AssistantChatData, ChatConversationViewNode, ChatNode, ChatNodeKind, FinalAssistantChatData, ManualCompactionChatData, RetryChatData, ToolChatData, TurnProcessChatData, TurnTailChatData, } from './contract/chat-nodes.ts';
17
17
  export type { ChatStoreState, ToolCallId, TurnProcessViewEntry } from './contract/store.ts';
18
18
  export type { TranscriptViewRowInjected, TranscriptViewRowProps } from './settings/TranscriptViewRow.tsx';
@@ -177,9 +177,9 @@ export declare const zh: {
177
177
  'message.turnUsage.output': string;
178
178
  'message.turnUsage.reasoning': string;
179
179
  'message.turnUsage.count': string;
180
- 'duration.seconds': string;
181
- 'duration.minutes': string;
182
- 'duration.hours': string;
180
+ 'duration.secondUnit': string;
181
+ 'duration.minuteUnit': string;
182
+ 'duration.hourUnit': string;
183
183
  'command.running': string;
184
184
  'command.failed': string;
185
185
  'command.done': string;
@@ -368,9 +368,9 @@ export declare const en: {
368
368
  'message.turnUsage.output': string;
369
369
  'message.turnUsage.reasoning': string;
370
370
  'message.turnUsage.count': string;
371
- 'duration.seconds': string;
372
- 'duration.minutes': string;
373
- 'duration.hours': string;
371
+ 'duration.secondUnit': string;
372
+ 'duration.minuteUnit': string;
373
+ 'duration.hourUnit': string;
374
374
  'command.running': string;
375
375
  'command.failed': string;
376
376
  'command.done': string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-chat",
3
3
  "description": "Chat Conversation target, node definitions, renderers, and details surface",
4
- "version": "0.2.0-rc.1",
4
+ "version": "0.2.1-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "license": "MIT",
47
47
  "peerDependencies": {
48
- "@deepseek-ai/cordis": "~4.0.4"
48
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@tanstack/react-virtual": "^3.14.9",
@@ -53,46 +53,46 @@
53
53
  "@types/react-dom": "~18.3.0",
54
54
  "react": "^18.2.0",
55
55
  "react-dom": "^18.2.0",
56
- "@deepseek-ai/cordis": "~4.0.4",
57
- "@deepseek-ai/dsh-agent": "0.2.0-rc.1",
58
- "@deepseek-ai/dsh-api-remotes": "0.2.0-rc.1",
59
- "@deepseek-ai/dsh-api-session-controller": "0.2.0-rc.1",
60
- "@deepseek-ai/dsh-api-workspace-controller": "0.2.0-rc.1",
61
- "@deepseek-ai/dsh-brand": "0.2.0-rc.1",
62
- "@deepseek-ai/dsh-client-locale": "0.2.0-rc.1",
63
- "@deepseek-ai/dsh-client-store": "0.2.0-rc.1",
64
- "@deepseek-ai/dsh-client-ui-approval": "0.2.0-rc.1",
65
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.1",
66
- "@deepseek-ai/dsh-client-ui-layout": "0.2.0-rc.1",
67
- "@deepseek-ai/dsh-client-ui-input-trigger": "0.2.0-rc.1",
68
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.1",
69
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.1",
70
- "@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.1",
71
- "@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.1",
72
- "@deepseek-ai/dsh-attachment": "0.2.0-rc.1",
73
- "@deepseek-ai/dsh-client-ui-sidebar-browser": "0.2.0-rc.1",
74
- "@deepseek-ai/dsh-client-ui-sidebar-documentpreview": "0.2.0-rc.1",
75
- "@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.0-rc.1",
76
- "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1",
77
- "@deepseek-ai/dsh-client-ui-workspace": "0.2.0-rc.1",
78
- "@deepseek-ai/dsh-commands": "0.2.0-rc.1",
79
- "@deepseek-ai/dsh-compaction": "0.2.0-rc.1",
80
- "@deepseek-ai/dsh-api-workspace-files": "0.2.0-rc.1",
81
- "@deepseek-ai/dsh-session": "0.2.0-rc.1",
82
- "@deepseek-ai/dsh-session-stats": "0.2.0-rc.1",
83
- "@deepseek-ai/dsh-session-turn-outline": "0.2.0-rc.1",
84
- "@deepseek-ai/dsh-subagent": "0.2.0-rc.1",
85
- "@deepseek-ai/dsh-token-meter": "0.2.0-rc.1",
86
- "@deepseek-ai/dsh-tools": "0.2.0-rc.1",
87
- "@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.1",
88
- "@deepseek-ai/dsh-llm": "0.2.0-rc.1",
89
- "@deepseek-ai/dsh-client-product-analytics": "0.2.0-rc.1",
90
- "@deepseek-ai/dsh-llm-retry": "0.2.0-rc.1",
91
- "@deepseek-ai/dsh-settings": "0.2.0-rc.1",
92
- "@deepseek-ai/dsh-util-values": "0.2.0-rc.1"
56
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
57
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
58
+ "@deepseek-ai/dsh-api-remotes": "0.2.1-alpha.1",
59
+ "@deepseek-ai/dsh-api-session-controller": "0.2.1-alpha.1",
60
+ "@deepseek-ai/dsh-api-workspace-controller": "0.2.1-alpha.1",
61
+ "@deepseek-ai/dsh-api-workspace-files": "0.2.1-alpha.1",
62
+ "@deepseek-ai/dsh-attachment": "0.2.1-alpha.1",
63
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
64
+ "@deepseek-ai/dsh-client-locale": "0.2.1-alpha.1",
65
+ "@deepseek-ai/dsh-client-store": "0.2.1-alpha.1",
66
+ "@deepseek-ai/dsh-client-ui-approval": "0.2.1-alpha.1",
67
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-alpha.1",
68
+ "@deepseek-ai/dsh-client-ui-input-trigger": "0.2.1-alpha.1",
69
+ "@deepseek-ai/dsh-client-ui-layout": "0.2.1-alpha.1",
70
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.1",
71
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.1",
72
+ "@deepseek-ai/dsh-client-ui-session": "0.2.1-alpha.1",
73
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.1-alpha.1",
74
+ "@deepseek-ai/dsh-client-ui-sidebar-browser": "0.2.1-alpha.1",
75
+ "@deepseek-ai/dsh-client-ui-sidebar-documentpreview": "0.2.1-alpha.1",
76
+ "@deepseek-ai/dsh-client-ui-workspace": "0.2.1-alpha.1",
77
+ "@deepseek-ai/dsh-commands": "0.2.1-alpha.1",
78
+ "@deepseek-ai/dsh-compaction": "0.2.1-alpha.1",
79
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
80
+ "@deepseek-ai/dsh-llm-retry": "0.2.1-alpha.1",
81
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
82
+ "@deepseek-ai/dsh-session-stats": "0.2.1-alpha.1",
83
+ "@deepseek-ai/dsh-session-turn-outline": "0.2.1-alpha.1",
84
+ "@deepseek-ai/dsh-token-meter": "0.2.1-alpha.1",
85
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
86
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
87
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.1",
88
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.1",
89
+ "@deepseek-ai/dsh-settings": "0.2.1-alpha.1",
90
+ "@deepseek-ai/dsh-client-product-analytics": "0.2.1-alpha.1",
91
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.1",
92
+ "@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.1-alpha.1"
93
93
  },
94
94
  "dependencies": {
95
- "@deepseek-ai/schemastery": "~3.18.4"
95
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
96
96
  },
97
97
  "files": [
98
98
  "lib/index.js",
@@ -1,34 +0,0 @@
1
- import type { StreamChunk } from '@deepseek-ai/dsh-llm/types';
2
- import type { AssistantBlock, PartialAssistant } from '@deepseek-ai/dsh-client-ui-conversation/client';
3
- /**
4
- * Whether a stream chunk changes the partial assistant projection shown by the UI.
5
- * @param type - Stream chunk discriminant.
6
- * @returns Whether publishing the accumulated partial can change the visible snapshot.
7
- */
8
- export declare function isVisibleAssistantChunk(type: string): boolean;
9
- /** Live Assistant-frame accumulator: folds StreamChunks into AssistantBlock[] with block-level immutability. */
10
- export declare class PartialAccumulator {
11
- readonly turn: number;
12
- readonly step: number;
13
- private blocks;
14
- private changed;
15
- private snapshot;
16
- /**
17
- * @param turn - Owning agent turn.
18
- * @param step - Owning model step.
19
- * @param initialBlocks - Materialized prefix when accumulation begins after history replay.
20
- */
21
- constructor(turn: number, step: number, initialBlocks?: readonly AssistantBlock[]);
22
- /**
23
- * Fold one chunk.
24
- * @param chunk - the stream chunk.
25
- * @returns whether it caused a visible change (usage/finish return false, skipping notification).
26
- */
27
- push(chunk: StreamChunk): boolean;
28
- /**
29
- * Current partial projection.
30
- * @returns the cached snapshot (the blocks array reference only changes after a mutation).
31
- */
32
- toPartial(): PartialAssistant;
33
- }
34
- //# sourceMappingURL=partial.d.ts.map