@deepseek-ai/dsh-client-ui-trajectory 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.
@@ -1,6 +1,7 @@
1
1
  /** Turn-aware trajectory event ledger with a local record inspector. */
2
2
  import type { JsonTreeProps } from '@deepseek-ai/dsh-client-ui-primitives';
3
- import type { AssistantRequestConfig, RenderMessageImages } from '@deepseek-ai/dsh-client-ui-conversation/client';
3
+ import type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots';
4
+ import type { AssistantRequestConfig, MessageImageLoader } from '@deepseek-ai/dsh-client-ui-conversation/client';
4
5
  import type { TrajectoryCellProps } from './trajectory-record.ts';
5
6
  import type { TrajectoryTurnModel } from './layout.ts';
6
7
  import type { TrajectoryTranslate } from './locales.ts';
@@ -11,7 +12,9 @@ export interface TrajectoryTableProps {
11
12
  /** Trajectory locale seat. */
12
13
  t: TrajectoryTranslate;
13
14
  /** Slot-backed durable image renderer shared with the Chat gallery. */
14
- renderImages: RenderMessageImages;
15
+ renderSlot: PropsRenderSlots<'conversation.trajectory.images'>['renderSlot'];
16
+ /** Session-bound loader for durable message image attachments. */
17
+ loadImage: MessageImageLoader;
15
18
  /** Session-global request numbers for the request groups visible in this context. */
16
19
  requestNumbers?: readonly TrajectoryRequestNumber[];
17
20
  /** Grouped records in display order. */
@@ -106,6 +109,6 @@ export interface TrajectoryUsage {
106
109
  * @param props - Grouped trajectory data and whole-ledger fold state.
107
110
  * @returns The ledger and an optional local record inspector.
108
111
  */
109
- export declare function TrajectoryTable({ t, stringWrapping, renderImages, requestNumbers: sessionRequestNumbers, turns, streamingCells, timelineFocusIndexes, searchMatchIndexes, onSelectedIndexChange, onRecordSelect, recordSelection, recordFocus, historyLoading, olderHistoryLoading, historyStartSeq, hasOlderRecords, onLoadOlder, onClearSelection, collapsedTurns, onToggleTurn, collapsedAssistants, onToggleAssistant, inspectCallId, onInspectApplied, }: TrajectoryTableProps): import("react").JSX.Element;
112
+ export declare function TrajectoryTable({ t, stringWrapping, renderSlot, loadImage, requestNumbers: sessionRequestNumbers, turns, streamingCells, timelineFocusIndexes, searchMatchIndexes, onSelectedIndexChange, onRecordSelect, recordSelection, recordFocus, historyLoading, olderHistoryLoading, historyStartSeq, hasOlderRecords, onLoadOlder, onClearSelection, collapsedTurns, onToggleTurn, collapsedAssistants, onToggleAssistant, inspectCallId, onInspectApplied, }: TrajectoryTableProps): import("react").JSX.Element;
110
113
  export {};
111
114
  //# sourceMappingURL=TrajectoryTable.d.ts.map
@@ -14,5 +14,5 @@ export interface TrajectoryViewInjected {
14
14
  loadImage: MessageImageLoader;
15
15
  setActualDuration: (actualDuration: boolean) => void;
16
16
  }
17
- export declare function TrajectoryView({ useSession, useTrajectory, useDuration, loadOlder, loadImage, setActualDuration, viewRequest, completeViewRequest, renderSlot, t, jsonStringWrapping, }: ConvViewProps & PropsRenderSlots<'conversation.trajectory.images'> & InjectFace<TrajectoryViewInjected> & PropsLocale<'trajectory'>): import("react").JSX.Element;
17
+ export declare function TrajectoryView({ useSession, useTrajectory, useDuration, loadOlder, loadImage, setActualDuration, viewRequest, completeViewRequest, renderSlot, t, jsonStringWrapping, }: ConvViewProps & Pick<PropsRenderSlots<'conversation.trajectory.images'>, 'renderSlot'> & InjectFace<TrajectoryViewInjected> & PropsLocale<'trajectory'>): import("react").JSX.Element;
18
18
  //# sourceMappingURL=TrajectoryView.d.ts.map
@@ -158,9 +158,9 @@ export declare const zh: {
158
158
  readonly 'details.toolCalls': "工具调用";
159
159
  readonly 'details.subtoolCalls': "子工具调用";
160
160
  readonly 'details.error': "错误";
161
+ readonly 'details.lastAttemptError': "上次尝试错误";
161
162
  readonly 'details.failure.auth': "API 密钥无效";
162
163
  readonly 'details.retry': "重试";
163
- readonly 'details.scheduled': "已计划";
164
164
  readonly 'details.retryDelay': "重试延迟";
165
165
  readonly 'details.result': "结果";
166
166
  readonly 'details.compacted': "已压缩";
@@ -1,4 +1,4 @@
1
- import type { AssistantMessageNode, ConversationLocation, ConversationNode, ConversationPromptSnapshot, ConversationViewNode, MessageImagesOwnerProps, PartialAssistant, RequestPromptChange, RequestView, RunningToolCall, SystemPromptNode, ToolCallBlock } from '@deepseek-ai/dsh-client-ui-conversation/client';
1
+ import type { AssistantMessageNode, AssistantTiming, ConversationLocation, ConversationNode, ConversationPromptSnapshot, ConversationViewNode, MessageImagesOwnerProps, PartialAssistant, RequestPromptChange, RequestView, RunningToolCall, SystemPromptNode, ToolCallBlock } from '@deepseek-ai/dsh-client-ui-conversation/client';
2
2
  import type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  /** Request-header facts retained by the Trajectory target. */
4
4
  export interface TrajectoryRequestHeaderState {
@@ -8,6 +8,10 @@ export interface TrajectoryRequestHeaderState {
8
8
  readonly change?: RequestPromptChange;
9
9
  readonly location: ConversationLocation;
10
10
  }
11
+ /** In-flight assistant output with the loaded Step start and first token timestamps. */
12
+ export interface TrajectoryPartialAssistant extends PartialAssistant {
13
+ readonly timing?: Pick<AssistantTiming, 'stepStartTime' | 'firstTokenTime'>;
14
+ }
11
15
  /** One independently assembled contribution to the legacy Trajectory ledger. */
12
16
  export type TrajectoryContribution = {
13
17
  readonly kind: 'system-prompt';
@@ -18,7 +22,7 @@ export type TrajectoryContribution = {
18
22
  } | {
19
23
  readonly kind: 'assistant';
20
24
  readonly node?: AssistantMessageNode;
21
- readonly partial: PartialAssistant | null;
25
+ readonly partial: TrajectoryPartialAssistant | null;
22
26
  readonly request?: Extract<RequestView, {
23
27
  purpose: 'assistant';
24
28
  }>;
@@ -59,7 +63,7 @@ export interface TrajectorySnapshot {
59
63
  readonly eventLocations: ReadonlyMap<number, ConversationLocation>;
60
64
  readonly requests: readonly RequestView[];
61
65
  readonly callSchemas: ReadonlyMap<string, ConversationPromptSnapshot['tools'][number]>;
62
- readonly partial: PartialAssistant | null;
66
+ readonly partial: TrajectoryPartialAssistant | null;
63
67
  readonly runningCalls: readonly RunningToolCall[];
64
68
  }
65
69
  /** Selector hook over the current Conversation binding's Trajectory target. */
@@ -72,7 +72,7 @@ export interface TrajectoryCellProps extends HTMLAttributes<HTMLDivElement> {
72
72
  callId?: string;
73
73
  /** Recorded tool name; independent of the display summary. */
74
74
  toolName?: string;
75
- /** Tool-only result failure state. */
75
+ /** Failed operation or interrupted assistant output. */
76
76
  isError?: boolean;
77
77
  /** Own duration in seconds, or `null` when no duration is known. */
78
78
  timeSeconds: number | null;
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "ui-trajectory"
4
+ }
5
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "运行轨迹",
4
+ "description": "按轮次查看消息、工具调用、耗时和 Token 等运行记录。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-trajectory",
3
3
  "description": "Trajectory event ledger with an interactive timing overview: pure-consumer plugin registering into the conversation ViewMap (no service)",
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": {
@@ -39,35 +40,34 @@
39
40
  },
40
41
  "license": "MIT",
41
42
  "peerDependencies": {
42
- "@deepseek-ai/cordis": "~4.0.5-alpha.1"
43
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2"
43
44
  },
44
45
  "devDependencies": {
45
- "@types/react": "~18.3.1",
46
- "@types/react-dom": "~18.3.0",
46
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
47
+ "@deepseek-ai/dsh-client-locale": "0.2.1-alpha.3",
48
+ "@deepseek-ai/dsh-client-test-runtime": "0.2.1-alpha.3",
49
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.3",
50
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-alpha.3",
51
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.3",
52
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.3",
53
+ "@deepseek-ai/dsh-compaction": "0.2.1-alpha.3",
54
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
55
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
47
56
  "react": "^18.2.0",
48
57
  "react-dom": "^18.2.0",
49
- "@tanstack/react-virtual": "^3.14.9",
50
- "diff": "^9.0.0",
51
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
52
- "@deepseek-ai/dsh-client-locale": "0.2.1-alpha.1",
53
- "@deepseek-ai/dsh-client-test-runtime": "0.2.1-alpha.1",
54
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.1",
55
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-alpha.1",
56
- "@deepseek-ai/dsh-util-values": "0.2.1-alpha.1",
57
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.1",
58
- "@deepseek-ai/dsh-compaction": "0.2.1-alpha.1",
59
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
60
- "@deepseek-ai/dsh-client-store": "0.2.1-alpha.1",
61
- "@deepseek-ai/dsh-client-ui-chat": "0.2.1-alpha.1",
62
- "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
63
- "@deepseek-ai/dsh-api-session-controller": "0.2.1-alpha.1",
64
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.1",
65
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
66
- "@deepseek-ai/dsh-attachment": "0.2.1-alpha.1",
67
- "@deepseek-ai/dsh-client-ui-session": "0.2.1-alpha.1",
68
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.1"
58
+ "@deepseek-ai/dsh-client-store": "0.2.1-alpha.3",
59
+ "@deepseek-ai/dsh-client-ui-chat": "0.2.1-alpha.3",
60
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
61
+ "@deepseek-ai/dsh-api-session-controller": "0.2.1-alpha.3",
62
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.3",
63
+ "@deepseek-ai/dsh-client-ui-session": "0.2.1-alpha.3",
64
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
65
+ "@deepseek-ai/dsh-attachment": "0.2.1-alpha.3",
66
+ "@tanstack/react-virtual": "3.14.10",
67
+ "diff": "^9.0.0"
69
68
  },
70
69
  "files": [
70
+ "locale/*.json",
71
71
  "lib/index.js",
72
72
  "lib/client.js",
73
73
  "lib/types/**/*.d.ts"