dsh-edge 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +1318 -1075
- package/dist/assets/index-Df-65__b.js +110 -0
- package/dist/assets/index-b24khbeK.css +1 -0
- package/dist/assets/langs/{php-DDkx9sim.js → php-DJl5gRdb.js} +2 -2
- package/dist/assets/langs/{ruby-DCxyoPen.js → ruby-5eNB0pDK.js} +2 -2
- package/dist/assets/vendor-BNsW4eBh.css +1 -0
- package/dist/assets/vendor-CCJJTK99.js +411 -0
- package/dist/index.html +8 -8
- package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +1513 -77
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +3608 -757
- package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +2777 -0
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-controller/client.js +415 -0
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +1975 -7466
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +225 -76
- package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +67 -15
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +270 -460
- package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +292 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +42 -17
- package/dist/plugins/@deepseek-ai/dsh-client-ui-brand-official/client.js +7 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +8177 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +22 -10
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +14950 -8910
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +161 -137
- package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +6 -7
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +268 -40
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +45 -11
- package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +30 -58
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +188 -89
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +105 -75
- package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +650 -188
- package/dist/plugins/@deepseek-ai/dsh-client-ui-schedule/client.js +307 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-session/client.js +340 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +57 -50
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +134 -69
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +575 -442
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +24 -11
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +13 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +44 -20
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +265 -94
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +899 -433
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +1472 -613
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +249 -95
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +5 -5
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +425 -146
- package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +29 -14
- package/dist/plugins/dsh-edge-client-ui/client.js +28 -26
- package/package.json +62 -58
- package/scripts/verify-packed.mjs +1 -1
- package/worker/direct/index.js +2866 -1466
- package/worker/isolated/index.js +2438 -1038
- package/dist/assets/index-C6eRlFa6.css +0 -1
- package/dist/assets/index-ClqxG24t.js +0 -96
- package/dist/assets/vendor-CjyC-hUb.css +0 -1
- package/dist/assets/vendor-D22_Mp1f.js +0 -411
- package/dist/plugins/@deepseek-ai/dsh-client-runtime/client.js +0 -10574
|
@@ -26,7 +26,7 @@ window.__ModuleLoader__.load({
|
|
|
26
26
|
enumerable: true
|
|
27
27
|
}) : target, mod));
|
|
28
28
|
//#endregion
|
|
29
|
-
let
|
|
29
|
+
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
30
30
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
31
31
|
let react = require("react");
|
|
32
32
|
react = __toESM(react, 1);
|
|
@@ -38,31 +38,191 @@ window.__ModuleLoader__.load({
|
|
|
38
38
|
* @returns a persisted source shared by every session view in one plugin lifecycle.
|
|
39
39
|
*/
|
|
40
40
|
function createTrajectoryDurationStore() {
|
|
41
|
-
return (0,
|
|
41
|
+
return (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(false, { persist: { name: "dsh.trajectory.duration" } });
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region lib/types/client/locales.js
|
|
45
|
-
/** `trajectory` namespace dictionaries
|
|
45
|
+
/** `trajectory` namespace dictionaries for the complete trajectory surface. */
|
|
46
46
|
/** Dictionary namespace owned by this plugin. */
|
|
47
47
|
const NS = "trajectory";
|
|
48
48
|
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
49
49
|
const zh = {
|
|
50
50
|
"view.trajectory": "轨迹",
|
|
51
51
|
"toolbar.aria": "轨迹工具栏",
|
|
52
|
-
"toolbar.duration": "
|
|
53
|
-
"toolbar.useActualDuration": "
|
|
54
|
-
"toolbar.useEqualWidth": "
|
|
52
|
+
"toolbar.duration": "时长",
|
|
53
|
+
"toolbar.useActualDuration": "使用实际时长",
|
|
54
|
+
"toolbar.useEqualWidth": "使用等宽操作",
|
|
55
55
|
"toolbar.actualTime": "实际时间",
|
|
56
|
-
"toolbar.turns": "
|
|
57
|
-
"toolbar.expandTurns": "
|
|
58
|
-
"toolbar.collapseTurns": "
|
|
59
|
-
"toolbar.calls": "
|
|
60
|
-
"toolbar.expandCalls": "
|
|
61
|
-
"toolbar.collapseCalls": "
|
|
56
|
+
"toolbar.turns": "轮次",
|
|
57
|
+
"toolbar.expandTurns": "展开所有轮次",
|
|
58
|
+
"toolbar.collapseTurns": "收起所有轮次",
|
|
59
|
+
"toolbar.calls": "调用",
|
|
60
|
+
"toolbar.expandCalls": "展开所有调用",
|
|
61
|
+
"toolbar.collapseCalls": "收起所有调用",
|
|
62
62
|
"toolbar.search": "搜索轨迹",
|
|
63
|
-
"toolbar.searchPlaceholder": "搜索"
|
|
63
|
+
"toolbar.searchPlaceholder": "搜索",
|
|
64
|
+
"kind.system": "系统",
|
|
65
|
+
"kind.user": "用户",
|
|
66
|
+
"kind.context": "上下文",
|
|
67
|
+
"kind.compacted": "已压缩",
|
|
68
|
+
"kind.message": "消息",
|
|
69
|
+
"kind.assistant": "助手",
|
|
70
|
+
"kind.tool": "工具",
|
|
71
|
+
"kind.subtool": "子工具",
|
|
72
|
+
"kind.sub": "子项",
|
|
73
|
+
"column.input": "输入",
|
|
74
|
+
"column.output": "输出",
|
|
75
|
+
"column.think": "思考",
|
|
76
|
+
"column.time": "时间",
|
|
77
|
+
"column.model": "模型",
|
|
78
|
+
"column.tools": "工具",
|
|
79
|
+
"turn.label": "第 {turn} 轮",
|
|
80
|
+
"section.betweenTurns": "轮次之间",
|
|
81
|
+
"group.message": "消息",
|
|
82
|
+
"group.step": "步骤 {step}",
|
|
83
|
+
"group.compaction": "压缩 {seq}",
|
|
84
|
+
"status.failed": "失败",
|
|
85
|
+
"status.pending": "等待中",
|
|
86
|
+
"status.completed": "已完成",
|
|
87
|
+
"timing.notAvailable": "不可用",
|
|
88
|
+
"timing.notRecorded": "未记录",
|
|
89
|
+
"timing.stepStartUnavailable": "步骤开始时间不可用",
|
|
90
|
+
"timing.firstTokenUnavailable": "首 token 时间不可用",
|
|
91
|
+
"timing.usageUnavailable": "用量不可用",
|
|
92
|
+
"timing.outputTokensUnavailable": "输出 token 数不可用",
|
|
93
|
+
"timing.durationTooShort": "时长过短",
|
|
94
|
+
"timing.showLocalTime": "显示本地时间",
|
|
95
|
+
"timing.showUnixTimestamp": "显示 Unix 时间戳",
|
|
96
|
+
"timing.started": "开始时间",
|
|
97
|
+
"timing.totalDuration": "总时长",
|
|
98
|
+
"timing.ttft": "首 token 延迟",
|
|
99
|
+
"timing.generation": "生成",
|
|
100
|
+
"timing.throughput": "吞吐量",
|
|
101
|
+
"timing.duration": "时长",
|
|
102
|
+
"timing.source": "计时来源",
|
|
103
|
+
"timing.sessionTimestamps": "会话时间戳",
|
|
104
|
+
"timing.sessionTimestampsRunning": "会话时间戳(运行中)",
|
|
105
|
+
"timing.request": "请求计时",
|
|
106
|
+
"unit.milliseconds": "{value} 毫秒",
|
|
107
|
+
"unit.seconds": "{value} 秒",
|
|
108
|
+
"unit.tokens": "{value} tok",
|
|
109
|
+
"unit.tokensPerSecond": "{value} tok/s",
|
|
110
|
+
"usage.tokens": "Token",
|
|
111
|
+
"usage.reasoning": "推理",
|
|
112
|
+
"usage.content": "内容",
|
|
113
|
+
"usage.notReported": "未报告用量",
|
|
114
|
+
"usage.input": "输入",
|
|
115
|
+
"usage.cached": "缓存读取",
|
|
116
|
+
"usage.cacheCreated": "缓存写入",
|
|
117
|
+
"usage.other": "其他",
|
|
118
|
+
"usage.output": "输出",
|
|
119
|
+
"usage.thisRequest": "本次请求",
|
|
120
|
+
"usage.sessionCumulative": "会话累计",
|
|
121
|
+
"options.notRecorded": "未记录选项",
|
|
122
|
+
"options.json": "请求选项 JSON",
|
|
123
|
+
"source.unknown": "未知",
|
|
124
|
+
"source.user": "用户",
|
|
125
|
+
"source.plugin": "插件",
|
|
126
|
+
"source.pluginNamed": "插件 · {plugin}",
|
|
127
|
+
"source.goal": "目标",
|
|
128
|
+
"source.goalRound": "目标 · Round {round}",
|
|
129
|
+
"source.notRecorded": "未记录来源",
|
|
130
|
+
"source.messageJson": "消息来源 JSON",
|
|
131
|
+
"tab.summary": "概述",
|
|
132
|
+
"tab.rawOutput": "原始输出",
|
|
133
|
+
"tab.preview": "预览",
|
|
134
|
+
"tab.raw": "原始内容",
|
|
135
|
+
"tab.source": "来源",
|
|
136
|
+
"tab.payload": "参数",
|
|
137
|
+
"tab.result": "结果",
|
|
138
|
+
"tab.schema": "Schema",
|
|
139
|
+
"tab.timing": "计时",
|
|
140
|
+
"tab.diff": "差异",
|
|
141
|
+
"tab.systemPrompt": "系统提示词",
|
|
142
|
+
"tab.tools": "工具",
|
|
143
|
+
"tab.options": "选项",
|
|
144
|
+
"tab.usage": "用量",
|
|
145
|
+
"record.toolCallOnly": "(仅工具调用)",
|
|
146
|
+
"record.noContent": "无内容",
|
|
147
|
+
"record.noPayload": "未捕获参数",
|
|
148
|
+
"record.noResult": "未捕获结果",
|
|
149
|
+
"record.noOutput": "无输出",
|
|
150
|
+
"record.schemaUnavailable": "Schema 不可用",
|
|
151
|
+
"record.parameters": "参数",
|
|
152
|
+
"record.resultJson": "结果 JSON",
|
|
153
|
+
"record.json": "JSON",
|
|
154
|
+
"record.parametersJson": "参数 JSON",
|
|
155
|
+
"record.namedParametersJson": "{name} 参数 JSON",
|
|
156
|
+
"record.payloadJson": "参数 JSON",
|
|
157
|
+
"record.outputJson": "结果 JSON",
|
|
158
|
+
"record.thinking": "思考",
|
|
159
|
+
"record.systemPromptMissing": "本次请求没有系统提示词",
|
|
160
|
+
"record.toolsMissing": "本次请求没有工具",
|
|
161
|
+
"record.systemPrompt": "系统提示词",
|
|
162
|
+
"record.tools": "工具",
|
|
163
|
+
"block.openSummary": "打开第 {index} 个块的工具调用概述",
|
|
164
|
+
"block.openSummaryTitle": "打开工具调用概述",
|
|
165
|
+
"block.label": "块 #{index} {type}",
|
|
166
|
+
"history.loadingTrajectory": "正在加载轨迹…",
|
|
167
|
+
"history.loadingEarlier": "正在加载更早的历史…",
|
|
168
|
+
"history.loadingEarlierAria": "正在加载更早的历史…",
|
|
169
|
+
"history.loadEarlier": "加载更早的历史",
|
|
170
|
+
"history.clickToLoadEarlier": "点击加载更早的历史",
|
|
171
|
+
"request.label": "请求 #{request}",
|
|
172
|
+
"request.labelCompaction": "请求 #{request} · 压缩",
|
|
173
|
+
"request.compaction": "压缩 · {section}",
|
|
174
|
+
"request.compactionPurpose": "压缩",
|
|
175
|
+
"request.retryProgress": "{retry}/{maximum}",
|
|
176
|
+
"request.collapsedSummary": "已收起的{kind}概述,{summary}",
|
|
177
|
+
"request.collapsedTurn": "轮次",
|
|
178
|
+
"request.collapsedAssistant": "助手",
|
|
179
|
+
"request.rowAria": "{request}{kind},{content}",
|
|
180
|
+
"request.rowPrefix": "请求 {request},",
|
|
181
|
+
"request.rowAriaCompaction": "请求 {request},压缩",
|
|
182
|
+
"request.noContent": "无内容",
|
|
183
|
+
"summary.toolCalls.one": "{count} 个工具调用",
|
|
184
|
+
"summary.toolCalls.other": "{count} 个工具调用",
|
|
185
|
+
"summary.steps.one": "{count} 个步骤",
|
|
186
|
+
"summary.steps.other": "{count} 个步骤",
|
|
187
|
+
"details.event": "事件详情",
|
|
188
|
+
"details.resize": "调整事件详情宽度",
|
|
189
|
+
"details.resizeTitle": "拖动调整大小;双击恢复默认值。",
|
|
190
|
+
"details.close": "关闭详情",
|
|
191
|
+
"details.status": "状态",
|
|
192
|
+
"details.purpose": "用途",
|
|
193
|
+
"details.provider": "提供方",
|
|
194
|
+
"details.model": "模型",
|
|
195
|
+
"details.toolCalls": "工具调用",
|
|
196
|
+
"details.subtoolCalls": "子工具调用",
|
|
197
|
+
"details.error": "错误",
|
|
198
|
+
"details.failure.auth": "API 密钥无效",
|
|
199
|
+
"details.retry": "重试",
|
|
200
|
+
"details.scheduled": "已计划",
|
|
201
|
+
"details.retryDelay": "重试延迟",
|
|
202
|
+
"details.result": "结果",
|
|
203
|
+
"details.compacted": "已压缩",
|
|
204
|
+
"details.assistantMessage": "助手消息",
|
|
205
|
+
"details.source": "来源",
|
|
206
|
+
"details.hierarchy": "层级",
|
|
207
|
+
"details.toolCall": "工具调用",
|
|
208
|
+
"timeline.aria": "轨迹时间线",
|
|
209
|
+
"timeline.overviewAria": "时间线概览;水平拖动可聚焦事件",
|
|
210
|
+
"timeline.noTimingData": "无计时数据",
|
|
211
|
+
"timeline.total": "总计 {duration}",
|
|
212
|
+
"timeline.started": "开始于 {time}",
|
|
213
|
+
"timeline.ttftDecoding": "首 token {ttft} · 解码 {decoding}",
|
|
214
|
+
"layout.compacting": "正在压缩上下文…",
|
|
215
|
+
"layout.compactionFailed": "上下文压缩失败",
|
|
216
|
+
"layout.compacted": "上下文已压缩",
|
|
217
|
+
"layout.toolCallOnly": "仅工具调用",
|
|
218
|
+
"layout.imageOnly": "图片 ×{count}",
|
|
219
|
+
"layout.initialSystemPrompt": "初始系统提示词",
|
|
220
|
+
"layout.systemPromptUpdated": "系统提示词已更新",
|
|
221
|
+
"layout.toolsUpdated": "工具已更新",
|
|
222
|
+
"layout.systemPromptAndToolsUpdated": "系统提示词和工具已更新",
|
|
223
|
+
"layout.compactionInterrupted": "上下文压缩在完成前被中断。"
|
|
64
224
|
};
|
|
65
|
-
/** English dictionary. */
|
|
225
|
+
/** English dictionary, checked complete against the Chinese source of truth. */
|
|
66
226
|
const en = {
|
|
67
227
|
"view.trajectory": "Trajectory",
|
|
68
228
|
"toolbar.aria": "Trajectory toolbar",
|
|
@@ -77,7 +237,167 @@ window.__ModuleLoader__.load({
|
|
|
77
237
|
"toolbar.expandCalls": "Expand calls",
|
|
78
238
|
"toolbar.collapseCalls": "Collapse calls",
|
|
79
239
|
"toolbar.search": "Search trajectory",
|
|
80
|
-
"toolbar.searchPlaceholder": "Search"
|
|
240
|
+
"toolbar.searchPlaceholder": "Search",
|
|
241
|
+
"kind.system": "SYSTEM",
|
|
242
|
+
"kind.user": "USER",
|
|
243
|
+
"kind.context": "CONTEXT",
|
|
244
|
+
"kind.compacted": "COMPACTED",
|
|
245
|
+
"kind.message": "Message",
|
|
246
|
+
"kind.assistant": "ASSISTANT",
|
|
247
|
+
"kind.tool": "TOOL",
|
|
248
|
+
"kind.subtool": "SUBTOOL",
|
|
249
|
+
"kind.sub": "Sub",
|
|
250
|
+
"column.input": "Input",
|
|
251
|
+
"column.output": "Output",
|
|
252
|
+
"column.think": "Think",
|
|
253
|
+
"column.time": "Time",
|
|
254
|
+
"column.model": "Model",
|
|
255
|
+
"column.tools": "Tools",
|
|
256
|
+
"turn.label": "Turn {turn}",
|
|
257
|
+
"section.betweenTurns": "Between turns",
|
|
258
|
+
"group.message": "Message",
|
|
259
|
+
"group.step": "Step {step}",
|
|
260
|
+
"group.compaction": "Compaction {seq}",
|
|
261
|
+
"status.failed": "Failed",
|
|
262
|
+
"status.pending": "Pending",
|
|
263
|
+
"status.completed": "Completed",
|
|
264
|
+
"timing.notAvailable": "Not available",
|
|
265
|
+
"timing.notRecorded": "Not recorded",
|
|
266
|
+
"timing.stepStartUnavailable": "Step start unavailable",
|
|
267
|
+
"timing.firstTokenUnavailable": "First token unavailable",
|
|
268
|
+
"timing.usageUnavailable": "Usage unavailable",
|
|
269
|
+
"timing.outputTokensUnavailable": "Output tokens unavailable",
|
|
270
|
+
"timing.durationTooShort": "Duration too short",
|
|
271
|
+
"timing.showLocalTime": "Show local time",
|
|
272
|
+
"timing.showUnixTimestamp": "Show Unix timestamp",
|
|
273
|
+
"timing.started": "Started",
|
|
274
|
+
"timing.totalDuration": "Total duration",
|
|
275
|
+
"timing.ttft": "TTFT",
|
|
276
|
+
"timing.generation": "Generation",
|
|
277
|
+
"timing.throughput": "Throughput",
|
|
278
|
+
"timing.duration": "Duration",
|
|
279
|
+
"timing.source": "Timing source",
|
|
280
|
+
"timing.sessionTimestamps": "Session timestamps",
|
|
281
|
+
"timing.sessionTimestampsRunning": "Session timestamps (running)",
|
|
282
|
+
"timing.request": "Request Timing",
|
|
283
|
+
"unit.milliseconds": "{value} ms",
|
|
284
|
+
"unit.seconds": "{value} s",
|
|
285
|
+
"unit.tokens": "{value} tok",
|
|
286
|
+
"unit.tokensPerSecond": "{value} tok/s",
|
|
287
|
+
"usage.tokens": "Tokens",
|
|
288
|
+
"usage.reasoning": "Reasoning",
|
|
289
|
+
"usage.content": "Content",
|
|
290
|
+
"usage.notReported": "Usage not reported",
|
|
291
|
+
"usage.input": "Input",
|
|
292
|
+
"usage.cached": "Cached",
|
|
293
|
+
"usage.cacheCreated": "Cache created",
|
|
294
|
+
"usage.other": "Other",
|
|
295
|
+
"usage.output": "Output",
|
|
296
|
+
"usage.thisRequest": "This request",
|
|
297
|
+
"usage.sessionCumulative": "Session cumulative",
|
|
298
|
+
"options.notRecorded": "Options not recorded",
|
|
299
|
+
"options.json": "Request options JSON",
|
|
300
|
+
"source.unknown": "Unknown",
|
|
301
|
+
"source.user": "User",
|
|
302
|
+
"source.plugin": "Plugin",
|
|
303
|
+
"source.pluginNamed": "Plugin · {plugin}",
|
|
304
|
+
"source.goal": "Goal",
|
|
305
|
+
"source.goalRound": "Goal · Round {round}",
|
|
306
|
+
"source.notRecorded": "Source not recorded",
|
|
307
|
+
"source.messageJson": "Message source JSON",
|
|
308
|
+
"tab.summary": "Summary",
|
|
309
|
+
"tab.rawOutput": "Raw Output",
|
|
310
|
+
"tab.preview": "Preview",
|
|
311
|
+
"tab.raw": "Raw",
|
|
312
|
+
"tab.source": "Source",
|
|
313
|
+
"tab.payload": "Payload",
|
|
314
|
+
"tab.result": "Result",
|
|
315
|
+
"tab.schema": "Schema",
|
|
316
|
+
"tab.timing": "Timing",
|
|
317
|
+
"tab.diff": "Diff",
|
|
318
|
+
"tab.systemPrompt": "System Prompt",
|
|
319
|
+
"tab.tools": "Tools",
|
|
320
|
+
"tab.options": "Options",
|
|
321
|
+
"tab.usage": "Usage",
|
|
322
|
+
"record.toolCallOnly": "(tool call only)",
|
|
323
|
+
"record.noContent": "No content",
|
|
324
|
+
"record.noPayload": "No payload captured",
|
|
325
|
+
"record.noResult": "No result captured",
|
|
326
|
+
"record.noOutput": "No output",
|
|
327
|
+
"record.schemaUnavailable": "Schema unavailable",
|
|
328
|
+
"record.parameters": "Parameters",
|
|
329
|
+
"record.resultJson": "Result JSON",
|
|
330
|
+
"record.json": "JSON",
|
|
331
|
+
"record.parametersJson": "parameters JSON",
|
|
332
|
+
"record.namedParametersJson": "{name} parameters JSON",
|
|
333
|
+
"record.payloadJson": "Payload JSON",
|
|
334
|
+
"record.outputJson": "Result JSON",
|
|
335
|
+
"record.thinking": "Thinking",
|
|
336
|
+
"record.systemPromptMissing": "No system prompt in this request",
|
|
337
|
+
"record.toolsMissing": "No tools in this request",
|
|
338
|
+
"record.systemPrompt": "System Prompt",
|
|
339
|
+
"record.tools": "Tools",
|
|
340
|
+
"block.openSummary": "Open Block #{index} tool call summary",
|
|
341
|
+
"block.openSummaryTitle": "Open tool call summary",
|
|
342
|
+
"block.label": "Block #{index} {type}",
|
|
343
|
+
"history.loadingTrajectory": "Loading trajectory…",
|
|
344
|
+
"history.loadingEarlier": "Loading earlier history…",
|
|
345
|
+
"history.loadingEarlierAria": "Loading earlier history…",
|
|
346
|
+
"history.loadEarlier": "Load earlier history",
|
|
347
|
+
"history.clickToLoadEarlier": "Click to load earlier history",
|
|
348
|
+
"request.label": "Request #{request}",
|
|
349
|
+
"request.labelCompaction": "Request #{request} · Compaction",
|
|
350
|
+
"request.compaction": "Compaction · {section}",
|
|
351
|
+
"request.compactionPurpose": "Compaction",
|
|
352
|
+
"request.retryProgress": "{retry} of {maximum}",
|
|
353
|
+
"request.collapsedSummary": "Collapsed {kind} summary, {summary}",
|
|
354
|
+
"request.collapsedTurn": "turn",
|
|
355
|
+
"request.collapsedAssistant": "assistant",
|
|
356
|
+
"request.rowAria": "{request}{kind}, {content}",
|
|
357
|
+
"request.rowPrefix": "Request {request}, ",
|
|
358
|
+
"request.rowAriaCompaction": "Request {request}, compaction",
|
|
359
|
+
"request.noContent": "no content",
|
|
360
|
+
"summary.toolCalls.one": "{count} tool call",
|
|
361
|
+
"summary.toolCalls.other": "{count} tool calls",
|
|
362
|
+
"summary.steps.one": "{count} step",
|
|
363
|
+
"summary.steps.other": "{count} steps",
|
|
364
|
+
"details.event": "Event details",
|
|
365
|
+
"details.resize": "Resize event details",
|
|
366
|
+
"details.resizeTitle": "Drag to resize. Double-click to reset.",
|
|
367
|
+
"details.close": "Close details",
|
|
368
|
+
"details.status": "Status",
|
|
369
|
+
"details.purpose": "Purpose",
|
|
370
|
+
"details.provider": "Provider",
|
|
371
|
+
"details.model": "Model",
|
|
372
|
+
"details.toolCalls": "Tool calls",
|
|
373
|
+
"details.subtoolCalls": "Subtool calls",
|
|
374
|
+
"details.error": "Error",
|
|
375
|
+
"details.failure.auth": "API key is invalid",
|
|
376
|
+
"details.retry": "Retry",
|
|
377
|
+
"details.scheduled": "Scheduled",
|
|
378
|
+
"details.retryDelay": "Retry delay",
|
|
379
|
+
"details.result": "Result",
|
|
380
|
+
"details.compacted": "Compacted",
|
|
381
|
+
"details.assistantMessage": "Assistant Message",
|
|
382
|
+
"details.source": "Source",
|
|
383
|
+
"details.hierarchy": "Hierarchy",
|
|
384
|
+
"details.toolCall": "Tool Call",
|
|
385
|
+
"timeline.aria": "Trajectory timeline",
|
|
386
|
+
"timeline.overviewAria": "Timeline overview; drag horizontally to focus events",
|
|
387
|
+
"timeline.noTimingData": "No timing data",
|
|
388
|
+
"timeline.total": "Total {duration}",
|
|
389
|
+
"timeline.started": "Started {time}",
|
|
390
|
+
"timeline.ttftDecoding": "TTFT {ttft} · Decoding {decoding}",
|
|
391
|
+
"layout.compacting": "Compacting context…",
|
|
392
|
+
"layout.compactionFailed": "Compaction failed",
|
|
393
|
+
"layout.compacted": "Context compacted",
|
|
394
|
+
"layout.toolCallOnly": "Tool call only",
|
|
395
|
+
"layout.imageOnly": "Images ×{count}",
|
|
396
|
+
"layout.initialSystemPrompt": "Initial System Prompt",
|
|
397
|
+
"layout.systemPromptUpdated": "System Prompt Updated",
|
|
398
|
+
"layout.toolsUpdated": "Tools Updated",
|
|
399
|
+
"layout.systemPromptAndToolsUpdated": "System Prompt and Tools Updated",
|
|
400
|
+
"layout.compactionInterrupted": "Compaction was interrupted before completion."
|
|
81
401
|
};
|
|
82
402
|
//#endregion
|
|
83
403
|
//#region lib/types/client/trajectory-definition-common.js
|
|
@@ -101,7 +421,185 @@ window.__ModuleLoader__.load({
|
|
|
101
421
|
};
|
|
102
422
|
}
|
|
103
423
|
//#endregion
|
|
424
|
+
//#region lib/types/client/trajectory-event-projection.js
|
|
425
|
+
/** Trajectory-owned conversion from durable Session events to ledger view data. */
|
|
426
|
+
function asRecord(value) {
|
|
427
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
428
|
+
}
|
|
429
|
+
function readString(record, key) {
|
|
430
|
+
const value = record[key];
|
|
431
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
432
|
+
}
|
|
433
|
+
function collect(source, member, field) {
|
|
434
|
+
const list = source[member];
|
|
435
|
+
if (!Array.isArray(list)) return [];
|
|
436
|
+
const seen = [];
|
|
437
|
+
for (const entry of list) {
|
|
438
|
+
const record = asRecord(entry);
|
|
439
|
+
const value = record === null ? null : readString(record, field);
|
|
440
|
+
if (value !== null && !seen.includes(value)) seen.push(value);
|
|
441
|
+
}
|
|
442
|
+
return seen;
|
|
443
|
+
}
|
|
444
|
+
function joined(names) {
|
|
445
|
+
return names.length > 0 ? names.join(", ") : null;
|
|
446
|
+
}
|
|
447
|
+
/** Forms Trajectory presents structurally; unknown merge-extensible values remain opaque. */
|
|
448
|
+
const KNOWN_FORMS = [
|
|
449
|
+
"instructions",
|
|
450
|
+
"catalog",
|
|
451
|
+
"snapshot",
|
|
452
|
+
"notice",
|
|
453
|
+
"relay",
|
|
454
|
+
"recall"
|
|
455
|
+
];
|
|
456
|
+
/**
|
|
457
|
+
* Read the target-supported presentation form from a durable message source.
|
|
458
|
+
* @param source - Logged `user/message` source.
|
|
459
|
+
* @returns Supported form, or null for the opaque presentation.
|
|
460
|
+
*/
|
|
461
|
+
function contextForm(source) {
|
|
462
|
+
const record = asRecord(source);
|
|
463
|
+
const form = record === null ? null : readString(record, "form");
|
|
464
|
+
return form !== null && KNOWN_FORMS.includes(form) ? form : null;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Project a durable message source to the Trajectory row's role and producer label.
|
|
468
|
+
* @param source - Logged `user/message` source.
|
|
469
|
+
* @returns Role and label rendered by Trajectory.
|
|
470
|
+
*/
|
|
471
|
+
function contextProvenance(source) {
|
|
472
|
+
const record = asRecord(source);
|
|
473
|
+
const kind = record === null ? null : readString(record, "kind");
|
|
474
|
+
if (record === null || kind === null) return {
|
|
475
|
+
role: "inject",
|
|
476
|
+
label: null
|
|
477
|
+
};
|
|
478
|
+
switch (kind) {
|
|
479
|
+
case "session-reference": return {
|
|
480
|
+
role: "recall",
|
|
481
|
+
label: joined(collect(record, "references", "label")) ?? kind
|
|
482
|
+
};
|
|
483
|
+
case "agent-instructions": return {
|
|
484
|
+
role: "inject",
|
|
485
|
+
label: joined(collect(record, "changes", "path")) ?? kind
|
|
486
|
+
};
|
|
487
|
+
case "plugin": return {
|
|
488
|
+
role: "inject",
|
|
489
|
+
label: readString(record, "plugin") ?? kind
|
|
490
|
+
};
|
|
491
|
+
case "skill-invocation": return {
|
|
492
|
+
role: "inject",
|
|
493
|
+
label: readString(record, "name") ?? kind
|
|
494
|
+
};
|
|
495
|
+
default: return {
|
|
496
|
+
role: "inject",
|
|
497
|
+
label: kind
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Classify finalized Assistant content for Trajectory rendering.
|
|
503
|
+
* @param content - Core content blocks.
|
|
504
|
+
* @returns Trajectory blocks in source order.
|
|
505
|
+
*/
|
|
506
|
+
function toAssistantBlocks(content) {
|
|
507
|
+
return content.map(toAssistantBlock);
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Classify one finalized Assistant block for Trajectory rendering.
|
|
511
|
+
* @param block - Core content block.
|
|
512
|
+
* @returns Trajectory block.
|
|
513
|
+
*/
|
|
514
|
+
function toAssistantBlock(block) {
|
|
515
|
+
switch (block.type) {
|
|
516
|
+
case "text": return {
|
|
517
|
+
kind: "text",
|
|
518
|
+
text: block.text
|
|
519
|
+
};
|
|
520
|
+
case "reasoning": return {
|
|
521
|
+
kind: "reasoning",
|
|
522
|
+
text: block.text
|
|
523
|
+
};
|
|
524
|
+
case "image": return {
|
|
525
|
+
kind: "image",
|
|
526
|
+
attachment: block.attachment
|
|
527
|
+
};
|
|
528
|
+
case "tool-call": return {
|
|
529
|
+
kind: "tool-call",
|
|
530
|
+
callId: String(block.id),
|
|
531
|
+
name: block.name,
|
|
532
|
+
argsRaw: block.arguments
|
|
533
|
+
};
|
|
534
|
+
default: return {
|
|
535
|
+
kind: "other",
|
|
536
|
+
block
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Create the initial Trajectory block for one streamed Assistant block kind.
|
|
542
|
+
* @param blockType - Wire block kind.
|
|
543
|
+
* @returns Empty block ready to receive deltas.
|
|
544
|
+
*/
|
|
545
|
+
function emptyAssistantBlock(blockType) {
|
|
546
|
+
switch (blockType) {
|
|
547
|
+
case "text": return {
|
|
548
|
+
kind: "text",
|
|
549
|
+
text: ""
|
|
550
|
+
};
|
|
551
|
+
case "reasoning": return {
|
|
552
|
+
kind: "reasoning",
|
|
553
|
+
text: ""
|
|
554
|
+
};
|
|
555
|
+
case "tool-call": return {
|
|
556
|
+
kind: "tool-call",
|
|
557
|
+
callId: "",
|
|
558
|
+
name: "",
|
|
559
|
+
argsRaw: ""
|
|
560
|
+
};
|
|
561
|
+
default: return {
|
|
562
|
+
kind: "other",
|
|
563
|
+
block: null
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Convert a durable failure to locale-independent fields safe for Trajectory.
|
|
569
|
+
* @param failure - Failure preserved by a Session event.
|
|
570
|
+
* @returns Sanitized message and optional stable provider code.
|
|
571
|
+
*/
|
|
572
|
+
function displayFailure(failure) {
|
|
573
|
+
if (failure === null || typeof failure !== "object") return { message: String(failure) };
|
|
574
|
+
const record = failure;
|
|
575
|
+
const code = typeof record.code === "string" ? record.code : void 0;
|
|
576
|
+
if (code === "AUTH") return {
|
|
577
|
+
code,
|
|
578
|
+
message: ""
|
|
579
|
+
};
|
|
580
|
+
return {
|
|
581
|
+
...code === void 0 ? {} : { code },
|
|
582
|
+
message: typeof record.message === "string" ? record.message : JSON.stringify(failure)
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Whether a stream chunk carries visible model output for Trajectory timing.
|
|
587
|
+
* @param chunk - Stream chunk to inspect.
|
|
588
|
+
* @returns true for a non-empty text, reasoning, or Tool-call delta.
|
|
589
|
+
*/
|
|
590
|
+
function isTokenDelta(chunk) {
|
|
591
|
+
switch (chunk.type) {
|
|
592
|
+
case "text-delta":
|
|
593
|
+
case "reasoning-delta": return chunk.text !== "";
|
|
594
|
+
case "tool-call-delta": return chunk.argumentsDelta !== "" || chunk.name !== void 0;
|
|
595
|
+
default: return false;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
//#endregion
|
|
104
599
|
//#region lib/types/client/trajectory-assistant-definition.js
|
|
600
|
+
function isChunkRunEvent(event) {
|
|
601
|
+
return event.type === "chunkrow/text-chunks" || event.type === "chunkrow/reasoning-chunks" || event.type === "chunkrow/tool-call-chunks";
|
|
602
|
+
}
|
|
105
603
|
function initialState(turn, step, startSeq, startTime, started) {
|
|
106
604
|
return {
|
|
107
605
|
turn,
|
|
@@ -111,6 +609,7 @@ window.__ModuleLoader__.load({
|
|
|
111
609
|
started,
|
|
112
610
|
sawChunk: false,
|
|
113
611
|
blocks: [],
|
|
612
|
+
visibleBlocks: 0,
|
|
114
613
|
firstVisibleSeq: void 0,
|
|
115
614
|
firstVisibleTime: void 0,
|
|
116
615
|
firstTokenTime: void 0,
|
|
@@ -123,12 +622,15 @@ window.__ModuleLoader__.load({
|
|
|
123
622
|
function compactBlocks(blocks) {
|
|
124
623
|
return blocks.filter((block) => block !== void 0);
|
|
125
624
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
625
|
+
function blockIsVisible(block) {
|
|
626
|
+
if (block === void 0 || block.kind === "tool-call") return false;
|
|
627
|
+
if (block.kind === "text" || block.kind === "reasoning") return block.text.trim() !== "";
|
|
628
|
+
return true;
|
|
629
|
+
}
|
|
630
|
+
function countVisibleBlocks(blocks) {
|
|
631
|
+
let count = 0;
|
|
632
|
+
for (const block of blocks) if (blockIsVisible(block)) count++;
|
|
633
|
+
return count;
|
|
132
634
|
}
|
|
133
635
|
function hasInterruptionEvidence(blocks) {
|
|
134
636
|
return blocks.some((block) => {
|
|
@@ -154,12 +656,18 @@ window.__ModuleLoader__.load({
|
|
|
154
656
|
usage: addUsage$1(state.usage, chunk.usage)
|
|
155
657
|
};
|
|
156
658
|
const blocks = [...state.blocks];
|
|
659
|
+
let changedIndex = -1;
|
|
660
|
+
let previousVisible = false;
|
|
157
661
|
switch (chunk.type) {
|
|
158
662
|
case "block-start":
|
|
159
|
-
|
|
663
|
+
changedIndex = chunk.index;
|
|
664
|
+
previousVisible = blockIsVisible(blocks[chunk.index]);
|
|
665
|
+
blocks[chunk.index] = emptyAssistantBlock(chunk.blockType);
|
|
160
666
|
break;
|
|
161
667
|
case "text-delta": {
|
|
162
668
|
const previous = blocks[chunk.index];
|
|
669
|
+
changedIndex = chunk.index;
|
|
670
|
+
previousVisible = blockIsVisible(previous);
|
|
163
671
|
blocks[chunk.index] = {
|
|
164
672
|
kind: "text",
|
|
165
673
|
text: (previous?.kind === "text" ? previous.text : "") + chunk.text
|
|
@@ -168,6 +676,8 @@ window.__ModuleLoader__.load({
|
|
|
168
676
|
}
|
|
169
677
|
case "reasoning-delta": {
|
|
170
678
|
const previous = blocks[chunk.index];
|
|
679
|
+
changedIndex = chunk.index;
|
|
680
|
+
previousVisible = blockIsVisible(previous);
|
|
171
681
|
blocks[chunk.index] = {
|
|
172
682
|
kind: "reasoning",
|
|
173
683
|
text: (previous?.kind === "reasoning" ? previous.text : "") + chunk.text
|
|
@@ -176,6 +686,8 @@ window.__ModuleLoader__.load({
|
|
|
176
686
|
}
|
|
177
687
|
case "tool-call-delta": {
|
|
178
688
|
const previous = blocks[chunk.index];
|
|
689
|
+
changedIndex = chunk.index;
|
|
690
|
+
previousVisible = blockIsVisible(previous);
|
|
179
691
|
const base = previous?.kind === "tool-call" ? previous : {
|
|
180
692
|
kind: "tool-call",
|
|
181
693
|
callId: "",
|
|
@@ -191,23 +703,94 @@ window.__ModuleLoader__.load({
|
|
|
191
703
|
break;
|
|
192
704
|
}
|
|
193
705
|
case "block-end":
|
|
194
|
-
|
|
706
|
+
changedIndex = chunk.index;
|
|
707
|
+
previousVisible = blockIsVisible(blocks[chunk.index]);
|
|
708
|
+
blocks[chunk.index] = toAssistantBlock(chunk.block);
|
|
195
709
|
break;
|
|
196
710
|
default: return {
|
|
197
711
|
...state,
|
|
198
712
|
sawChunk: true
|
|
199
713
|
};
|
|
200
714
|
}
|
|
201
|
-
const
|
|
715
|
+
const visibleBlocks = state.visibleBlocks - Number(previousVisible) + Number(blockIsVisible(blocks[changedIndex]));
|
|
202
716
|
return {
|
|
203
717
|
...state,
|
|
204
718
|
sawChunk: true,
|
|
205
719
|
blocks,
|
|
206
|
-
|
|
720
|
+
visibleBlocks,
|
|
721
|
+
...visibleBlocks > 0 && state.firstVisibleSeq === void 0 ? {
|
|
207
722
|
firstVisibleSeq: match.event.seq,
|
|
208
723
|
firstVisibleTime: match.event.time
|
|
209
724
|
} : {},
|
|
210
|
-
...
|
|
725
|
+
...isTokenDelta(chunk) && state.firstTokenTime === void 0 ? { firstTokenTime: match.event.time } : {}
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
function chunkRunBoundaries(event, needsToken, needsVisible, visibleFromStart) {
|
|
729
|
+
const fragments = event.type === "chunkrow/tool-call-chunks" ? event.data.args : event.data.texts;
|
|
730
|
+
const nameStartsToken = event.type === "chunkrow/tool-call-chunks" && Object.hasOwn(event.data, "name");
|
|
731
|
+
let firstTokenTime;
|
|
732
|
+
let firstVisible;
|
|
733
|
+
let time = event.time;
|
|
734
|
+
for (let index = 0; index < fragments.length; index++) {
|
|
735
|
+
const fragment = fragments[index];
|
|
736
|
+
if (needsToken && firstTokenTime === void 0 && (nameStartsToken || fragment !== "")) firstTokenTime = time;
|
|
737
|
+
if (needsVisible && firstVisible === void 0 && (visibleFromStart || event.type !== "chunkrow/tool-call-chunks" && fragment.trim() !== "")) firstVisible = {
|
|
738
|
+
seq: event.seq + index,
|
|
739
|
+
time
|
|
740
|
+
};
|
|
741
|
+
if ((!needsToken || firstTokenTime !== void 0) && (!needsVisible || firstVisible !== void 0)) break;
|
|
742
|
+
time += event.data.dt[index] ?? 0;
|
|
743
|
+
}
|
|
744
|
+
return {
|
|
745
|
+
firstTokenTime,
|
|
746
|
+
firstVisible
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
function updateChunkRun(state, event) {
|
|
750
|
+
const blocks = [...state.blocks];
|
|
751
|
+
const previous = blocks[event.data.index];
|
|
752
|
+
const previousVisible = blockIsVisible(previous);
|
|
753
|
+
let visibleFromStart = state.visibleBlocks - Number(previousVisible) > 0;
|
|
754
|
+
if (event.type === "chunkrow/text-chunks") {
|
|
755
|
+
const text = previous?.kind === "text" ? previous.text : "";
|
|
756
|
+
visibleFromStart ||= text.trim() !== "";
|
|
757
|
+
blocks[event.data.index] = {
|
|
758
|
+
kind: "text",
|
|
759
|
+
text: text + event.data.texts.join("")
|
|
760
|
+
};
|
|
761
|
+
} else if (event.type === "chunkrow/reasoning-chunks") {
|
|
762
|
+
const text = previous?.kind === "reasoning" ? previous.text : "";
|
|
763
|
+
visibleFromStart ||= text.trim() !== "";
|
|
764
|
+
blocks[event.data.index] = {
|
|
765
|
+
kind: "reasoning",
|
|
766
|
+
text: text + event.data.texts.join("")
|
|
767
|
+
};
|
|
768
|
+
} else {
|
|
769
|
+
const base = previous?.kind === "tool-call" ? previous : {
|
|
770
|
+
kind: "tool-call",
|
|
771
|
+
callId: "",
|
|
772
|
+
name: "",
|
|
773
|
+
argsRaw: ""
|
|
774
|
+
};
|
|
775
|
+
blocks[event.data.index] = {
|
|
776
|
+
kind: "tool-call",
|
|
777
|
+
callId: base.callId || String(event.data.id),
|
|
778
|
+
name: Object.hasOwn(event.data, "name") ? event.data.name : base.name,
|
|
779
|
+
argsRaw: base.argsRaw + event.data.args.join("")
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
const boundaries = chunkRunBoundaries(event, state.firstTokenTime === void 0, state.firstVisibleSeq === void 0, visibleFromStart);
|
|
783
|
+
const visibleBlocks = state.visibleBlocks - Number(previousVisible) + Number(blockIsVisible(blocks[event.data.index]));
|
|
784
|
+
return {
|
|
785
|
+
...state,
|
|
786
|
+
sawChunk: true,
|
|
787
|
+
blocks,
|
|
788
|
+
visibleBlocks,
|
|
789
|
+
...boundaries.firstVisible === void 0 ? {} : {
|
|
790
|
+
firstVisibleSeq: boundaries.firstVisible.seq,
|
|
791
|
+
firstVisibleTime: boundaries.firstVisible.time
|
|
792
|
+
},
|
|
793
|
+
...boundaries.firstTokenTime === void 0 ? {} : { firstTokenTime: boundaries.firstTokenTime }
|
|
211
794
|
};
|
|
212
795
|
}
|
|
213
796
|
function closedBoundary(context) {
|
|
@@ -219,15 +802,22 @@ window.__ModuleLoader__.load({
|
|
|
219
802
|
function fallbackState$1(context) {
|
|
220
803
|
let state;
|
|
221
804
|
for (const match of context.matches) {
|
|
805
|
+
if (isChunkRunEvent(match.event)) {
|
|
806
|
+
state ??= initialState(match.event.data.turn, match.event.data.step, match.event.seq, match.event.time, false);
|
|
807
|
+
state = updateChunkRun(state, match.event);
|
|
808
|
+
continue;
|
|
809
|
+
}
|
|
222
810
|
const event = match.event;
|
|
223
811
|
if (event.type === "assistant/chunk") {
|
|
224
812
|
state ??= initialState(event.data.turn, event.data.step, event.seq, event.time, false);
|
|
225
813
|
state = updateChunk(state, match);
|
|
226
814
|
} else if (event.type === "assistant/message") {
|
|
227
815
|
state ??= initialState(event.data.turn, event.data.step, event.seq, event.time, false);
|
|
816
|
+
const blocks = toAssistantBlocks(event.data.message.content);
|
|
228
817
|
state = {
|
|
229
818
|
...state,
|
|
230
|
-
blocks
|
|
819
|
+
blocks,
|
|
820
|
+
visibleBlocks: countVisibleBlocks(blocks),
|
|
231
821
|
final: match,
|
|
232
822
|
usage: state.usage ?? event.data.usage
|
|
233
823
|
};
|
|
@@ -249,7 +839,7 @@ window.__ModuleLoader__.load({
|
|
|
249
839
|
time: event.time,
|
|
250
840
|
turn: state.turn,
|
|
251
841
|
step: state.step,
|
|
252
|
-
blocks:
|
|
842
|
+
blocks: toAssistantBlocks(event.data.message.content),
|
|
253
843
|
usage: event.data.usage,
|
|
254
844
|
provenance: {
|
|
255
845
|
provider: event.data.message.source.provider,
|
|
@@ -264,8 +854,9 @@ window.__ModuleLoader__.load({
|
|
|
264
854
|
};
|
|
265
855
|
}
|
|
266
856
|
const boundary = closedBoundary(context);
|
|
857
|
+
if (boundary === void 0) return void 0;
|
|
267
858
|
const blocks = compactBlocks(state.blocks);
|
|
268
|
-
if (
|
|
859
|
+
if (!hasInterruptionEvidence(blocks)) return void 0;
|
|
269
860
|
return {
|
|
270
861
|
kind: "assistant",
|
|
271
862
|
seq: boundary.seq - .9,
|
|
@@ -289,6 +880,7 @@ window.__ModuleLoader__.load({
|
|
|
289
880
|
status,
|
|
290
881
|
...state.retry === void 0 ? {} : {
|
|
291
882
|
error: state.retry.message,
|
|
883
|
+
...state.retry.code === void 0 ? {} : { errorCode: state.retry.code },
|
|
292
884
|
retry: state.retry.retry,
|
|
293
885
|
...state.retry.maxRetries === void 0 ? {} : { maxRetries: state.retry.maxRetries },
|
|
294
886
|
retryDelayMs: state.retry.delayMs
|
|
@@ -313,6 +905,10 @@ window.__ModuleLoader__.load({
|
|
|
313
905
|
id: `${event.data.turn}:${event.data.step}`,
|
|
314
906
|
role: "update"
|
|
315
907
|
};
|
|
908
|
+
if (isChunkRunEvent(event)) return {
|
|
909
|
+
id: `${event.data.turn}:${event.data.step}`,
|
|
910
|
+
role: "update"
|
|
911
|
+
};
|
|
316
912
|
return null;
|
|
317
913
|
},
|
|
318
914
|
start: (_context, match) => {
|
|
@@ -320,25 +916,32 @@ window.__ModuleLoader__.load({
|
|
|
320
916
|
return initialState(match.event.data.turn, match.event.data.step, match.event.seq, match.event.time, true);
|
|
321
917
|
},
|
|
322
918
|
update: (context, match) => {
|
|
919
|
+
if (isChunkRunEvent(match.event)) return updateChunkRun(context.state, match.event);
|
|
323
920
|
if (match.event.type === "assistant/chunk") return updateChunk(context.state, match);
|
|
324
|
-
if (match.event.type === "assistant/message")
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
921
|
+
if (match.event.type === "assistant/message") {
|
|
922
|
+
const blocks = toAssistantBlocks(match.event.data.message.content);
|
|
923
|
+
return {
|
|
924
|
+
...context.state,
|
|
925
|
+
blocks,
|
|
926
|
+
visibleBlocks: countVisibleBlocks(blocks),
|
|
927
|
+
final: match,
|
|
928
|
+
usage: context.state.usage ?? match.event.data.usage
|
|
929
|
+
};
|
|
930
|
+
}
|
|
330
931
|
if (match.event.type === "step/end") return {
|
|
331
932
|
...context.state,
|
|
332
933
|
stepEnd: match
|
|
333
934
|
};
|
|
334
935
|
if (match.event.type !== "llm/retry") return context.state;
|
|
335
936
|
const data = match.event.data;
|
|
937
|
+
const failure = displayFailure(data.failure);
|
|
336
938
|
return {
|
|
337
939
|
...initialState(context.state.turn, context.state.step, context.state.startSeq, context.state.startTime, true),
|
|
338
940
|
firstTokenTime: context.state.firstTokenTime,
|
|
339
941
|
usage: context.state.usage,
|
|
340
942
|
retry: {
|
|
341
|
-
message:
|
|
943
|
+
message: failure.message,
|
|
944
|
+
...failure.code === void 0 ? {} : { code: failure.code },
|
|
342
945
|
retry: data.retry,
|
|
343
946
|
...data.mode === "normal" ? { maxRetries: data.maxRetries } : {},
|
|
344
947
|
delayMs: data.delayMs
|
|
@@ -347,6 +950,7 @@ window.__ModuleLoader__.load({
|
|
|
347
950
|
},
|
|
348
951
|
publication: (match) => {
|
|
349
952
|
if (match.event.type === "step/start") return "none";
|
|
953
|
+
if (isChunkRunEvent(match.event)) return "animation-frame";
|
|
350
954
|
if (match.event.type !== "assistant/chunk") return "immediate";
|
|
351
955
|
const type = match.event.data.chunk.type;
|
|
352
956
|
return type === "usage" || type === "finish" ? "none" : "animation-frame";
|
|
@@ -381,11 +985,15 @@ window.__ModuleLoader__.load({
|
|
|
381
985
|
start: (_context, match) => {
|
|
382
986
|
if (match.event.type !== "turn/end") throw new Error("trajectory-turn-end start requires turn/end");
|
|
383
987
|
const reason = match.event.data.reason;
|
|
988
|
+
const failure = reason.kind === "error" ? displayFailure(reason.error) : void 0;
|
|
384
989
|
return {
|
|
385
990
|
turn: match.event.data.turn,
|
|
386
991
|
seq: match.event.seq,
|
|
387
992
|
time: match.event.time,
|
|
388
|
-
...
|
|
993
|
+
...failure === void 0 ? {} : {
|
|
994
|
+
error: failure.message,
|
|
995
|
+
...failure.code === void 0 ? {} : { errorCode: failure.code }
|
|
996
|
+
}
|
|
389
997
|
};
|
|
390
998
|
},
|
|
391
999
|
update: (context) => context.state,
|
|
@@ -393,7 +1001,8 @@ window.__ModuleLoader__.load({
|
|
|
393
1001
|
kind: "turn-end",
|
|
394
1002
|
turn: context.state.turn,
|
|
395
1003
|
time: context.state.time,
|
|
396
|
-
...context.state.error === void 0 ? {} : { error: context.state.error }
|
|
1004
|
+
...context.state.error === void 0 ? {} : { error: context.state.error },
|
|
1005
|
+
...context.state.errorCode === void 0 ? {} : { errorCode: context.state.errorCode }
|
|
397
1006
|
})
|
|
398
1007
|
};
|
|
399
1008
|
/**
|
|
@@ -402,8 +1011,8 @@ window.__ModuleLoader__.load({
|
|
|
402
1011
|
* @param ctx - Plugin context receiving the Definitions.
|
|
403
1012
|
*/
|
|
404
1013
|
function registerTrajectoryAssistantDefinition(ctx) {
|
|
405
|
-
ctx.
|
|
406
|
-
ctx.
|
|
1014
|
+
ctx.uiConversation.events.register(trajectoryAssistantDefinition);
|
|
1015
|
+
ctx.uiConversation.events.register(trajectoryTurnEndDefinition);
|
|
407
1016
|
}
|
|
408
1017
|
//#endregion
|
|
409
1018
|
//#region lib/types/client/trajectory-compaction-definition.js
|
|
@@ -517,28 +1126,78 @@ window.__ModuleLoader__.load({
|
|
|
517
1126
|
* @param ctx - Plugin context receiving the Definitions.
|
|
518
1127
|
*/
|
|
519
1128
|
function registerTrajectoryCompactionDefinitions(ctx) {
|
|
520
|
-
ctx.
|
|
521
|
-
ctx.
|
|
1129
|
+
ctx.uiConversation.events.register(trajectoryCompactionDefinition);
|
|
1130
|
+
ctx.uiConversation.events.register(trajectorySessionEndDefinition);
|
|
522
1131
|
}
|
|
523
1132
|
//#endregion
|
|
524
1133
|
//#region lib/types/client/trajectory-message-definitions.js
|
|
1134
|
+
const EMPTY_PENDING = {
|
|
1135
|
+
kind: "snapshot",
|
|
1136
|
+
ids: []
|
|
1137
|
+
};
|
|
1138
|
+
const EMPTY_CURRENT_CLAIMED = /* @__PURE__ */ new Set();
|
|
1139
|
+
function materializePending(state) {
|
|
1140
|
+
const splices = [];
|
|
1141
|
+
let current = state;
|
|
1142
|
+
while (current.kind === "splice") {
|
|
1143
|
+
splices.push(current);
|
|
1144
|
+
current = current.previous;
|
|
1145
|
+
}
|
|
1146
|
+
const pending = [...current.ids];
|
|
1147
|
+
for (const splice of splices.reverse()) pending.splice(splice.start, splice.removedCount, ...splice.inserted);
|
|
1148
|
+
return pending;
|
|
1149
|
+
}
|
|
1150
|
+
function withoutInserted(claimed, inserted) {
|
|
1151
|
+
let next;
|
|
1152
|
+
for (const id of inserted) {
|
|
1153
|
+
if (!claimed.has(id)) continue;
|
|
1154
|
+
next ??= new Set(claimed);
|
|
1155
|
+
next.delete(id);
|
|
1156
|
+
}
|
|
1157
|
+
return next ?? claimed;
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Apply one next-step splice under the AgentLoop's durable event ordering.
|
|
1161
|
+
* An entered claim logs its complete message batch before another claim; a
|
|
1162
|
+
* rejected claim logs no messages, so only the current claim can classify a
|
|
1163
|
+
* later `user/message`.
|
|
1164
|
+
*/
|
|
525
1165
|
function applySplice(previous, splice) {
|
|
526
|
-
const
|
|
527
|
-
const
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
1166
|
+
const priorPending = previous?.state.pending ?? EMPTY_PENDING;
|
|
1167
|
+
const inserted = splice.inserted.map((identity) => identity.id);
|
|
1168
|
+
const removedCount = splice.removedCount ?? 0;
|
|
1169
|
+
if (removedCount > 0 && splice.outcome !== "canceled") {
|
|
1170
|
+
const pending = materializePending(priorPending);
|
|
1171
|
+
const removed = pending.splice(splice.start, removedCount, ...inserted);
|
|
1172
|
+
return {
|
|
1173
|
+
pending: {
|
|
1174
|
+
kind: "snapshot",
|
|
1175
|
+
ids: pending
|
|
1176
|
+
},
|
|
1177
|
+
currentClaimed: new Set(removed)
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
const currentClaimed = withoutInserted(previous?.state.currentClaimed ?? EMPTY_CURRENT_CLAIMED, inserted);
|
|
531
1181
|
return {
|
|
532
|
-
pending
|
|
533
|
-
|
|
1182
|
+
pending: {
|
|
1183
|
+
kind: "splice",
|
|
1184
|
+
previous: priorPending,
|
|
1185
|
+
start: splice.start,
|
|
1186
|
+
removedCount,
|
|
1187
|
+
inserted
|
|
1188
|
+
},
|
|
1189
|
+
currentClaimed
|
|
534
1190
|
};
|
|
535
1191
|
}
|
|
536
1192
|
const trajectoryInboxDefinition = {
|
|
537
1193
|
kind: "trajectory-inbox-next-step",
|
|
538
|
-
match: (event) =>
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
1194
|
+
match: (event) => {
|
|
1195
|
+
if (event.type === "agent/inbox/spliced" && event.data.target === "next-step") return {
|
|
1196
|
+
id: String(event.seq),
|
|
1197
|
+
role: "start"
|
|
1198
|
+
};
|
|
1199
|
+
return null;
|
|
1200
|
+
},
|
|
542
1201
|
start: (_context, match, reader) => {
|
|
543
1202
|
if (match.event.type !== "agent/inbox/spliced") throw new Error("trajectory-inbox-next-step start requires agent/inbox/spliced");
|
|
544
1203
|
return applySplice(reader.previous("trajectory-inbox-next-step"), match.event.data);
|
|
@@ -562,10 +1221,10 @@ window.__ModuleLoader__.load({
|
|
|
562
1221
|
time: event.time,
|
|
563
1222
|
content: event.data.content,
|
|
564
1223
|
source: event.data.source,
|
|
565
|
-
provenance:
|
|
566
|
-
form:
|
|
1224
|
+
provenance: contextProvenance(event.data.source),
|
|
1225
|
+
form: contextForm(event.data.source)
|
|
567
1226
|
};
|
|
568
|
-
return reader.previous("trajectory-inbox-next-step")?.state.
|
|
1227
|
+
return reader.previous("trajectory-inbox-next-step")?.state.currentClaimed.has(String(event.data.id)) === true ? {
|
|
569
1228
|
kind: "steering",
|
|
570
1229
|
messageId: event.data.id,
|
|
571
1230
|
seq: event.seq,
|
|
@@ -592,68 +1251,58 @@ window.__ModuleLoader__.load({
|
|
|
592
1251
|
* @param ctx - Plugin context receiving the Definitions.
|
|
593
1252
|
*/
|
|
594
1253
|
function registerTrajectoryMessageDefinitions(ctx) {
|
|
595
|
-
ctx.
|
|
596
|
-
ctx.
|
|
1254
|
+
ctx.uiConversation.events.register(trajectoryInboxDefinition);
|
|
1255
|
+
ctx.uiConversation.events.register(trajectoryMessageDefinition);
|
|
597
1256
|
}
|
|
598
1257
|
//#endregion
|
|
599
1258
|
//#region lib/types/client/trajectory-request-header-definition.js
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
tools: Array.isArray(tools) ? tools : []
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
function promptChange(previous, prompt, match) {
|
|
611
|
-
if (match.event.type !== "request/header") return void 0;
|
|
612
|
-
if (previous === void 0 && match.event.data.reason !== "initial") return void 0;
|
|
613
|
-
const systemChanged = previous !== void 0 && previous.system !== prompt.system;
|
|
614
|
-
const toolsChanged = previous !== void 0 && JSON.stringify(previous.tools) !== JSON.stringify(prompt.tools);
|
|
615
|
-
if (previous !== void 0 && !systemChanged && !toolsChanged) return void 0;
|
|
1259
|
+
/**
|
|
1260
|
+
* Request-header fact Definition for the Trajectory target.
|
|
1261
|
+
* @param inspect - the shared prompt interpretation, supplied by the
|
|
1262
|
+
* uiConversation service (a client bundle cannot value-import it).
|
|
1263
|
+
* @returns the Trajectory request-header Definition.
|
|
1264
|
+
*/
|
|
1265
|
+
function trajectoryRequestHeaderDefinition(inspect) {
|
|
616
1266
|
return {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
1267
|
+
kind: "trajectory-request-header",
|
|
1268
|
+
target: "trajectory",
|
|
1269
|
+
match: (event) => event.type === "request/header" ? {
|
|
1270
|
+
id: String(event.seq),
|
|
1271
|
+
role: "start"
|
|
1272
|
+
} : null,
|
|
1273
|
+
start: (_context, match, reader) => {
|
|
1274
|
+
if (match.event.type !== "request/header") throw new Error("trajectory-request-header start requires request/header");
|
|
1275
|
+
const previous = reader.previous("trajectory-request-header")?.state.prompt;
|
|
1276
|
+
const { prompt, change } = inspect(previous, match.event);
|
|
1277
|
+
return {
|
|
1278
|
+
seq: match.event.seq,
|
|
1279
|
+
time: match.event.time,
|
|
1280
|
+
prompt,
|
|
1281
|
+
location: match.location,
|
|
1282
|
+
...change === void 0 ? {} : { change }
|
|
1283
|
+
};
|
|
1284
|
+
},
|
|
1285
|
+
update: (context) => context.state,
|
|
1286
|
+
buildViewNode: (context) => context.state === void 0 ? null : trajectoryNode(context, context.state.seq, {
|
|
1287
|
+
kind: "request-header",
|
|
1288
|
+
header: context.state
|
|
1289
|
+
})
|
|
621
1290
|
};
|
|
622
1291
|
}
|
|
623
|
-
const trajectoryRequestHeaderDefinition = {
|
|
624
|
-
kind: "trajectory-request-header",
|
|
625
|
-
target: "trajectory",
|
|
626
|
-
match: (event) => event.type === "request/header" ? {
|
|
627
|
-
id: String(event.seq),
|
|
628
|
-
role: "start"
|
|
629
|
-
} : null,
|
|
630
|
-
start: (_context, match, reader) => {
|
|
631
|
-
const prompt = requestPrompt(match);
|
|
632
|
-
const previous = reader.previous("trajectory-request-header")?.state.prompt;
|
|
633
|
-
const change = promptChange(previous, prompt, match);
|
|
634
|
-
return {
|
|
635
|
-
seq: match.event.seq,
|
|
636
|
-
time: match.event.time,
|
|
637
|
-
prompt,
|
|
638
|
-
location: match.location,
|
|
639
|
-
...change === void 0 ? {} : { change }
|
|
640
|
-
};
|
|
641
|
-
},
|
|
642
|
-
update: (context) => context.state,
|
|
643
|
-
buildViewNode: (context) => context.state === void 0 ? null : trajectoryNode(context, context.state.seq, {
|
|
644
|
-
kind: "request-header",
|
|
645
|
-
header: context.state
|
|
646
|
-
})
|
|
647
|
-
};
|
|
648
1292
|
/**
|
|
649
1293
|
* Register Trajectory request-header facts.
|
|
650
1294
|
*
|
|
651
1295
|
* @param ctx - Plugin context receiving the Definition.
|
|
652
1296
|
*/
|
|
653
1297
|
function registerTrajectoryRequestHeaderDefinition(ctx) {
|
|
654
|
-
ctx.
|
|
1298
|
+
ctx.uiConversation.events.register(trajectoryRequestHeaderDefinition((previous, event) => ctx.uiConversation.inspectRequestPrompt(previous, event)));
|
|
655
1299
|
}
|
|
656
1300
|
//#endregion
|
|
1301
|
+
//#region lib/types/client/copy-codes.js
|
|
1302
|
+
/** Stable non-display markers for client-synthesized trajectory copy. */
|
|
1303
|
+
/** Error marker localized only when the trajectory renders it. */
|
|
1304
|
+
const COMPACTION_INTERRUPTED_ERROR = "trajectory.compaction-interrupted";
|
|
1305
|
+
//#endregion
|
|
657
1306
|
//#region lib/types/client/trajectory-snapshot-builder.js
|
|
658
1307
|
const EMPTY_LIST = [];
|
|
659
1308
|
/** Stable empty target used until a Session has assembled Trajectory records. */
|
|
@@ -673,13 +1322,16 @@ window.__ModuleLoader__.load({
|
|
|
673
1322
|
return location.kind === "step" ? stepKey(location.turn.turn, location.step.step) : void 0;
|
|
674
1323
|
}
|
|
675
1324
|
function headerFor(request, headersByStep, previous) {
|
|
676
|
-
return headersByStep.get(stepKey(request.turn, request.step)) ?? (previous !== void 0 && previous.seq < request.startSeq ?
|
|
1325
|
+
return headersByStep.get(stepKey(request.turn, request.step)) ?? (previous !== void 0 && previous.seq < request.startSeq ? {
|
|
1326
|
+
latest: previous,
|
|
1327
|
+
...previous.change === void 0 ? {} : { change: previous.change }
|
|
1328
|
+
} : void 0);
|
|
677
1329
|
}
|
|
678
1330
|
function applyHeader(request, header, includeChange) {
|
|
679
1331
|
return header === void 0 ? request : {
|
|
680
1332
|
...request,
|
|
681
|
-
prompt: header.prompt,
|
|
682
|
-
requestConfig: header.prompt.config,
|
|
1333
|
+
prompt: header.latest.prompt,
|
|
1334
|
+
requestConfig: header.latest.prompt.config,
|
|
683
1335
|
...includeChange && header.change !== void 0 ? { promptChange: header.change } : {}
|
|
684
1336
|
};
|
|
685
1337
|
}
|
|
@@ -717,7 +1369,7 @@ window.__ModuleLoader__.load({
|
|
|
717
1369
|
...request,
|
|
718
1370
|
completedAt: boundary.time,
|
|
719
1371
|
status: "error",
|
|
720
|
-
error:
|
|
1372
|
+
error: COMPACTION_INTERRUPTED_ERROR
|
|
721
1373
|
};
|
|
722
1374
|
}
|
|
723
1375
|
}
|
|
@@ -734,7 +1386,8 @@ window.__ModuleLoader__.load({
|
|
|
734
1386
|
...request,
|
|
735
1387
|
completedAt: request.completedAt ?? ending.time,
|
|
736
1388
|
status: "error",
|
|
737
|
-
error: ending.error
|
|
1389
|
+
error: ending.error,
|
|
1390
|
+
...ending.errorCode === void 0 ? {} : { errorCode: ending.errorCode }
|
|
738
1391
|
};
|
|
739
1392
|
}
|
|
740
1393
|
}
|
|
@@ -771,7 +1424,12 @@ window.__ModuleLoader__.load({
|
|
|
771
1424
|
for (const contribution of this.contributions) {
|
|
772
1425
|
if (contribution.data.kind !== "request-header") continue;
|
|
773
1426
|
const key = headerStepKey(contribution.data.header);
|
|
774
|
-
if (key
|
|
1427
|
+
if (key === void 0) continue;
|
|
1428
|
+
const previous = headersByStep.get(key);
|
|
1429
|
+
headersByStep.set(key, {
|
|
1430
|
+
latest: contribution.data.header,
|
|
1431
|
+
...contribution.data.header.change !== void 0 ? { change: contribution.data.header.change } : previous?.change === void 0 ? {} : { change: previous.change }
|
|
1432
|
+
});
|
|
775
1433
|
}
|
|
776
1434
|
const finalized = [];
|
|
777
1435
|
const eventLocations = /* @__PURE__ */ new Map();
|
|
@@ -798,12 +1456,13 @@ window.__ModuleLoader__.load({
|
|
|
798
1456
|
}
|
|
799
1457
|
if (data.kind === "assistant") {
|
|
800
1458
|
const header = data.request === void 0 ? void 0 : headerFor(data.request, headersByStep, previousHeader);
|
|
801
|
-
if (data.node !== void 0) finalized.push(withRequestConfig(data.node, header?.prompt));
|
|
1459
|
+
if (data.node !== void 0) finalized.push(withRequestConfig(data.node, header?.latest.prompt));
|
|
802
1460
|
if (data.partial !== null) partial = data.partial;
|
|
803
1461
|
if (data.request !== void 0) {
|
|
804
|
-
const
|
|
1462
|
+
const change = header?.change;
|
|
1463
|
+
const includeChange = change !== void 0 && !consumedPromptChanges.has(change.seq);
|
|
805
1464
|
requests.push(applyHeader(data.request, header, includeChange));
|
|
806
|
-
if (includeChange) consumedPromptChanges.add(
|
|
1465
|
+
if (includeChange) consumedPromptChanges.add(change.seq);
|
|
807
1466
|
}
|
|
808
1467
|
continue;
|
|
809
1468
|
}
|
|
@@ -827,7 +1486,8 @@ window.__ModuleLoader__.load({
|
|
|
827
1486
|
turnEndings.push({
|
|
828
1487
|
turn: data.turn,
|
|
829
1488
|
time: data.time,
|
|
830
|
-
...data.error === void 0 ? {} : { error: data.error }
|
|
1489
|
+
...data.error === void 0 ? {} : { error: data.error },
|
|
1490
|
+
...data.errorCode === void 0 ? {} : { errorCode: data.errorCode }
|
|
831
1491
|
});
|
|
832
1492
|
}
|
|
833
1493
|
requests.sort((left, right) => left.startSeq - right.startSeq);
|
|
@@ -860,7 +1520,7 @@ window.__ModuleLoader__.load({
|
|
|
860
1520
|
* @param ctx - Plugin context receiving the view Definition.
|
|
861
1521
|
*/
|
|
862
1522
|
function registerTrajectoryConversationView(ctx) {
|
|
863
|
-
ctx.
|
|
1523
|
+
ctx.uiConversation.views.register(trajectoryViewDefinition);
|
|
864
1524
|
}
|
|
865
1525
|
//#endregion
|
|
866
1526
|
//#region lib/types/client/trajectory-tool-definition.js
|
|
@@ -874,7 +1534,6 @@ window.__ModuleLoader__.load({
|
|
|
874
1534
|
turn: match.event.data.turn,
|
|
875
1535
|
step: match.event.data.step,
|
|
876
1536
|
time: match.event.time,
|
|
877
|
-
callView: match.view?.for === "call" ? match.view.view : null,
|
|
878
1537
|
subCalls: []
|
|
879
1538
|
};
|
|
880
1539
|
}
|
|
@@ -895,8 +1554,6 @@ window.__ModuleLoader__.load({
|
|
|
895
1554
|
isError: result.isError === true,
|
|
896
1555
|
...match.event.data.error === void 0 ? {} : { error: match.event.data.error },
|
|
897
1556
|
meta: match.event.data.meta,
|
|
898
|
-
callView: previous?.callView ?? null,
|
|
899
|
-
resultView: match.view?.for === "result" ? match.view.view : null,
|
|
900
1557
|
subCalls: []
|
|
901
1558
|
};
|
|
902
1559
|
}
|
|
@@ -909,12 +1566,12 @@ window.__ModuleLoader__.load({
|
|
|
909
1566
|
function childCall(match, data) {
|
|
910
1567
|
return {
|
|
911
1568
|
callId: data.subCallId,
|
|
1569
|
+
parentCallId: data.parentCallId,
|
|
912
1570
|
name: data.name,
|
|
913
1571
|
argsRaw: JSON.stringify(data.arguments),
|
|
914
1572
|
turn: locationTurn(match),
|
|
915
1573
|
step: locationStep(match),
|
|
916
1574
|
time: match.event.time,
|
|
917
|
-
callView: null,
|
|
918
1575
|
subCalls: []
|
|
919
1576
|
};
|
|
920
1577
|
}
|
|
@@ -924,6 +1581,7 @@ window.__ModuleLoader__.load({
|
|
|
924
1581
|
seq: match.event.seq,
|
|
925
1582
|
time: match.event.time,
|
|
926
1583
|
callId: data.subCallId,
|
|
1584
|
+
parentCallId: data.parentCallId,
|
|
927
1585
|
call: {
|
|
928
1586
|
name: data.name,
|
|
929
1587
|
argsRaw: JSON.stringify(data.arguments)
|
|
@@ -931,8 +1589,6 @@ window.__ModuleLoader__.load({
|
|
|
931
1589
|
callTime: previous === void 0 || "kind" in previous ? null : previous.time,
|
|
932
1590
|
content: data.content ?? [],
|
|
933
1591
|
isError: data.isError === true,
|
|
934
|
-
callView: null,
|
|
935
|
-
resultView: null,
|
|
936
1592
|
subCalls: []
|
|
937
1593
|
};
|
|
938
1594
|
}
|
|
@@ -1018,6 +1674,7 @@ window.__ModuleLoader__.load({
|
|
|
1018
1674
|
seq: interruptedAt.seq - .8,
|
|
1019
1675
|
time: interruptedAt.time,
|
|
1020
1676
|
callId: block.callId,
|
|
1677
|
+
...block.parentCallId === void 0 ? {} : { parentCallId: block.parentCallId },
|
|
1021
1678
|
call: {
|
|
1022
1679
|
name: block.name,
|
|
1023
1680
|
argsRaw: block.argsRaw
|
|
@@ -1029,8 +1686,6 @@ window.__ModuleLoader__.load({
|
|
|
1029
1686
|
name: "Interrupted",
|
|
1030
1687
|
code: "interrupted"
|
|
1031
1688
|
},
|
|
1032
|
-
callView: block.callView,
|
|
1033
|
-
resultView: null,
|
|
1034
1689
|
subCalls
|
|
1035
1690
|
};
|
|
1036
1691
|
}
|
|
@@ -1107,7 +1762,7 @@ window.__ModuleLoader__.load({
|
|
|
1107
1762
|
* @param ctx - Plugin context receiving the Definition.
|
|
1108
1763
|
*/
|
|
1109
1764
|
function registerTrajectoryToolDefinition(ctx) {
|
|
1110
|
-
ctx.
|
|
1765
|
+
ctx.uiConversation.events.register(trajectoryToolDefinition);
|
|
1111
1766
|
}
|
|
1112
1767
|
//#endregion
|
|
1113
1768
|
//#region ../../../node_modules/.pnpm/@tanstack+virtual-core@3.17.7/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js
|
|
@@ -2910,19 +3565,21 @@ window.__ModuleLoader__.load({
|
|
|
2910
3565
|
/**
|
|
2911
3566
|
* Format a duration in milliseconds with thousands separators.
|
|
2912
3567
|
* @param milliseconds - Duration in milliseconds, or `null` when absent.
|
|
3568
|
+
* @param t - Trajectory locale translator.
|
|
2913
3569
|
* @returns `—` when unknown, otherwise an integer-millisecond label.
|
|
2914
3570
|
*/
|
|
2915
|
-
function formatDurationMillis(milliseconds) {
|
|
3571
|
+
function formatDurationMillis(milliseconds, t) {
|
|
2916
3572
|
if (milliseconds === null || !Number.isFinite(milliseconds)) return "—";
|
|
2917
|
-
return
|
|
3573
|
+
return t("unit.milliseconds", { value: String(Math.round(milliseconds)).replace(/\B(?=(\d{3})+(?!\d))/g, ",") });
|
|
2918
3574
|
}
|
|
2919
3575
|
/**
|
|
2920
3576
|
* Format an elapsed duration given in seconds as a millisecond label.
|
|
2921
3577
|
* @param seconds - Duration seconds, or `null` when absent.
|
|
3578
|
+
* @param t - Trajectory locale translator.
|
|
2922
3579
|
* @returns `—` when unknown, otherwise an integer-millisecond label.
|
|
2923
3580
|
*/
|
|
2924
|
-
function formatElapsedSeconds(seconds) {
|
|
2925
|
-
return formatDurationMillis(seconds === null ? null : seconds * 1e3);
|
|
3581
|
+
function formatElapsedSeconds(seconds, t) {
|
|
3582
|
+
return formatDurationMillis(seconds === null ? null : seconds * 1e3, t);
|
|
2926
3583
|
}
|
|
2927
3584
|
//#endregion
|
|
2928
3585
|
//#region lib/types/client/trajectory-virtual-rows.js
|
|
@@ -2992,7 +3649,7 @@ window.__ModuleLoader__.load({
|
|
|
2992
3649
|
}
|
|
2993
3650
|
//#endregion
|
|
2994
3651
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-trajectory/src/client/TrajectoryTable.module.css.mjs
|
|
2995
|
-
const css$3 = ".Y0dWHa_split{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);background:var(--dsw-alias-bg-layer-1);flex:1;width:100%;min-height:0;display:flex;position:relative;overflow:hidden;container-type:inline-size}.Y0dWHa_tablePane{min-width:0;padding-bottom:var(--dsh-trajectory-bottom-clearance,0px);flex:1;position:relative;overflow:hidden auto;container:Y0dWHa_trajectory-table/inline-size}.Y0dWHa_historyLoading{z-index:5;pointer-events:none;height:0;position:sticky;top:0;overflow:visible}.Y0dWHa_historyLoadingBar{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);width:100%;height:30px;color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);justify-content:center;align-items:center;gap:6px;display:flex}.Y0dWHa_historyLoadingSpinner{box-sizing:border-box;border:1.5px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-state-business-primary);border-radius:50%;width:10px;height:10px;animation:.7s linear infinite Y0dWHa_history-loading-spin}.Y0dWHa_table tbody .Y0dWHa_historyLoadRow td{height:30px;padding:0}.Y0dWHa_table tbody .Y0dWHa_historyLoadRow+tr[data-turn-start=true] td:before{content:none}.Y0dWHa_historyLoadButton{background:var(--dsw-alias-bg-layer-1);width:100%;height:29px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:var(--dsw-font-xxs-12);border:0;justify-content:center;align-items:center;gap:6px;display:flex}.Y0dWHa_historyLoadButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.Y0dWHa_historyLoadButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px}.Y0dWHa_historyLoadButton:disabled{cursor:default}.Y0dWHa_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.Y0dWHa_table:not([data-scroll-ready=true]){visibility:hidden}@keyframes Y0dWHa_history-loading-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.Y0dWHa_historyLoadingSpinner{animation:none}}.Y0dWHa_table{--trajectory-turn-accent:color-mix(in srgb, var(--dsw-static-blue-500) 22%, var(--dsw-alias-bg-layer-1));border-spacing:0;table-layout:fixed;width:100%;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);font:var(--dsw-font-xxs-12)}.Y0dWHa_eventColumn{width:122px}.Y0dWHa_contentColumn{width:auto}.Y0dWHa_table th{z-index:3;box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);height:30px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-specific-sidebar-fill);font:var(--dsw-font-xxs-12);text-align:left;text-overflow:ellipsis;user-select:none;white-space:nowrap;padding:0 8px;font-weight:500;position:sticky;top:0;overflow:hidden}.Y0dWHa_eventHeader{text-align:right!important;padding-right:4px!important}.Y0dWHa_table td{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l1);text-overflow:ellipsis;white-space:nowrap;height:30px;padding:0 8px;overflow:hidden}.Y0dWHa_table tbody .Y0dWHa_virtualSpacer{pointer-events:none}.Y0dWHa_table tbody .Y0dWHa_virtualSpacer td{height:var(--trajectory-virtual-spacer-height);border:0;padding:0}.Y0dWHa_table tbody tr:not([data-collapsed-summary]):not([data-virtual-spacer]):not([data-history-load]){cursor:default;transition:background-color .12s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out);outline:none}.Y0dWHa_table tbody tr[data-timeline-focus=outside]{opacity:.24}.Y0dWHa_table tbody tr:not([data-collapsed-summary]):not([data-virtual-spacer]):not([data-history-load]):not([data-selected=true]):hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_table tbody tr[data-request-only=true]:hover{background:0 0}.Y0dWHa_table tbody tr[data-request-only=true] td{border-bottom:0;height:0;padding-top:0;padding-bottom:0}.Y0dWHa_table tbody tr[data-terminal-request-boundary=true] td{height:9px}.Y0dWHa_table tbody tr[data-request-only=true] .Y0dWHa_turnRail{top:-15px;bottom:0}.Y0dWHa_table tbody tr:not([data-collapsed-summary]):focus-visible{box-shadow:inset 0 0 0 1px var(--dsw-alias-state-business-primary)}.Y0dWHa_table tbody tr[data-selected=true]{background:var(--dsw-alias-interactive-bg-active)}.Y0dWHa_requestBoundaryControl{--request-boundary-base-left:12px;z-index:6;top:-8px;left:calc(var(--request-boundary-base-left) + var(--request-boundary-offset,0px));cursor:pointer;background:0 0;border:0;width:16px;height:16px;padding:0;position:absolute}.Y0dWHa_requestBoundaryControl:before{background:var(--dsw-alias-label-caption);width:5px;height:5px;box-shadow:0 0 0 2px var(--dsw-alias-bg-layer-1), 0 0 0 3px transparent;content:\"\";transition:background .12s var(--ds-ease-in-out), box-shadow .12s var(--ds-ease-in-out);border-radius:50%;position:absolute;top:5.5px;left:5.5px}.Y0dWHa_requestBoundaryControl:after{border:1px solid var(--dsw-alias-border-l1);width:max-content;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);content:attr(data-label);font:9px/12px var(--ds-font-family-code);opacity:0;pointer-events:none;transition:opacity .12s var(--ds-ease-in-out), transform .12s var(--ds-ease-in-out);user-select:none;white-space:nowrap;border-radius:2px;padding:0 4px;position:absolute;top:2px;left:17px;transform:translate(-2px);box-shadow:0 2px 6px #0000001f}.Y0dWHa_requestBoundaryControl:hover:before,.Y0dWHa_requestBoundaryControl:focus-visible:before{background:var(--dsw-alias-brand-primary-new-colorprimary-new-color)}.Y0dWHa_requestBoundaryControlActive:before,.Y0dWHa_requestBoundaryControlActive:hover:before,.Y0dWHa_requestBoundaryControlActive:focus-visible:before{background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 18%, var(--dsw-alias-bg-layer-1));box-shadow:0 0 0 1.5px var(--dsw-alias-brand-primary-new-colorprimary-new-color)}.Y0dWHa_requestBoundaryControl[data-request-status=error]:before,.Y0dWHa_requestBoundaryControl[data-request-status=error]:hover:before,.Y0dWHa_requestBoundaryControl[data-request-status=error]:focus-visible:before{background:var(--dsw-alias-state-error-primary)}.Y0dWHa_requestBoundaryControl:hover:after,.Y0dWHa_requestBoundaryControl:focus-visible:after{opacity:1;transform:translate(0)}.Y0dWHa_requestBoundaryControl:focus-visible{outline:none}.Y0dWHa_table tbody tr:has(.Y0dWHa_requestBoundaryControl:hover):not([data-selected=true]){background:0 0}.Y0dWHa_event{position:relative}.Y0dWHa_turnRail,.Y0dWHa_selectionRail{background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);pointer-events:none;position:absolute;left:0}.Y0dWHa_turnRail{z-index:4;background:var(--trajectory-turn-accent);width:2px;top:-1px;bottom:-1px}.Y0dWHa_table tbody tr[data-turn-end=true] .Y0dWHa_turnRail{bottom:0}.Y0dWHa_selectionRail{z-index:5;width:3px;top:0;bottom:0}.Y0dWHa_table tbody tr[data-error=true] .Y0dWHa_turnRail{background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 22%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_table tbody tr[data-error=true] .Y0dWHa_selectionRail{background:var(--dsw-alias-state-error-primary)}.Y0dWHa_table tbody tr[data-turn-start=true] td{position:relative;overflow:visible}.Y0dWHa_table tbody tr[data-turn-start=true]:not(:first-child) td:before{z-index:1;background:var(--dsw-alias-border-l1);content:\"\";pointer-events:none;height:2px;position:absolute;top:0;left:0;right:0;transform:translateY(-50%)}.Y0dWHa_event{padding-left:36px!important;padding-right:4px!important;overflow:visible!important}.Y0dWHa_turnLabel{z-index:3;box-sizing:border-box;width:max-content;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-module-platform);font:8px/10px var(--ds-font-family-code);font-variant-numeric:tabular-nums;user-select:none;white-space:nowrap;border-radius:0 0 2px;flex:none;align-items:center;padding:1px 5px;display:inline-grid;position:absolute;top:0;left:0}.Y0dWHa_turnLabelFull,.Y0dWHa_turnLabelCompact{opacity:1;white-space:nowrap;grid-area:1/1;max-width:64px;overflow:hidden}.Y0dWHa_turnLabelCompact{opacity:0;max-width:0}.Y0dWHa_turnLabelActive{color:color-mix(in srgb, var(--dsw-static-blue-500) 55%, var(--dsw-alias-label-tertiary));background:var(--trajectory-turn-accent)}.Y0dWHa_eventInner{justify-content:flex-start;align-items:center;min-width:0;height:100%;display:flex}.Y0dWHa_kindSlot{flex:none;justify-content:flex-end;align-items:flex-end;width:76px;display:flex}.Y0dWHa_kindSlot [role=tooltip]{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);box-shadow:var(--dsw-shadow-lv2);color:var(--dsw-alias-label-primary)}.Y0dWHa_content{color:var(--dsw-alias-label-primary);padding-left:4px!important}.Y0dWHa_kindTag{box-sizing:border-box;letter-spacing:.035em;user-select:none;border:1px solid #0000;border-radius:4px;flex:none;align-items:center;height:19px;padding:0 5px;font-size:10px;font-weight:650;line-height:16px;display:inline-flex}.Y0dWHa_kindTagIcon{opacity:0;flex:none;justify-content:center;align-items:center;width:0;height:13px;display:inline-flex;overflow:hidden;transform:scale(.8)}.Y0dWHa_kindTagLabel{opacity:1;white-space:nowrap;max-width:72px;display:inline-block;overflow:hidden}.Y0dWHa_table .Y0dWHa_kindSlot .Y0dWHa_message{justify-content:center;width:100%}@container Y0dWHa_trajectory-table (width<=620px){.Y0dWHa_eventColumn{width:50px}.Y0dWHa_event{padding-left:28px!important;padding-right:3px!important}.Y0dWHa_requestBoundaryControl{--request-boundary-base-left:6px}.Y0dWHa_kindSlot{width:19px}.Y0dWHa_kindTag,.Y0dWHa_table .Y0dWHa_kindSlot .Y0dWHa_message{justify-content:center;width:19px;padding-left:0;padding-right:0}.Y0dWHa_kindTagIcon{opacity:1;width:13px;transform:scale(1)}.Y0dWHa_kindTagLabel,.Y0dWHa_turnLabelFull{opacity:0;max-width:0}.Y0dWHa_turnLabelCompact{opacity:1;max-width:64px}}@media (prefers-reduced-motion:no-preference){.Y0dWHa_eventColumn,.Y0dWHa_event,.Y0dWHa_requestBoundaryControl,.Y0dWHa_kindSlot,.Y0dWHa_kindTag,.Y0dWHa_kindTagIcon,.Y0dWHa_kindTagLabel,.Y0dWHa_turnLabelFull,.Y0dWHa_turnLabelCompact{transition-duration:.18s;transition-timing-function:var(--ds-ease-in-out)}.Y0dWHa_eventColumn,.Y0dWHa_kindSlot{transition-property:width}.Y0dWHa_event{transition-property:padding-right,padding-left}.Y0dWHa_requestBoundaryControl{transition-property:left}.Y0dWHa_kindTag{transition-property:padding-right,padding-left}.Y0dWHa_kindTagIcon{transition-property:width,opacity,transform}.Y0dWHa_kindTagLabel,.Y0dWHa_turnLabelFull,.Y0dWHa_turnLabelCompact{transition-property:max-width,opacity}}.Y0dWHa_user{color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-state-business-tertiary)}.Y0dWHa_systemNeutral{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform)}.Y0dWHa_contextGreen{color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 68%, var(--dsw-alias-label-secondary));background:var(--dsw-alias-state-success-tertiary)}.Y0dWHa_compacted{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform)}.Y0dWHa_compactedSummary{font:var(--dsw-font-xs-13);margin-top:12px;padding:0 0 14px}.Y0dWHa_promptDiffSections{flex-direction:column;gap:14px;max-height:100%;padding:10px 14px 14px;display:flex;overflow:auto}.Y0dWHa_promptDiffSection{min-width:0}.Y0dWHa_promptDiffTitle{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-strong-13);user-select:none;margin:0 0 6px}.Y0dWHa_promptDiff{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);font:11px/17px var(--ds-font-family-code);white-space:pre;margin:0;overflow:auto}.Y0dWHa_promptDiff span{min-width:max-content;padding:0 6px;display:block}.Y0dWHa_promptDiffLinemeta{color:var(--dsw-alias-label-caption);background:var(--dsw-alias-bg-module-platform);user-select:none}.Y0dWHa_promptDiffLinecontext{color:var(--dsw-alias-label-secondary)}.Y0dWHa_promptDiffLineadded{color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 72%, var(--dsw-alias-label-primary));background:var(--dsw-alias-state-success-tertiary)}.Y0dWHa_promptDiffLineremoved{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_assistantVioletBright{color:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 60%, var(--dsw-alias-state-error-secondary));background:color-mix(in srgb, color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 55%, var(--dsw-alias-state-error-secondary)) 15%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_toolAmber{color:var(--dsw-alias-state-warn-label);background:var(--dsw-alias-state-warn-tertiary)}.Y0dWHa_subtoolAmber{color:color-mix(in srgb, var(--dsw-alias-state-warn-label) 62%, var(--dsw-alias-label-tertiary));background:color-mix(in srgb, var(--dsw-alias-state-warn-tertiary) 58%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_contentText{text-overflow:ellipsis;white-space:nowrap;min-width:0;display:block;overflow:hidden}.Y0dWHa_toolCallOnly{color:var(--dsw-alias-label-tertiary)}.Y0dWHa_table tbody tr[data-collapsed-summary=turn] td,.Y0dWHa_table tbody tr[data-collapsed-summary=assistant] td{height:20px}.Y0dWHa_table tbody tr[data-collapsed-summary]{cursor:pointer;transition:background-color .12s var(--ds-ease-in-out);outline:none}.Y0dWHa_table tbody tr[data-collapsed-summary]:hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_table tbody tr[data-collapsed-summary]:focus-visible{box-shadow:inset 0 0 0 1px var(--dsw-alias-state-business-primary)}.Y0dWHa_collapsedTurnContent{min-width:0;color:var(--dsw-alias-label-secondary);align-items:center;font-size:12px;line-height:16px;display:flex}.Y0dWHa_collapsedTurnEllipsis{color:var(--dsw-alias-label-tertiary);user-select:none;flex:none;margin-right:6px;font-weight:600}.Y0dWHa_collapsedTurnText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Y0dWHa_resultPreview{grid-template-columns:clamp(180px, var(--trajectory-tool-request-width,calc(36cqw - 56px)), 480px) minmax(0, 1fr);align-items:center;gap:8px;min-width:0;display:grid}.Y0dWHa_resultRequest,.Y0dWHa_inlineResultText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Y0dWHa_toolCallNameTypeface{color:var(--dsw-alias-label-primary);font:400 12px/18px Menlo,Consolas,Liberation Mono,PingFang SC,Microsoft YaHei}.Y0dWHa_toolCallPayload{color:var(--dsw-alias-label-secondary);font:400 12px/18px var(--ds-font-family-code);margin-left:7px}.Y0dWHa_table tbody tr[data-kind=tool] .Y0dWHa_contentText,.Y0dWHa_table tbody tr[data-kind=subtool] .Y0dWHa_contentText,.Y0dWHa_table tbody tr[data-kind=tool] .Y0dWHa_resultPreview,.Y0dWHa_table tbody tr[data-kind=subtool] .Y0dWHa_resultPreview{font-family:var(--ds-font-family-code);font-size:12px}.Y0dWHa_table tbody tr[data-kind=subtool] .Y0dWHa_content{padding-left:26px}.Y0dWHa_inlineResult{min-width:0;color:var(--dsw-alias-label-secondary);align-items:center;display:flex}.Y0dWHa_noOutputText{color:var(--dsw-alias-label-caption)}.Y0dWHa_arrow{color:var(--dsw-alias-label-caption);flex:none;margin-right:8px}.Y0dWHa_error,.Y0dWHa_overview dd.Y0dWHa_error,.Y0dWHa_details .Y0dWHa_errorPayload{color:var(--dsw-alias-state-error-primary)}.Y0dWHa_details .Y0dWHa_errorPayload .Y0dWHa_resultBlockText{color:inherit}.Y0dWHa_details .Y0dWHa_jsonPayload.Y0dWHa_errorPayload,.Y0dWHa_details .Y0dWHa_jsonPreview.Y0dWHa_errorPayload{--json-tree-property:var(--dsw-alias-state-error-primary);--json-tree-string:var(--dsw-alias-state-error-primary);--json-tree-number:var(--dsw-alias-state-error-primary);--json-tree-keyword:var(--dsw-alias-state-error-primary);--json-tree-punctuation:var(--dsw-alias-state-error-primary);--json-tree-icon:var(--dsw-alias-state-error-primary)}.Y0dWHa_details{border-left:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);flex-direction:column;flex:none;width:clamp(320px,38%,440px);min-width:0;max-width:calc(100% - 280px);min-height:0;display:flex;position:relative}.Y0dWHa_detailsResizeHandle{z-index:6;cursor:col-resize;touch-action:none;user-select:none;background:0 0;border:0;width:8px;padding:0;position:absolute;top:0;bottom:0;left:-4px}.Y0dWHa_detailsResizeHandle:focus-visible{outline:none}.Y0dWHa_detailsHeader{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);flex:none;justify-content:space-between;align-items:center;height:42px;padding:0 8px 0 12px;display:flex}.Y0dWHa_detailsTitle{min-width:0;color:var(--dsw-alias-label-primary);align-items:center;gap:8px;display:flex}.Y0dWHa_requestDetailsDot{background:var(--dsw-alias-label-secondary);border-radius:50%;flex:none;width:5px;height:5px}.Y0dWHa_requestDetailsName{font:500 12px/16px var(--ds-font-family-code);flex:none}.Y0dWHa_detailsLocation{min-width:0;color:var(--dsw-alias-label-tertiary);font:11px/16px var(--ds-font-family-code);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Y0dWHa_close{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;font-size:18px;line-height:18px;display:inline-flex}.Y0dWHa_close:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_detailTabs{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);overscroll-behavior-x:contain;scrollbar-width:none;white-space:nowrap;flex:none;gap:1px;width:100%;min-width:0;max-width:100%;height:34px;padding:0 8px;display:flex;overflow:auto hidden}.Y0dWHa_detailTabs::-webkit-scrollbar{display:none}.Y0dWHa_detailTab{color:var(--dsw-alias-label-tertiary);cursor:pointer;font:var(--dsw-font-xs-13);background:0 0;border:0;flex:none;padding:0 9px;position:relative}.Y0dWHa_detailTab:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_detailTabActive{color:var(--dsw-alias-state-business-primary)}.Y0dWHa_detailTabActive:after{background:var(--dsw-alias-state-business-primary);content:\"\";border-radius:1px 1px 0 0;height:2px;position:absolute;bottom:0;left:9px;right:9px}.Y0dWHa_close:focus-visible,.Y0dWHa_detailTab:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}.Y0dWHa_detailBody{min-height:0;padding-bottom:var(--dsh-trajectory-bottom-clearance,0px);scrollbar-gutter:stable;flex:1;overflow:hidden auto}.Y0dWHa_detailBodySummary{box-sizing:border-box;padding-bottom:calc(12px + var(--dsh-trajectory-bottom-clearance,0px));flex-direction:column;display:flex;overflow:hidden}.Y0dWHa_detailBodySummary>.Y0dWHa_overview{overscroll-behavior:contain;flex:0 auto;min-height:0;overflow:auto}.Y0dWHa_detailBodySummary>.Y0dWHa_compactedSummary{flex:1;min-height:0;overflow:auto}.Y0dWHa_summaryScrollRegion{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.Y0dWHa_summaryScrollRegion:hover,.Y0dWHa_summaryScrollRegion:focus-within{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2)}.Y0dWHa_compactedSummary .Y0dWHa_markdownPayload{padding-right:18px}.Y0dWHa_overview{font:var(--dsw-font-xs-13);margin:0;padding:8px 0}.Y0dWHa_overviewParentLinks{gap:14px;display:flex}.Y0dWHa_overviewHierarchyNavLink{all:unset;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;opacity:1;align-items:center;gap:1px;display:inline-flex}.Y0dWHa_overviewHierarchyNavLink:hover{color:var(--dsw-alias-label-primary)}.Y0dWHa_overviewHierarchyJumpIconTight{color:var(--dsw-alias-label-caption);flex:none}.Y0dWHa_overviewHierarchyNavLink:hover .Y0dWHa_overviewHierarchyJumpIconTight,.Y0dWHa_overviewHierarchyNavLink:focus-visible .Y0dWHa_overviewHierarchyJumpIconTight{color:var(--dsw-alias-label-primary)}.Y0dWHa_overviewHierarchyNavLink:focus-visible{color:var(--dsw-alias-label-primary);outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_overview>div{grid-template-columns:94px minmax(0,1fr);align-items:center;min-height:22px;padding:0 14px;display:grid}.Y0dWHa_overview>.Y0dWHa_requestTokenDetail dt{padding-left:12px}.Y0dWHa_usagePanel{padding:4px 0 10px}.Y0dWHa_usageGroup+.Y0dWHa_usageGroup{margin-top:8px}.Y0dWHa_usageHeading{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-strong-13);user-select:none;margin:0;padding:4px 14px 1px}.Y0dWHa_usageGroup .Y0dWHa_overview{padding:0}.Y0dWHa_overview dt{color:var(--dsw-alias-label-tertiary)}.Y0dWHa_overview dd{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;margin:0;overflow:hidden}.Y0dWHa_timestampToggle{all:unset;color:inherit;cursor:pointer;font:inherit;user-select:text}.Y0dWHa_timestampToggle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_overviewSections{border-top:0;flex-direction:column;flex:1;min-height:min-content;display:flex;overflow:hidden}.Y0dWHa_overviewSection{flex-direction:column;flex:1 1 0;min-height:28px;max-height:max-content;display:flex;overflow:hidden}.Y0dWHa_overviewSection+.Y0dWHa_overviewSection{padding-top:8px}.Y0dWHa_overviewHeading{box-sizing:border-box;width:100%;height:28px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);font:var(--dsw-font-xs-strong-13);user-select:none;flex:none;align-items:flex-end;margin:0;padding:0 0 3px 14px;display:flex}.Y0dWHa_overviewTitle{width:max-content;height:auto;color:inherit;cursor:pointer;font:inherit;user-select:none;background:0 0;border:0;flex:none;align-items:center;gap:3px;padding:0;line-height:1;display:inline-flex}.Y0dWHa_overviewTitleIcon{color:var(--dsw-alias-label-caption);flex:none}.Y0dWHa_overviewTitle:hover .Y0dWHa_overviewTitleIcon{color:var(--dsw-alias-label-primary)}.Y0dWHa_overviewTitle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_overviewTitle:focus-visible .Y0dWHa_overviewTitleIcon{color:var(--dsw-alias-state-business-primary)}.Y0dWHa_overviewPreview{overscroll-behavior:contain;background:var(--dsw-alias-bg-layer-1);flex:1;min-height:0;overflow:auto}.Y0dWHa_overviewPreview>:last-child{margin-bottom:0;padding-bottom:0}.Y0dWHa_overviewPreview .Y0dWHa_jsonPreview>:first-child,.Y0dWHa_overviewPreview .Y0dWHa_schemaTree>:first-child{padding-bottom:0}.Y0dWHa_overviewPreview .Y0dWHa_schemaTree{margin-bottom:0}.Y0dWHa_overviewPreview .Y0dWHa_overview{padding:2px 0 0}.Y0dWHa_overviewPreview .Y0dWHa_overview>div{min-height:22px}.Y0dWHa_markdownPreview,.Y0dWHa_markdownPayload{color:var(--dsw-alias-label-primary)}.Y0dWHa_markdownPreview>div,.Y0dWHa_markdownPayload>div{font:var(--dsw-font-xs-13);gap:8px}.Y0dWHa_markdownPreview>div h1,.Y0dWHa_markdownPayload>div h1{font:600 16px/22px var(--dsw-font-family)}.Y0dWHa_markdownPreview>div h2,.Y0dWHa_markdownPayload>div h2{font:600 15px/22px var(--dsw-font-family)}.Y0dWHa_markdownPreview>div :where(h3,h4,h5,h6),.Y0dWHa_markdownPayload>div :where(h3,h4,h5,h6){font:600 14px/20px var(--dsw-font-family)}.Y0dWHa_markdownPreview>div :not(pre)>code,.Y0dWHa_markdownPayload>div :not(pre)>code{font:12px/18px var(--ds-font-family-code)}.Y0dWHa_markdownPreview>div table,.Y0dWHa_markdownPayload>div table{font:var(--dsw-font-xs-13)}.Y0dWHa_markdownPreview>div>:first-child{margin-top:0}.Y0dWHa_markdownPreview>div>:last-child{margin-bottom:0}.Y0dWHa_markdownPreview>div :where(h1,h2,h3){margin:12px 0 6px}.Y0dWHa_markdownPreview>div :where(h4,h5,h6){margin:10px 0 5px}.Y0dWHa_markdownPreview>div :where(p,ul,ol){margin:8px 0}.Y0dWHa_markdownPreview>div li:not(:first-child){margin-top:3px}.Y0dWHa_markdownPreview>div blockquote{margin-top:8px}.Y0dWHa_markdownPreview>div hr{margin:14px 0}.Y0dWHa_markdownPreview>div>.md-code-block{margin:10px 0}.Y0dWHa_assistantContent .Y0dWHa_markdownPayload,.Y0dWHa_assistantContent .Y0dWHa_payload{min-height:0}.Y0dWHa_thinkingQuote{border-left:2px solid var(--dsw-alias-markdown-citation);color:var(--dsw-alias-label-secondary);background:0 0;margin:6px 14px 0 12px;padding-left:6px}.Y0dWHa_thinkingQuoteOnlyPreview{margin-bottom:8px}.Y0dWHa_detailBody>.Y0dWHa_assistantContentRendered .Y0dWHa_thinkingQuote{margin-top:14px}.Y0dWHa_thinkingToggle{width:max-content;height:18px;color:var(--dsw-alias-label-tertiary);cursor:pointer;font:600 12px/18px var(--dsw-font-family);user-select:none;background:0 0;border:0;align-items:center;gap:2px;padding:0;display:flex}.Y0dWHa_thinkingChevron{transition:transform .12s var(--ds-ease-in-out);flex:none}.Y0dWHa_thinkingToggle[aria-expanded=true] .Y0dWHa_thinkingChevron{transform:rotate(90deg)}.Y0dWHa_thinkingToggle:hover{color:var(--dsw-alias-label-secondary)}.Y0dWHa_thinkingToggle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_thinkingQuote .Y0dWHa_markdownPreview,.Y0dWHa_thinkingQuote .Y0dWHa_markdownPayload,.Y0dWHa_thinkingQuote .Y0dWHa_payload{min-height:0;color:var(--dsw-alias-label-secondary);background:0 0;padding:2px 0}.Y0dWHa_assistantOutput{background:var(--dsw-alias-bg-layer-1)}.Y0dWHa_markdownPreview{padding:6px 14px 8px}.Y0dWHa_markdownPayload{min-height:100%;padding:14px}.Y0dWHa_jsonPayload{min-height:100%}.Y0dWHa_jsonPreview{min-height:0}.Y0dWHa_schema{background:var(--dsw-alias-bg-layer-1);min-height:100%}.Y0dWHa_schemaPreview{min-height:0}.Y0dWHa_schemaIntro{padding:12px 14px 6px}.Y0dWHa_schemaPreview .Y0dWHa_schemaIntro{padding-top:6px}.Y0dWHa_schemaName{color:var(--dsw-alias-label-primary);font:600 12px/18px var(--ds-font-family-code);margin:0}.Y0dWHa_schemaDescription{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);white-space:pre-wrap;margin:2px 0 0}.Y0dWHa_schemaParameters{min-width:0}.Y0dWHa_schemaParametersTitle{color:var(--dsw-alias-label-tertiary);font:600 11px/16px var(--dsw-font-family);user-select:none;margin:0;padding:4px 14px 2px}.Y0dWHa_schemaTree{margin:0 6px 8px 0}.Y0dWHa_payload{box-sizing:border-box;overflow-wrap:anywhere;min-height:100%;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-markdown-code-block);font:12px/19px var(--ds-font-family-code);tab-size:2;white-space:pre-wrap;margin:0;padding:14px}.Y0dWHa_payloadPreview{min-height:0;padding:6px 14px 8px}.Y0dWHa_sourceBlocks{box-sizing:border-box;min-height:100%;padding:12px 14px}.Y0dWHa_sourceBlock+.Y0dWHa_sourceBlock{margin-top:14px}.Y0dWHa_sourceBlockHeader,.Y0dWHa_sourceBlockJumpTarget{user-select:none;align-items:center;gap:3px;width:max-content;margin-bottom:3px;display:flex}.Y0dWHa_sourceBlockJumpTarget{all:unset;cursor:pointer;user-select:none;align-items:center;gap:3px;width:max-content;margin-bottom:3px;display:flex}.Y0dWHa_sourceBlockLabel{color:var(--dsw-alias-label-tertiary);font:11px/16px var(--ds-font-family-code)}.Y0dWHa_sourceBlockJumpIcon{color:var(--dsw-alias-label-caption);flex:none}.Y0dWHa_sourceBlockJumpTarget:hover .Y0dWHa_sourceBlockJumpIcon{color:var(--dsw-alias-label-primary)}.Y0dWHa_sourceBlockJumpTarget:focus-visible{outline:none}.Y0dWHa_sourceBlockJumpTarget:focus-visible .Y0dWHa_sourceBlockJumpIcon{color:var(--dsw-alias-state-business-primary)}.Y0dWHa_sourceBlockContent{overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font:12px/19px var(--ds-font-family-code);tab-size:2;white-space:pre-wrap;background:0 0;margin:0}.Y0dWHa_panelImageLink{cursor:zoom-in;border-radius:4px;width:auto;max-width:100%;display:block;overflow:hidden}.Y0dWHa_panelImageLinkPreview{max-height:140px}.Y0dWHa_panelImage{border-radius:inherit;background:var(--dsw-alias-bg-base);object-fit:contain;width:auto;max-width:100%;height:auto;max-height:320px;margin:0;display:block}.Y0dWHa_panelImageLinkPreview .Y0dWHa_panelImage{max-height:140px}.Y0dWHa_messageImages{flex-direction:column;gap:8px;margin:8px 14px 14px;display:flex}.Y0dWHa_messageImagesPreview{gap:6px;margin:6px 14px 8px}.Y0dWHa_assistantToolCalls{box-sizing:border-box;max-width:100%;color:var(--dsw-alias-label-secondary);font:11px/17px var(--ds-font-family-code);margin:2px 14px 12px;padding:0;list-style:none}.Y0dWHa_assistantToolCallsPreview{margin-top:2px;margin-bottom:8px}.Y0dWHa_assistantToolCalls li{min-width:0}.Y0dWHa_assistantToolCallButton{all:unset;box-sizing:border-box;cursor:pointer;border-radius:3px;align-items:center;width:calc(100% + 4px);min-width:0;height:19px;margin-left:-4px;padding:0 4px;display:flex}.Y0dWHa_assistantToolCallButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_assistantToolCallButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}.Y0dWHa_assistantToolCallIcon{color:var(--dsw-alias-label-caption);flex:none;margin-right:5px}.Y0dWHa_assistantToolCallButton:hover .Y0dWHa_assistantToolCallIcon,.Y0dWHa_assistantToolCallButton:focus-visible .Y0dWHa_assistantToolCallIcon{color:var(--dsw-alias-label-secondary)}.Y0dWHa_assistantToolCallText{white-space:nowrap;flex:1;min-width:0;display:flex;overflow:hidden}.Y0dWHa_assistantToolCallName{color:var(--dsw-alias-label-secondary);flex:none;margin-right:5px;font-weight:500}.Y0dWHa_assistantToolCallArgs{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Y0dWHa_systemPrompt{box-sizing:border-box}.Y0dWHa_toolCatalog{min-height:100%;padding:8px 0 16px}.Y0dWHa_toolCatalogItem{border-bottom:1px solid var(--dsw-alias-border-l1)}.Y0dWHa_toolCatalogSummary{box-sizing:border-box;cursor:pointer;user-select:none;grid-template-columns:12px 12px max-content minmax(0,1fr);align-items:center;gap:5px;min-height:30px;padding:4px 12px;list-style:none;display:grid}.Y0dWHa_toolCatalogSummary::-webkit-details-marker{display:none}.Y0dWHa_toolCatalogSummary:hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_toolCatalogSummary:focus-visible{background:var(--dsw-alias-interactive-bg-hover);outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}.Y0dWHa_toolCatalogChevron,.Y0dWHa_toolCatalogIcon{color:var(--dsw-alias-label-caption)}.Y0dWHa_toolCatalogChevron{transition:transform .1s var(--ds-ease-in-out)}.Y0dWHa_toolCatalogItem[open] .Y0dWHa_toolCatalogChevron{transform:rotate(90deg)}.Y0dWHa_toolCatalogName{color:var(--dsw-alias-label-primary);font:500 12px/18px var(--ds-font-family-code)}.Y0dWHa_toolCatalogDescription{min-width:0;color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Y0dWHa_toolCatalogDefinition{background:var(--dsw-alias-bg-base);padding:0 0 8px 29px}.Y0dWHa_toolCatalogFullDescription{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);white-space:pre-wrap;margin:0;padding:7px 14px 4px 0}.Y0dWHa_toolCatalogTree{margin-left:-14px;margin-right:6px}.Y0dWHa_resultBlocks{box-sizing:border-box;flex-direction:column;gap:10px;min-height:100%;padding:14px;display:flex}.Y0dWHa_resultBlocksPreview{gap:6px;min-height:0;padding:6px 14px 8px}.Y0dWHa_resultBlockText{overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font:12px/19px var(--ds-font-family-code);tab-size:2;white-space:pre-wrap;background:0 0;margin:0}.Y0dWHa_overviewPreview .Y0dWHa_noPayload{padding:6px 14px 8px}.Y0dWHa_noPayload{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);margin:0;padding:18px 14px}@media (width<=760px){.Y0dWHa_details{z-index:5;border-left-color:var(--dsw-alias-border-l3);width:min(92%,420px);max-width:92%;position:absolute;top:0;bottom:0;right:0;box-shadow:-12px 0 32px #00000024}}";
|
|
3652
|
+
const css$3 = ".Y0dWHa_split{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);background:var(--dsw-alias-bg-layer-1);flex:1;width:100%;min-height:0;display:flex;position:relative;overflow:hidden;container-type:inline-size}.Y0dWHa_tablePane{min-width:0;padding-bottom:var(--dsh-trajectory-bottom-clearance,0px);flex:1;position:relative;overflow:hidden auto;container:Y0dWHa_trajectory-table/inline-size}.Y0dWHa_historyLoading{z-index:5;pointer-events:none;height:0;position:sticky;top:0;overflow:visible}.Y0dWHa_historyLoadingBar{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);width:100%;height:30px;color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);justify-content:center;align-items:center;gap:6px;display:flex}.Y0dWHa_historyLoadingSpinner{box-sizing:border-box;border:1.5px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-state-business-primary);corner-shape:round;border-radius:50%;width:10px;height:10px;animation:.7s linear infinite Y0dWHa_history-loading-spin}.Y0dWHa_table tbody .Y0dWHa_historyLoadRow td{height:30px;padding:0}.Y0dWHa_table tbody .Y0dWHa_historyLoadRow+tr[data-turn-start=true] td:before{content:none}.Y0dWHa_historyLoadButton{background:var(--dsw-alias-bg-layer-1);width:100%;height:29px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:var(--dsw-font-xxs-12);border:0;justify-content:center;align-items:center;gap:6px;display:flex}.Y0dWHa_historyLoadButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.Y0dWHa_historyLoadButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px}.Y0dWHa_historyLoadButton:disabled{cursor:default}.Y0dWHa_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.Y0dWHa_table:not([data-scroll-ready=true]){visibility:hidden}@keyframes Y0dWHa_history-loading-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.Y0dWHa_historyLoadingSpinner{animation:none}}.Y0dWHa_table{--trajectory-turn-accent:color-mix(in srgb, var(--dsw-static-blue-500) 22%, var(--dsw-alias-bg-layer-1));border-spacing:0;table-layout:fixed;width:100%;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);font:var(--dsw-font-xxs-12)}.Y0dWHa_eventColumn{width:122px}.Y0dWHa_contentColumn{width:auto}.Y0dWHa_table th{z-index:3;box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l2);height:30px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-specific-sidebar-fill);font:var(--dsw-font-xxs-12);text-align:left;text-overflow:ellipsis;user-select:none;white-space:nowrap;padding:0 8px;font-weight:500;position:sticky;top:0;overflow:hidden}.Y0dWHa_eventHeader{text-align:right!important;padding-right:4px!important}.Y0dWHa_table td{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l1);text-overflow:ellipsis;white-space:nowrap;height:30px;padding:0 8px;overflow:hidden}.Y0dWHa_table tbody .Y0dWHa_virtualSpacer{pointer-events:none}.Y0dWHa_table tbody .Y0dWHa_virtualSpacer td{height:var(--trajectory-virtual-spacer-height);border:0;padding:0}.Y0dWHa_table tbody tr:not([data-collapsed-summary]):not([data-virtual-spacer]):not([data-history-load]){cursor:default;transition:background-color .12s var(--ds-ease-in-out), opacity .12s var(--ds-ease-in-out);outline:none}.Y0dWHa_table tbody tr[data-timeline-focus=outside]{opacity:.24}.Y0dWHa_table tbody tr:not([data-collapsed-summary]):not([data-virtual-spacer]):not([data-history-load]):not([data-selected=true]):hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_table tbody tr[data-request-only=true]:hover{background:0 0}.Y0dWHa_table tbody tr[data-request-only=true] td{border-bottom:0;height:0;padding-top:0;padding-bottom:0}.Y0dWHa_table tbody tr[data-terminal-request-boundary=true] td{height:9px}.Y0dWHa_table tbody tr[data-request-only=true] .Y0dWHa_turnRail{top:-15px;bottom:0}.Y0dWHa_table tbody tr:not([data-collapsed-summary]):focus-visible{box-shadow:inset 0 0 0 1px var(--dsw-alias-state-business-primary)}.Y0dWHa_table tbody tr[data-selected=true]{background:var(--dsw-alias-interactive-bg-active)}.Y0dWHa_requestBoundaryControl{--request-boundary-base-left:12px;z-index:6;top:-8px;left:calc(var(--request-boundary-base-left) + var(--request-boundary-offset,0px));cursor:pointer;background:0 0;border:0;width:16px;height:16px;padding:0;position:absolute}.Y0dWHa_requestBoundaryControl:before{corner-shape:round;background:var(--dsw-alias-label-caption);width:5px;height:5px;box-shadow:0 0 0 2px var(--dsw-alias-bg-layer-1), 0 0 0 3px transparent;content:\"\";transition:background .12s var(--ds-ease-in-out), box-shadow .12s var(--ds-ease-in-out);border-radius:50%;position:absolute;top:5.5px;left:5.5px}.Y0dWHa_requestBoundaryControl:after{border:.5px solid var(--dsw-alias-border-l1);width:max-content;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);content:attr(data-label);font:9px/12px var(--ds-font-family-code);opacity:0;pointer-events:none;transition:opacity .12s var(--ds-ease-in-out), transform .12s var(--ds-ease-in-out);user-select:none;white-space:nowrap;border-radius:2px;padding:0 4px;position:absolute;top:2px;left:17px;transform:translate(-2px);box-shadow:0 2px 6px #0000001f}.Y0dWHa_requestBoundaryControl:hover:before,.Y0dWHa_requestBoundaryControl:focus-visible:before{background:var(--dsw-alias-brand-primary-new-colorprimary-new-color)}.Y0dWHa_requestBoundaryControlActive:before,.Y0dWHa_requestBoundaryControlActive:hover:before,.Y0dWHa_requestBoundaryControlActive:focus-visible:before{background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 18%, var(--dsw-alias-bg-layer-1));box-shadow:0 0 0 1.5px var(--dsw-alias-brand-primary-new-colorprimary-new-color)}.Y0dWHa_requestBoundaryControl[data-request-status=error]:before,.Y0dWHa_requestBoundaryControl[data-request-status=error]:hover:before,.Y0dWHa_requestBoundaryControl[data-request-status=error]:focus-visible:before{background:var(--dsw-alias-state-error-primary)}.Y0dWHa_requestBoundaryControl:hover:after,.Y0dWHa_requestBoundaryControl:focus-visible:after{opacity:1;transform:translate(0)}.Y0dWHa_requestBoundaryControl:focus-visible{outline:none}.Y0dWHa_table tbody tr:has(.Y0dWHa_requestBoundaryControl:hover):not([data-selected=true]){background:0 0}.Y0dWHa_event{position:relative}.Y0dWHa_turnRail,.Y0dWHa_selectionRail{background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);pointer-events:none;position:absolute;left:0}.Y0dWHa_turnRail{z-index:4;background:var(--trajectory-turn-accent);width:2px;top:-1px;bottom:-1px}.Y0dWHa_table tbody tr[data-turn-end=true] .Y0dWHa_turnRail{bottom:0}.Y0dWHa_selectionRail{z-index:5;width:3px;top:0;bottom:0}.Y0dWHa_table tbody tr[data-error=true] .Y0dWHa_turnRail{background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 22%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_table tbody tr[data-error=true] .Y0dWHa_selectionRail{background:var(--dsw-alias-state-error-primary)}.Y0dWHa_table tbody tr[data-turn-start=true] td{position:relative;overflow:visible}.Y0dWHa_table tbody tr[data-turn-start=true]:not(:first-child) td:before{z-index:1;background:var(--dsw-alias-border-l1);content:\"\";pointer-events:none;height:2px;position:absolute;top:0;left:0;right:0;transform:translateY(-50%)}.Y0dWHa_event{padding-left:36px!important;padding-right:4px!important;overflow:visible!important}.Y0dWHa_turnLabel{z-index:3;box-sizing:border-box;width:max-content;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-module-platform);font:8px/10px var(--ds-font-family-code);font-variant-numeric:tabular-nums;user-select:none;white-space:nowrap;border-radius:0 0 2px;flex:none;align-items:center;padding:1px 5px;display:inline-grid;position:absolute;top:0;left:0}.Y0dWHa_turnLabelFull,.Y0dWHa_turnLabelCompact{opacity:1;white-space:nowrap;grid-area:1/1;max-width:64px;overflow:hidden}.Y0dWHa_turnLabelCompact{opacity:0;max-width:0}.Y0dWHa_turnLabelActive{color:color-mix(in srgb, var(--dsw-static-blue-500) 55%, var(--dsw-alias-label-tertiary));background:var(--trajectory-turn-accent)}.Y0dWHa_eventInner{justify-content:flex-start;align-items:center;min-width:0;height:100%;display:flex}.Y0dWHa_kindSlot{flex:none;justify-content:flex-end;align-items:flex-end;width:76px;display:flex}.Y0dWHa_kindSlot [role=tooltip]{background:var(--dsw-alias-bg-layer-2);box-shadow:var(--dsw-elevation-panel);color:var(--dsw-alias-label-primary);border:0}.Y0dWHa_content{color:var(--dsw-alias-label-primary);padding-left:4px!important}.Y0dWHa_kindTag{box-sizing:border-box;letter-spacing:.035em;user-select:none;border:1px solid #0000;border-radius:4px;flex:none;align-items:center;height:19px;padding:0 5px;font-size:10px;font-weight:650;line-height:16px;display:inline-flex}.Y0dWHa_kindTagIcon{opacity:0;flex:none;justify-content:center;align-items:center;width:0;height:13px;display:inline-flex;overflow:hidden;transform:scale(.8)}.Y0dWHa_kindTagLabel{opacity:1;white-space:nowrap;max-width:72px;display:inline-block;overflow:hidden}.Y0dWHa_table .Y0dWHa_kindSlot .Y0dWHa_message{justify-content:center;width:100%}@container Y0dWHa_trajectory-table (width<=620px){.Y0dWHa_eventColumn{width:50px}.Y0dWHa_event{padding-left:28px!important;padding-right:3px!important}.Y0dWHa_requestBoundaryControl{--request-boundary-base-left:6px}.Y0dWHa_kindSlot{width:19px}.Y0dWHa_kindTag,.Y0dWHa_table .Y0dWHa_kindSlot .Y0dWHa_message{justify-content:center;width:19px;padding-left:0;padding-right:0}.Y0dWHa_kindTagIcon{opacity:1;width:13px;transform:scale(1)}.Y0dWHa_kindTagLabel,.Y0dWHa_turnLabelFull{opacity:0;max-width:0}.Y0dWHa_turnLabelCompact{opacity:1;max-width:64px}}@media (prefers-reduced-motion:no-preference){.Y0dWHa_eventColumn,.Y0dWHa_event,.Y0dWHa_requestBoundaryControl,.Y0dWHa_kindSlot,.Y0dWHa_kindTag,.Y0dWHa_kindTagIcon,.Y0dWHa_kindTagLabel,.Y0dWHa_turnLabelFull,.Y0dWHa_turnLabelCompact{transition-duration:.18s;transition-timing-function:var(--ds-ease-in-out)}.Y0dWHa_eventColumn,.Y0dWHa_kindSlot{transition-property:width}.Y0dWHa_event{transition-property:padding-right,padding-left}.Y0dWHa_requestBoundaryControl{transition-property:left}.Y0dWHa_kindTag{transition-property:padding-right,padding-left}.Y0dWHa_kindTagIcon{transition-property:width,opacity,transform}.Y0dWHa_kindTagLabel,.Y0dWHa_turnLabelFull,.Y0dWHa_turnLabelCompact{transition-property:max-width,opacity}}.Y0dWHa_user{color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-state-business-tertiary)}.Y0dWHa_systemNeutral{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform)}.Y0dWHa_contextGreen{color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 68%, var(--dsw-alias-label-secondary));background:var(--dsw-alias-state-success-tertiary)}.Y0dWHa_compacted{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform)}.Y0dWHa_compactedSummary{font:var(--dsw-font-xs-13);margin-top:12px;padding:0 0 14px}.Y0dWHa_promptDiffSections{flex-direction:column;gap:14px;max-height:100%;padding:10px 14px 14px;display:flex;overflow:auto}.Y0dWHa_promptDiffSection{min-width:0}.Y0dWHa_promptDiffTitle{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-strong-13);user-select:none;margin:0 0 6px}.Y0dWHa_promptDiff{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);font:11px/17px var(--ds-font-family-code);white-space:pre;margin:0;overflow:auto}.Y0dWHa_promptDiff span{min-width:max-content;padding:0 6px;display:block}.Y0dWHa_promptDiffLinemeta{color:var(--dsw-alias-label-caption);background:var(--dsw-alias-bg-module-platform);user-select:none}.Y0dWHa_promptDiffLinecontext{color:var(--dsw-alias-label-secondary)}.Y0dWHa_promptDiffLineadded{color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 72%, var(--dsw-alias-label-primary));background:var(--dsw-alias-state-success-tertiary)}.Y0dWHa_promptDiffLineremoved{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_assistantVioletBright{color:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 60%, var(--dsw-alias-state-error-secondary));background:color-mix(in srgb, color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 55%, var(--dsw-alias-state-error-secondary)) 15%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_toolAmber{color:var(--dsw-alias-state-warn-label);background:var(--dsw-alias-state-warn-tertiary)}.Y0dWHa_subtoolAmber{color:color-mix(in srgb, var(--dsw-alias-state-warn-label) 62%, var(--dsw-alias-label-tertiary));background:color-mix(in srgb, var(--dsw-alias-state-warn-tertiary) 58%, var(--dsw-alias-bg-layer-1))}.Y0dWHa_contentText{text-overflow:ellipsis;white-space:nowrap;min-width:0;display:block;overflow:hidden}.Y0dWHa_toolCallOnly{color:var(--dsw-alias-label-tertiary)}.Y0dWHa_table tbody tr[data-collapsed-summary=turn] td,.Y0dWHa_table tbody tr[data-collapsed-summary=assistant] td{height:20px}.Y0dWHa_table tbody tr[data-collapsed-summary]{cursor:pointer;transition:background-color .12s var(--ds-ease-in-out);outline:none}.Y0dWHa_table tbody tr[data-collapsed-summary]:hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_table tbody tr[data-collapsed-summary]:focus-visible{box-shadow:inset 0 0 0 1px var(--dsw-alias-state-business-primary)}.Y0dWHa_collapsedTurnContent{min-width:0;color:var(--dsw-alias-label-secondary);align-items:center;font-size:12px;line-height:16px;display:flex}.Y0dWHa_collapsedTurnEllipsis{color:var(--dsw-alias-label-tertiary);user-select:none;flex:none;margin-right:6px;font-weight:600}.Y0dWHa_collapsedTurnText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Y0dWHa_resultPreview{grid-template-columns:clamp(180px, var(--trajectory-tool-request-width,calc(36cqw - 56px)), 480px) minmax(0, 1fr);align-items:center;gap:8px;min-width:0;display:grid}.Y0dWHa_resultRequest,.Y0dWHa_inlineResultText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Y0dWHa_toolCallNameTypeface{color:var(--dsw-alias-label-primary);font:400 12px/18px Menlo,Consolas,Liberation Mono,PingFang SC,Microsoft YaHei}.Y0dWHa_toolCallPayload{color:var(--dsw-alias-label-secondary);font:400 12px/18px var(--ds-font-family-code);margin-left:7px}.Y0dWHa_table tbody tr[data-kind=tool] .Y0dWHa_contentText,.Y0dWHa_table tbody tr[data-kind=subtool] .Y0dWHa_contentText,.Y0dWHa_table tbody tr[data-kind=tool] .Y0dWHa_resultPreview,.Y0dWHa_table tbody tr[data-kind=subtool] .Y0dWHa_resultPreview{font-family:var(--ds-font-family-code);font-size:12px}.Y0dWHa_table tbody tr[data-kind=subtool] .Y0dWHa_content{padding-left:26px}.Y0dWHa_inlineResult{min-width:0;color:var(--dsw-alias-label-secondary);align-items:center;display:flex}.Y0dWHa_noOutputText{color:var(--dsw-alias-label-caption)}.Y0dWHa_arrow{color:var(--dsw-alias-label-caption);flex:none;margin-right:8px}.Y0dWHa_error,.Y0dWHa_overview dd.Y0dWHa_error,.Y0dWHa_details .Y0dWHa_errorPayload{color:var(--dsw-alias-state-error-primary)}.Y0dWHa_details .Y0dWHa_errorPayload .Y0dWHa_resultBlockText{color:inherit}.Y0dWHa_details .Y0dWHa_jsonPayload.Y0dWHa_errorPayload,.Y0dWHa_details .Y0dWHa_jsonPreview.Y0dWHa_errorPayload{--json-tree-property:var(--dsw-alias-state-error-primary);--json-tree-string:var(--dsw-alias-state-error-primary);--json-tree-number:var(--dsw-alias-state-error-primary);--json-tree-keyword:var(--dsw-alias-state-error-primary);--json-tree-punctuation:var(--dsw-alias-state-error-primary);--json-tree-icon:var(--dsw-alias-state-error-primary)}.Y0dWHa_details{border-left:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);flex-direction:column;flex:none;width:clamp(320px,38%,440px);min-width:0;max-width:calc(100% - 280px);min-height:0;display:flex;position:relative}.Y0dWHa_detailsResizeHandle{z-index:6;cursor:col-resize;touch-action:none;user-select:none;background:0 0;border:0;width:8px;padding:0;position:absolute;top:0;bottom:0;left:-4px}.Y0dWHa_detailsResizeHandle:focus-visible{outline:none}.Y0dWHa_detailsHeader{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l2);flex:none;justify-content:space-between;align-items:center;height:42px;padding:0 8px 0 12px;display:flex}.Y0dWHa_detailsTitle{min-width:0;color:var(--dsw-alias-label-primary);align-items:center;gap:8px;display:flex}.Y0dWHa_requestDetailsDot{corner-shape:round;background:var(--dsw-alias-label-secondary);border-radius:50%;flex:none;width:5px;height:5px}.Y0dWHa_requestDetailsName{font:500 12px/16px var(--ds-font-family-code);flex:none}.Y0dWHa_detailsLocation{min-width:0;color:var(--dsw-alias-label-tertiary);font:11px/16px var(--ds-font-family-code);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Y0dWHa_close{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;font-size:18px;line-height:18px;display:inline-flex}.Y0dWHa_close:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_detailTabs{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l2);overscroll-behavior-x:contain;scrollbar-width:none;white-space:nowrap;flex:none;gap:1px;width:100%;min-width:0;max-width:100%;height:34px;padding:0 8px;display:flex;overflow:auto hidden}.Y0dWHa_detailTabs::-webkit-scrollbar{display:none}.Y0dWHa_detailTab{color:var(--dsw-alias-label-tertiary);cursor:pointer;font:var(--dsw-font-xs-13);background:0 0;border:0;flex:none;padding:0 9px;position:relative}.Y0dWHa_detailTab:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_detailTabActive{color:var(--dsw-alias-state-business-primary)}.Y0dWHa_detailTabActive:after{background:var(--dsw-alias-state-business-primary);content:\"\";border-radius:1px 1px 0 0;height:2px;position:absolute;bottom:0;left:9px;right:9px}.Y0dWHa_close:focus-visible,.Y0dWHa_detailTab:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}.Y0dWHa_detailBody{min-height:0;padding-bottom:var(--dsh-trajectory-bottom-clearance,0px);scrollbar-gutter:stable;flex:1;overflow:hidden auto}.Y0dWHa_detailBodySummary{box-sizing:border-box;padding-bottom:calc(12px + var(--dsh-trajectory-bottom-clearance,0px));flex-direction:column;display:flex;overflow:hidden}.Y0dWHa_detailBodySummary>.Y0dWHa_overview{overscroll-behavior:contain;flex:0 auto;min-height:0;overflow:auto}.Y0dWHa_detailBodySummary>.Y0dWHa_compactedSummary{flex:1;min-height:0;overflow:auto}.Y0dWHa_summaryScrollRegion{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.Y0dWHa_summaryScrollRegion:hover,.Y0dWHa_summaryScrollRegion:focus-within{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2)}.Y0dWHa_compactedSummary .Y0dWHa_markdownPayload{padding-right:18px}.Y0dWHa_overview{font:var(--dsw-font-xs-13);margin:0;padding:8px 0}.Y0dWHa_overviewParentLinks{gap:14px;display:flex}.Y0dWHa_overviewHierarchyNavLink{all:unset;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;opacity:1;align-items:center;gap:1px;display:inline-flex}.Y0dWHa_overviewHierarchyNavLink:hover{color:var(--dsw-alias-label-primary)}.Y0dWHa_overviewHierarchyJumpIconTight{color:var(--dsw-alias-label-caption);flex:none}.Y0dWHa_overviewHierarchyNavLink:hover .Y0dWHa_overviewHierarchyJumpIconTight,.Y0dWHa_overviewHierarchyNavLink:focus-visible .Y0dWHa_overviewHierarchyJumpIconTight{color:var(--dsw-alias-label-primary)}.Y0dWHa_overviewHierarchyNavLink:focus-visible{color:var(--dsw-alias-label-primary);outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_overview>div{grid-template-columns:94px minmax(0,1fr);align-items:center;min-height:22px;padding:0 14px;display:grid}.Y0dWHa_overview>.Y0dWHa_requestTokenDetail dt{padding-left:12px}.Y0dWHa_usagePanel{padding:4px 0 10px}.Y0dWHa_usageGroup+.Y0dWHa_usageGroup{margin-top:8px}.Y0dWHa_usageHeading{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-strong-13);user-select:none;margin:0;padding:4px 14px 1px}.Y0dWHa_usageGroup .Y0dWHa_overview{padding:0}.Y0dWHa_overview dt{color:var(--dsw-alias-label-tertiary)}.Y0dWHa_overview dd{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;margin:0;overflow:hidden}.Y0dWHa_timestampToggle{all:unset;color:inherit;cursor:pointer;font:inherit;user-select:text}.Y0dWHa_timestampToggle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_overviewSections{border-top:0;flex-direction:column;flex:1;min-height:min-content;display:flex;overflow:hidden}.Y0dWHa_overviewSection{flex-direction:column;flex:1 1 0;min-height:28px;max-height:max-content;display:flex;overflow:hidden}.Y0dWHa_overviewSection+.Y0dWHa_overviewSection{padding-top:8px}.Y0dWHa_overviewHeading{box-sizing:border-box;width:100%;height:28px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);font:var(--dsw-font-xs-strong-13);user-select:none;flex:none;align-items:flex-end;margin:0;padding:0 0 3px 14px;display:flex}.Y0dWHa_overviewTitle{width:max-content;height:auto;color:inherit;cursor:pointer;font:inherit;user-select:none;background:0 0;border:0;flex:none;align-items:center;gap:3px;padding:0;line-height:1;display:inline-flex}.Y0dWHa_overviewTitleIcon{color:var(--dsw-alias-label-caption);flex:none}.Y0dWHa_overviewTitle:hover .Y0dWHa_overviewTitleIcon{color:var(--dsw-alias-label-primary)}.Y0dWHa_overviewTitle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_overviewTitle:focus-visible .Y0dWHa_overviewTitleIcon{color:var(--dsw-alias-state-business-primary)}.Y0dWHa_overviewPreview{overscroll-behavior:contain;background:var(--dsw-alias-bg-layer-1);flex:1;min-height:0;overflow:auto}.Y0dWHa_overviewPreview>:last-child{margin-bottom:0;padding-bottom:0}.Y0dWHa_overviewPreview .Y0dWHa_jsonPreview>:first-child,.Y0dWHa_overviewPreview .Y0dWHa_schemaTree>:first-child{padding-bottom:0}.Y0dWHa_overviewPreview .Y0dWHa_schemaTree{margin-bottom:0}.Y0dWHa_overviewPreview .Y0dWHa_overview{padding:2px 0 0}.Y0dWHa_overviewPreview .Y0dWHa_overview>div{min-height:22px}.Y0dWHa_markdownPreview,.Y0dWHa_markdownPayload{color:var(--dsw-alias-label-primary)}.Y0dWHa_markdownPreview>div,.Y0dWHa_markdownPayload>div{font:var(--dsw-font-xs-13);gap:8px}.Y0dWHa_markdownPreview>div h1,.Y0dWHa_markdownPayload>div h1{font:600 16px/22px var(--dsw-font-family)}.Y0dWHa_markdownPreview>div h2,.Y0dWHa_markdownPayload>div h2{font:600 15px/22px var(--dsw-font-family)}.Y0dWHa_markdownPreview>div :where(h3,h4,h5,h6),.Y0dWHa_markdownPayload>div :where(h3,h4,h5,h6){font:600 14px/20px var(--dsw-font-family)}.Y0dWHa_markdownPreview>div :not(pre)>code,.Y0dWHa_markdownPayload>div :not(pre)>code{font:12px/18px var(--ds-font-family-code)}.Y0dWHa_markdownPreview>div table,.Y0dWHa_markdownPayload>div table{font:var(--dsw-font-xs-13)}.Y0dWHa_markdownPreview>div>:first-child{margin-top:0}.Y0dWHa_markdownPreview>div>:last-child{margin-bottom:0}.Y0dWHa_markdownPreview>div :where(h1,h2,h3){margin:12px 0 6px}.Y0dWHa_markdownPreview>div :where(h4,h5,h6){margin:10px 0 5px}.Y0dWHa_markdownPreview>div :where(p,ul,ol){margin:8px 0}.Y0dWHa_markdownPreview>div li:not(:first-child){margin-top:3px}.Y0dWHa_markdownPreview>div blockquote{margin-top:8px}.Y0dWHa_markdownPreview>div hr{margin:14px 0}.Y0dWHa_markdownPreview>div>.md-code-block{margin:10px 0}.Y0dWHa_assistantContent .Y0dWHa_markdownPayload,.Y0dWHa_assistantContent .Y0dWHa_payload{min-height:0}.Y0dWHa_thinkingQuote{border-left:2px solid var(--dsw-alias-markdown-citation);color:var(--dsw-alias-label-secondary);background:0 0;margin:6px 14px 0 12px;padding-left:6px}.Y0dWHa_thinkingQuoteOnlyPreview{margin-bottom:8px}.Y0dWHa_detailBody>.Y0dWHa_assistantContentRendered .Y0dWHa_thinkingQuote{margin-top:14px}.Y0dWHa_thinkingToggle{width:max-content;height:18px;color:var(--dsw-alias-label-tertiary);cursor:pointer;font:600 12px/18px var(--dsw-font-family);user-select:none;background:0 0;border:0;align-items:center;gap:2px;padding:0;display:flex}.Y0dWHa_thinkingChevron{transition:transform .12s var(--ds-ease-in-out);flex:none}.Y0dWHa_thinkingToggle[aria-expanded=true] .Y0dWHa_thinkingChevron{transform:rotate(90deg)}.Y0dWHa_thinkingToggle:hover{color:var(--dsw-alias-label-secondary)}.Y0dWHa_thinkingToggle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.Y0dWHa_thinkingQuote .Y0dWHa_markdownPreview,.Y0dWHa_thinkingQuote .Y0dWHa_markdownPayload,.Y0dWHa_thinkingQuote .Y0dWHa_payload{min-height:0;color:var(--dsw-alias-label-secondary);background:0 0;padding:2px 0}.Y0dWHa_assistantOutput{background:var(--dsw-alias-bg-layer-1)}.Y0dWHa_markdownPreview{padding:6px 14px 8px}.Y0dWHa_markdownPayload{min-height:100%;padding:14px}.Y0dWHa_jsonPayload{min-height:100%}.Y0dWHa_jsonPreview{min-height:0}.Y0dWHa_schema{background:var(--dsw-alias-bg-layer-1);min-height:100%}.Y0dWHa_schemaPreview{min-height:0}.Y0dWHa_schemaIntro{padding:12px 14px 6px}.Y0dWHa_schemaPreview .Y0dWHa_schemaIntro{padding-top:6px}.Y0dWHa_schemaName{color:var(--dsw-alias-label-primary);font:600 12px/18px var(--ds-font-family-code);margin:0}.Y0dWHa_schemaDescription{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);white-space:pre-wrap;margin:2px 0 0}.Y0dWHa_schemaParameters{min-width:0}.Y0dWHa_schemaParametersTitle{color:var(--dsw-alias-label-tertiary);font:600 11px/16px var(--dsw-font-family);user-select:none;margin:0;padding:4px 14px 2px}.Y0dWHa_schemaTree{margin:0 6px 8px 0}.Y0dWHa_payload{box-sizing:border-box;overflow-wrap:anywhere;min-height:100%;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-markdown-code-block);font:12px/19px var(--ds-font-family-code);tab-size:2;white-space:pre-wrap;margin:0;padding:14px}.Y0dWHa_payloadPreview{min-height:0;padding:6px 14px 8px}.Y0dWHa_sourceBlocks{box-sizing:border-box;min-height:100%;padding:12px 14px}.Y0dWHa_sourceBlock+.Y0dWHa_sourceBlock{margin-top:14px}.Y0dWHa_sourceBlockHeader,.Y0dWHa_sourceBlockJumpTarget{user-select:none;align-items:center;gap:3px;width:max-content;margin-bottom:3px;display:flex}.Y0dWHa_sourceBlockJumpTarget{all:unset;cursor:pointer;user-select:none;align-items:center;gap:3px;width:max-content;margin-bottom:3px;display:flex}.Y0dWHa_sourceBlockLabel{color:var(--dsw-alias-label-tertiary);font:11px/16px var(--ds-font-family-code)}.Y0dWHa_sourceBlockJumpIcon{color:var(--dsw-alias-label-caption);flex:none}.Y0dWHa_sourceBlockJumpTarget:hover .Y0dWHa_sourceBlockJumpIcon{color:var(--dsw-alias-label-primary)}.Y0dWHa_sourceBlockJumpTarget:focus-visible{outline:none}.Y0dWHa_sourceBlockJumpTarget:focus-visible .Y0dWHa_sourceBlockJumpIcon{color:var(--dsw-alias-state-business-primary)}.Y0dWHa_sourceBlockContent{overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font:12px/19px var(--ds-font-family-code);tab-size:2;white-space:pre-wrap;background:0 0;margin:0}.Y0dWHa_messageImages{flex-direction:column;gap:8px;margin:8px 14px 14px;display:flex}.Y0dWHa_messageImagesPreview{gap:6px;margin:6px 14px 8px}.Y0dWHa_assistantToolCalls{box-sizing:border-box;max-width:100%;color:var(--dsw-alias-label-secondary);font:11px/17px var(--ds-font-family-code);margin:2px 14px 12px;padding:0;list-style:none}.Y0dWHa_assistantToolCallsPreview{margin-top:2px;margin-bottom:8px}.Y0dWHa_assistantToolCalls li{min-width:0}.Y0dWHa_assistantToolCallButton{all:unset;box-sizing:border-box;cursor:pointer;border-radius:3px;align-items:center;width:calc(100% + 4px);min-width:0;height:19px;margin-left:-4px;padding:0 4px;display:flex}.Y0dWHa_assistantToolCallButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_assistantToolCallButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}.Y0dWHa_assistantToolCallIcon{color:var(--dsw-alias-label-caption);flex:none;margin-right:5px}.Y0dWHa_assistantToolCallButton:hover .Y0dWHa_assistantToolCallIcon,.Y0dWHa_assistantToolCallButton:focus-visible .Y0dWHa_assistantToolCallIcon{color:var(--dsw-alias-label-secondary)}.Y0dWHa_assistantToolCallText{white-space:nowrap;flex:1;min-width:0;display:flex;overflow:hidden}.Y0dWHa_assistantToolCallName{color:var(--dsw-alias-label-secondary);flex:none;margin-right:5px;font-weight:500}.Y0dWHa_assistantToolCallArgs{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Y0dWHa_systemPrompt{box-sizing:border-box}.Y0dWHa_toolCatalog{min-height:100%;padding:8px 0 16px}.Y0dWHa_toolCatalogItem{border-bottom:.5px solid var(--dsw-alias-border-l1)}.Y0dWHa_toolCatalogSummary{box-sizing:border-box;cursor:pointer;user-select:none;grid-template-columns:12px 12px max-content minmax(0,1fr);align-items:center;gap:5px;min-height:30px;padding:4px 12px;list-style:none;display:grid}.Y0dWHa_toolCatalogSummary::-webkit-details-marker{display:none}.Y0dWHa_toolCatalogSummary:hover{background:var(--dsw-alias-interactive-bg-hover)}.Y0dWHa_toolCatalogSummary:focus-visible{background:var(--dsw-alias-interactive-bg-hover);outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}.Y0dWHa_toolCatalogChevron,.Y0dWHa_toolCatalogIcon{color:var(--dsw-alias-label-caption)}.Y0dWHa_toolCatalogChevron{transition:transform .1s var(--ds-ease-in-out)}.Y0dWHa_toolCatalogItem[open] .Y0dWHa_toolCatalogChevron{transform:rotate(90deg)}.Y0dWHa_toolCatalogName{color:var(--dsw-alias-label-primary);font:500 12px/18px var(--ds-font-family-code)}.Y0dWHa_toolCatalogDescription{min-width:0;color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.Y0dWHa_toolCatalogDefinition{background:var(--dsw-alias-bg-base);padding:0 0 8px 29px}.Y0dWHa_toolCatalogFullDescription{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);white-space:pre-wrap;margin:0;padding:7px 14px 4px 0}.Y0dWHa_toolCatalogTree{margin-left:-14px;margin-right:6px}.Y0dWHa_resultBlocks{box-sizing:border-box;flex-direction:column;gap:10px;min-height:100%;padding:14px;display:flex}.Y0dWHa_resultBlocksPreview{gap:6px;min-height:0;padding:6px 14px 8px}.Y0dWHa_resultBlockText{overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font:12px/19px var(--ds-font-family-code);tab-size:2;white-space:pre-wrap;background:0 0;margin:0}.Y0dWHa_overviewPreview .Y0dWHa_noPayload{padding:6px 14px 8px}.Y0dWHa_noPayload{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);margin:0;padding:18px 14px}@media (width<=760px){.Y0dWHa_details{z-index:5;border-left-color:var(--dsw-alias-border-l3);width:min(92%,420px);max-width:92%;position:absolute;top:0;bottom:0;right:0;box-shadow:-12px 0 32px #00000024}}";
|
|
2996
3653
|
const tagId$3 = "@deepseek-ai/dsh-client-ui-trajectory/TrajectoryTable.module.css";
|
|
2997
3654
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
2998
3655
|
const tag = document.createElement("style");
|
|
@@ -3071,9 +3728,6 @@ window.__ModuleLoader__.load({
|
|
|
3071
3728
|
"overviewSections": "Y0dWHa_overviewSections",
|
|
3072
3729
|
"overviewTitle": "Y0dWHa_overviewTitle",
|
|
3073
3730
|
"overviewTitleIcon": "Y0dWHa_overviewTitleIcon",
|
|
3074
|
-
"panelImage": "Y0dWHa_panelImage",
|
|
3075
|
-
"panelImageLink": "Y0dWHa_panelImageLink",
|
|
3076
|
-
"panelImageLinkPreview": "Y0dWHa_panelImageLinkPreview",
|
|
3077
3731
|
"payload": "Y0dWHa_payload",
|
|
3078
3732
|
"payloadPreview": "Y0dWHa_payloadPreview",
|
|
3079
3733
|
"promptDiff": "Y0dWHa_promptDiff",
|
|
@@ -3158,14 +3812,14 @@ window.__ModuleLoader__.load({
|
|
|
3158
3812
|
const VIRTUALIZATION_THRESHOLD = 100;
|
|
3159
3813
|
const VIRTUAL_OVERSCAN_ROWS = 12;
|
|
3160
3814
|
const VIRTUAL_INITIAL_VIEWPORT_HEIGHT_PX = 600;
|
|
3161
|
-
const
|
|
3162
|
-
system: "
|
|
3163
|
-
user: "
|
|
3164
|
-
context: "
|
|
3165
|
-
compacted: "
|
|
3166
|
-
message: "
|
|
3167
|
-
tool: "
|
|
3168
|
-
subtool: "
|
|
3815
|
+
const KIND_LABEL_KEY = {
|
|
3816
|
+
system: "kind.system",
|
|
3817
|
+
user: "kind.user",
|
|
3818
|
+
context: "kind.context",
|
|
3819
|
+
compacted: "kind.compacted",
|
|
3820
|
+
message: "kind.assistant",
|
|
3821
|
+
tool: "kind.tool",
|
|
3822
|
+
subtool: "kind.subtool"
|
|
3169
3823
|
};
|
|
3170
3824
|
function ToolWrenchIcon() {
|
|
3171
3825
|
return (0, react_jsx_runtime.jsx)("svg", {
|
|
@@ -3272,33 +3926,56 @@ window.__ModuleLoader__.load({
|
|
|
3272
3926
|
const DEFAULT_TOOL_REQUEST_OFFSET = 56;
|
|
3273
3927
|
const SYSTEM_PROMPT_TABS = [{
|
|
3274
3928
|
id: "system-prompt",
|
|
3275
|
-
|
|
3929
|
+
labelKey: "tab.systemPrompt"
|
|
3276
3930
|
}, {
|
|
3277
3931
|
id: "tools",
|
|
3278
|
-
|
|
3932
|
+
labelKey: "tab.tools"
|
|
3279
3933
|
}];
|
|
3280
3934
|
const SYSTEM_UPDATE_TABS = [{
|
|
3281
3935
|
id: "diff",
|
|
3282
|
-
|
|
3936
|
+
labelKey: "tab.diff"
|
|
3283
3937
|
}, ...SYSTEM_PROMPT_TABS];
|
|
3284
3938
|
const REQUEST_TABS = [
|
|
3285
3939
|
{
|
|
3286
3940
|
id: "overview",
|
|
3287
|
-
|
|
3941
|
+
labelKey: "tab.summary"
|
|
3288
3942
|
},
|
|
3289
3943
|
{
|
|
3290
3944
|
id: "options",
|
|
3291
|
-
|
|
3945
|
+
labelKey: "tab.options"
|
|
3292
3946
|
},
|
|
3293
3947
|
{
|
|
3294
3948
|
id: "usage",
|
|
3295
|
-
|
|
3949
|
+
labelKey: "tab.usage"
|
|
3296
3950
|
},
|
|
3297
3951
|
{
|
|
3298
3952
|
id: "timing",
|
|
3299
|
-
|
|
3953
|
+
labelKey: "tab.timing"
|
|
3300
3954
|
}
|
|
3301
3955
|
];
|
|
3956
|
+
function jsonTreeLabels(t) {
|
|
3957
|
+
return {
|
|
3958
|
+
copyValue: t("copy.value"),
|
|
3959
|
+
copyJson: t("copy.json"),
|
|
3960
|
+
copyPath: t("copy.path"),
|
|
3961
|
+
copyPrettyJson: t("copy.prettyJson"),
|
|
3962
|
+
copyCompactJson: t("copy.compactJson"),
|
|
3963
|
+
copied: t("copied"),
|
|
3964
|
+
copyFailed: t("copy.failed"),
|
|
3965
|
+
collapseNode: t("json.collapseNode"),
|
|
3966
|
+
expandNode: t("json.expandNode"),
|
|
3967
|
+
copyButtonTitle: (action) => t("copy.optionsHint", { action })
|
|
3968
|
+
};
|
|
3969
|
+
}
|
|
3970
|
+
function markdownLabels(t) {
|
|
3971
|
+
return {
|
|
3972
|
+
code: {
|
|
3973
|
+
copyLabel: t("copy"),
|
|
3974
|
+
copiedLabel: t("copied")
|
|
3975
|
+
},
|
|
3976
|
+
footnotes: t("markdown.footnotes")
|
|
3977
|
+
};
|
|
3978
|
+
}
|
|
3302
3979
|
function clampDetailsWidth(width, splitWidth) {
|
|
3303
3980
|
const maxWidth = Math.max(DETAILS_MIN_WIDTH, Math.min(DETAILS_MAX_WIDTH, splitWidth - TABLE_MIN_WIDTH));
|
|
3304
3981
|
return Math.round(Math.min(Math.max(width, DETAILS_MIN_WIDTH), maxWidth));
|
|
@@ -3306,12 +3983,12 @@ window.__ModuleLoader__.load({
|
|
|
3306
3983
|
function defaultToolRequestWidth(splitWidth) {
|
|
3307
3984
|
return Math.min(Math.max(splitWidth * DEFAULT_TOOL_REQUEST_SHARE - DEFAULT_TOOL_REQUEST_OFFSET, TOOL_REQUEST_MIN_WIDTH), TOOL_REQUEST_MAX_WIDTH);
|
|
3308
3985
|
}
|
|
3309
|
-
function formatDurationMs(milliseconds) {
|
|
3310
|
-
if (milliseconds < 1e3) return
|
|
3311
|
-
return
|
|
3986
|
+
function formatDurationMs(milliseconds, t) {
|
|
3987
|
+
if (milliseconds < 1e3) return t("unit.milliseconds", { value: Math.round(milliseconds) });
|
|
3988
|
+
return t("unit.seconds", { value: (milliseconds / 1e3).toFixed(milliseconds < 1e4 ? 2 : 1) });
|
|
3312
3989
|
}
|
|
3313
|
-
function formatStartedAt(timestamp) {
|
|
3314
|
-
if (timestamp === null || !Number.isFinite(timestamp)) return "
|
|
3990
|
+
function formatStartedAt(timestamp, t) {
|
|
3991
|
+
if (timestamp === null || !Number.isFinite(timestamp)) return t("timing.notAvailable");
|
|
3315
3992
|
const date = new Date(timestamp);
|
|
3316
3993
|
const two = (value) => String(value).padStart(2, "0");
|
|
3317
3994
|
const three = (value) => String(value).padStart(3, "0");
|
|
@@ -3323,55 +4000,58 @@ window.__ModuleLoader__.load({
|
|
|
3323
4000
|
const selection = window.getSelection();
|
|
3324
4001
|
return selection !== null && !selection.isCollapsed && selection.rangeCount > 0 && selection.getRangeAt(0).intersectsNode(target);
|
|
3325
4002
|
}
|
|
3326
|
-
function StartedAtValue({ timestamp }) {
|
|
4003
|
+
function StartedAtValue({ timestamp, t }) {
|
|
3327
4004
|
const [showUnix, setShowUnix] = (0, react.useState)(false);
|
|
3328
|
-
if (timestamp === null || !Number.isFinite(timestamp)) return (0, react_jsx_runtime.jsx)("dd", { children: "
|
|
4005
|
+
if (timestamp === null || !Number.isFinite(timestamp)) return (0, react_jsx_runtime.jsx)("dd", { children: t("timing.notAvailable") });
|
|
3329
4006
|
return (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("button", {
|
|
3330
4007
|
type: "button",
|
|
3331
4008
|
className: TrajectoryTable_module_css_default.timestampToggle,
|
|
3332
|
-
title: showUnix ? "
|
|
4009
|
+
title: showUnix ? t("timing.showLocalTime") : t("timing.showUnixTimestamp"),
|
|
3333
4010
|
onClick: (event) => {
|
|
3334
4011
|
if (clickSelectsText(event.currentTarget)) return;
|
|
3335
4012
|
setShowUnix((current) => !current);
|
|
3336
4013
|
},
|
|
3337
|
-
children: showUnix ? (timestamp / 1e3).toFixed(3) : formatStartedAt(timestamp)
|
|
4014
|
+
children: showUnix ? (timestamp / 1e3).toFixed(3) : formatStartedAt(timestamp, t)
|
|
3338
4015
|
}) });
|
|
3339
4016
|
}
|
|
3340
|
-
function totalTime(metrics) {
|
|
3341
|
-
if (!metrics.timingRecorded) return "
|
|
3342
|
-
if (metrics.stepStartTime === null) return "
|
|
3343
|
-
if (metrics.completedTime === null) return "
|
|
3344
|
-
return formatDurationMs(Math.max(0, metrics.completedTime - metrics.stepStartTime));
|
|
3345
|
-
}
|
|
3346
|
-
function ttft(metrics) {
|
|
3347
|
-
if (!metrics.timingRecorded) return "
|
|
3348
|
-
if (metrics.stepStartTime === null) return "
|
|
3349
|
-
if (metrics.firstTokenTime === null) return "
|
|
3350
|
-
return formatDurationMs(Math.max(0, metrics.firstTokenTime - metrics.stepStartTime));
|
|
3351
|
-
}
|
|
3352
|
-
function generationTime(metrics) {
|
|
3353
|
-
if (!metrics.timingRecorded || metrics.firstTokenTime === null) return "
|
|
3354
|
-
if (metrics.completedTime === null) return "
|
|
3355
|
-
return formatDurationMs(Math.max(0, metrics.completedTime - metrics.firstTokenTime));
|
|
3356
|
-
}
|
|
3357
|
-
function throughput(metrics) {
|
|
3358
|
-
if (!metrics.usageProvided) return "
|
|
3359
|
-
if (metrics.outputTokens === null) return "
|
|
3360
|
-
if (!metrics.timingRecorded || metrics.firstTokenTime === null) return "
|
|
3361
|
-
if (metrics.completedTime === null) return "
|
|
4017
|
+
function totalTime(metrics, t) {
|
|
4018
|
+
if (!metrics.timingRecorded) return t("timing.notRecorded");
|
|
4019
|
+
if (metrics.stepStartTime === null) return t("timing.stepStartUnavailable");
|
|
4020
|
+
if (metrics.completedTime === null) return t("status.pending");
|
|
4021
|
+
return formatDurationMs(Math.max(0, metrics.completedTime - metrics.stepStartTime), t);
|
|
4022
|
+
}
|
|
4023
|
+
function ttft(metrics, t) {
|
|
4024
|
+
if (!metrics.timingRecorded) return t("timing.notRecorded");
|
|
4025
|
+
if (metrics.stepStartTime === null) return t("timing.stepStartUnavailable");
|
|
4026
|
+
if (metrics.firstTokenTime === null) return t("timing.firstTokenUnavailable");
|
|
4027
|
+
return formatDurationMs(Math.max(0, metrics.firstTokenTime - metrics.stepStartTime), t);
|
|
4028
|
+
}
|
|
4029
|
+
function generationTime(metrics, t) {
|
|
4030
|
+
if (!metrics.timingRecorded || metrics.firstTokenTime === null) return t("timing.firstTokenUnavailable");
|
|
4031
|
+
if (metrics.completedTime === null) return t("status.pending");
|
|
4032
|
+
return formatDurationMs(Math.max(0, metrics.completedTime - metrics.firstTokenTime), t);
|
|
4033
|
+
}
|
|
4034
|
+
function throughput(metrics, t) {
|
|
4035
|
+
if (!metrics.usageProvided) return t("timing.usageUnavailable");
|
|
4036
|
+
if (metrics.outputTokens === null) return t("timing.outputTokensUnavailable");
|
|
4037
|
+
if (!metrics.timingRecorded || metrics.firstTokenTime === null) return t("timing.firstTokenUnavailable");
|
|
4038
|
+
if (metrics.completedTime === null) return t("status.pending");
|
|
3362
4039
|
const generationSeconds = (metrics.completedTime - metrics.firstTokenTime) / 1e3;
|
|
3363
|
-
if (generationSeconds <= 0) return "
|
|
3364
|
-
return
|
|
4040
|
+
if (generationSeconds <= 0) return t("timing.durationTooShort");
|
|
4041
|
+
return t("unit.tokensPerSecond", { value: (metrics.outputTokens / generationSeconds).toFixed(1) });
|
|
3365
4042
|
}
|
|
3366
|
-
function AssistantTimingPanel({ metrics }) {
|
|
4043
|
+
function AssistantTimingPanel({ metrics, t }) {
|
|
3367
4044
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
3368
4045
|
className: TrajectoryTable_module_css_default.overview,
|
|
3369
4046
|
children: [
|
|
3370
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4047
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
4048
|
+
timestamp: metrics.stepStartTime,
|
|
4049
|
+
t
|
|
4050
|
+
})] }),
|
|
4051
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.totalDuration") }), (0, react_jsx_runtime.jsx)("dd", { children: totalTime(metrics, t) })] }),
|
|
4052
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.ttft") }), (0, react_jsx_runtime.jsx)("dd", { children: ttft(metrics, t) })] }),
|
|
4053
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.generation") }), (0, react_jsx_runtime.jsx)("dd", { children: generationTime(metrics, t) })] }),
|
|
4054
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.throughput") }), (0, react_jsx_runtime.jsx)("dd", { children: throughput(metrics, t) })] })
|
|
3375
4055
|
]
|
|
3376
4056
|
});
|
|
3377
4057
|
}
|
|
@@ -3416,43 +4096,32 @@ window.__ModuleLoader__.load({
|
|
|
3416
4096
|
}
|
|
3417
4097
|
return filtered;
|
|
3418
4098
|
}
|
|
3419
|
-
function requestStep(group) {
|
|
3420
|
-
if (!group.startsWith("Step ")) return void 0;
|
|
3421
|
-
const value = Number(group.slice(5));
|
|
3422
|
-
return Number.isInteger(value) && value > 0 ? value : void 0;
|
|
3423
|
-
}
|
|
3424
4099
|
function requestKey(turn, group) {
|
|
3425
4100
|
return `${turn}\u0000${group}`;
|
|
3426
4101
|
}
|
|
3427
|
-
function
|
|
4102
|
+
function requestIdentity(request) {
|
|
4103
|
+
return request.purpose === "compaction" ? `compaction\u0000${request.seq}` : `assistant\u0000${request.turn}\u0000${request.step}`;
|
|
4104
|
+
}
|
|
4105
|
+
function indexRequestBoundaries(records, requestGroups) {
|
|
3428
4106
|
const boundaries = /* @__PURE__ */ new Map();
|
|
3429
4107
|
for (const record of records) {
|
|
3430
4108
|
const key = requestKey(record.turn, record.group);
|
|
4109
|
+
if (!requestGroups.has(key)) continue;
|
|
3431
4110
|
if (boundaries.has(key)) continue;
|
|
3432
|
-
if (requestStep(record.group) === void 0) {
|
|
3433
|
-
if (record.groupStart) boundaries.set(key, record.cell.index);
|
|
3434
|
-
continue;
|
|
3435
|
-
}
|
|
3436
4111
|
if (record.cell.kind === "user" || record.cell.kind === "context") continue;
|
|
3437
4112
|
boundaries.set(key, record.cell.index);
|
|
3438
4113
|
}
|
|
3439
4114
|
return boundaries;
|
|
3440
4115
|
}
|
|
3441
|
-
function sectionLabel(turn) {
|
|
3442
|
-
return turn === null ? "
|
|
4116
|
+
function sectionLabel(turn, t) {
|
|
4117
|
+
return turn === null ? t("section.betweenTurns") : t("turn.label", { turn });
|
|
3443
4118
|
}
|
|
3444
|
-
function indexRequestNumbers(
|
|
4119
|
+
function indexRequestNumbers(sessionNumbers) {
|
|
3445
4120
|
const numbers = /* @__PURE__ */ new Map();
|
|
3446
4121
|
for (const request of sessionNumbers ?? []) numbers.set(requestKey(request.turn, request.group), request.number);
|
|
3447
|
-
let next = Math.max(0, ...numbers.values()) + 1;
|
|
3448
|
-
const boundaryRecords = records.filter((record) => boundaries.get(requestKey(record.turn, record.group)) === record.cell.index && requestStep(record.group) !== void 0).sort((left, right) => left.cell.index - right.cell.index);
|
|
3449
|
-
for (const record of boundaryRecords) {
|
|
3450
|
-
const key = requestKey(record.turn, record.group);
|
|
3451
|
-
if (!numbers.has(key)) numbers.set(key, next++);
|
|
3452
|
-
}
|
|
3453
4122
|
return numbers;
|
|
3454
4123
|
}
|
|
3455
|
-
function indexRequestBoundaryRuns(records) {
|
|
4124
|
+
function indexRequestBoundaryRuns(records, requestGroups) {
|
|
3456
4125
|
const indexes = /* @__PURE__ */ new Map();
|
|
3457
4126
|
let runLength = 0;
|
|
3458
4127
|
for (const record of records) {
|
|
@@ -3460,17 +4129,17 @@ window.__ModuleLoader__.load({
|
|
|
3460
4129
|
indexes.set(record.cell.index, runLength++);
|
|
3461
4130
|
continue;
|
|
3462
4131
|
}
|
|
3463
|
-
if (runLength > 0 && record.groupStart &&
|
|
4132
|
+
if (runLength > 0 && record.groupStart && requestGroups.has(requestKey(record.turn, record.group))) indexes.set(record.cell.index, runLength);
|
|
3464
4133
|
runLength = 0;
|
|
3465
4134
|
}
|
|
3466
4135
|
return indexes;
|
|
3467
4136
|
}
|
|
3468
|
-
function summarizeTurn(records) {
|
|
3469
|
-
const steps = new Set(records.map((record) => record.group).filter((
|
|
4137
|
+
function summarizeTurn(records, requestGroups, t) {
|
|
4138
|
+
const steps = new Set(records.map((record) => requestKey(record.turn, record.group)).filter((key) => requestGroups.has(key))).size;
|
|
3470
4139
|
const toolCalls = records.filter((record) => record.cell.kind === "tool" || record.cell.kind === "subtool").length;
|
|
3471
|
-
return [
|
|
4140
|
+
return [t(steps === 1 ? "summary.steps.one" : "summary.steps.other", { count: steps }), t(toolCalls === 1 ? "summary.toolCalls.one" : "summary.toolCalls.other", { count: toolCalls })].join(" · ");
|
|
3472
4141
|
}
|
|
3473
|
-
function collapseTurnRecords(records, collapsedTurns) {
|
|
4142
|
+
function collapseTurnRecords(records, collapsedTurns, requestGroups, t) {
|
|
3474
4143
|
const recordsByTurn = /* @__PURE__ */ new Map();
|
|
3475
4144
|
for (const record of records) {
|
|
3476
4145
|
if (record.turn === null) continue;
|
|
@@ -3493,7 +4162,7 @@ window.__ModuleLoader__.load({
|
|
|
3493
4162
|
groupStart: false,
|
|
3494
4163
|
turnStart: false,
|
|
3495
4164
|
turnEnd: true,
|
|
3496
|
-
collapsedSummary: summarizeTurn(contentRecords.slice(1)),
|
|
4165
|
+
collapsedSummary: summarizeTurn(contentRecords.slice(1), requestGroups, t),
|
|
3497
4166
|
collapsedSummaryKind: "turn"
|
|
3498
4167
|
}];
|
|
3499
4168
|
});
|
|
@@ -3510,16 +4179,16 @@ window.__ModuleLoader__.load({
|
|
|
3510
4179
|
}
|
|
3511
4180
|
return calls;
|
|
3512
4181
|
}
|
|
3513
|
-
function summarizeAssistantTools(records) {
|
|
4182
|
+
function summarizeAssistantTools(records, t) {
|
|
3514
4183
|
const names = [...new Set(records.map((record) => {
|
|
3515
4184
|
const separator = record.cell.text.indexOf(" · ");
|
|
3516
4185
|
return separator === -1 ? record.cell.text : record.cell.text.slice(0, separator);
|
|
3517
4186
|
}).filter((name) => name !== ""))];
|
|
3518
4187
|
const count = records.length;
|
|
3519
|
-
const summary =
|
|
4188
|
+
const summary = t(count === 1 ? "summary.toolCalls.one" : "summary.toolCalls.other", { count });
|
|
3520
4189
|
return names.length > 0 ? `${summary} · ${names.join(", ")}` : summary;
|
|
3521
4190
|
}
|
|
3522
|
-
function collapseAssistantRecords(records, collapsedAssistants) {
|
|
4191
|
+
function collapseAssistantRecords(records, collapsedAssistants, t) {
|
|
3523
4192
|
const out = [];
|
|
3524
4193
|
for (let i = 0; i < records.length; i++) {
|
|
3525
4194
|
const record = records[i];
|
|
@@ -3543,7 +4212,7 @@ window.__ModuleLoader__.load({
|
|
|
3543
4212
|
groupStart: false,
|
|
3544
4213
|
turnStart: false,
|
|
3545
4214
|
turnEnd: last?.turnEnd ?? false,
|
|
3546
|
-
collapsedSummary: summarizeAssistantTools(calls),
|
|
4215
|
+
collapsedSummary: summarizeAssistantTools(calls, t),
|
|
3547
4216
|
collapsedSummaryKind: "assistant"
|
|
3548
4217
|
});
|
|
3549
4218
|
i += calls.length;
|
|
@@ -3556,22 +4225,27 @@ window.__ModuleLoader__.load({
|
|
|
3556
4225
|
if ((record.cell.kind === "tool" || record.cell.kind === "subtool") && record.cell.outputDetail === void 0) return "running";
|
|
3557
4226
|
return "complete";
|
|
3558
4227
|
}
|
|
3559
|
-
function statusLabel(state) {
|
|
3560
|
-
if (state === "error") return "
|
|
3561
|
-
if (state === "running") return "
|
|
3562
|
-
return "
|
|
4228
|
+
function statusLabel(state, t) {
|
|
4229
|
+
if (state === "error") return t("status.failed");
|
|
4230
|
+
if (state === "running") return t("status.pending");
|
|
4231
|
+
return t("status.completed");
|
|
3563
4232
|
}
|
|
3564
|
-
function
|
|
4233
|
+
function requestErrorMessage(request, t) {
|
|
4234
|
+
if (request.errorCode === "AUTH") return t("details.failure.auth");
|
|
4235
|
+
if (request.error === "trajectory.compaction-interrupted") return t("layout.compactionInterrupted");
|
|
4236
|
+
return request.error;
|
|
4237
|
+
}
|
|
4238
|
+
function TokenRows({ cell, t }) {
|
|
3565
4239
|
const content = cell.output !== void 0 && cell.think !== void 0 ? Math.max(0, cell.output - cell.think) : void 0;
|
|
3566
4240
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3567
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4241
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.tokens") }), (0, react_jsx_runtime.jsx)("dd", { children: cell.output === void 0 ? "—" : t("unit.tokens", { value: cell.output }) })] }),
|
|
3568
4242
|
cell.think !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3569
4243
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3570
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4244
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.reasoning") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: cell.think }) })]
|
|
3571
4245
|
}),
|
|
3572
4246
|
content !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3573
4247
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3574
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4248
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.content") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: content }) })]
|
|
3575
4249
|
})
|
|
3576
4250
|
] });
|
|
3577
4251
|
}
|
|
@@ -3579,95 +4253,103 @@ window.__ModuleLoader__.load({
|
|
|
3579
4253
|
if (usage.input === void 0 && usage.cacheRead === void 0 && usage.cacheWrite === void 0) return void 0;
|
|
3580
4254
|
return (usage.input ?? 0) + (usage.cacheRead ?? 0) + (usage.cacheWrite ?? 0);
|
|
3581
4255
|
}
|
|
3582
|
-
function UsageRows({ usage }) {
|
|
4256
|
+
function UsageRows({ usage, t }) {
|
|
3583
4257
|
if (usage === void 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3584
4258
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3585
|
-
children: "
|
|
4259
|
+
children: t("usage.notReported")
|
|
3586
4260
|
});
|
|
3587
4261
|
const totalInput = inputTotal(usage);
|
|
3588
4262
|
const otherOutput = usage.output !== void 0 && usage.reasoning !== void 0 ? usage.output - usage.reasoning : void 0;
|
|
3589
4263
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
3590
4264
|
className: TrajectoryTable_module_css_default.overview,
|
|
3591
4265
|
children: [
|
|
3592
|
-
totalInput !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4266
|
+
totalInput !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.input") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: totalInput }) })] }),
|
|
3593
4267
|
usage.cacheRead !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3594
4268
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3595
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4269
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.cached") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: usage.cacheRead }) })]
|
|
3596
4270
|
}),
|
|
3597
4271
|
usage.cacheWrite !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3598
4272
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3599
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4273
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.cacheCreated") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: usage.cacheWrite }) })]
|
|
3600
4274
|
}),
|
|
3601
4275
|
usage.input !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3602
4276
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3603
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4277
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.other") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: usage.input }) })]
|
|
3604
4278
|
}),
|
|
3605
|
-
usage.output !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4279
|
+
usage.output !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.output") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: usage.output }) })] }),
|
|
3606
4280
|
usage.reasoning !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3607
4281
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3608
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4282
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.reasoning") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: usage.reasoning }) })]
|
|
3609
4283
|
}),
|
|
3610
4284
|
otherOutput !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3611
4285
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3612
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4286
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.content") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: otherOutput }) })]
|
|
3613
4287
|
})
|
|
3614
4288
|
]
|
|
3615
4289
|
});
|
|
3616
4290
|
}
|
|
3617
|
-
function RequestUsagePanel({ usage, cumulative }) {
|
|
4291
|
+
function RequestUsagePanel({ usage, cumulative, t }) {
|
|
3618
4292
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
3619
4293
|
className: TrajectoryTable_module_css_default.usagePanel,
|
|
3620
4294
|
children: [(0, react_jsx_runtime.jsxs)("section", {
|
|
3621
4295
|
className: TrajectoryTable_module_css_default.usageGroup,
|
|
3622
4296
|
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
3623
4297
|
className: TrajectoryTable_module_css_default.usageHeading,
|
|
3624
|
-
children: "
|
|
3625
|
-
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4298
|
+
children: t("usage.thisRequest")
|
|
4299
|
+
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4300
|
+
usage,
|
|
4301
|
+
t
|
|
4302
|
+
})]
|
|
3626
4303
|
}), (0, react_jsx_runtime.jsxs)("section", {
|
|
3627
4304
|
className: TrajectoryTable_module_css_default.usageGroup,
|
|
3628
4305
|
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
3629
4306
|
className: TrajectoryTable_module_css_default.usageHeading,
|
|
3630
|
-
children: "
|
|
3631
|
-
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4307
|
+
children: t("usage.sessionCumulative")
|
|
4308
|
+
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4309
|
+
usage: cumulative,
|
|
4310
|
+
t
|
|
4311
|
+
})]
|
|
3632
4312
|
})]
|
|
3633
4313
|
});
|
|
3634
4314
|
}
|
|
3635
|
-
function RequestOptions({ options, preview = false }) {
|
|
4315
|
+
function RequestOptions({ options, preview = false, t }) {
|
|
3636
4316
|
if (options === void 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3637
4317
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3638
|
-
children: "
|
|
4318
|
+
children: t("options.notRecorded")
|
|
3639
4319
|
});
|
|
3640
4320
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
3641
4321
|
data: options,
|
|
3642
|
-
label: "
|
|
4322
|
+
label: t("options.json"),
|
|
4323
|
+
labels: jsonTreeLabels(t),
|
|
3643
4324
|
className: preview ? TrajectoryTable_module_css_default.jsonPreview : TrajectoryTable_module_css_default.jsonPayload
|
|
3644
4325
|
});
|
|
3645
4326
|
}
|
|
3646
|
-
function messageSourceLabel(source) {
|
|
3647
|
-
if (typeof source !== "object" || source === null || Array.isArray(source)) return "
|
|
4327
|
+
function messageSourceLabel(source, t) {
|
|
4328
|
+
if (typeof source !== "object" || source === null || Array.isArray(source)) return t("source.unknown");
|
|
3648
4329
|
const properties = source;
|
|
3649
4330
|
const kind = properties.kind;
|
|
3650
|
-
if (kind === "user") return "
|
|
4331
|
+
if (kind === "user") return t("source.user");
|
|
3651
4332
|
if (kind === "plugin") {
|
|
3652
4333
|
const plugin = properties.plugin;
|
|
3653
|
-
return typeof plugin === "string" && plugin !== "" ?
|
|
4334
|
+
return typeof plugin === "string" && plugin !== "" ? t("source.pluginNamed", { plugin }) : t("source.plugin");
|
|
3654
4335
|
}
|
|
3655
4336
|
if (kind === "goal") {
|
|
3656
4337
|
const round = properties.round;
|
|
3657
|
-
return typeof round === "number" && round > 0 ?
|
|
4338
|
+
return typeof round === "number" && round > 0 ? t("source.goalRound", { round }) : t("source.goal");
|
|
3658
4339
|
}
|
|
3659
|
-
if (typeof kind !== "string" || kind === "") return "
|
|
4340
|
+
if (typeof kind !== "string" || kind === "") return t("source.unknown");
|
|
3660
4341
|
return `${kind[0]?.toUpperCase() ?? ""}${kind.slice(1)}`;
|
|
3661
4342
|
}
|
|
3662
|
-
function MessageSource({ record }) {
|
|
4343
|
+
function MessageSource({ record, t }) {
|
|
3663
4344
|
const source = record.cell.messageSource;
|
|
3664
4345
|
if (source === void 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3665
4346
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3666
|
-
children: "
|
|
4347
|
+
children: t("source.notRecorded")
|
|
3667
4348
|
});
|
|
3668
4349
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
3669
4350
|
data: typeof source === "object" && source !== null ? source : { value: source },
|
|
3670
|
-
label: "
|
|
4351
|
+
label: t("source.messageJson"),
|
|
4352
|
+
labels: jsonTreeLabels(t),
|
|
3671
4353
|
className: TrajectoryTable_module_css_default.jsonPayload
|
|
3672
4354
|
});
|
|
3673
4355
|
}
|
|
@@ -3703,54 +4385,54 @@ window.__ModuleLoader__.load({
|
|
|
3703
4385
|
if (record.cell.kind === "system") return record.cell.previousPromptDetail === void 0 ? SYSTEM_PROMPT_TABS : SYSTEM_UPDATE_TABS;
|
|
3704
4386
|
if (record.cell.kind === "compacted") return [{
|
|
3705
4387
|
id: "overview",
|
|
3706
|
-
|
|
4388
|
+
labelKey: "tab.summary"
|
|
3707
4389
|
}, {
|
|
3708
4390
|
id: "raw",
|
|
3709
|
-
|
|
4391
|
+
labelKey: "tab.rawOutput"
|
|
3710
4392
|
}];
|
|
3711
4393
|
if (isMarkdownRecord(record)) return [
|
|
3712
4394
|
{
|
|
3713
4395
|
id: "overview",
|
|
3714
|
-
|
|
4396
|
+
labelKey: "tab.summary"
|
|
3715
4397
|
},
|
|
3716
4398
|
{
|
|
3717
4399
|
id: "rendered",
|
|
3718
|
-
|
|
4400
|
+
labelKey: "tab.preview"
|
|
3719
4401
|
},
|
|
3720
4402
|
{
|
|
3721
4403
|
id: "raw",
|
|
3722
|
-
|
|
4404
|
+
labelKey: "tab.raw"
|
|
3723
4405
|
},
|
|
3724
4406
|
...record.cell.messageSource === void 0 ? [] : [{
|
|
3725
4407
|
id: "source",
|
|
3726
|
-
|
|
4408
|
+
labelKey: "tab.source"
|
|
3727
4409
|
}]
|
|
3728
4410
|
];
|
|
3729
4411
|
return [
|
|
3730
4412
|
{
|
|
3731
4413
|
id: "overview",
|
|
3732
|
-
|
|
4414
|
+
labelKey: "tab.summary"
|
|
3733
4415
|
},
|
|
3734
4416
|
...record.cell.inputDetail ? [{
|
|
3735
4417
|
id: "input",
|
|
3736
|
-
|
|
4418
|
+
labelKey: "tab.payload"
|
|
3737
4419
|
}] : [],
|
|
3738
4420
|
...record.cell.outputDetail ? [{
|
|
3739
4421
|
id: "output",
|
|
3740
|
-
|
|
4422
|
+
labelKey: "tab.result"
|
|
3741
4423
|
}] : [],
|
|
3742
4424
|
{
|
|
3743
4425
|
id: "schema",
|
|
3744
|
-
|
|
4426
|
+
labelKey: "tab.schema"
|
|
3745
4427
|
},
|
|
3746
4428
|
{
|
|
3747
4429
|
id: "timing",
|
|
3748
|
-
|
|
4430
|
+
labelKey: "tab.timing"
|
|
3749
4431
|
}
|
|
3750
4432
|
];
|
|
3751
4433
|
}
|
|
3752
|
-
function recordDisplayText(cell) {
|
|
3753
|
-
if (isToolCallOnly(cell)) return "";
|
|
4434
|
+
function recordDisplayText(cell, t) {
|
|
4435
|
+
if (isToolCallOnly(cell, t)) return "";
|
|
3754
4436
|
if (cell.previewMarkdown !== void 0) {
|
|
3755
4437
|
const preview = trajectoryPreviewText(cell.previewMarkdown);
|
|
3756
4438
|
if (cell.text === "") return preview;
|
|
@@ -3772,33 +4454,34 @@ window.__ModuleLoader__.load({
|
|
|
3772
4454
|
args: text.slice(separator + 3)
|
|
3773
4455
|
};
|
|
3774
4456
|
}
|
|
3775
|
-
function isToolCallOnly(cell) {
|
|
3776
|
-
return cell.kind === "message" && !cell.outputDetail && !cell.thinkingDetail && cell.text === "
|
|
4457
|
+
function isToolCallOnly(cell, t) {
|
|
4458
|
+
return cell.kind === "message" && !cell.outputDetail && !cell.thinkingDetail && cell.text === t("layout.toolCallOnly");
|
|
3777
4459
|
}
|
|
3778
|
-
function RecordPresentation({ cell, children }) {
|
|
3779
|
-
const displayText = (0, react.useMemo)(() => recordDisplayText(cell), [
|
|
4460
|
+
function RecordPresentation({ cell, children, t }) {
|
|
4461
|
+
const displayText = (0, react.useMemo)(() => recordDisplayText(cell, t), [
|
|
3780
4462
|
cell.kind,
|
|
3781
4463
|
cell.text,
|
|
3782
4464
|
cell.previewMarkdown,
|
|
3783
4465
|
cell.inputDetail,
|
|
3784
4466
|
cell.outputDetail,
|
|
3785
|
-
cell.thinkingDetail
|
|
4467
|
+
cell.thinkingDetail,
|
|
4468
|
+
t
|
|
3786
4469
|
]);
|
|
3787
4470
|
const resultText = (0, react.useMemo)(() => recordResultText(cell), [cell.result, cell.resultPreviewMarkdown]);
|
|
3788
|
-
const toolCallOnly = isToolCallOnly(cell);
|
|
4471
|
+
const toolCallOnly = isToolCallOnly(cell, t);
|
|
3789
4472
|
const toolCallText = toolCallTextParts(cell.kind, displayText);
|
|
3790
4473
|
return children({
|
|
3791
4474
|
displayText,
|
|
3792
|
-
listDisplayText: toolCallOnly ? "
|
|
4475
|
+
listDisplayText: toolCallOnly ? t("record.toolCallOnly") : toolCallText === void 0 ? displayText : [toolCallText.name, toolCallText.args].filter(Boolean).join(" "),
|
|
3793
4476
|
resultText,
|
|
3794
4477
|
toolCallOnly,
|
|
3795
4478
|
toolCallText
|
|
3796
4479
|
});
|
|
3797
4480
|
}
|
|
3798
|
-
function RecordListText({ displayText, toolCallOnly, toolCallText }) {
|
|
4481
|
+
function RecordListText({ displayText, toolCallOnly, toolCallText, t }) {
|
|
3799
4482
|
if (toolCallOnly) return (0, react_jsx_runtime.jsx)("span", {
|
|
3800
4483
|
className: TrajectoryTable_module_css_default.toolCallOnly,
|
|
3801
|
-
children: "
|
|
4484
|
+
children: t("record.toolCallOnly")
|
|
3802
4485
|
});
|
|
3803
4486
|
if (toolCallText === void 0) return displayText || "—";
|
|
3804
4487
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
@@ -3809,17 +4492,21 @@ window.__ModuleLoader__.load({
|
|
|
3809
4492
|
children: toolCallText.args
|
|
3810
4493
|
})] });
|
|
3811
4494
|
}
|
|
3812
|
-
function MarkdownFragment({ text, rendered, preview }) {
|
|
4495
|
+
function MarkdownFragment({ text, rendered, preview, t }) {
|
|
4496
|
+
const labels = (0, react.useMemo)(() => markdownLabels(t), [t]);
|
|
3813
4497
|
if (rendered) return (0, react_jsx_runtime.jsx)("div", {
|
|
3814
4498
|
className: preview ? TrajectoryTable_module_css_default.markdownPreview : TrajectoryTable_module_css_default.markdownPayload,
|
|
3815
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
4499
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
4500
|
+
text,
|
|
4501
|
+
labels
|
|
4502
|
+
})
|
|
3816
4503
|
});
|
|
3817
4504
|
return (0, react_jsx_runtime.jsx)("pre", {
|
|
3818
4505
|
className: `${TrajectoryTable_module_css_default.payload} ${preview ? TrajectoryTable_module_css_default.payloadPreview : ""}`,
|
|
3819
4506
|
children: text
|
|
3820
4507
|
});
|
|
3821
4508
|
}
|
|
3822
|
-
function SourceBlocks({ blocks, onOpenCall }) {
|
|
4509
|
+
function SourceBlocks({ blocks, onOpenCall, renderImages, t }) {
|
|
3823
4510
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
3824
4511
|
className: TrajectoryTable_module_css_default.sourceBlocks,
|
|
3825
4512
|
children: blocks.map((block, index) => (0, react_jsx_runtime.jsxs)("section", {
|
|
@@ -3827,14 +4514,17 @@ window.__ModuleLoader__.load({
|
|
|
3827
4514
|
children: [block.callId !== void 0 ? (0, react_jsx_runtime.jsxs)("button", {
|
|
3828
4515
|
type: "button",
|
|
3829
4516
|
className: TrajectoryTable_module_css_default.sourceBlockJumpTarget,
|
|
3830
|
-
"aria-label":
|
|
3831
|
-
title: "
|
|
4517
|
+
"aria-label": t("block.openSummary", { index: index + 1 }),
|
|
4518
|
+
title: t("block.openSummaryTitle"),
|
|
3832
4519
|
onClick: () => {
|
|
3833
4520
|
if (block.callId !== void 0) onOpenCall(block.callId);
|
|
3834
4521
|
},
|
|
3835
4522
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
3836
4523
|
className: TrajectoryTable_module_css_default.sourceBlockLabel,
|
|
3837
|
-
children:
|
|
4524
|
+
children: t("block.label", {
|
|
4525
|
+
index: index + 1,
|
|
4526
|
+
type: block.type
|
|
4527
|
+
})
|
|
3838
4528
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
3839
4529
|
className: TrajectoryTable_module_css_default.sourceBlockJumpIcon,
|
|
3840
4530
|
size: 12
|
|
@@ -3843,42 +4533,36 @@ window.__ModuleLoader__.load({
|
|
|
3843
4533
|
className: TrajectoryTable_module_css_default.sourceBlockHeader,
|
|
3844
4534
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
3845
4535
|
className: TrajectoryTable_module_css_default.sourceBlockLabel,
|
|
3846
|
-
children:
|
|
4536
|
+
children: t("block.label", {
|
|
4537
|
+
index: index + 1,
|
|
4538
|
+
type: block.type
|
|
4539
|
+
})
|
|
3847
4540
|
})
|
|
3848
|
-
}), block.
|
|
4541
|
+
}), block.attachment !== void 0 ? renderImages({
|
|
4542
|
+
images: [{ attachment: block.attachment }],
|
|
4543
|
+
align: "start"
|
|
4544
|
+
}) : (0, react_jsx_runtime.jsx)("pre", {
|
|
3849
4545
|
className: TrajectoryTable_module_css_default.sourceBlockContent,
|
|
3850
4546
|
children: block.content
|
|
3851
4547
|
})]
|
|
3852
4548
|
}, index))
|
|
3853
4549
|
});
|
|
3854
4550
|
}
|
|
3855
|
-
function
|
|
3856
|
-
|
|
3857
|
-
return (0, react_jsx_runtime.jsx)("a", {
|
|
3858
|
-
className: preview ? `${TrajectoryTable_module_css_default.panelImageLink} ${TrajectoryTable_module_css_default.panelImageLinkPreview}` : TrajectoryTable_module_css_default.panelImageLink,
|
|
3859
|
-
href: block.imageSrc,
|
|
3860
|
-
target: "_blank",
|
|
3861
|
-
rel: "noopener noreferrer",
|
|
3862
|
-
title: "Open image",
|
|
3863
|
-
children: (0, react_jsx_runtime.jsx)("img", {
|
|
3864
|
-
className: TrajectoryTable_module_css_default.panelImage,
|
|
3865
|
-
src: block.imageSrc,
|
|
3866
|
-
alt: block.imageAlt ?? ""
|
|
3867
|
-
})
|
|
3868
|
-
});
|
|
4551
|
+
function recordImages(blocks) {
|
|
4552
|
+
return (blocks ?? []).flatMap((block) => block.attachment !== void 0 ? [{ attachment: block.attachment }] : []);
|
|
3869
4553
|
}
|
|
3870
|
-
function MessageImages({ blocks, preview }) {
|
|
3871
|
-
const images = blocks
|
|
4554
|
+
function MessageImages({ blocks, preview, renderImages }) {
|
|
4555
|
+
const images = recordImages(blocks);
|
|
3872
4556
|
if (images.length === 0) return null;
|
|
3873
4557
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
3874
4558
|
className: preview ? `${TrajectoryTable_module_css_default.messageImages} ${TrajectoryTable_module_css_default.messageImagesPreview}` : TrajectoryTable_module_css_default.messageImages,
|
|
3875
|
-
children:
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
}
|
|
4559
|
+
children: renderImages({
|
|
4560
|
+
images,
|
|
4561
|
+
align: "start"
|
|
4562
|
+
})
|
|
3879
4563
|
});
|
|
3880
4564
|
}
|
|
3881
|
-
function AssistantToolCalls({ blocks, preview, onOpenCall }) {
|
|
4565
|
+
function AssistantToolCalls({ blocks, preview, onOpenCall, t }) {
|
|
3882
4566
|
const calls = blocks?.filter((block) => block.type === "tool-call") ?? [];
|
|
3883
4567
|
if (calls.length === 0) return null;
|
|
3884
4568
|
return (0, react_jsx_runtime.jsx)("ul", {
|
|
@@ -3886,7 +4570,7 @@ window.__ModuleLoader__.load({
|
|
|
3886
4570
|
children: calls.map((call, index) => (0, react_jsx_runtime.jsx)("li", { children: (0, react_jsx_runtime.jsxs)("button", {
|
|
3887
4571
|
type: "button",
|
|
3888
4572
|
className: TrajectoryTable_module_css_default.assistantToolCallButton,
|
|
3889
|
-
title: "
|
|
4573
|
+
title: t("block.openSummaryTitle"),
|
|
3890
4574
|
onClick: () => {
|
|
3891
4575
|
if (call.callId !== void 0) onOpenCall(call.callId);
|
|
3892
4576
|
},
|
|
@@ -3908,7 +4592,7 @@ window.__ModuleLoader__.load({
|
|
|
3908
4592
|
className: TrajectoryTable_module_css_default.assistantToolCallText,
|
|
3909
4593
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
3910
4594
|
className: TrajectoryTable_module_css_default.assistantToolCallName,
|
|
3911
|
-
children: call.toolName ?? "
|
|
4595
|
+
children: call.toolName ?? t("details.toolCall")
|
|
3912
4596
|
}), call.content !== "" && (0, react_jsx_runtime.jsx)("span", {
|
|
3913
4597
|
className: TrajectoryTable_module_css_default.assistantToolCallArgs,
|
|
3914
4598
|
children: call.content
|
|
@@ -3934,10 +4618,10 @@ window.__ModuleLoader__.load({
|
|
|
3934
4618
|
})
|
|
3935
4619
|
});
|
|
3936
4620
|
}
|
|
3937
|
-
function ToolCatalog({ tools }) {
|
|
4621
|
+
function ToolCatalog({ tools, t }) {
|
|
3938
4622
|
if (tools.length === 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3939
4623
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3940
|
-
children: "
|
|
4624
|
+
children: t("record.toolsMissing")
|
|
3941
4625
|
});
|
|
3942
4626
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
3943
4627
|
className: TrajectoryTable_module_css_default.toolCatalog,
|
|
@@ -3967,7 +4651,8 @@ window.__ModuleLoader__.load({
|
|
|
3967
4651
|
children: tool.description
|
|
3968
4652
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
3969
4653
|
data: tool.parameters,
|
|
3970
|
-
label:
|
|
4654
|
+
label: t("record.namedParametersJson", { name: tool.name }),
|
|
4655
|
+
labels: jsonTreeLabels(t),
|
|
3971
4656
|
className: TrajectoryTable_module_css_default.toolCatalogTree
|
|
3972
4657
|
})]
|
|
3973
4658
|
})]
|
|
@@ -4018,48 +4703,57 @@ window.__ModuleLoader__.load({
|
|
|
4018
4703
|
})]
|
|
4019
4704
|
});
|
|
4020
4705
|
}
|
|
4021
|
-
function SystemPromptDiff({ before, after }) {
|
|
4706
|
+
function SystemPromptDiff({ before, after, t }) {
|
|
4022
4707
|
const toolsBefore = JSON.stringify(before.tools, null, 2);
|
|
4023
4708
|
const toolsAfter = JSON.stringify(after.tools, null, 2);
|
|
4024
4709
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
4025
4710
|
className: TrajectoryTable_module_css_default.promptDiffSections,
|
|
4026
4711
|
children: [before.system !== after.system && (0, react_jsx_runtime.jsx)(PromptDiffSection, {
|
|
4027
|
-
title: "
|
|
4712
|
+
title: t("record.systemPrompt"),
|
|
4028
4713
|
before: before.system,
|
|
4029
4714
|
after: after.system
|
|
4030
4715
|
}), toolsBefore !== toolsAfter && (0, react_jsx_runtime.jsx)(PromptDiffSection, {
|
|
4031
|
-
title: "
|
|
4716
|
+
title: t("record.tools"),
|
|
4032
4717
|
before: toolsBefore,
|
|
4033
4718
|
after: toolsAfter
|
|
4034
4719
|
})]
|
|
4035
4720
|
});
|
|
4036
4721
|
}
|
|
4037
|
-
function ToolOutputBlocks({ blocks, error, preview }) {
|
|
4038
|
-
return (0, react_jsx_runtime.
|
|
4722
|
+
function ToolOutputBlocks({ blocks, error, errorDetail, preview, renderImages }) {
|
|
4723
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
4039
4724
|
className: [
|
|
4040
4725
|
TrajectoryTable_module_css_default.resultBlocks,
|
|
4041
4726
|
preview ? TrajectoryTable_module_css_default.resultBlocksPreview : void 0,
|
|
4042
4727
|
error ? TrajectoryTable_module_css_default.errorPayload : void 0
|
|
4043
4728
|
].filter((value) => value !== void 0).join(" "),
|
|
4044
|
-
children:
|
|
4045
|
-
|
|
4046
|
-
|
|
4729
|
+
children: [error && errorDetail !== void 0 && errorDetail !== "" && (0, react_jsx_runtime.jsx)("pre", {
|
|
4730
|
+
className: TrajectoryTable_module_css_default.resultBlockText,
|
|
4731
|
+
children: errorDetail
|
|
4732
|
+
}), blocks.map((block, index) => block.attachment !== void 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
4733
|
+
className: TrajectoryTable_module_css_default.messageImages,
|
|
4734
|
+
children: renderImages({
|
|
4735
|
+
images: [{ attachment: block.attachment }],
|
|
4736
|
+
align: "start"
|
|
4737
|
+
})
|
|
4047
4738
|
}, index) : block.content !== "" ? (0, react_jsx_runtime.jsx)("pre", {
|
|
4048
4739
|
className: TrajectoryTable_module_css_default.resultBlockText,
|
|
4049
4740
|
children: block.content
|
|
4050
|
-
}, index) : null)
|
|
4741
|
+
}, index) : null)]
|
|
4051
4742
|
});
|
|
4052
4743
|
}
|
|
4053
|
-
function MarkdownRecordContent({ record, rendered, preview = false, thinkingExpanded, onThinkingExpandedChange, onOpenCall }) {
|
|
4744
|
+
function MarkdownRecordContent({ record, rendered, preview = false, thinkingExpanded, onThinkingExpandedChange, onOpenCall, renderImages, t }) {
|
|
4054
4745
|
if (!rendered && record.cell.sourceBlocks && record.cell.sourceBlocks.length > 0) return (0, react_jsx_runtime.jsx)(SourceBlocks, {
|
|
4055
4746
|
blocks: record.cell.sourceBlocks,
|
|
4056
|
-
onOpenCall
|
|
4747
|
+
onOpenCall,
|
|
4748
|
+
renderImages,
|
|
4749
|
+
t
|
|
4057
4750
|
});
|
|
4058
4751
|
if (record.cell.thinkingDetail) {
|
|
4059
4752
|
if (!rendered) return (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4060
4753
|
text: [record.cell.thinkingDetail, record.cell.outputDetail].filter((value) => value !== void 0 && value !== "").join("\n\n"),
|
|
4061
4754
|
rendered: false,
|
|
4062
|
-
preview
|
|
4755
|
+
preview,
|
|
4756
|
+
t
|
|
4063
4757
|
});
|
|
4064
4758
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
4065
4759
|
className: `${TrajectoryTable_module_css_default.assistantContent} ${TrajectoryTable_module_css_default.assistantContentRendered}`,
|
|
@@ -4073,14 +4767,15 @@ window.__ModuleLoader__.load({
|
|
|
4073
4767
|
onClick: () => {
|
|
4074
4768
|
onThinkingExpandedChange(!thinkingExpanded);
|
|
4075
4769
|
},
|
|
4076
|
-
children: ["
|
|
4770
|
+
children: [t("record.thinking"), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
4077
4771
|
className: TrajectoryTable_module_css_default.thinkingChevron,
|
|
4078
4772
|
size: 12
|
|
4079
4773
|
})]
|
|
4080
4774
|
}), thinkingExpanded && (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4081
4775
|
text: record.cell.thinkingDetail,
|
|
4082
4776
|
rendered,
|
|
4083
|
-
preview
|
|
4777
|
+
preview,
|
|
4778
|
+
t
|
|
4084
4779
|
})]
|
|
4085
4780
|
}),
|
|
4086
4781
|
record.cell.outputDetail && (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -4088,26 +4783,29 @@ window.__ModuleLoader__.load({
|
|
|
4088
4783
|
children: (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4089
4784
|
text: record.cell.outputDetail,
|
|
4090
4785
|
rendered,
|
|
4091
|
-
preview
|
|
4786
|
+
preview,
|
|
4787
|
+
t
|
|
4092
4788
|
})
|
|
4093
4789
|
}),
|
|
4094
4790
|
(0, react_jsx_runtime.jsx)(AssistantToolCalls, {
|
|
4095
4791
|
blocks: record.cell.sourceBlocks,
|
|
4096
4792
|
preview,
|
|
4097
|
-
onOpenCall
|
|
4793
|
+
onOpenCall,
|
|
4794
|
+
t
|
|
4098
4795
|
}),
|
|
4099
4796
|
(0, react_jsx_runtime.jsx)(MessageImages, {
|
|
4100
4797
|
blocks: record.cell.sourceBlocks,
|
|
4101
|
-
preview
|
|
4798
|
+
preview,
|
|
4799
|
+
renderImages
|
|
4102
4800
|
})
|
|
4103
4801
|
]
|
|
4104
4802
|
});
|
|
4105
4803
|
}
|
|
4106
4804
|
const source = markdownSource(record);
|
|
4107
|
-
const hasImages = record.cell.sourceBlocks?.some((block) => block.
|
|
4805
|
+
const hasImages = record.cell.sourceBlocks?.some((block) => block.attachment !== void 0) === true;
|
|
4108
4806
|
const hasToolCalls = record.cell.kind === "message" && record.cell.sourceBlocks?.some((block) => block.type === "tool-call") === true;
|
|
4109
4807
|
if (!source && !hasImages && !hasToolCalls) {
|
|
4110
|
-
const emptyLabel = isToolCallOnly(record.cell) ? "
|
|
4808
|
+
const emptyLabel = isToolCallOnly(record.cell, t) ? t("record.toolCallOnly") : record.cell.text || t("record.noContent");
|
|
4111
4809
|
return (0, react_jsx_runtime.jsx)("p", {
|
|
4112
4810
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
4113
4811
|
children: emptyLabel
|
|
@@ -4116,56 +4814,75 @@ window.__ModuleLoader__.load({
|
|
|
4116
4814
|
if (!rendered || !hasImages && !hasToolCalls) return (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4117
4815
|
text: source ?? "",
|
|
4118
4816
|
rendered,
|
|
4119
|
-
preview
|
|
4817
|
+
preview,
|
|
4818
|
+
t
|
|
4120
4819
|
});
|
|
4121
4820
|
return (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
4122
4821
|
source && (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4123
4822
|
text: source,
|
|
4124
4823
|
rendered: true,
|
|
4125
|
-
preview
|
|
4824
|
+
preview,
|
|
4825
|
+
t
|
|
4126
4826
|
}),
|
|
4127
4827
|
record.cell.kind === "message" && (0, react_jsx_runtime.jsx)(AssistantToolCalls, {
|
|
4128
4828
|
blocks: record.cell.sourceBlocks,
|
|
4129
4829
|
preview,
|
|
4130
|
-
onOpenCall
|
|
4830
|
+
onOpenCall,
|
|
4831
|
+
t
|
|
4131
4832
|
}),
|
|
4132
4833
|
(0, react_jsx_runtime.jsx)(MessageImages, {
|
|
4133
4834
|
blocks: record.cell.sourceBlocks,
|
|
4134
|
-
preview
|
|
4835
|
+
preview,
|
|
4836
|
+
renderImages
|
|
4135
4837
|
})
|
|
4136
4838
|
] });
|
|
4137
4839
|
}
|
|
4138
|
-
function RecordTiming({ record }) {
|
|
4139
|
-
return record.cell.kind === "message" && record.cell.assistantMetrics !== void 0 ? (0, react_jsx_runtime.jsx)(AssistantTimingPanel, {
|
|
4840
|
+
function RecordTiming({ record, t }) {
|
|
4841
|
+
return record.cell.kind === "message" && record.cell.assistantMetrics !== void 0 ? (0, react_jsx_runtime.jsx)(AssistantTimingPanel, {
|
|
4842
|
+
metrics: record.cell.assistantMetrics,
|
|
4843
|
+
t
|
|
4844
|
+
}) : (0, react_jsx_runtime.jsxs)("dl", {
|
|
4140
4845
|
className: TrajectoryTable_module_css_default.overview,
|
|
4141
4846
|
children: [
|
|
4142
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4143
|
-
|
|
4144
|
-
|
|
4847
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
4848
|
+
timestamp: record.cell.startedAt ?? null,
|
|
4849
|
+
t
|
|
4850
|
+
})] }),
|
|
4851
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.duration") }), (0, react_jsx_runtime.jsx)("dd", { children: formatElapsedSeconds(record.cell.timeSeconds, t) })] }),
|
|
4852
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.source") }), (0, react_jsx_runtime.jsx)("dd", { children: record.cell.timeSeconds === null ? t("timing.notAvailable") : t("timing.sessionTimestamps") })] })
|
|
4145
4853
|
]
|
|
4146
4854
|
});
|
|
4147
4855
|
}
|
|
4148
|
-
function RequestTiming({ assistant, anchor, request }) {
|
|
4149
|
-
if (assistant !== void 0) return (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
4856
|
+
function RequestTiming({ assistant, anchor, request, t }) {
|
|
4857
|
+
if (assistant !== void 0) return (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
4858
|
+
record: assistant,
|
|
4859
|
+
t
|
|
4860
|
+
});
|
|
4150
4861
|
if (request?.startedAt !== void 0) {
|
|
4151
4862
|
const duration = request.completedAt === null || request.completedAt === void 0 ? null : Math.max(0, (request.completedAt - request.startedAt) / 1e3);
|
|
4152
4863
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
4153
4864
|
className: TrajectoryTable_module_css_default.overview,
|
|
4154
4865
|
children: [
|
|
4155
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4156
|
-
|
|
4157
|
-
|
|
4866
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
4867
|
+
timestamp: request.startedAt,
|
|
4868
|
+
t
|
|
4869
|
+
})] }),
|
|
4870
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.duration") }), (0, react_jsx_runtime.jsx)("dd", { children: formatElapsedSeconds(duration, t) })] }),
|
|
4871
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.source") }), (0, react_jsx_runtime.jsx)("dd", { children: duration === null ? t("timing.sessionTimestampsRunning") : t("timing.sessionTimestamps") })] })
|
|
4158
4872
|
]
|
|
4159
4873
|
});
|
|
4160
4874
|
}
|
|
4161
4875
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
4162
4876
|
className: TrajectoryTable_module_css_default.overview,
|
|
4163
|
-
children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4877
|
+
children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
4878
|
+
timestamp: anchor?.cell.startedAt ?? null,
|
|
4879
|
+
t
|
|
4880
|
+
})] }), (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.duration") }), (0, react_jsx_runtime.jsx)("dd", { children: formatElapsedSeconds(null, t) })] })]
|
|
4164
4881
|
});
|
|
4165
4882
|
}
|
|
4166
|
-
function RecordPayload({ record, direction, preview = false }) {
|
|
4883
|
+
function RecordPayload({ record, direction, preview = false, renderImages, t }) {
|
|
4167
4884
|
const value = direction === "input" ? record.cell.inputDetail : record.cell.outputDetail;
|
|
4168
|
-
const missing = direction === "input" ? "
|
|
4885
|
+
const missing = direction === "input" ? t("record.noPayload") : t("record.noResult");
|
|
4169
4886
|
if (!value) return (0, react_jsx_runtime.jsx)("p", {
|
|
4170
4887
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
4171
4888
|
children: missing
|
|
@@ -4176,21 +4893,28 @@ window.__ModuleLoader__.load({
|
|
|
4176
4893
|
const json = parseJsonContainer(value);
|
|
4177
4894
|
if (direction === "output" && record.cell.outputBlocks?.length === 1 && record.cell.outputBlocks[0]?.type === "text" && json !== void 0) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
4178
4895
|
data: json,
|
|
4179
|
-
label: "
|
|
4896
|
+
label: t("record.resultJson"),
|
|
4897
|
+
labels: jsonTreeLabels(t),
|
|
4180
4898
|
className: payloadClassName
|
|
4181
4899
|
});
|
|
4182
|
-
if (direction === "output" && record.cell.outputBlocks?.some((block) => block.
|
|
4900
|
+
if (direction === "output" && record.cell.outputBlocks?.some((block) => block.attachment !== void 0 || block.content !== "") === true) return (0, react_jsx_runtime.jsx)(ToolOutputBlocks, {
|
|
4183
4901
|
blocks: record.cell.outputBlocks,
|
|
4184
4902
|
error,
|
|
4185
|
-
|
|
4903
|
+
errorDetail: error ? value : void 0,
|
|
4904
|
+
preview,
|
|
4905
|
+
renderImages
|
|
4186
4906
|
});
|
|
4187
4907
|
if (direction === "input" && (record.cell.kind === "user" || record.cell.kind === "context") || direction === "output" && record.cell.kind === "message") return (0, react_jsx_runtime.jsx)("div", {
|
|
4188
4908
|
className: [preview ? TrajectoryTable_module_css_default.markdownPreview : TrajectoryTable_module_css_default.markdownPayload, error ? TrajectoryTable_module_css_default.errorPayload : void 0].filter((className) => className !== void 0).join(" "),
|
|
4189
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
4909
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
4910
|
+
text: value,
|
|
4911
|
+
labels: markdownLabels(t)
|
|
4912
|
+
})
|
|
4190
4913
|
});
|
|
4191
4914
|
if (json !== void 0) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
4192
4915
|
data: json,
|
|
4193
|
-
label:
|
|
4916
|
+
label: t(direction === "input" ? "record.payloadJson" : "record.outputJson"),
|
|
4917
|
+
labels: jsonTreeLabels(t),
|
|
4194
4918
|
className: payloadClassName
|
|
4195
4919
|
});
|
|
4196
4920
|
return (0, react_jsx_runtime.jsx)("pre", {
|
|
@@ -4198,15 +4922,15 @@ window.__ModuleLoader__.load({
|
|
|
4198
4922
|
TrajectoryTable_module_css_default.payload,
|
|
4199
4923
|
preview ? TrajectoryTable_module_css_default.payloadPreview : void 0,
|
|
4200
4924
|
error ? TrajectoryTable_module_css_default.errorPayload : void 0,
|
|
4201
|
-
value === "
|
|
4925
|
+
value === t("record.noOutput") ? TrajectoryTable_module_css_default.noOutputText : void 0
|
|
4202
4926
|
].filter((value) => value !== void 0).join(" "),
|
|
4203
4927
|
children: value
|
|
4204
4928
|
});
|
|
4205
4929
|
}
|
|
4206
|
-
function RecordSchema({ record, preview = false }) {
|
|
4930
|
+
function RecordSchema({ record, preview = false, t }) {
|
|
4207
4931
|
if (!record.cell.schemaDetail) return (0, react_jsx_runtime.jsx)("p", {
|
|
4208
4932
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
4209
|
-
children: "
|
|
4933
|
+
children: t("record.schemaUnavailable")
|
|
4210
4934
|
});
|
|
4211
4935
|
const schema = parseToolSchema(record.cell.schemaDetail);
|
|
4212
4936
|
if (schema !== void 0) return (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -4224,10 +4948,11 @@ window.__ModuleLoader__.load({
|
|
|
4224
4948
|
className: TrajectoryTable_module_css_default.schemaParameters,
|
|
4225
4949
|
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
4226
4950
|
className: TrajectoryTable_module_css_default.schemaParametersTitle,
|
|
4227
|
-
children: "
|
|
4951
|
+
children: t("record.parameters")
|
|
4228
4952
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
4229
4953
|
data: schema.parameters,
|
|
4230
|
-
label:
|
|
4954
|
+
label: t("record.namedParametersJson", { name: schema.name }),
|
|
4955
|
+
labels: jsonTreeLabels(t),
|
|
4231
4956
|
className: TrajectoryTable_module_css_default.schemaTree
|
|
4232
4957
|
})]
|
|
4233
4958
|
})]
|
|
@@ -4287,7 +5012,7 @@ window.__ModuleLoader__.load({
|
|
|
4287
5012
|
* @param props - Grouped trajectory data and whole-ledger fold state.
|
|
4288
5013
|
* @returns The ledger and an optional local record inspector.
|
|
4289
5014
|
*/
|
|
4290
|
-
function TrajectoryTable({ requestNumbers: sessionRequestNumbers, turns, streamingCells = [], timelineFocusIndexes = null, searchMatchIndexes = null, onSelectedIndexChange, onRecordSelect, recordSelection = null, recordFocus = null, historyLoading = false, olderHistoryLoading = false, historyStartSeq, hasOlderRecords = false, onLoadOlder, onClearSelection, collapsedTurns, onToggleTurn, collapsedAssistants, onToggleAssistant, inspectCallId = null, onInspectApplied }) {
|
|
5015
|
+
function TrajectoryTable({ t, renderImages, requestNumbers: sessionRequestNumbers, turns, streamingCells = [], timelineFocusIndexes = null, searchMatchIndexes = null, onSelectedIndexChange, onRecordSelect, recordSelection = null, recordFocus = null, historyLoading = false, olderHistoryLoading = false, historyStartSeq, hasOlderRecords = false, onLoadOlder, onClearSelection, collapsedTurns, onToggleTurn, collapsedAssistants, onToggleAssistant, inspectCallId = null, onInspectApplied }) {
|
|
4291
5016
|
const [selectedRecordId, setSelectedRecordId] = (0, react.useState)(null);
|
|
4292
5017
|
const [selectedRequest, setSelectedRequest] = (0, react.useState)(null);
|
|
4293
5018
|
const [activeTab, setActiveTab] = (0, react.useState)("overview");
|
|
@@ -4322,21 +5047,20 @@ window.__ModuleLoader__.load({
|
|
|
4322
5047
|
(0, react.useEffect)(() => {
|
|
4323
5048
|
onSelectedIndexChange?.(selectedIndex);
|
|
4324
5049
|
}, [onSelectedIndexChange, selectedIndex]);
|
|
4325
|
-
const
|
|
4326
|
-
const
|
|
4327
|
-
|
|
4328
|
-
requestBoundaries,
|
|
4329
|
-
sessionRequestNumbers
|
|
4330
|
-
]);
|
|
5050
|
+
const requestGroups = (0, react.useMemo)(() => new Set((sessionRequestNumbers ?? []).map((request) => requestKey(request.turn, request.group))), [sessionRequestNumbers]);
|
|
5051
|
+
const requestBoundaries = (0, react.useMemo)(() => indexRequestBoundaries(allRecords, requestGroups), [allRecords, requestGroups]);
|
|
5052
|
+
const requestNumbers = (0, react.useMemo)(() => indexRequestNumbers(sessionRequestNumbers), [sessionRequestNumbers]);
|
|
4331
5053
|
const records = (0, react.useMemo)(() => {
|
|
4332
5054
|
if (searchMatchIndexes !== null) return filterRecords(allRecords, searchMatchIndexes);
|
|
4333
|
-
const turnRecords = collapsedTurns.size === 0 ? allRecords : collapseTurnRecords(allRecords, collapsedTurns);
|
|
4334
|
-
return collapsedAssistants.size === 0 ? turnRecords : collapseAssistantRecords(turnRecords, collapsedAssistants);
|
|
5055
|
+
const turnRecords = collapsedTurns.size === 0 ? allRecords : collapseTurnRecords(allRecords, collapsedTurns, requestGroups, t);
|
|
5056
|
+
return collapsedAssistants.size === 0 ? turnRecords : collapseAssistantRecords(turnRecords, collapsedAssistants, t);
|
|
4335
5057
|
}, [
|
|
4336
5058
|
allRecords,
|
|
4337
5059
|
collapsedAssistants,
|
|
4338
5060
|
collapsedTurns,
|
|
4339
|
-
|
|
5061
|
+
requestGroups,
|
|
5062
|
+
searchMatchIndexes,
|
|
5063
|
+
t
|
|
4340
5064
|
]);
|
|
4341
5065
|
const projectedVirtualRows = (0, react.useMemo)(() => groupTrajectoryVirtualRows(records), [records]);
|
|
4342
5066
|
const virtualRowStructure = useStableVirtualRowStructure(projectedVirtualRows);
|
|
@@ -4381,17 +5105,17 @@ window.__ModuleLoader__.load({
|
|
|
4381
5105
|
position,
|
|
4382
5106
|
terminalRequestBoundary: record.cell.requestOnly === true && position === records.length - 1
|
|
4383
5107
|
}));
|
|
4384
|
-
const requestBoundaryRuns = (0, react.useMemo)(() => indexRequestBoundaryRuns(records), [records]);
|
|
5108
|
+
const requestBoundaryRuns = (0, react.useMemo)(() => indexRequestBoundaryRuns(records, requestGroups), [records, requestGroups]);
|
|
4385
5109
|
const selectedPrompt = selected?.cell.kind === "system" ? selected.cell.promptDetail : void 0;
|
|
4386
5110
|
const selectedPreviousPrompt = selected?.cell.kind === "system" ? selected.cell.previousPromptDetail : void 0;
|
|
4387
5111
|
const promptSelected = selectedPrompt !== void 0;
|
|
4388
5112
|
const selectedState = selected === void 0 ? void 0 : stateOf(selected);
|
|
4389
|
-
const
|
|
5113
|
+
const selectedRequestInfo = selectedRequest === null ? void 0 : sessionRequestNumbers?.find((request) => requestIdentity(request) === selectedRequest.identity);
|
|
5114
|
+
const selectedRequestRecords = (0, react.useMemo)(() => selectedRequestInfo === void 0 ? [] : allRecords.filter((record) => record.turn === selectedRequestInfo.turn && record.group === selectedRequestInfo.group), [allRecords, selectedRequestInfo]).map(currentRecord);
|
|
4390
5115
|
const selectedRequestAssistant = selectedRequestRecords.find((record) => record.cell.kind === "message");
|
|
4391
5116
|
const selectedRequestAnchor = selectedRequestAssistant ?? selectedRequestRecords[0];
|
|
4392
|
-
const selectedRequestNumber =
|
|
4393
|
-
const
|
|
4394
|
-
const selectedRequestState = selectedRequest === null ? void 0 : selectedRequestInfo?.status ?? (selectedRequestAssistant?.cell.assistantMetrics?.completedTime === null ? "running" : selectedRequestAssistant === void 0 && selectedRequestRecords.some((record) => stateOf(record) === "running") ? "running" : "complete");
|
|
5117
|
+
const selectedRequestNumber = selectedRequestInfo?.number;
|
|
5118
|
+
const selectedRequestState = selectedRequestInfo === void 0 ? void 0 : selectedRequestInfo.status ?? (selectedRequestAssistant?.cell.assistantMetrics?.completedTime === null ? "running" : selectedRequestAssistant === void 0 && selectedRequestRecords.some((record) => stateOf(record) === "running") ? "running" : "complete");
|
|
4395
5119
|
const selectedRequestToolCalls = selectedRequestRecords.filter((record) => record.cell.kind === "tool").length;
|
|
4396
5120
|
const selectedRequestSubtoolCalls = selectedRequestRecords.filter((record) => record.cell.kind === "subtool").length;
|
|
4397
5121
|
const selectedRequestResultTemplate = selectedRequestInfo?.resultSeq === void 0 ? selectedRequestAssistant : allRecords.find((record) => record.cell.sourceSeq === selectedRequestInfo.resultSeq);
|
|
@@ -4405,19 +5129,15 @@ window.__ModuleLoader__.load({
|
|
|
4405
5129
|
});
|
|
4406
5130
|
const selectedRequestCumulativeUsage = selectedRequestInfo?.cumulativeUsage ?? selectedRequestUsage;
|
|
4407
5131
|
const selectedRequestOptions = selectedRequestInfo?.requestConfig;
|
|
4408
|
-
const activeTurn =
|
|
4409
|
-
const activeSection =
|
|
4410
|
-
const selectedTabs =
|
|
5132
|
+
const activeTurn = selectedRequestInfo === void 0 ? selected?.turn : selectedRequestInfo.turn;
|
|
5133
|
+
const activeSection = selectedRequestInfo === void 0 ? selected?.section : selectedRequestRecords[0]?.section;
|
|
5134
|
+
const selectedTabs = selectedRequestInfo !== void 0 ? REQUEST_TABS.filter((tab) => tab.id !== "options" || selectedRequestOptions !== void 0) : selected === void 0 ? [] : detailTabs(selected);
|
|
4411
5135
|
const selectedParents = selected === void 0 ? {} : parentRecords(allRecords, selected);
|
|
4412
5136
|
const selectedParentMessage = selectedParents.message;
|
|
4413
5137
|
const selectedParentTool = selectedParents.tool;
|
|
4414
5138
|
const selectedAssistantRequest = selected?.cell.kind === "message" ? requestNumbers.get(requestKey(selected.turn, selected.group)) : void 0;
|
|
4415
5139
|
const selectedAssistantRequestInfo = selectedAssistantRequest === void 0 ? void 0 : sessionRequestNumbers?.find((request) => request.number === selectedAssistantRequest);
|
|
4416
|
-
const selectedAssistantRequestTarget =
|
|
4417
|
-
turn: selected.turn,
|
|
4418
|
-
group: selected.group,
|
|
4419
|
-
...selectedAssistantRequestInfo?.seq === void 0 ? {} : { seq: selectedAssistantRequestInfo.seq }
|
|
4420
|
-
} : void 0;
|
|
5140
|
+
const selectedAssistantRequestTarget = selectedAssistantRequestInfo === void 0 ? void 0 : { identity: requestIdentity(selectedAssistantRequestInfo) };
|
|
4421
5141
|
const hasSelectedHierarchy = selectedAssistantRequestTarget !== void 0 || selectedParents.message !== void 0 || selectedParents.tool !== void 0;
|
|
4422
5142
|
const splitStyle = toolRequestOffset === null ? void 0 : { "--trajectory-tool-request-width": `calc(58cqw - ${toolRequestOffset}px)` };
|
|
4423
5143
|
const activateTab = (tab) => {
|
|
@@ -4656,7 +5376,7 @@ window.__ModuleLoader__.load({
|
|
|
4656
5376
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4657
5377
|
className: TrajectoryTable_module_css_default.historyLoadingSpinner,
|
|
4658
5378
|
"aria-hidden": "true"
|
|
4659
|
-
}), "
|
|
5379
|
+
}), t("history.loadingTrajectory")]
|
|
4660
5380
|
})
|
|
4661
5381
|
}), (0, react_jsx_runtime.jsxs)("table", {
|
|
4662
5382
|
className: TrajectoryTable_module_css_default.table,
|
|
@@ -4673,7 +5393,7 @@ window.__ModuleLoader__.load({
|
|
|
4673
5393
|
type: "button",
|
|
4674
5394
|
className: TrajectoryTable_module_css_default.historyLoadButton,
|
|
4675
5395
|
disabled: olderBusy || onLoadOlder === void 0,
|
|
4676
|
-
"aria-label": olderBusy ? "
|
|
5396
|
+
"aria-label": olderBusy ? t("history.loadingEarlierAria") : t("history.loadEarlier"),
|
|
4677
5397
|
onClick: () => {
|
|
4678
5398
|
const pane = tablePaneRef.current;
|
|
4679
5399
|
if (pane !== null) requestOlder(pane, false);
|
|
@@ -4685,13 +5405,13 @@ window.__ModuleLoader__.load({
|
|
|
4685
5405
|
}),
|
|
4686
5406
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4687
5407
|
"aria-hidden": "true",
|
|
4688
|
-
children: olderBusy ? "
|
|
5408
|
+
children: olderBusy ? t("history.loadingEarlier") : t("history.loadEarlier")
|
|
4689
5409
|
}),
|
|
4690
5410
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4691
5411
|
className: TrajectoryTable_module_css_default.visuallyHidden,
|
|
4692
5412
|
role: "status",
|
|
4693
5413
|
"aria-live": "polite",
|
|
4694
|
-
children: olderBusy ? "
|
|
5414
|
+
children: olderBusy ? t("history.loadingEarlier") : ""
|
|
4695
5415
|
})
|
|
4696
5416
|
]
|
|
4697
5417
|
})
|
|
@@ -4708,6 +5428,7 @@ window.__ModuleLoader__.load({
|
|
|
4708
5428
|
}),
|
|
4709
5429
|
renderedRecords.map(({ record, position, terminalRequestBoundary }) => (0, react_jsx_runtime.jsx)(RecordPresentation, {
|
|
4710
5430
|
cell: record.cell,
|
|
5431
|
+
t,
|
|
4711
5432
|
children: ({ displayText, listDisplayText, resultText, toolCallOnly, toolCallText }) => {
|
|
4712
5433
|
const isCollapsedSummary = record.collapsedSummary !== void 0;
|
|
4713
5434
|
const isRequestOnly = record.cell.requestOnly === true;
|
|
@@ -4718,13 +5439,20 @@ window.__ModuleLoader__.load({
|
|
|
4718
5439
|
const requestStatus = requestInfo?.status ?? (record.cell.isError === true ? "error" : void 0);
|
|
4719
5440
|
const requestRunIndex = requestBoundaryRuns.get(record.cell.index) ?? 0;
|
|
4720
5441
|
const requestBoundaryStyle = { "--request-boundary-offset": `${requestRunIndex * 8}px` };
|
|
4721
|
-
const requestLabel = request === void 0 ? void 0 :
|
|
4722
|
-
const requestSelected =
|
|
5442
|
+
const requestLabel = request === void 0 ? void 0 : t(requestInfo?.purpose === "compaction" ? "request.labelCompaction" : "request.label", { request });
|
|
5443
|
+
const requestSelected = requestInfo !== void 0 && selectedRequest?.identity === requestIdentity(requestInfo);
|
|
4723
5444
|
const sectionActive = record.turn === null ? activeSection === record.section : activeTurn === record.turn;
|
|
4724
5445
|
return (0, react_jsx_runtime.jsxs)("tr", {
|
|
4725
5446
|
tabIndex: isRequestOnly ? -1 : 0,
|
|
4726
5447
|
"aria-rowindex": position + 1 + historyRowOffset,
|
|
4727
|
-
"aria-label": isCollapsedSummary ?
|
|
5448
|
+
"aria-label": isCollapsedSummary ? t("request.collapsedSummary", {
|
|
5449
|
+
kind: t(record.collapsedSummaryKind === "turn" ? "request.collapsedTurn" : "request.collapsedAssistant"),
|
|
5450
|
+
summary: record.collapsedSummary
|
|
5451
|
+
}) : isRequestOnly ? t("request.rowAriaCompaction", { request: request ?? "" }) : t("request.rowAria", {
|
|
5452
|
+
request: request === void 0 ? "" : t("request.rowPrefix", { request }),
|
|
5453
|
+
kind: t(KIND_LABEL_KEY[record.cell.kind]),
|
|
5454
|
+
content: listDisplayText || t("request.noContent")
|
|
5455
|
+
}),
|
|
4728
5456
|
"aria-selected": !isCollapsedSummary && !isRequestOnly && selectedIndex === record.cell.index,
|
|
4729
5457
|
"data-kind": record.cell.kind,
|
|
4730
5458
|
"data-trajectory-row-key": trajectoryVirtualRecordKey(record),
|
|
@@ -4789,11 +5517,7 @@ window.__ModuleLoader__.load({
|
|
|
4789
5517
|
style: requestBoundaryStyle,
|
|
4790
5518
|
onClick: (event) => {
|
|
4791
5519
|
event.stopPropagation();
|
|
4792
|
-
selectRequest({
|
|
4793
|
-
turn: record.turn,
|
|
4794
|
-
group: record.group,
|
|
4795
|
-
...requestInfo?.seq === void 0 ? {} : { seq: requestInfo.seq }
|
|
4796
|
-
});
|
|
5520
|
+
if (requestInfo !== void 0) selectRequest({ identity: requestIdentity(requestInfo) });
|
|
4797
5521
|
},
|
|
4798
5522
|
onDoubleClick: (event) => {
|
|
4799
5523
|
event.stopPropagation();
|
|
@@ -4809,11 +5533,11 @@ window.__ModuleLoader__.load({
|
|
|
4809
5533
|
}),
|
|
4810
5534
|
!isCollapsedSummary && !isRequestOnly && record.turnStart && (0, react_jsx_runtime.jsx)("span", {
|
|
4811
5535
|
className: sectionActive ? `${TrajectoryTable_module_css_default.turnLabel} ${TrajectoryTable_module_css_default.turnLabelActive}` : TrajectoryTable_module_css_default.turnLabel,
|
|
4812
|
-
"aria-label": sectionLabel(record.turn),
|
|
4813
|
-
children: record.turn === null ? sectionLabel(record.turn) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
5536
|
+
"aria-label": sectionLabel(record.turn, t),
|
|
5537
|
+
children: record.turn === null ? sectionLabel(record.turn, t) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4814
5538
|
className: TrajectoryTable_module_css_default.turnLabelFull,
|
|
4815
5539
|
"aria-hidden": "true",
|
|
4816
|
-
children: sectionLabel(record.turn)
|
|
5540
|
+
children: sectionLabel(record.turn, t)
|
|
4817
5541
|
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
4818
5542
|
className: TrajectoryTable_module_css_default.turnLabelCompact,
|
|
4819
5543
|
"aria-hidden": "true",
|
|
@@ -4828,7 +5552,7 @@ window.__ModuleLoader__.load({
|
|
|
4828
5552
|
className: `${TrajectoryTable_module_css_default.kindTag} ${record.cell.kind === "system" ? TrajectoryTable_module_css_default.systemNeutral : record.cell.kind === "context" ? TrajectoryTable_module_css_default.contextGreen : record.cell.kind === "compacted" ? TrajectoryTable_module_css_default.compacted : record.cell.kind === "tool" ? TrajectoryTable_module_css_default.toolAmber : record.cell.kind === "message" ? TrajectoryTable_module_css_default.assistantVioletBright : record.cell.kind === "subtool" ? TrajectoryTable_module_css_default.subtoolAmber : TrajectoryTable_module_css_default[record.cell.kind]}`,
|
|
4829
5553
|
"data-role-kind": record.cell.kind,
|
|
4830
5554
|
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
4831
|
-
label:
|
|
5555
|
+
label: t(KIND_LABEL_KEY[record.cell.kind]),
|
|
4832
5556
|
side: "right",
|
|
4833
5557
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
4834
5558
|
className: TrajectoryTable_module_css_default.kindTagIcon,
|
|
@@ -4837,7 +5561,7 @@ window.__ModuleLoader__.load({
|
|
|
4837
5561
|
})
|
|
4838
5562
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4839
5563
|
className: TrajectoryTable_module_css_default.kindTagLabel,
|
|
4840
|
-
children:
|
|
5564
|
+
children: t(KIND_LABEL_KEY[record.cell.kind])
|
|
4841
5565
|
})]
|
|
4842
5566
|
})
|
|
4843
5567
|
})
|
|
@@ -4863,7 +5587,8 @@ window.__ModuleLoader__.load({
|
|
|
4863
5587
|
children: (0, react_jsx_runtime.jsx)(RecordListText, {
|
|
4864
5588
|
displayText,
|
|
4865
5589
|
toolCallOnly,
|
|
4866
|
-
toolCallText
|
|
5590
|
+
toolCallText,
|
|
5591
|
+
t
|
|
4867
5592
|
})
|
|
4868
5593
|
}), resultText !== void 0 && (0, react_jsx_runtime.jsxs)("span", {
|
|
4869
5594
|
className: record.cell.isError ? `${TrajectoryTable_module_css_default.inlineResult} ${TrajectoryTable_module_css_default.error}` : TrajectoryTable_module_css_default.inlineResult,
|
|
@@ -4871,7 +5596,7 @@ window.__ModuleLoader__.load({
|
|
|
4871
5596
|
className: TrajectoryTable_module_css_default.arrow,
|
|
4872
5597
|
children: "→"
|
|
4873
5598
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4874
|
-
className: resultText === "
|
|
5599
|
+
className: resultText === t("record.noOutput") ? `${TrajectoryTable_module_css_default.inlineResultText} ${TrajectoryTable_module_css_default.noOutputText}` : TrajectoryTable_module_css_default.inlineResultText,
|
|
4875
5600
|
children: resultText
|
|
4876
5601
|
})]
|
|
4877
5602
|
})]
|
|
@@ -4891,19 +5616,19 @@ window.__ModuleLoader__.load({
|
|
|
4891
5616
|
})
|
|
4892
5617
|
] })]
|
|
4893
5618
|
})]
|
|
4894
|
-
}), (
|
|
5619
|
+
}), (selectedRequestInfo !== void 0 || promptSelected || selected !== void 0 && selectedState !== void 0) && (0, react_jsx_runtime.jsxs)("aside", {
|
|
4895
5620
|
className: TrajectoryTable_module_css_default.details,
|
|
4896
|
-
"aria-label": "
|
|
5621
|
+
"aria-label": t("details.event"),
|
|
4897
5622
|
style: detailsWidth === null ? void 0 : { width: detailsWidth },
|
|
4898
5623
|
children: [
|
|
4899
5624
|
(0, react_jsx_runtime.jsx)("div", {
|
|
4900
5625
|
className: TrajectoryTable_module_css_default.detailsResizeHandle,
|
|
4901
5626
|
role: "separator",
|
|
4902
|
-
"aria-label": "
|
|
5627
|
+
"aria-label": t("details.resize"),
|
|
4903
5628
|
"aria-controls": "trajectory-detail-panel",
|
|
4904
5629
|
"aria-orientation": "vertical",
|
|
4905
5630
|
tabIndex: 0,
|
|
4906
|
-
title: "
|
|
5631
|
+
title: t("details.resizeTitle"),
|
|
4907
5632
|
onDoubleClick: () => {
|
|
4908
5633
|
setDetailsWidth(null);
|
|
4909
5634
|
setToolRequestOffset(null);
|
|
@@ -4960,36 +5685,36 @@ window.__ModuleLoader__.load({
|
|
|
4960
5685
|
className: TrajectoryTable_module_css_default.detailsHeader,
|
|
4961
5686
|
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
4962
5687
|
className: TrajectoryTable_module_css_default.detailsTitle,
|
|
4963
|
-
children:
|
|
5688
|
+
children: selectedRequestInfo !== void 0 ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
4964
5689
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4965
5690
|
className: TrajectoryTable_module_css_default.requestDetailsDot,
|
|
4966
5691
|
"aria-hidden": "true"
|
|
4967
5692
|
}),
|
|
4968
|
-
(0, react_jsx_runtime.
|
|
5693
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
4969
5694
|
className: TrajectoryTable_module_css_default.requestDetailsName,
|
|
4970
|
-
children:
|
|
5695
|
+
children: t("request.label", { request: selectedRequestNumber ?? "—" })
|
|
4971
5696
|
}),
|
|
4972
5697
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4973
5698
|
className: TrajectoryTable_module_css_default.detailsLocation,
|
|
4974
|
-
children: selectedRequestInfo
|
|
5699
|
+
children: selectedRequestInfo.purpose === "compaction" ? t("request.compaction", { section: sectionLabel(selectedRequestInfo.turn, t) }) : sectionLabel(selectedRequestInfo.turn, t)
|
|
4975
5700
|
})
|
|
4976
5701
|
] }) : promptSelected ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4977
5702
|
className: `${TrajectoryTable_module_css_default.kindTag} ${TrajectoryTable_module_css_default.systemNeutral}`,
|
|
4978
|
-
children: "
|
|
5703
|
+
children: t("kind.system")
|
|
4979
5704
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4980
5705
|
className: TrajectoryTable_module_css_default.detailsLocation,
|
|
4981
5706
|
children: selected?.cell.text
|
|
4982
5707
|
})] }) : selected !== void 0 && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4983
5708
|
className: `${TrajectoryTable_module_css_default.kindTag} ${selected.cell.kind === "context" ? TrajectoryTable_module_css_default.contextGreen : selected.cell.kind === "compacted" ? TrajectoryTable_module_css_default.compacted : selected.cell.kind === "tool" ? TrajectoryTable_module_css_default.toolAmber : selected.cell.kind === "message" ? TrajectoryTable_module_css_default.assistantVioletBright : selected.cell.kind === "subtool" ? TrajectoryTable_module_css_default.subtoolAmber : TrajectoryTable_module_css_default[selected.cell.kind]}`,
|
|
4984
|
-
children:
|
|
5709
|
+
children: t(KIND_LABEL_KEY[selected.cell.kind])
|
|
4985
5710
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4986
5711
|
className: TrajectoryTable_module_css_default.detailsLocation,
|
|
4987
|
-
children: selected.cell.kind === "compacted" ? sectionLabel(selected.turn) : `${sectionLabel(selected.turn)} · ${selected.group}`
|
|
5712
|
+
children: selected.cell.kind === "compacted" ? sectionLabel(selected.turn, t) : `${sectionLabel(selected.turn, t)} · ${selected.group}`
|
|
4988
5713
|
})] })
|
|
4989
5714
|
}), (0, react_jsx_runtime.jsx)("button", {
|
|
4990
5715
|
type: "button",
|
|
4991
5716
|
className: TrajectoryTable_module_css_default.close,
|
|
4992
|
-
"aria-label": "
|
|
5717
|
+
"aria-label": t("details.close"),
|
|
4993
5718
|
onClick: clearInspectorSelection,
|
|
4994
5719
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
4995
5720
|
"aria-hidden": "true",
|
|
@@ -5000,7 +5725,7 @@ window.__ModuleLoader__.load({
|
|
|
5000
5725
|
(0, react_jsx_runtime.jsx)("div", {
|
|
5001
5726
|
className: TrajectoryTable_module_css_default.detailTabs,
|
|
5002
5727
|
role: "tablist",
|
|
5003
|
-
"aria-label": "
|
|
5728
|
+
"aria-label": t("details.event"),
|
|
5004
5729
|
children: selectedTabs.map((tab) => (0, react_jsx_runtime.jsx)("button", {
|
|
5005
5730
|
id: `trajectory-detail-${tab.id}`,
|
|
5006
5731
|
type: "button",
|
|
@@ -5011,7 +5736,7 @@ window.__ModuleLoader__.load({
|
|
|
5011
5736
|
onClick: () => {
|
|
5012
5737
|
activateTab(tab.id);
|
|
5013
5738
|
},
|
|
5014
|
-
children: tab.
|
|
5739
|
+
children: t(tab.labelKey)
|
|
5015
5740
|
}, tab.id))
|
|
5016
5741
|
}),
|
|
5017
5742
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -5020,30 +5745,33 @@ window.__ModuleLoader__.load({
|
|
|
5020
5745
|
role: "tabpanel",
|
|
5021
5746
|
"aria-labelledby": `trajectory-detail-${activeTab}`,
|
|
5022
5747
|
children: [
|
|
5023
|
-
|
|
5748
|
+
selectedRequestInfo !== void 0 && selectedRequestState !== void 0 && activeTab === "overview" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("dl", {
|
|
5024
5749
|
className: `${TrajectoryTable_module_css_default.overview} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5025
5750
|
"data-summary-scroll-region": "",
|
|
5026
5751
|
children: [
|
|
5027
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5752
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.status") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5028
5753
|
className: selectedRequestState === "error" ? TrajectoryTable_module_css_default.error : void 0,
|
|
5029
|
-
children: statusLabel(selectedRequestState)
|
|
5754
|
+
children: statusLabel(selectedRequestState, t)
|
|
5030
5755
|
})] }),
|
|
5031
|
-
selectedRequestInfo
|
|
5032
|
-
(selectedRequestInfo
|
|
5033
|
-
(selectedRequestInfo
|
|
5034
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5035
|
-
selectedRequestSubtoolCalls > 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5036
|
-
selectedRequestInfo
|
|
5756
|
+
selectedRequestInfo.purpose === "compaction" && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.purpose") }), (0, react_jsx_runtime.jsx)("dd", { children: t("request.compactionPurpose") })] }),
|
|
5757
|
+
(selectedRequestInfo.provider ?? selectedRequestInfo.requestConfig?.provider) !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.provider") }), (0, react_jsx_runtime.jsx)("dd", { children: selectedRequestInfo.provider ?? selectedRequestInfo.requestConfig?.provider })] }),
|
|
5758
|
+
(selectedRequestInfo.model ?? selectedRequestInfo.requestConfig?.model) !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.model") }), (0, react_jsx_runtime.jsx)("dd", { children: selectedRequestInfo.model ?? selectedRequestInfo.requestConfig?.model })] }),
|
|
5759
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.toolCalls") }), (0, react_jsx_runtime.jsx)("dd", { children: selectedRequestToolCalls })] }),
|
|
5760
|
+
selectedRequestSubtoolCalls > 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.subtoolCalls") }), (0, react_jsx_runtime.jsx)("dd", { children: selectedRequestSubtoolCalls })] }),
|
|
5761
|
+
selectedRequestInfo.error !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.error") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5037
5762
|
className: TrajectoryTable_module_css_default.error,
|
|
5038
|
-
children: selectedRequestInfo
|
|
5763
|
+
children: requestErrorMessage(selectedRequestInfo, t)
|
|
5039
5764
|
})] }),
|
|
5040
|
-
selectedRequestInfo
|
|
5041
|
-
"
|
|
5042
|
-
|
|
5043
|
-
selectedRequestInfo.maxRetries === void 0 ?
|
|
5765
|
+
selectedRequestInfo.retry !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.retry") }), (0, react_jsx_runtime.jsxs)("dd", { children: [
|
|
5766
|
+
t("details.scheduled"),
|
|
5767
|
+
" ",
|
|
5768
|
+
selectedRequestInfo.maxRetries === void 0 ? selectedRequestInfo.retry : t("request.retryProgress", {
|
|
5769
|
+
retry: selectedRequestInfo.retry,
|
|
5770
|
+
maximum: selectedRequestInfo.maxRetries
|
|
5771
|
+
})
|
|
5044
5772
|
] })] }),
|
|
5045
|
-
selectedRequestInfo
|
|
5046
|
-
selectedRequestResult !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5773
|
+
selectedRequestInfo.retryDelayMs !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.retryDelay") }), (0, react_jsx_runtime.jsx)("dd", { children: formatDurationMs(selectedRequestInfo.retryDelayMs, t) })] }),
|
|
5774
|
+
selectedRequestResult !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.result") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5047
5775
|
className: TrajectoryTable_module_css_default.overviewParentLinks,
|
|
5048
5776
|
children: (0, react_jsx_runtime.jsxs)("button", {
|
|
5049
5777
|
type: "button",
|
|
@@ -5051,7 +5779,7 @@ window.__ModuleLoader__.load({
|
|
|
5051
5779
|
onClick: () => {
|
|
5052
5780
|
openRecordSummary(selectedRequestResult);
|
|
5053
5781
|
},
|
|
5054
|
-
children: [(0, react_jsx_runtime.jsx)("span", { children: selectedRequestInfo
|
|
5782
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: selectedRequestInfo.purpose === "compaction" ? t("details.compacted") : t("details.assistantMessage") }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5055
5783
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5056
5784
|
size: 11
|
|
5057
5785
|
})]
|
|
@@ -5062,84 +5790,103 @@ window.__ModuleLoader__.load({
|
|
|
5062
5790
|
className: TrajectoryTable_module_css_default.overviewSections,
|
|
5063
5791
|
children: [
|
|
5064
5792
|
selectedRequestOptions !== void 0 && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5065
|
-
label: "
|
|
5793
|
+
label: t("tab.options"),
|
|
5066
5794
|
onOpen: () => {
|
|
5067
5795
|
activateTab("options");
|
|
5068
5796
|
},
|
|
5069
5797
|
children: (0, react_jsx_runtime.jsx)(RequestOptions, {
|
|
5070
5798
|
options: selectedRequestOptions,
|
|
5071
|
-
preview: true
|
|
5799
|
+
preview: true,
|
|
5800
|
+
t
|
|
5072
5801
|
})
|
|
5073
5802
|
}),
|
|
5074
5803
|
(0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5075
|
-
label: "
|
|
5804
|
+
label: t("tab.usage"),
|
|
5076
5805
|
onOpen: () => {
|
|
5077
5806
|
activateTab("usage");
|
|
5078
5807
|
},
|
|
5079
|
-
children: (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
5808
|
+
children: (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
5809
|
+
usage: selectedRequestUsage,
|
|
5810
|
+
t
|
|
5811
|
+
})
|
|
5080
5812
|
}),
|
|
5081
5813
|
(0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5082
|
-
label: "
|
|
5814
|
+
label: t("tab.timing"),
|
|
5083
5815
|
onOpen: () => {
|
|
5084
5816
|
activateTab("timing");
|
|
5085
5817
|
},
|
|
5086
5818
|
children: (0, react_jsx_runtime.jsx)(RequestTiming, {
|
|
5087
5819
|
assistant: selectedRequestAssistant,
|
|
5088
5820
|
anchor: selectedRequestAnchor,
|
|
5089
|
-
request: selectedRequestInfo
|
|
5821
|
+
request: selectedRequestInfo,
|
|
5822
|
+
t
|
|
5090
5823
|
})
|
|
5091
5824
|
})
|
|
5092
5825
|
]
|
|
5093
5826
|
})] }),
|
|
5094
|
-
|
|
5095
|
-
|
|
5827
|
+
selectedRequestInfo !== void 0 && activeTab === "options" && (0, react_jsx_runtime.jsx)(RequestOptions, {
|
|
5828
|
+
options: selectedRequestOptions,
|
|
5829
|
+
t
|
|
5830
|
+
}),
|
|
5831
|
+
selectedRequestInfo !== void 0 && activeTab === "usage" && (0, react_jsx_runtime.jsx)(RequestUsagePanel, {
|
|
5096
5832
|
usage: selectedRequestUsage,
|
|
5097
|
-
cumulative: selectedRequestCumulativeUsage
|
|
5833
|
+
cumulative: selectedRequestCumulativeUsage,
|
|
5834
|
+
t
|
|
5098
5835
|
}),
|
|
5099
|
-
|
|
5836
|
+
selectedRequestInfo !== void 0 && activeTab === "timing" && (0, react_jsx_runtime.jsx)(RequestTiming, {
|
|
5100
5837
|
assistant: selectedRequestAssistant,
|
|
5101
5838
|
anchor: selectedRequestAnchor,
|
|
5102
|
-
request: selectedRequestInfo
|
|
5839
|
+
request: selectedRequestInfo,
|
|
5840
|
+
t
|
|
5103
5841
|
}),
|
|
5104
5842
|
promptSelected && selectedPreviousPrompt !== void 0 && activeTab === "diff" && (0, react_jsx_runtime.jsx)(SystemPromptDiff, {
|
|
5105
5843
|
before: selectedPreviousPrompt,
|
|
5106
|
-
after: selectedPrompt
|
|
5844
|
+
after: selectedPrompt,
|
|
5845
|
+
t
|
|
5107
5846
|
}),
|
|
5108
5847
|
promptSelected && activeTab === "system-prompt" && (selectedPrompt.system === "" ? (0, react_jsx_runtime.jsx)("p", {
|
|
5109
5848
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
5110
|
-
children: "
|
|
5849
|
+
children: t("record.systemPromptMissing")
|
|
5111
5850
|
}) : (0, react_jsx_runtime.jsx)("div", {
|
|
5112
5851
|
className: `${TrajectoryTable_module_css_default.markdownPayload} ${TrajectoryTable_module_css_default.systemPrompt}`,
|
|
5113
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
5852
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
5853
|
+
text: selectedPrompt.system,
|
|
5854
|
+
labels: markdownLabels(t)
|
|
5855
|
+
})
|
|
5114
5856
|
})),
|
|
5115
|
-
promptSelected && activeTab === "tools" && (0, react_jsx_runtime.jsx)(ToolCatalog, {
|
|
5857
|
+
promptSelected && activeTab === "tools" && (0, react_jsx_runtime.jsx)(ToolCatalog, {
|
|
5858
|
+
tools: selectedPrompt.tools,
|
|
5859
|
+
t
|
|
5860
|
+
}),
|
|
5116
5861
|
!promptSelected && selected?.cell.kind === "compacted" && selectedState !== void 0 && activeTab === "overview" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("dl", {
|
|
5117
5862
|
className: `${TrajectoryTable_module_css_default.overview} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5118
5863
|
"data-summary-scroll-region": "",
|
|
5119
5864
|
children: [
|
|
5120
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5865
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.status") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5121
5866
|
className: selectedState === "error" ? TrajectoryTable_module_css_default.error : void 0,
|
|
5122
|
-
children: statusLabel(selectedState)
|
|
5867
|
+
children: statusLabel(selectedState, t)
|
|
5123
5868
|
})] }),
|
|
5124
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5125
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5869
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.duration") }), (0, react_jsx_runtime.jsx)("dd", { children: formatElapsedSeconds(selected.cell.timeSeconds, t) })] }),
|
|
5870
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.tokens") }), (0, react_jsx_runtime.jsx)("dd", { children: "—" })] })
|
|
5126
5871
|
]
|
|
5127
5872
|
}), selected.cell.outputDetail !== void 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
5128
5873
|
className: `${TrajectoryTable_module_css_default.compactedSummary} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5129
5874
|
"data-summary-scroll-region": "",
|
|
5130
5875
|
children: (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5131
5876
|
record: selected,
|
|
5877
|
+
renderImages,
|
|
5132
5878
|
rendered: true,
|
|
5133
5879
|
thinkingExpanded,
|
|
5134
5880
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5135
|
-
onOpenCall: openCallSummary
|
|
5881
|
+
onOpenCall: openCallSummary,
|
|
5882
|
+
t
|
|
5136
5883
|
})
|
|
5137
5884
|
})] }),
|
|
5138
5885
|
!promptSelected && selected !== void 0 && selected.cell.kind !== "compacted" && selectedState !== void 0 && activeTab === "overview" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("dl", {
|
|
5139
5886
|
className: `${TrajectoryTable_module_css_default.overview} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5140
5887
|
"data-summary-scroll-region": "",
|
|
5141
5888
|
children: [
|
|
5142
|
-
selected.cell.messageSource !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5889
|
+
selected.cell.messageSource !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.source") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5143
5890
|
className: TrajectoryTable_module_css_default.overviewParentLinks,
|
|
5144
5891
|
children: (0, react_jsx_runtime.jsxs)("button", {
|
|
5145
5892
|
type: "button",
|
|
@@ -5147,13 +5894,13 @@ window.__ModuleLoader__.load({
|
|
|
5147
5894
|
onClick: () => {
|
|
5148
5895
|
activateTab("source");
|
|
5149
5896
|
},
|
|
5150
|
-
children: [(0, react_jsx_runtime.jsx)("span", { children: messageSourceLabel(selected.cell.messageSource) }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5897
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: messageSourceLabel(selected.cell.messageSource, t) }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5151
5898
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5152
5899
|
size: 11
|
|
5153
5900
|
})]
|
|
5154
5901
|
})
|
|
5155
5902
|
})] }),
|
|
5156
|
-
hasSelectedHierarchy && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: selectedAssistantRequestTarget !== void 0 ? "
|
|
5903
|
+
hasSelectedHierarchy && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: selectedAssistantRequestTarget !== void 0 ? t("details.source") : t("details.hierarchy") }), (0, react_jsx_runtime.jsxs)("dd", {
|
|
5157
5904
|
className: TrajectoryTable_module_css_default.overviewParentLinks,
|
|
5158
5905
|
children: [
|
|
5159
5906
|
selectedAssistantRequestTarget !== void 0 && (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -5162,7 +5909,7 @@ window.__ModuleLoader__.load({
|
|
|
5162
5909
|
onClick: () => {
|
|
5163
5910
|
selectRequest(selectedAssistantRequestTarget);
|
|
5164
5911
|
},
|
|
5165
|
-
children: [(0, react_jsx_runtime.
|
|
5912
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("request.label", { request: selectedAssistantRequest ?? "—" }) }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5166
5913
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5167
5914
|
size: 11
|
|
5168
5915
|
})]
|
|
@@ -5173,7 +5920,7 @@ window.__ModuleLoader__.load({
|
|
|
5173
5920
|
onClick: () => {
|
|
5174
5921
|
openRecordSummary(selectedParentMessage);
|
|
5175
5922
|
},
|
|
5176
|
-
children: [(0, react_jsx_runtime.jsx)("span", { children: "
|
|
5923
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("details.assistantMessage") }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5177
5924
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5178
5925
|
size: 11
|
|
5179
5926
|
})]
|
|
@@ -5184,111 +5931,144 @@ window.__ModuleLoader__.load({
|
|
|
5184
5931
|
onClick: () => {
|
|
5185
5932
|
openRecordSummary(selectedParentTool);
|
|
5186
5933
|
},
|
|
5187
|
-
children: [(0, react_jsx_runtime.jsx)("span", { children: "
|
|
5934
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("details.toolCall") }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5188
5935
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5189
5936
|
size: 11
|
|
5190
5937
|
})]
|
|
5191
5938
|
})
|
|
5192
5939
|
]
|
|
5193
5940
|
})] }),
|
|
5194
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5941
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.status") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5195
5942
|
className: selectedState === "error" ? TrajectoryTable_module_css_default.error : void 0,
|
|
5196
|
-
children: statusLabel(selectedState)
|
|
5943
|
+
children: statusLabel(selectedState, t)
|
|
5197
5944
|
})] }),
|
|
5198
|
-
selected.cell.kind === "message" && (0, react_jsx_runtime.jsx)(TokenRows, {
|
|
5199
|
-
|
|
5945
|
+
selected.cell.kind === "message" && (0, react_jsx_runtime.jsx)(TokenRows, {
|
|
5946
|
+
cell: selected.cell,
|
|
5947
|
+
t
|
|
5948
|
+
}),
|
|
5949
|
+
(selected.cell.kind === "user" || selected.cell.kind === "context") && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.duration") }), (0, react_jsx_runtime.jsx)("dd", { children: formatElapsedSeconds(selected.cell.timeSeconds, t) })] })
|
|
5200
5950
|
]
|
|
5201
5951
|
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
5202
5952
|
className: TrajectoryTable_module_css_default.overviewSections,
|
|
5203
5953
|
children: [
|
|
5204
5954
|
isMarkdownRecord(selected) ? (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5205
|
-
label: "
|
|
5955
|
+
label: t("tab.preview"),
|
|
5206
5956
|
onOpen: () => {
|
|
5207
5957
|
activateTab("rendered");
|
|
5208
5958
|
},
|
|
5209
5959
|
children: (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5210
5960
|
record: selected,
|
|
5961
|
+
renderImages,
|
|
5211
5962
|
rendered: true,
|
|
5212
5963
|
preview: true,
|
|
5213
5964
|
thinkingExpanded,
|
|
5214
5965
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5215
|
-
onOpenCall: openCallSummary
|
|
5966
|
+
onOpenCall: openCallSummary,
|
|
5967
|
+
t
|
|
5216
5968
|
})
|
|
5217
5969
|
}) }) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
5218
5970
|
selected.cell.inputDetail && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5219
|
-
label: "
|
|
5971
|
+
label: t("tab.payload"),
|
|
5220
5972
|
onOpen: () => {
|
|
5221
5973
|
activateTab("input");
|
|
5222
5974
|
},
|
|
5223
5975
|
children: (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5224
5976
|
record: selected,
|
|
5225
5977
|
direction: "input",
|
|
5226
|
-
preview: true
|
|
5978
|
+
preview: true,
|
|
5979
|
+
renderImages,
|
|
5980
|
+
t
|
|
5227
5981
|
})
|
|
5228
5982
|
}),
|
|
5229
5983
|
selected.cell.outputDetail && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5230
|
-
label: "
|
|
5984
|
+
label: t("tab.result"),
|
|
5231
5985
|
onOpen: () => {
|
|
5232
5986
|
activateTab("output");
|
|
5233
5987
|
},
|
|
5234
5988
|
children: (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5235
5989
|
record: selected,
|
|
5236
5990
|
direction: "output",
|
|
5237
|
-
preview: true
|
|
5991
|
+
preview: true,
|
|
5992
|
+
renderImages,
|
|
5993
|
+
t
|
|
5238
5994
|
})
|
|
5239
5995
|
}),
|
|
5240
5996
|
(0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5241
|
-
label: "
|
|
5997
|
+
label: t("tab.schema"),
|
|
5242
5998
|
onOpen: () => {
|
|
5243
5999
|
activateTab("schema");
|
|
5244
6000
|
},
|
|
5245
6001
|
children: (0, react_jsx_runtime.jsx)(RecordSchema, {
|
|
5246
6002
|
record: selected,
|
|
5247
|
-
preview: true
|
|
6003
|
+
preview: true,
|
|
6004
|
+
t
|
|
5248
6005
|
})
|
|
5249
6006
|
})
|
|
5250
6007
|
] }),
|
|
5251
6008
|
selectedAssistantRequestTarget !== void 0 && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5252
|
-
label: "
|
|
6009
|
+
label: t("timing.request"),
|
|
5253
6010
|
onOpen: () => {
|
|
5254
6011
|
selectRequest(selectedAssistantRequestTarget, "timing");
|
|
5255
6012
|
},
|
|
5256
|
-
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
6013
|
+
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
6014
|
+
record: selected,
|
|
6015
|
+
t
|
|
6016
|
+
})
|
|
5257
6017
|
}),
|
|
5258
6018
|
(selected.cell.kind === "tool" || selected.cell.kind === "subtool") && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5259
|
-
label: "
|
|
6019
|
+
label: t("tab.timing"),
|
|
5260
6020
|
onOpen: () => {
|
|
5261
6021
|
activateTab("timing");
|
|
5262
6022
|
},
|
|
5263
|
-
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
6023
|
+
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
6024
|
+
record: selected,
|
|
6025
|
+
t
|
|
6026
|
+
})
|
|
5264
6027
|
})
|
|
5265
6028
|
]
|
|
5266
6029
|
})] }),
|
|
5267
6030
|
!promptSelected && selected !== void 0 && activeTab === "rendered" && (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5268
6031
|
record: selected,
|
|
6032
|
+
renderImages,
|
|
5269
6033
|
rendered: true,
|
|
5270
6034
|
thinkingExpanded,
|
|
5271
6035
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5272
|
-
onOpenCall: openCallSummary
|
|
6036
|
+
onOpenCall: openCallSummary,
|
|
6037
|
+
t
|
|
5273
6038
|
}),
|
|
5274
6039
|
!promptSelected && selected !== void 0 && activeTab === "raw" && (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5275
6040
|
record: selected,
|
|
6041
|
+
renderImages,
|
|
5276
6042
|
rendered: false,
|
|
5277
6043
|
thinkingExpanded,
|
|
5278
6044
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5279
|
-
onOpenCall: openCallSummary
|
|
6045
|
+
onOpenCall: openCallSummary,
|
|
6046
|
+
t
|
|
6047
|
+
}),
|
|
6048
|
+
!promptSelected && selected !== void 0 && activeTab === "source" && (0, react_jsx_runtime.jsx)(MessageSource, {
|
|
6049
|
+
record: selected,
|
|
6050
|
+
t
|
|
5280
6051
|
}),
|
|
5281
|
-
!promptSelected && selected !== void 0 && activeTab === "source" && (0, react_jsx_runtime.jsx)(MessageSource, { record: selected }),
|
|
5282
6052
|
!promptSelected && selected !== void 0 && activeTab === "input" && (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5283
6053
|
record: selected,
|
|
5284
|
-
direction: "input"
|
|
6054
|
+
direction: "input",
|
|
6055
|
+
renderImages,
|
|
6056
|
+
t
|
|
5285
6057
|
}),
|
|
5286
6058
|
!promptSelected && selected !== void 0 && activeTab === "output" && (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5287
6059
|
record: selected,
|
|
5288
|
-
direction: "output"
|
|
6060
|
+
direction: "output",
|
|
6061
|
+
renderImages,
|
|
6062
|
+
t
|
|
6063
|
+
}),
|
|
6064
|
+
!promptSelected && selected !== void 0 && activeTab === "schema" && (0, react_jsx_runtime.jsx)(RecordSchema, {
|
|
6065
|
+
record: selected,
|
|
6066
|
+
t
|
|
5289
6067
|
}),
|
|
5290
|
-
!promptSelected && selected !== void 0 && activeTab === "
|
|
5291
|
-
|
|
6068
|
+
!promptSelected && selected !== void 0 && activeTab === "timing" && (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
6069
|
+
record: selected,
|
|
6070
|
+
t
|
|
6071
|
+
})
|
|
5292
6072
|
]
|
|
5293
6073
|
})
|
|
5294
6074
|
]
|
|
@@ -5297,7 +6077,7 @@ window.__ModuleLoader__.load({
|
|
|
5297
6077
|
}
|
|
5298
6078
|
//#endregion
|
|
5299
6079
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css.mjs
|
|
5300
|
-
const css$2 = ".fV0t5q_root{z-index:4;box-sizing:border-box;width:100%;height:var(--dsh-trajectory-toolbar-height);border-bottom
|
|
6080
|
+
const css$2 = ".fV0t5q_root{z-index:4;box-sizing:border-box;width:100%;height:var(--dsh-trajectory-toolbar-height);border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);position:sticky;top:0}.fV0t5q_inner{box-sizing:border-box;align-items:center;gap:8px;width:100%;height:100%;padding:0 6px;display:flex}.fV0t5q_actions{flex:none;align-items:center;gap:2px;display:flex}.fV0t5q_toggle{height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;font:var(--dsw-font-xxs-12);background:0 0;border:0;border-radius:3px;flex:none;align-items:center;gap:4px;padding:0 7px;display:inline-flex}.fV0t5q_toggle:hover,.fV0t5q_toggle[aria-pressed=true]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.fV0t5q_toggle:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.fV0t5q_toggleIcon{stroke:currentColor;stroke-width:1.25px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:12px;height:12px}.fV0t5q_control{box-sizing:border-box;width:88px;height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;font:var(--dsw-font-xxs-12);background:0 0;border:0;border-radius:0;flex:none;justify-content:center;align-items:center;gap:4px;padding:0 5px;display:inline-flex}.fV0t5q_control[hidden]{display:none}.fV0t5q_control:hover:not(:disabled),.fV0t5q_control[aria-checked=true],.fV0t5q_control[aria-pressed=true]{color:var(--dsw-alias-label-primary)}.fV0t5q_control:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.fV0t5q_control:disabled{color:var(--dsw-alias-label-dimmed);cursor:not-allowed}.fV0t5q_controlTrack{background:var(--dsw-alias-border-l2);width:20px;height:10px;transition:background-color .12s var(--ds-ease-in-out);border-radius:5px;flex:none;display:inline-block;position:relative}.fV0t5q_controlThumb{corner-shape:round;background:var(--dsw-alias-bg-layer-1);width:6px;height:6px;transition:transform .12s var(--ds-ease-in-out);border-radius:50%;position:absolute;top:2px;left:2px}.fV0t5q_controlTrack[data-on=true]{background:var(--dsw-alias-state-business-primary)}.fV0t5q_controlTrack[data-on=true] .fV0t5q_controlThumb{transform:translate(10px)}.fV0t5q_action{height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;font:var(--dsw-font-xxs-12);background:0 0;border:0;border-radius:3px;flex:none;align-items:center;gap:4px;padding:0 5px;display:inline-flex}.fV0t5q_action:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.fV0t5q_action:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.fV0t5q_actionIcon{color:var(--dsw-alias-label-tertiary);font:14px/14px var(--ds-font-family-code)}.fV0t5q_search{border:.5px solid var(--dsw-alias-border-l4);min-width:84px;height:22px;color:var(--dsw-alias-label-caption);background:var(--dsw-alias-bg-layer-2);border-radius:4px;flex:0 164px;align-items:center;gap:4px;margin-left:auto;padding:0 6px;display:flex}.fV0t5q_search:hover{border-color:var(--dsw-alias-label-caption)}.fV0t5q_search:focus-within{border-color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-layer-1)}.fV0t5q_searchIcon{flex:none}.fV0t5q_searchInput{width:100%;min-width:0;color:var(--dsw-alias-label-primary);font:var(--dsw-font-xxs-12);background:0 0;border:0;outline:0;padding:0}.fV0t5q_searchInput::placeholder{color:var(--dsw-alias-label-caption)}.fV0t5q_searchInput::-webkit-search-cancel-button{cursor:pointer;width:12px;height:12px}";
|
|
5301
6081
|
const tagId$2 = "@deepseek-ai/dsh-client-ui-trajectory/TrajectoryToolbar.module.css";
|
|
5302
6082
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
5303
6083
|
const tag = document.createElement("style");
|
|
@@ -5427,10 +6207,11 @@ window.__ModuleLoader__.load({
|
|
|
5427
6207
|
/**
|
|
5428
6208
|
* Format a timeline duration as an integer-millisecond label.
|
|
5429
6209
|
* @param milliseconds - Non-negative duration in milliseconds.
|
|
6210
|
+
* @param t - Trajectory locale translator.
|
|
5430
6211
|
* @returns Millisecond label with thousands separators.
|
|
5431
6212
|
*/
|
|
5432
|
-
function formatTimelineOffset(milliseconds) {
|
|
5433
|
-
return formatDurationMillis(milliseconds);
|
|
6213
|
+
function formatTimelineOffset(milliseconds, t) {
|
|
6214
|
+
return formatDurationMillis(milliseconds, t);
|
|
5434
6215
|
}
|
|
5435
6216
|
function laneFor(kind) {
|
|
5436
6217
|
if (kind === "tool" || kind === "subtool") return 2;
|
|
@@ -5549,7 +6330,7 @@ window.__ModuleLoader__.load({
|
|
|
5549
6330
|
}
|
|
5550
6331
|
//#endregion
|
|
5551
6332
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-trajectory/src/client/TrajectoryTimeline.module.css.mjs
|
|
5552
|
-
const css$1 = "._1p9O6q_root{z-index:1;isolation:isolate;border-bottom
|
|
6333
|
+
const css$1 = "._1p9O6q_root{z-index:1;isolation:isolate;border-bottom:.5px solid var(--dsw-alias-border-l2);user-select:none;flex:none;position:relative}._1p9O6q_root [role=tooltip]{font:var(--dsw-font-xxxs-11)}._1p9O6q_plot{background:var(--dsw-alias-bg-layer-2);grid-template-columns:44px minmax(0,1fr);height:50px;display:grid;overflow:hidden}._1p9O6q_labels{border-right:.5px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-caption);font:var(--dsw-font-xs-13);font-size:10px;line-height:1;position:relative}._1p9O6q_labels span{text-align:right;justify-content:flex-end;align-items:center;height:8px;display:flex;position:absolute;right:3px}._1p9O6q_labels span:first-child{top:7px}._1p9O6q_labels span:nth-child(2){top:21px}._1p9O6q_labels span:nth-child(3){top:35px}._1p9O6q_track{cursor:crosshair;touch-action:none;position:relative;overflow:hidden}._1p9O6q_track[data-panning=true]{cursor:grabbing}._1p9O6q_earlierHistory{z-index:5;appearance:none;box-sizing:border-box;background:linear-gradient(to right, var(--dsw-alias-bg-layer-2) 0, var(--dsw-alias-bg-layer-2) 38%, transparent 100%);width:28px;color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);opacity:.72;cursor:pointer;border:0;outline:none;justify-content:flex-start;align-items:center;padding-left:3px;line-height:1;display:flex;position:absolute;top:0;bottom:0;left:0}._1p9O6q_earlierHistory:hover{opacity:1}._1p9O6q_earlierHistory[aria-disabled=true]{cursor:default}._1p9O6q_earlierHistory:focus-visible{box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2)}._1p9O6q_empty{color:var(--dsw-alias-label-caption);font:var(--dsw-font-xs-13);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._1p9O6q_track:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}._1p9O6q_lanes{z-index:2;top:7px;bottom:7px;left:var(--trajectory-domain-left);width:var(--trajectory-domain-width);position:absolute}._1p9O6q_turnBoundaries{z-index:3;top:0;bottom:0;left:var(--trajectory-domain-left);width:var(--trajectory-domain-width);pointer-events:none;position:absolute}@media (prefers-reduced-motion:no-preference){._1p9O6q_lanes[data-animate-viewport=true],._1p9O6q_turnBoundaries[data-animate-viewport=true]{transition:left .18s ease-out}}._1p9O6q_turnBoundary{top:0;bottom:0;left:var(--trajectory-turn-left);background:var(--dsw-alias-border-l2);width:.5px;position:absolute}._1p9O6q_span{top:calc(var(--trajectory-span-lane) * 14px);left:calc(var(--trajectory-span-left) + var(--trajectory-span-gap));width:max(2px, calc(var(--trajectory-span-width) - var(--trajectory-span-gap) - var(--trajectory-span-gap)));background:var(--dsw-alias-label-secondary);opacity:.78;border-radius:1px;min-width:2px;height:8px;position:absolute}._1p9O6q_span[data-timeline-span=user]{background:var(--dsw-alias-state-business-primary)}._1p9O6q_span[data-timeline-span=context]{background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 68%, var(--dsw-alias-label-secondary))}._1p9O6q_span[data-timeline-span=message]{--trajectory-assistant-decoding-color:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 60%, var(--dsw-alias-state-error-secondary));--trajectory-assistant-ttft-color:color-mix(in srgb, var(--trajectory-assistant-decoding-color) 54%, var(--dsw-alias-bg-layer-2));background:var(--trajectory-assistant-decoding-color);opacity:1}._1p9O6q_span[data-timeline-span=message][data-assistant-timing=true]{background:linear-gradient(to right, var(--trajectory-assistant-ttft-color) 0, var(--trajectory-assistant-ttft-color) var(--trajectory-assistant-ttft), var(--trajectory-assistant-decoding-color) var(--trajectory-assistant-ttft), var(--trajectory-assistant-decoding-color) 100%)}._1p9O6q_span[data-timeline-span=tool],._1p9O6q_span[data-timeline-span=subtool]{background:var(--dsw-alias-state-warn-label);opacity:1}._1p9O6q_span[data-error=true]{background:var(--dsw-alias-state-error-primary)}._1p9O6q_span[data-equal-duration=true]{width:8px;min-width:8px}._1p9O6q_span[data-selected=false]{opacity:.2}._1p9O6q_span[data-hovered=true]:not([data-current=true]){z-index:1;opacity:1;box-shadow:0 0 0 1px var(--dsw-alias-bg-layer-2), 0 0 0 2px color-mix(in srgb, var(--dsw-alias-state-business-primary) 80%, transparent)}._1p9O6q_span[data-current=true]{z-index:1;opacity:1;box-shadow:0 0 0 1px var(--dsw-alias-bg-layer-2), 0 0 0 2px var(--dsw-alias-state-business-primary)}._1p9O6q_span[data-search-match=false]{opacity:.14}._1p9O6q_selection{z-index:1;top:0;bottom:0;left:var(--trajectory-selection-left);width:var(--trajectory-selection-width);background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);min-width:1px;box-shadow:-100vw 0 0 100vw color-mix(in srgb, var(--dsw-alias-bg-layer-1) 58%, transparent), 100vw 0 0 100vw color-mix(in srgb, var(--dsw-alias-bg-layer-1) 58%, transparent);pointer-events:none;position:absolute}._1p9O6q_selectionEdges{z-index:4;top:0;bottom:0;left:var(--trajectory-selection-left);width:var(--trajectory-selection-width);pointer-events:none;min-width:1px;position:absolute}._1p9O6q_hoverLine{z-index:4;top:0;bottom:0;left:clamp(0px, calc(var(--trajectory-hover-left) - 1px), calc(100% - 2px));background:var(--dsw-alias-state-business-primary);pointer-events:none;width:2px;position:absolute}._1p9O6q_selectionEdges:before,._1p9O6q_selectionEdges:after{background:var(--dsw-alias-state-business-primary);content:\"\";width:3px;position:absolute;top:0;bottom:0}._1p9O6q_selectionEdges:before{left:0}._1p9O6q_selectionEdges:after{right:0}._1p9O6q_selectionEdges[data-dragging=true]:before,._1p9O6q_selectionEdges[data-dragging=true]:after{width:2px}._1p9O6q_selection[data-dragging=true]{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 18%, transparent)}";
|
|
5553
6334
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-trajectory/TrajectoryTimeline.module.css";
|
|
5554
6335
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
5555
6336
|
const tag = document.createElement("style");
|
|
@@ -5601,15 +6382,15 @@ window.__ModuleLoader__.load({
|
|
|
5601
6382
|
...assistantTimingDetail(cell.assistantMetrics)
|
|
5602
6383
|
};
|
|
5603
6384
|
}
|
|
5604
|
-
function timelineKindLabel(kind) {
|
|
6385
|
+
function timelineKindLabel(kind, t) {
|
|
5605
6386
|
switch (kind) {
|
|
5606
|
-
case "system": return "
|
|
5607
|
-
case "user": return "
|
|
5608
|
-
case "context": return "
|
|
5609
|
-
case "compacted": return "
|
|
5610
|
-
case "message": return "
|
|
5611
|
-
case "tool": return "
|
|
5612
|
-
case "subtool": return "
|
|
6387
|
+
case "system": return t("kind.system");
|
|
6388
|
+
case "user": return t("kind.user");
|
|
6389
|
+
case "context": return t("kind.context");
|
|
6390
|
+
case "compacted": return t("kind.compacted");
|
|
6391
|
+
case "message": return t("kind.assistant");
|
|
6392
|
+
case "tool": return t("kind.tool");
|
|
6393
|
+
case "subtool": return t("kind.subtool");
|
|
5613
6394
|
}
|
|
5614
6395
|
}
|
|
5615
6396
|
function formatRecordedTime(timestamp) {
|
|
@@ -5620,14 +6401,17 @@ window.__ModuleLoader__.load({
|
|
|
5620
6401
|
fractionalSecondDigits: 3
|
|
5621
6402
|
});
|
|
5622
6403
|
}
|
|
5623
|
-
function timelineTooltipLabel(kind, detail) {
|
|
5624
|
-
const heading = timelineKindLabel(kind);
|
|
6404
|
+
function timelineTooltipLabel(kind, detail, t) {
|
|
6405
|
+
const heading = timelineKindLabel(kind, t);
|
|
5625
6406
|
if (detail === void 0) return heading;
|
|
5626
|
-
const duration = detail.durationMs === void 0 ? null :
|
|
6407
|
+
const duration = detail.durationMs === void 0 ? null : t("timeline.total", { duration: formatTimelineOffset(detail.durationMs, t) });
|
|
5627
6408
|
return [
|
|
5628
6409
|
heading,
|
|
5629
|
-
detail.startedAt === void 0 ? null : detail.durationMs === void 0 ?
|
|
5630
|
-
[duration, detail.ttftMs === void 0 || detail.decodingMs === void 0 ? null :
|
|
6410
|
+
detail.startedAt === void 0 ? null : detail.durationMs === void 0 ? t("timeline.started", { time: formatRecordedTime(detail.startedAt) }) : `${formatRecordedTime(detail.startedAt)} → ${formatRecordedTime(detail.startedAt + detail.durationMs)}`,
|
|
6411
|
+
[duration, detail.ttftMs === void 0 || detail.decodingMs === void 0 ? null : t("timeline.ttftDecoding", {
|
|
6412
|
+
ttft: formatTimelineOffset(detail.ttftMs, t),
|
|
6413
|
+
decoding: formatTimelineOffset(detail.decodingMs, t)
|
|
6414
|
+
})].filter((value) => value !== null).join(" · ")
|
|
5631
6415
|
].filter((value) => value !== null && value !== "").join("\n");
|
|
5632
6416
|
}
|
|
5633
6417
|
function orderedRange(left, right) {
|
|
@@ -5657,20 +6441,20 @@ window.__ModuleLoader__.load({
|
|
|
5657
6441
|
end: (bounded.end - start) / duration
|
|
5658
6442
|
};
|
|
5659
6443
|
}
|
|
5660
|
-
function LaneLabels() {
|
|
6444
|
+
function LaneLabels({ t }) {
|
|
5661
6445
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
5662
6446
|
className: TrajectoryTimeline_module_css_default.labels,
|
|
5663
6447
|
"aria-hidden": "true",
|
|
5664
6448
|
children: [
|
|
5665
|
-
(0, react_jsx_runtime.jsx)("span", { children: "
|
|
5666
|
-
(0, react_jsx_runtime.jsx)("span", { children: "
|
|
5667
|
-
(0, react_jsx_runtime.jsx)("span", { children: "
|
|
6449
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("column.input") }),
|
|
6450
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("column.model") }),
|
|
6451
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("column.tools") })
|
|
5668
6452
|
]
|
|
5669
6453
|
});
|
|
5670
6454
|
}
|
|
5671
|
-
function EarlierHistoryBoundary({ loading, onHover, onLoad }) {
|
|
6455
|
+
function EarlierHistoryBoundary({ loading, onHover, onLoad, t }) {
|
|
5672
6456
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
5673
|
-
label: loading ? "
|
|
6457
|
+
label: loading ? t("history.loadingEarlier") : t("history.clickToLoadEarlier"),
|
|
5674
6458
|
side: "right",
|
|
5675
6459
|
delayMs: TIMELINE_TOOLTIP_DELAY_MS,
|
|
5676
6460
|
children: (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -5678,7 +6462,7 @@ window.__ModuleLoader__.load({
|
|
|
5678
6462
|
className: TrajectoryTimeline_module_css_default.earlierHistory,
|
|
5679
6463
|
"data-earlier-history": true,
|
|
5680
6464
|
"data-loading": loading || void 0,
|
|
5681
|
-
"aria-label": loading ? "
|
|
6465
|
+
"aria-label": loading ? t("history.loadingEarlierAria") : t("history.loadEarlier"),
|
|
5682
6466
|
"aria-disabled": loading || onLoad === void 0,
|
|
5683
6467
|
onClick: onLoad,
|
|
5684
6468
|
onPointerEnter: (event) => {
|
|
@@ -5696,7 +6480,7 @@ window.__ModuleLoader__.load({
|
|
|
5696
6480
|
});
|
|
5697
6481
|
}
|
|
5698
6482
|
/** Overview renderer with drag ranges, click-sized focus, and Escape reset. */
|
|
5699
|
-
const TrajectoryTimeline = (0, react.memo)(function TrajectoryTimeline({ turns, mode, range, hasEarlierRecords = false, onLoadEarlier, selectedIndex = null, searchMatchIndexes = null, onRangeChange, onRecordSelect, onRecordFocus }) {
|
|
6483
|
+
const TrajectoryTimeline = (0, react.memo)(function TrajectoryTimeline({ t, turns, mode, range, hasEarlierRecords = false, onLoadEarlier, selectedIndex = null, searchMatchIndexes = null, onRangeChange, onRecordSelect, onRecordFocus }) {
|
|
5700
6484
|
const model = (0, react.useMemo)(() => deriveTrajectoryTimeline(turns, mode), [mode, turns]);
|
|
5701
6485
|
const detailByIndex = (0, react.useMemo)(() => new Map(turns.flatMap((turn) => turn.groups.flatMap((group) => group.cells.map((cell) => [cell.index, timelineRecordDetail(cell)])))), [turns]);
|
|
5702
6486
|
const dragRef = (0, react.useRef)(null);
|
|
@@ -5794,20 +6578,21 @@ window.__ModuleLoader__.load({
|
|
|
5794
6578
|
if (model === null) return (0, react_jsx_runtime.jsx)("section", {
|
|
5795
6579
|
ref: rootRef,
|
|
5796
6580
|
className: TrajectoryTimeline_module_css_default.root,
|
|
5797
|
-
"aria-label": "
|
|
6581
|
+
"aria-label": t("timeline.aria"),
|
|
5798
6582
|
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
5799
6583
|
className: TrajectoryTimeline_module_css_default.plot,
|
|
5800
|
-
children: [(0, react_jsx_runtime.jsx)(LaneLabels, {}), (0, react_jsx_runtime.jsxs)("div", {
|
|
6584
|
+
children: [(0, react_jsx_runtime.jsx)(LaneLabels, { t }), (0, react_jsx_runtime.jsxs)("div", {
|
|
5801
6585
|
className: TrajectoryTimeline_module_css_default.track,
|
|
5802
6586
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
5803
6587
|
className: TrajectoryTimeline_module_css_default.empty,
|
|
5804
|
-
children: "
|
|
6588
|
+
children: t("timeline.noTimingData")
|
|
5805
6589
|
}), hasEarlierRecords && (0, react_jsx_runtime.jsx)(EarlierHistoryBoundary, {
|
|
5806
6590
|
loading: loadingEarlier,
|
|
5807
6591
|
onHover: () => {
|
|
5808
6592
|
setHover(null);
|
|
5809
6593
|
},
|
|
5810
|
-
onLoad: loadEarlier
|
|
6594
|
+
onLoad: loadEarlier,
|
|
6595
|
+
t
|
|
5811
6596
|
})]
|
|
5812
6597
|
})]
|
|
5813
6598
|
})
|
|
@@ -5954,14 +6739,14 @@ window.__ModuleLoader__.load({
|
|
|
5954
6739
|
return (0, react_jsx_runtime.jsx)("section", {
|
|
5955
6740
|
ref: rootRef,
|
|
5956
6741
|
className: TrajectoryTimeline_module_css_default.root,
|
|
5957
|
-
"aria-label": "
|
|
6742
|
+
"aria-label": t("timeline.aria"),
|
|
5958
6743
|
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
5959
6744
|
className: TrajectoryTimeline_module_css_default.plot,
|
|
5960
|
-
children: [(0, react_jsx_runtime.jsx)(LaneLabels, {}), (0, react_jsx_runtime.jsxs)("div", {
|
|
6745
|
+
children: [(0, react_jsx_runtime.jsx)(LaneLabels, { t }), (0, react_jsx_runtime.jsxs)("div", {
|
|
5961
6746
|
ref: trackRef,
|
|
5962
6747
|
className: TrajectoryTimeline_module_css_default.track,
|
|
5963
6748
|
"data-panning": panning || void 0,
|
|
5964
|
-
"aria-label": "
|
|
6749
|
+
"aria-label": t("timeline.overviewAria"),
|
|
5965
6750
|
tabIndex: 0,
|
|
5966
6751
|
onKeyDown,
|
|
5967
6752
|
onPointerDown,
|
|
@@ -5984,7 +6769,8 @@ window.__ModuleLoader__.load({
|
|
|
5984
6769
|
onHover: () => {
|
|
5985
6770
|
setHover(null);
|
|
5986
6771
|
},
|
|
5987
|
-
onLoad: loadEarlier
|
|
6772
|
+
onLoad: loadEarlier,
|
|
6773
|
+
t
|
|
5988
6774
|
}),
|
|
5989
6775
|
hover !== null && hover.recordIndex === null && draft === null && (0, react_jsx_runtime.jsx)("div", {
|
|
5990
6776
|
className: TrajectoryTimeline_module_css_default.hoverLine,
|
|
@@ -6033,7 +6819,7 @@ window.__ModuleLoader__.load({
|
|
|
6033
6819
|
const decodingMs = detail?.decodingMs;
|
|
6034
6820
|
const ttftFraction = ttftMs === void 0 || decodingMs === void 0 || ttftMs + decodingMs <= 0 ? null : ttftMs / (ttftMs + decodingMs);
|
|
6035
6821
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
6036
|
-
label: () => timelineTooltipLabel(span.kind, detail),
|
|
6822
|
+
label: () => timelineTooltipLabel(span.kind, detail, t),
|
|
6037
6823
|
side: "bottom",
|
|
6038
6824
|
delayMs: TIMELINE_TOOLTIP_DELAY_MS,
|
|
6039
6825
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6069,10 +6855,12 @@ window.__ModuleLoader__.load({
|
|
|
6069
6855
|
function layoutEntryOrder(entry) {
|
|
6070
6856
|
return entry.kind === "system" && entry.change.kind === "initial" ? Number.NEGATIVE_INFINITY : entry.seq;
|
|
6071
6857
|
}
|
|
6072
|
-
function inputCellDetail(node) {
|
|
6073
|
-
const
|
|
6858
|
+
function inputCellDetail(node, t) {
|
|
6859
|
+
const preview = previewContent(node.content);
|
|
6860
|
+
const previewMarkdown = preview === "" ? void 0 : preview;
|
|
6861
|
+
const images = imageBlockCount(node.content);
|
|
6074
6862
|
return {
|
|
6075
|
-
text: "",
|
|
6863
|
+
text: previewMarkdown === void 0 && images > 0 ? t("layout.imageOnly", { count: images }) : "",
|
|
6076
6864
|
...previewMarkdown === void 0 ? {} : { previewMarkdown },
|
|
6077
6865
|
sourceSeq: node.seq,
|
|
6078
6866
|
messageSource: node.source,
|
|
@@ -6085,9 +6873,10 @@ window.__ModuleLoader__.load({
|
|
|
6085
6873
|
/**
|
|
6086
6874
|
* Fold a snapshot into turn → Message/Step groups with expanded cells.
|
|
6087
6875
|
* @param input - nodes plus in-flight partial/runningCalls.
|
|
6876
|
+
* @param t - Trajectory locale translator.
|
|
6088
6877
|
* @returns turns ordered by first appearance.
|
|
6089
6878
|
*/
|
|
6090
|
-
function deriveTrajectoryLayout(input) {
|
|
6879
|
+
function deriveTrajectoryLayout(input, t) {
|
|
6091
6880
|
const { nodes, eventLocations, partial, runningCalls, requests = [], callSchemas } = input;
|
|
6092
6881
|
const resultByCall = indexResults(nodes);
|
|
6093
6882
|
const callById = new Map(resultByCall);
|
|
@@ -6119,19 +6908,19 @@ window.__ModuleLoader__.load({
|
|
|
6119
6908
|
const pushMessage = (turn, laid) => {
|
|
6120
6909
|
const groups = bucket(turn).groups;
|
|
6121
6910
|
const last = groups.at(-1);
|
|
6122
|
-
if (last?.title === "
|
|
6911
|
+
if (last?.title === t("group.message")) {
|
|
6123
6912
|
last.laid.push(laid);
|
|
6124
6913
|
return;
|
|
6125
6914
|
}
|
|
6126
6915
|
groups.push({
|
|
6127
|
-
title: "
|
|
6916
|
+
title: t("group.message"),
|
|
6128
6917
|
laid: [laid]
|
|
6129
6918
|
});
|
|
6130
6919
|
};
|
|
6131
6920
|
const pushStep = (turn, step, laid) => {
|
|
6132
6921
|
if (laid.length === 0) return;
|
|
6133
6922
|
const groups = bucket(turn).groups;
|
|
6134
|
-
const title =
|
|
6923
|
+
const title = t("group.step", { step });
|
|
6135
6924
|
const existing = groups.find((group) => group.title === title);
|
|
6136
6925
|
if (existing !== void 0) {
|
|
6137
6926
|
existing.laid.push(...laid);
|
|
@@ -6145,7 +6934,7 @@ window.__ModuleLoader__.load({
|
|
|
6145
6934
|
const pushStepInput = (turn, step, laid) => {
|
|
6146
6935
|
if (laid.length === 0) return;
|
|
6147
6936
|
const groups = bucket(turn).groups;
|
|
6148
|
-
const title =
|
|
6937
|
+
const title = t("group.step", { step });
|
|
6149
6938
|
const existing = groups.find((group) => group.title === title);
|
|
6150
6939
|
if (existing === void 0) {
|
|
6151
6940
|
groups.push({
|
|
@@ -6212,7 +7001,7 @@ window.__ModuleLoader__.load({
|
|
|
6212
7001
|
cell: {
|
|
6213
7002
|
index: ++index,
|
|
6214
7003
|
kind: "system",
|
|
6215
|
-
text: promptChangeLabel(change),
|
|
7004
|
+
text: promptChangeLabel(change, t),
|
|
6216
7005
|
sourceSeq: change.seq,
|
|
6217
7006
|
...request.prompt === void 0 ? {} : { promptDetail: request.prompt },
|
|
6218
7007
|
...change.previous === void 0 ? {} : { previousPromptDetail: change.previous },
|
|
@@ -6230,7 +7019,7 @@ window.__ModuleLoader__.load({
|
|
|
6230
7019
|
const cell = {
|
|
6231
7020
|
index: ++index,
|
|
6232
7021
|
kind: "compacted",
|
|
6233
|
-
text: request.status === "running" ? "
|
|
7022
|
+
text: request.status === "running" ? t("layout.compacting") : request.status === "error" ? request.error === "trajectory.compaction-interrupted" ? t("layout.compactionInterrupted") : request.error ?? t("layout.compactionFailed") : request.summary === void 0 ? t("layout.compacted") : "",
|
|
6234
7023
|
...request.status === "complete" && request.summary !== void 0 ? previewContentProperty(request.summary) : {},
|
|
6235
7024
|
sourceSeq: request.startSeq,
|
|
6236
7025
|
...request.summary === void 0 ? {} : {
|
|
@@ -6245,7 +7034,7 @@ window.__ModuleLoader__.load({
|
|
|
6245
7034
|
};
|
|
6246
7035
|
attachUsage(cell, request.usage);
|
|
6247
7036
|
const compaction = { groups: [{
|
|
6248
|
-
title:
|
|
7037
|
+
title: t("group.compaction", { seq: request.startSeq }),
|
|
6249
7038
|
laid: [{
|
|
6250
7039
|
absTime: finiteTime(request.startedAt),
|
|
6251
7040
|
cell
|
|
@@ -6263,7 +7052,7 @@ window.__ModuleLoader__.load({
|
|
|
6263
7052
|
cell: {
|
|
6264
7053
|
index: ++index,
|
|
6265
7054
|
kind: "user",
|
|
6266
|
-
...inputCellDetail(node),
|
|
7055
|
+
...inputCellDetail(node, t),
|
|
6267
7056
|
opensTurn: true
|
|
6268
7057
|
}
|
|
6269
7058
|
});
|
|
@@ -6277,7 +7066,7 @@ window.__ModuleLoader__.load({
|
|
|
6277
7066
|
cell: {
|
|
6278
7067
|
index: ++index,
|
|
6279
7068
|
kind: "user",
|
|
6280
|
-
...inputCellDetail(node)
|
|
7069
|
+
...inputCellDetail(node, t)
|
|
6281
7070
|
}
|
|
6282
7071
|
};
|
|
6283
7072
|
if (placement.step === void 0) pushMessage(placement.turn, laid);
|
|
@@ -6286,7 +7075,7 @@ window.__ModuleLoader__.load({
|
|
|
6286
7075
|
continue;
|
|
6287
7076
|
}
|
|
6288
7077
|
if (node.kind === "assistant") {
|
|
6289
|
-
const laidList = withSubCalls(expandAssistant(node, index + 1, prevAbsTime, resultByCall, callStartById, callById));
|
|
7078
|
+
const laidList = withSubCalls(expandAssistant(node, index + 1, prevAbsTime, resultByCall, callStartById, callById, t), t);
|
|
6290
7079
|
if (node.step > 0) pushStep(node.turn, node.step, laidList);
|
|
6291
7080
|
else for (const laid of laidList) pushMessage(node.turn, laid);
|
|
6292
7081
|
const last = laidList[laidList.length - 1];
|
|
@@ -6301,7 +7090,7 @@ window.__ModuleLoader__.load({
|
|
|
6301
7090
|
cell: {
|
|
6302
7091
|
index: ++index,
|
|
6303
7092
|
kind: "context",
|
|
6304
|
-
...inputCellDetail(node)
|
|
7093
|
+
...inputCellDetail(node, t)
|
|
6305
7094
|
}
|
|
6306
7095
|
});
|
|
6307
7096
|
prevAbsTime = finiteTime(node.time) ?? prevAbsTime;
|
|
@@ -6314,7 +7103,7 @@ window.__ModuleLoader__.load({
|
|
|
6314
7103
|
if (node.kind === "tool-result") {
|
|
6315
7104
|
if (!emittedCallIds.has(node.callId)) {
|
|
6316
7105
|
const toolName = node.call?.name;
|
|
6317
|
-
const resultPreview = summarizeResult(node);
|
|
7106
|
+
const resultPreview = summarizeResult(node, t);
|
|
6318
7107
|
const laidList = [{
|
|
6319
7108
|
absTime: finiteTime(node.callTime ?? node.time),
|
|
6320
7109
|
...toolName !== void 0 ? { toolName } : {},
|
|
@@ -6326,7 +7115,7 @@ window.__ModuleLoader__.load({
|
|
|
6326
7115
|
sourceSeq: node.seq,
|
|
6327
7116
|
...node.call !== null ? summarizeCall(node.call.name, node.call.argsRaw) : resultAsText(resultPreview),
|
|
6328
7117
|
...node.call !== null ? { inputDetail: node.call.argsRaw } : {},
|
|
6329
|
-
outputDetail: detailResult(node),
|
|
7118
|
+
outputDetail: detailResult(node, t),
|
|
6330
7119
|
outputBlocks: node.content.map((block) => sourceBlock(block)),
|
|
6331
7120
|
...resultPreview,
|
|
6332
7121
|
callId: node.callId,
|
|
@@ -6335,7 +7124,7 @@ window.__ModuleLoader__.load({
|
|
|
6335
7124
|
startedAt: finiteTime(node.callTime)
|
|
6336
7125
|
}
|
|
6337
7126
|
}];
|
|
6338
|
-
for (const laid of expandSubCalls(node.subCalls, index)) {
|
|
7127
|
+
for (const laid of expandSubCalls(node.subCalls, index, t)) {
|
|
6339
7128
|
laidList.push(laid);
|
|
6340
7129
|
index = laid.cell.index;
|
|
6341
7130
|
}
|
|
@@ -6352,7 +7141,7 @@ window.__ModuleLoader__.load({
|
|
|
6352
7141
|
turn: partial.turn,
|
|
6353
7142
|
step: partial.step,
|
|
6354
7143
|
blocks: partial.blocks
|
|
6355
|
-
}, index + 1, prevAbsTime, resultByCall, callStartById, callById, { streaming: true }));
|
|
7144
|
+
}, index + 1, prevAbsTime, resultByCall, callStartById, callById, t, { streaming: true }), t);
|
|
6356
7145
|
if (partial.step > 0) pushStep(partial.turn, partial.step, laidList);
|
|
6357
7146
|
else for (const laid of laidList) pushMessage(partial.turn, laid);
|
|
6358
7147
|
const last = laidList[laidList.length - 1];
|
|
@@ -6376,7 +7165,7 @@ window.__ModuleLoader__.load({
|
|
|
6376
7165
|
startedAt: finiteTime(call.time)
|
|
6377
7166
|
}
|
|
6378
7167
|
}];
|
|
6379
|
-
for (const laid of expandSubCalls(call.subCalls, index)) {
|
|
7168
|
+
for (const laid of expandSubCalls(call.subCalls, index, t)) {
|
|
6380
7169
|
laidList.push(laid);
|
|
6381
7170
|
index = laid.cell.index;
|
|
6382
7171
|
}
|
|
@@ -6392,22 +7181,23 @@ window.__ModuleLoader__.load({
|
|
|
6392
7181
|
turns.set(1, first);
|
|
6393
7182
|
}
|
|
6394
7183
|
for (const entry of [...turns.values(), ...standaloneCompactions]) for (const group of entry.groups) for (const laid of group.laid) attachToolSchema(laid, callSchemas);
|
|
6395
|
-
return [...[...turns.entries()].map(([turn, entry]) => toTurnModel(turn, entry)), ...standaloneCompactions.map((entry) => toTurnModel(null, entry))].sort((left, right) => firstCellIndex(left) - firstCellIndex(right));
|
|
7184
|
+
return [...[...turns.entries()].map(([turn, entry]) => toTurnModel(turn, entry, t)), ...standaloneCompactions.map((entry) => toTurnModel(null, entry, t))].sort((left, right) => firstCellIndex(left) - firstCellIndex(right));
|
|
6396
7185
|
}
|
|
6397
7186
|
/**
|
|
6398
7187
|
* Append the changing in-flight assistant cells to a stable finalized layout.
|
|
6399
7188
|
* @param turns - Finalized layout derived with an empty-block partial anchor.
|
|
6400
7189
|
* @param partial - Current in-flight assistant projection.
|
|
6401
7190
|
* @param lastIndex - Highest cell index in the finalized layout.
|
|
7191
|
+
* @param t - Trajectory locale translator.
|
|
6402
7192
|
* @returns The original layout without a partial, otherwise a layout sharing every unaffected turn.
|
|
6403
7193
|
*/
|
|
6404
|
-
function appendTrajectoryPartialLayout(turns, partial, lastIndex) {
|
|
7194
|
+
function appendTrajectoryPartialLayout(turns, partial, lastIndex, t) {
|
|
6405
7195
|
if (partial === null) return turns;
|
|
6406
7196
|
const partialTurn = deriveTrajectoryLayout({
|
|
6407
7197
|
nodes: [],
|
|
6408
7198
|
partial,
|
|
6409
7199
|
runningCalls: []
|
|
6410
|
-
}).at(0);
|
|
7200
|
+
}, t).at(0);
|
|
6411
7201
|
if (partialTurn === void 0) return turns;
|
|
6412
7202
|
const streamed = {
|
|
6413
7203
|
...partialTurn,
|
|
@@ -6453,11 +7243,11 @@ window.__ModuleLoader__.load({
|
|
|
6453
7243
|
if (schema === void 0) return;
|
|
6454
7244
|
laid.cell.schemaDetail = JSON.stringify(schema, null, 2);
|
|
6455
7245
|
}
|
|
6456
|
-
function toTurnModel(turn, entry) {
|
|
7246
|
+
function toTurnModel(turn, entry, t) {
|
|
6457
7247
|
return {
|
|
6458
7248
|
turn,
|
|
6459
7249
|
groups: entry.groups.map(({ title, laid }) => {
|
|
6460
|
-
const description = groupDescription(laid);
|
|
7250
|
+
const description = groupDescription(laid, t);
|
|
6461
7251
|
return {
|
|
6462
7252
|
title,
|
|
6463
7253
|
...description !== void 0 ? { description } : {},
|
|
@@ -6471,7 +7261,7 @@ window.__ModuleLoader__.load({
|
|
|
6471
7261
|
return Math.min(...turn.groups.flatMap((group) => group.cells.map((cell) => cell.index)), Number.POSITIVE_INFINITY);
|
|
6472
7262
|
}
|
|
6473
7263
|
/** Wall-span duration + tool histogram, e.g. `1.5 s bash×6`. */
|
|
6474
|
-
function groupDescription(laid) {
|
|
7264
|
+
function groupDescription(laid, t) {
|
|
6475
7265
|
const parts = [];
|
|
6476
7266
|
const times = [];
|
|
6477
7267
|
for (const l of laid) {
|
|
@@ -6480,11 +7270,11 @@ window.__ModuleLoader__.load({
|
|
|
6480
7270
|
if (l.cell.kind === "tool" && l.cell.timeSeconds !== null && Number.isFinite(l.cell.timeSeconds)) times.push(l.absTime + l.cell.timeSeconds * 1e3);
|
|
6481
7271
|
}
|
|
6482
7272
|
if (times.length >= 2) {
|
|
6483
|
-
const span = formatGroupDuration((Math.max(...times) - Math.min(...times)) / 1e3);
|
|
7273
|
+
const span = formatGroupDuration((Math.max(...times) - Math.min(...times)) / 1e3, t);
|
|
6484
7274
|
if (span !== void 0) parts.push(span);
|
|
6485
7275
|
} else if (times.length === 1) {
|
|
6486
7276
|
const own = laid.find((l) => l.absTime === times[0])?.cell.timeSeconds;
|
|
6487
|
-
const span = own !== null && own !== void 0 ? formatGroupDuration(own) : void 0;
|
|
7277
|
+
const span = own !== null && own !== void 0 ? formatGroupDuration(own, t) : void 0;
|
|
6488
7278
|
if (span !== void 0) parts.push(span);
|
|
6489
7279
|
}
|
|
6490
7280
|
const tools = /* @__PURE__ */ new Map();
|
|
@@ -6495,9 +7285,9 @@ window.__ModuleLoader__.load({
|
|
|
6495
7285
|
for (const [name, count] of tools) parts.push(count > 1 ? `${name}×${count}` : name);
|
|
6496
7286
|
return parts.length === 0 ? void 0 : parts.join(" ");
|
|
6497
7287
|
}
|
|
6498
|
-
function formatGroupDuration(seconds) {
|
|
7288
|
+
function formatGroupDuration(seconds, t) {
|
|
6499
7289
|
if (!Number.isFinite(seconds)) return void 0;
|
|
6500
|
-
return formatElapsedSeconds(seconds);
|
|
7290
|
+
return formatElapsedSeconds(seconds, t);
|
|
6501
7291
|
}
|
|
6502
7292
|
/** Own-duration seconds from two epoch-ms stamps; null when either is unusable. */
|
|
6503
7293
|
function durationSeconds(later, earlier) {
|
|
@@ -6508,7 +7298,7 @@ window.__ModuleLoader__.load({
|
|
|
6508
7298
|
function finiteTime(time) {
|
|
6509
7299
|
return typeof time === "number" && Number.isFinite(time) ? time : null;
|
|
6510
7300
|
}
|
|
6511
|
-
function expandAssistant(node, startIndex, prevAbsTime, results, callStarts, calls, opts) {
|
|
7301
|
+
function expandAssistant(node, startIndex, prevAbsTime, results, callStarts, calls, t, opts) {
|
|
6512
7302
|
if (opts?.streaming === true && node.blocks.length === 0) return [];
|
|
6513
7303
|
const out = [];
|
|
6514
7304
|
let index = startIndex - 1;
|
|
@@ -6524,7 +7314,7 @@ window.__ModuleLoader__.load({
|
|
|
6524
7314
|
recordId: `assistant\u0000${node.turn}\u0000${node.step}`,
|
|
6525
7315
|
kind: "message",
|
|
6526
7316
|
sourceSeq: node.seq,
|
|
6527
|
-
text: messageText !== "" || thinkingText !== "" ? "" : summarizeAssistantActivity(node.blocks),
|
|
7317
|
+
text: messageText !== "" || thinkingText !== "" ? "" : summarizeAssistantActivity(node.blocks, t),
|
|
6528
7318
|
...messageText !== "" ? { previewMarkdown: messageText } : thinkingText !== "" ? { previewMarkdown: thinkingText } : {},
|
|
6529
7319
|
...messageText !== "" ? { outputDetail: messageText } : {},
|
|
6530
7320
|
...thinkingText !== "" ? { thinkingDetail: thinkingText } : {},
|
|
@@ -6551,7 +7341,7 @@ window.__ModuleLoader__.load({
|
|
|
6551
7341
|
const toolDuration = streaming || result === void 0 ? null : durationSeconds(result.time, result.callTime);
|
|
6552
7342
|
const callAbs = finiteTime(callStarts.get(block.callId));
|
|
6553
7343
|
const call = calls.get(block.callId);
|
|
6554
|
-
const resultPreview = result === void 0 ? void 0 : summarizeResult(result);
|
|
7344
|
+
const resultPreview = result === void 0 ? void 0 : summarizeResult(result, t);
|
|
6555
7345
|
out.push({
|
|
6556
7346
|
absTime: callAbs,
|
|
6557
7347
|
toolName: block.name,
|
|
@@ -6564,7 +7354,7 @@ window.__ModuleLoader__.load({
|
|
|
6564
7354
|
inputDetail: block.argsRaw,
|
|
6565
7355
|
callId: block.callId,
|
|
6566
7356
|
...result !== void 0 ? {
|
|
6567
|
-
outputDetail: detailResult(result),
|
|
7357
|
+
outputDetail: detailResult(result, t),
|
|
6568
7358
|
outputBlocks: result.content.map((block) => sourceBlock(block)),
|
|
6569
7359
|
...resultPreview,
|
|
6570
7360
|
isError: result.isError
|
|
@@ -6576,20 +7366,22 @@ window.__ModuleLoader__.load({
|
|
|
6576
7366
|
}
|
|
6577
7367
|
return out;
|
|
6578
7368
|
}
|
|
6579
|
-
function summarizeAssistantActivity(blocks) {
|
|
7369
|
+
function summarizeAssistantActivity(blocks, t) {
|
|
6580
7370
|
const tools = /* @__PURE__ */ new Map();
|
|
6581
7371
|
for (const block of blocks) {
|
|
6582
7372
|
if (block.kind !== "tool-call") continue;
|
|
6583
7373
|
tools.set(block.name, (tools.get(block.name) ?? 0) + 1);
|
|
6584
7374
|
}
|
|
6585
|
-
if (tools.size > 0) return "
|
|
7375
|
+
if (tools.size > 0) return t("layout.toolCallOnly");
|
|
7376
|
+
const images = blocks.filter((block) => block.kind === "image").length;
|
|
7377
|
+
if (images > 0) return t("layout.imageOnly", { count: images });
|
|
6586
7378
|
return "";
|
|
6587
7379
|
}
|
|
6588
|
-
function promptChangeLabel(change) {
|
|
6589
|
-
if (change.kind === "initial") return "
|
|
6590
|
-
if (change.kind === "system") return "
|
|
6591
|
-
if (change.kind === "tools") return "
|
|
6592
|
-
return "
|
|
7380
|
+
function promptChangeLabel(change, t) {
|
|
7381
|
+
if (change.kind === "initial") return t("layout.initialSystemPrompt");
|
|
7382
|
+
if (change.kind === "system") return t("layout.systemPromptUpdated");
|
|
7383
|
+
if (change.kind === "tools") return t("layout.toolsUpdated");
|
|
7384
|
+
return t("layout.systemPromptAndToolsUpdated");
|
|
6593
7385
|
}
|
|
6594
7386
|
function assistantSourceBlock(block) {
|
|
6595
7387
|
switch (block.kind) {
|
|
@@ -6609,7 +7401,8 @@ window.__ModuleLoader__.load({
|
|
|
6609
7401
|
};
|
|
6610
7402
|
case "image": return {
|
|
6611
7403
|
type: "image",
|
|
6612
|
-
content:
|
|
7404
|
+
content: "",
|
|
7405
|
+
attachment: block.attachment
|
|
6613
7406
|
};
|
|
6614
7407
|
case "other": return sourceBlock(block.block);
|
|
6615
7408
|
}
|
|
@@ -6625,40 +7418,18 @@ window.__ModuleLoader__.load({
|
|
|
6625
7418
|
type: type === "reasoning" ? "thinking" : type,
|
|
6626
7419
|
content: block.text
|
|
6627
7420
|
};
|
|
6628
|
-
|
|
6629
|
-
|
|
7421
|
+
if (type === "image" && typeof block.attachment === "object" && block.attachment !== null && typeof block.attachment.attachmentId === "string") return {
|
|
7422
|
+
type,
|
|
7423
|
+
content: "",
|
|
7424
|
+
attachment: block.attachment
|
|
7425
|
+
};
|
|
6630
7426
|
return {
|
|
6631
7427
|
type,
|
|
6632
|
-
content:
|
|
6633
|
-
...imageSrc !== void 0 ? { imageSrc } : {},
|
|
6634
|
-
...imageAlt !== void 0 ? { imageAlt } : {}
|
|
7428
|
+
content: stringifySourceValue(value)
|
|
6635
7429
|
};
|
|
6636
7430
|
}
|
|
6637
|
-
function
|
|
6638
|
-
|
|
6639
|
-
for (const candidate of [block.url, block.image_url]) if (typeof candidate === "string") return safeImageSource(candidate);
|
|
6640
|
-
if (typeof block.data === "string") {
|
|
6641
|
-
const mediaType = [
|
|
6642
|
-
block.mimeType,
|
|
6643
|
-
block.mediaType,
|
|
6644
|
-
block.media_type
|
|
6645
|
-
].find((candidate) => typeof candidate === "string") ?? "image/png";
|
|
6646
|
-
return safeImageSource(block.data.startsWith("data:") ? block.data : `data:${mediaType};base64,${block.data}`);
|
|
6647
|
-
}
|
|
6648
|
-
if (typeof block.source !== "object" || block.source === null) return void 0;
|
|
6649
|
-
const source = block.source;
|
|
6650
|
-
if (typeof source.url === "string") return safeImageSource(source.url);
|
|
6651
|
-
if (typeof source.data !== "string") return void 0;
|
|
6652
|
-
return safeImageSource(`data:${typeof source.media_type === "string" ? source.media_type : "image/png"};base64,${source.data}`);
|
|
6653
|
-
}
|
|
6654
|
-
function safeImageSource(value) {
|
|
6655
|
-
if (value.startsWith("data:image/") || value.startsWith("blob:")) return value;
|
|
6656
|
-
try {
|
|
6657
|
-
const protocol = new URL(value).protocol;
|
|
6658
|
-
return protocol === "http:" || protocol === "https:" ? value : void 0;
|
|
6659
|
-
} catch {
|
|
6660
|
-
return;
|
|
6661
|
-
}
|
|
7431
|
+
function imageBlockCount(content) {
|
|
7432
|
+
return content.filter((block) => block.type === "image").length;
|
|
6662
7433
|
}
|
|
6663
7434
|
function stringifySourceValue(value) {
|
|
6664
7435
|
return JSON.stringify(value, null, 2) || String(value);
|
|
@@ -6739,7 +7510,7 @@ window.__ModuleLoader__.load({
|
|
|
6739
7510
|
return ids;
|
|
6740
7511
|
}
|
|
6741
7512
|
/** Interleave each tool cell's nested child calls right after it, reindexing followers. */
|
|
6742
|
-
function withSubCalls(laidList) {
|
|
7513
|
+
function withSubCalls(laidList, t) {
|
|
6743
7514
|
if (!laidList.some((laid) => laid.subCalls !== void 0 && laid.subCalls.length > 0)) return laidList;
|
|
6744
7515
|
const out = [];
|
|
6745
7516
|
let index = laidList[0] !== void 0 ? laidList[0].cell.index - 1 : 0;
|
|
@@ -6751,7 +7522,7 @@ window.__ModuleLoader__.load({
|
|
|
6751
7522
|
index: ++index
|
|
6752
7523
|
}
|
|
6753
7524
|
});
|
|
6754
|
-
for (const sub of expandSubCalls(laid.subCalls, index)) {
|
|
7525
|
+
for (const sub of expandSubCalls(laid.subCalls, index, t)) {
|
|
6755
7526
|
out.push(sub);
|
|
6756
7527
|
index = sub.cell.index;
|
|
6757
7528
|
}
|
|
@@ -6759,13 +7530,13 @@ window.__ModuleLoader__.load({
|
|
|
6759
7530
|
return out;
|
|
6760
7531
|
}
|
|
6761
7532
|
/** Sub-dispatch cells for one run_code parent, in start order (running = null duration). */
|
|
6762
|
-
function expandSubCalls(subs, startIndex) {
|
|
7533
|
+
function expandSubCalls(subs, startIndex, t) {
|
|
6763
7534
|
if (subs === void 0 || subs.length === 0) return [];
|
|
6764
7535
|
const out = [];
|
|
6765
7536
|
let index = startIndex;
|
|
6766
7537
|
for (const sub of subs) {
|
|
6767
7538
|
const settled = "kind" in sub;
|
|
6768
|
-
const resultPreview = settled ? summarizeResult(sub) : void 0;
|
|
7539
|
+
const resultPreview = settled ? summarizeResult(sub, t) : void 0;
|
|
6769
7540
|
const laid = {
|
|
6770
7541
|
absTime: settled ? finiteTime(sub.callTime ?? sub.time) : finiteTime(sub.time),
|
|
6771
7542
|
toolName: settled ? sub.call?.name ?? sub.callId : sub.name,
|
|
@@ -6777,7 +7548,7 @@ window.__ModuleLoader__.load({
|
|
|
6777
7548
|
...settled ? sub.call !== null ? summarizeCall(sub.call.name, sub.call.argsRaw) : resultAsText(resultPreview) : summarizeCall(sub.name, sub.argsRaw),
|
|
6778
7549
|
...settled ? sub.call !== null ? { inputDetail: sub.call.argsRaw } : {} : { inputDetail: sub.argsRaw },
|
|
6779
7550
|
...settled ? {
|
|
6780
|
-
outputDetail: detailResult(sub),
|
|
7551
|
+
outputDetail: detailResult(sub, t),
|
|
6781
7552
|
outputBlocks: sub.content.map((block) => sourceBlock(block)),
|
|
6782
7553
|
...resultPreview,
|
|
6783
7554
|
isError: sub.isError
|
|
@@ -6787,7 +7558,7 @@ window.__ModuleLoader__.load({
|
|
|
6787
7558
|
}
|
|
6788
7559
|
};
|
|
6789
7560
|
out.push(laid);
|
|
6790
|
-
for (const child of expandSubCalls(sub.subCalls, index)) {
|
|
7561
|
+
for (const child of expandSubCalls(sub.subCalls, index, t)) {
|
|
6791
7562
|
out.push(child);
|
|
6792
7563
|
index = child.cell.index;
|
|
6793
7564
|
}
|
|
@@ -6800,13 +7571,15 @@ window.__ModuleLoader__.load({
|
|
|
6800
7571
|
...argsRaw === "" ? {} : { previewMarkdown: argsRaw }
|
|
6801
7572
|
};
|
|
6802
7573
|
}
|
|
6803
|
-
function summarizeResult(node) {
|
|
7574
|
+
function summarizeResult(node, t) {
|
|
6804
7575
|
if (node.isError) return { result: node.error?.code ?? "error" };
|
|
6805
7576
|
for (const block of node.content) if (block.type === "text" && typeof block.text === "string" && block.text !== "") return {
|
|
6806
7577
|
result: "",
|
|
6807
7578
|
resultPreviewMarkdown: block.text
|
|
6808
7579
|
};
|
|
6809
|
-
|
|
7580
|
+
const images = imageBlockCount(node.content);
|
|
7581
|
+
if (images > 0) return { result: t("layout.imageOnly", { count: images }) };
|
|
7582
|
+
return { result: t("record.noOutput") };
|
|
6810
7583
|
}
|
|
6811
7584
|
function resultAsText(result) {
|
|
6812
7585
|
return {
|
|
@@ -6814,11 +7587,13 @@ window.__ModuleLoader__.load({
|
|
|
6814
7587
|
...result?.resultPreviewMarkdown === void 0 ? {} : { previewMarkdown: result.resultPreviewMarkdown }
|
|
6815
7588
|
};
|
|
6816
7589
|
}
|
|
6817
|
-
function detailResult(node) {
|
|
7590
|
+
function detailResult(node, t) {
|
|
6818
7591
|
if (node.isError) return node.error === void 0 ? "error" : `${node.error.name}: ${node.error.code}`;
|
|
6819
7592
|
const text = node.content.filter((block) => block.type === "text" && typeof block.text === "string").map((block) => block.type === "text" ? block.text : "").join("\n");
|
|
6820
7593
|
if (text !== "") return text;
|
|
6821
|
-
|
|
7594
|
+
const images = imageBlockCount(node.content);
|
|
7595
|
+
if (images > 0) return t("layout.imageOnly", { count: images });
|
|
7596
|
+
if (node.content.length === 0 || node.content.every((block) => block.type === "text" && (typeof block.text !== "string" || block.text === ""))) return t("record.noOutput");
|
|
6822
7597
|
return JSON.stringify(node.content, null, 2);
|
|
6823
7598
|
}
|
|
6824
7599
|
function detailContent(content) {
|
|
@@ -6878,7 +7653,7 @@ window.__ModuleLoader__.load({
|
|
|
6878
7653
|
block.content,
|
|
6879
7654
|
block.callId ?? "",
|
|
6880
7655
|
block.toolName ?? "",
|
|
6881
|
-
block.
|
|
7656
|
+
block.attachment?.name ?? ""
|
|
6882
7657
|
]),
|
|
6883
7658
|
searchableJson(cell.messageSource),
|
|
6884
7659
|
searchableJson(cell.promptDetail),
|
|
@@ -6951,6 +7726,11 @@ window.__ModuleLoader__.load({
|
|
|
6951
7726
|
const EMPTY_TURN_IDS = /* @__PURE__ */ new Set();
|
|
6952
7727
|
const EMPTY_RECORD_IDS = /* @__PURE__ */ new Set();
|
|
6953
7728
|
const SEARCH_INDEX_THROTTLE_MS = 3e3;
|
|
7729
|
+
const HISTORY_PAGE_NODES = 50;
|
|
7730
|
+
function containsCall(calls, callId) {
|
|
7731
|
+
for (const call of calls) if (call.callId === callId || containsCall(call.subCalls, callId)) return true;
|
|
7732
|
+
return false;
|
|
7733
|
+
}
|
|
6954
7734
|
function lastCellIndex(turns) {
|
|
6955
7735
|
let last = 0;
|
|
6956
7736
|
for (const turn of turns) for (const group of turn.groups) for (const cell of group.cells) last = Math.max(last, cell.index);
|
|
@@ -7004,8 +7784,12 @@ window.__ModuleLoader__.load({
|
|
|
7004
7784
|
...total?.reasoning === void 0 && usage.reasoning === void 0 ? {} : { reasoning: (total?.reasoning ?? 0) + (usage.reasoning ?? 0) }
|
|
7005
7785
|
};
|
|
7006
7786
|
}
|
|
7007
|
-
function TrajectoryView({ useSession, useDuration, loadOlder, setActualDuration,
|
|
7787
|
+
function TrajectoryView({ useSession, useTrajectory, useDuration, loadOlder, loadImage, setActualDuration, viewRequest, completeViewRequest, renderSlot, t }) {
|
|
7008
7788
|
const [collapsedTurns, setCollapsedTurns] = (0, react.useState)(EMPTY_TURN_IDS);
|
|
7789
|
+
const renderImages = (0, react.useCallback)((owner) => renderSlot("conversation.trajectory.images", {
|
|
7790
|
+
...owner,
|
|
7791
|
+
loadImage
|
|
7792
|
+
}), [loadImage, renderSlot]);
|
|
7009
7793
|
const [collapsedAssistants, setCollapsedAssistants] = (0, react.useState)(EMPTY_RECORD_IDS);
|
|
7010
7794
|
const [timelineSelection, setTimelineSelection] = (0, react.useState)(null);
|
|
7011
7795
|
const actualDuration = useDuration((value) => value);
|
|
@@ -7018,10 +7802,36 @@ window.__ModuleLoader__.load({
|
|
|
7018
7802
|
const [selectedTimelineIndex, setSelectedTimelineIndex] = (0, react.useState)(null);
|
|
7019
7803
|
const [timelineRecordSelection, setTimelineRecordSelection] = (0, react.useState)(null);
|
|
7020
7804
|
const [timelineRecordFocus, setTimelineRecordFocus] = (0, react.useState)(null);
|
|
7021
|
-
const
|
|
7805
|
+
const completeInspection = useTrajectory((snapshot) => snapshot);
|
|
7806
|
+
const latestNodeSeq = completeInspection.eventNodes.at(-1)?.seq;
|
|
7807
|
+
const [historyTailSeq, setHistoryTailSeq] = (0, react.useState)(latestNodeSeq);
|
|
7808
|
+
const [historyNodeLimit, setHistoryNodeLimit] = (0, react.useState)(HISTORY_PAGE_NODES);
|
|
7809
|
+
const fixedTailSeq = historyTailSeq ?? latestNodeSeq;
|
|
7810
|
+
const historyTailIndex = fixedTailSeq === void 0 ? -1 : completeInspection.eventNodes.findLastIndex((node) => node.seq <= fixedTailSeq);
|
|
7811
|
+
const historyEndIndex = historyTailIndex < 0 && latestNodeSeq !== void 0 ? completeInspection.eventNodes.length : historyTailIndex + 1;
|
|
7812
|
+
const historyStartIndex = Math.max(0, historyEndIndex - historyNodeLimit);
|
|
7813
|
+
(0, react.useEffect)(() => {
|
|
7814
|
+
if (latestNodeSeq !== void 0 && (historyTailSeq === void 0 || historyTailIndex < 0)) setHistoryTailSeq(latestNodeSeq);
|
|
7815
|
+
}, [
|
|
7816
|
+
historyTailIndex,
|
|
7817
|
+
historyTailSeq,
|
|
7818
|
+
latestNodeSeq
|
|
7819
|
+
]);
|
|
7820
|
+
const inspection = (0, react.useMemo)(() => {
|
|
7821
|
+
if (historyStartIndex === 0) return completeInspection;
|
|
7822
|
+
const eventNodes = completeInspection.eventNodes.slice(historyStartIndex);
|
|
7823
|
+
const firstSeq = eventNodes[0]?.seq ?? 0;
|
|
7824
|
+
return {
|
|
7825
|
+
...completeInspection,
|
|
7826
|
+
eventNodes,
|
|
7827
|
+
requests: completeInspection.requests.filter((request) => request.startSeq >= firstSeq || (request.resultSeq ?? -1) >= firstSeq)
|
|
7828
|
+
};
|
|
7829
|
+
}, [completeInspection, historyStartIndex]);
|
|
7022
7830
|
const historyLoading = useSession((snapshot) => snapshot.openState === "loading");
|
|
7023
7831
|
const olderHistoryLoading = useSession((snapshot) => snapshot.loadingOlder);
|
|
7024
|
-
const
|
|
7832
|
+
const sessionHasOlderHistory = useSession((snapshot) => snapshot.hasMore);
|
|
7833
|
+
const hasResidentOlderHistory = historyStartIndex > 0;
|
|
7834
|
+
const hasOlderHistory = hasResidentOlderHistory || sessionHasOlderHistory;
|
|
7025
7835
|
const nodes = inspection.eventNodes;
|
|
7026
7836
|
const eventLocations = inspection.eventLocations;
|
|
7027
7837
|
const historyBaseSeq = nodes[0]?.seq ?? 0;
|
|
@@ -7029,14 +7839,20 @@ window.__ModuleLoader__.load({
|
|
|
7029
7839
|
const runningCalls = inspection.runningCalls;
|
|
7030
7840
|
const requests = inspection.requests;
|
|
7031
7841
|
const callSchemas = inspection.callSchemas;
|
|
7842
|
+
const inspectCallId = viewRequest?.view === "trajectory" ? viewRequest.focus : null;
|
|
7843
|
+
const inspectNodeIndex = (0, react.useMemo)(() => inspectCallId === null ? -1 : completeInspection.eventNodes.findIndex((node) => node.kind === "assistant" ? node.blocks.some((block) => block.kind === "tool-call" && block.callId === inspectCallId) : node.kind === "tool-result" && containsCall([node], inspectCallId)), [completeInspection.eventNodes, inspectCallId]);
|
|
7844
|
+
(0, react.useEffect)(() => {
|
|
7845
|
+
if (inspectNodeIndex < 0 || inspectNodeIndex >= historyStartIndex) return;
|
|
7846
|
+
setHistoryNodeLimit((limit) => limit + historyStartIndex - inspectNodeIndex);
|
|
7847
|
+
}, [historyStartIndex, inspectNodeIndex]);
|
|
7032
7848
|
const requestNumbers = (0, react.useMemo)(() => {
|
|
7033
7849
|
const assistantsByStep = /* @__PURE__ */ new Map();
|
|
7034
|
-
for (const node of
|
|
7850
|
+
for (const node of completeInspection.eventNodes) {
|
|
7035
7851
|
if (node.kind !== "assistant" || node.step <= 0) continue;
|
|
7036
7852
|
assistantsByStep.set(`${node.turn}\u0000${node.step}`, node);
|
|
7037
7853
|
}
|
|
7038
|
-
const requestsByStep = new Map(requests.filter((request) => request.purpose === "assistant").map((request) => [`${request.turn}\u0000${request.step}`, request]));
|
|
7039
|
-
const orderedRequests = [...requests.map((request) => ({
|
|
7854
|
+
const requestsByStep = new Map(completeInspection.requests.filter((request) => request.purpose === "assistant").map((request) => [`${request.turn}\u0000${request.step}`, request]));
|
|
7855
|
+
const orderedRequests = [...completeInspection.requests.map((request) => ({
|
|
7040
7856
|
seq: request.startSeq,
|
|
7041
7857
|
request,
|
|
7042
7858
|
node: request.purpose === "assistant" ? assistantsByStep.get(`${request.turn}\u0000${request.step}`) : void 0
|
|
@@ -7063,12 +7879,13 @@ window.__ModuleLoader__.load({
|
|
|
7063
7879
|
seq: entry.seq,
|
|
7064
7880
|
turn,
|
|
7065
7881
|
step,
|
|
7066
|
-
group:
|
|
7882
|
+
group: t("group.step", { step }),
|
|
7067
7883
|
number: index + 1,
|
|
7068
7884
|
...request?.status === void 0 ? {} : { status: request.status },
|
|
7069
7885
|
...request?.startedAt === void 0 ? {} : { startedAt: request.startedAt },
|
|
7070
7886
|
...request?.completedAt === void 0 ? {} : { completedAt: request.completedAt },
|
|
7071
7887
|
...request?.error === void 0 ? {} : { error: request.error },
|
|
7888
|
+
...request?.errorCode === void 0 ? {} : { errorCode: request.errorCode },
|
|
7072
7889
|
...request?.resultSeq === void 0 ? {} : { resultSeq: request.resultSeq },
|
|
7073
7890
|
...request?.retry === void 0 ? {} : { retry: request.retry },
|
|
7074
7891
|
...request?.maxRetries === void 0 ? {} : { maxRetries: request.maxRetries },
|
|
@@ -7086,13 +7903,14 @@ window.__ModuleLoader__.load({
|
|
|
7086
7903
|
seq: request.startSeq,
|
|
7087
7904
|
turn: request.turn,
|
|
7088
7905
|
step: 0,
|
|
7089
|
-
group:
|
|
7906
|
+
group: t("group.compaction", { seq: request.startSeq }),
|
|
7090
7907
|
number: index + 1,
|
|
7091
7908
|
purpose: "compaction",
|
|
7092
7909
|
status: request.status,
|
|
7093
7910
|
startedAt: request.startedAt,
|
|
7094
7911
|
completedAt: request.completedAt,
|
|
7095
7912
|
...request.error === void 0 ? {} : { error: request.error },
|
|
7913
|
+
...request.errorCode === void 0 ? {} : { errorCode: request.errorCode },
|
|
7096
7914
|
resultSeq: request.startSeq,
|
|
7097
7915
|
...request.provenance?.provider === void 0 ? {} : { provider: request.provenance.provider },
|
|
7098
7916
|
...request.provenance?.model === void 0 ? {} : { model: request.provenance.model },
|
|
@@ -7102,7 +7920,11 @@ window.__ModuleLoader__.load({
|
|
|
7102
7920
|
});
|
|
7103
7921
|
}
|
|
7104
7922
|
return numbered;
|
|
7105
|
-
}, [
|
|
7923
|
+
}, [
|
|
7924
|
+
completeInspection.eventNodes,
|
|
7925
|
+
completeInspection.requests,
|
|
7926
|
+
t
|
|
7927
|
+
]);
|
|
7106
7928
|
const partialTurn = partial?.turn ?? null;
|
|
7107
7929
|
const partialStep = partial?.step ?? null;
|
|
7108
7930
|
const finalized = (0, react.useMemo)(() => {
|
|
@@ -7117,7 +7939,7 @@ window.__ModuleLoader__.load({
|
|
|
7117
7939
|
runningCalls,
|
|
7118
7940
|
requests,
|
|
7119
7941
|
callSchemas
|
|
7120
|
-
});
|
|
7942
|
+
}, t);
|
|
7121
7943
|
return {
|
|
7122
7944
|
turns,
|
|
7123
7945
|
lastIndex: lastCellIndex(turns)
|
|
@@ -7129,7 +7951,8 @@ window.__ModuleLoader__.load({
|
|
|
7129
7951
|
partialStep,
|
|
7130
7952
|
runningCalls,
|
|
7131
7953
|
requests,
|
|
7132
|
-
callSchemas
|
|
7954
|
+
callSchemas,
|
|
7955
|
+
t
|
|
7133
7956
|
]);
|
|
7134
7957
|
const timelinePartial = (0, react.useMemo)(() => partial === null ? null : {
|
|
7135
7958
|
turn: partial.turn,
|
|
@@ -7140,9 +7963,17 @@ window.__ModuleLoader__.load({
|
|
|
7140
7963
|
partialTurn,
|
|
7141
7964
|
partialStructureSignature(partial)
|
|
7142
7965
|
]);
|
|
7143
|
-
const timelineTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout(finalized.turns, timelinePartial, finalized.lastIndex), [
|
|
7966
|
+
const timelineTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout(finalized.turns, timelinePartial, finalized.lastIndex, t), [
|
|
7967
|
+
finalized,
|
|
7968
|
+
timelinePartial,
|
|
7969
|
+
t
|
|
7970
|
+
]);
|
|
7144
7971
|
const timelineMode = actualDuration ? actualTime ? "actual" : "duration" : actualTime ? "time" : "sequence";
|
|
7145
|
-
const partialSearchTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout([], partial, finalized.lastIndex), [
|
|
7972
|
+
const partialSearchTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout([], partial, finalized.lastIndex, t), [
|
|
7973
|
+
finalized.lastIndex,
|
|
7974
|
+
partial,
|
|
7975
|
+
t
|
|
7976
|
+
]);
|
|
7146
7977
|
const searchLayouts = (0, react.useMemo)(() => [finalized.turns, partialSearchTurns], [finalized, partialSearchTurns]);
|
|
7147
7978
|
const latestSearchLayouts = (0, react.useRef)(searchLayouts);
|
|
7148
7979
|
latestSearchLayouts.current = searchLayouts;
|
|
@@ -7241,9 +8072,11 @@ window.__ModuleLoader__.load({
|
|
|
7241
8072
|
return collapsed;
|
|
7242
8073
|
});
|
|
7243
8074
|
};
|
|
7244
|
-
const loadEarlierHistory = (0, react.useCallback)(() => {
|
|
7245
|
-
|
|
7246
|
-
|
|
8075
|
+
const loadEarlierHistory = (0, react.useCallback)(async () => {
|
|
8076
|
+
if (!hasResidentOlderHistory && !await loadOlder()) return false;
|
|
8077
|
+
setHistoryNodeLimit((limit) => limit + HISTORY_PAGE_NODES);
|
|
8078
|
+
return true;
|
|
8079
|
+
}, [hasResidentOlderHistory, loadOlder]);
|
|
7247
8080
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
7248
8081
|
className: views_module_css_default.root,
|
|
7249
8082
|
"data-conversation-composer-overlay": "",
|
|
@@ -7268,6 +8101,7 @@ window.__ModuleLoader__.load({
|
|
|
7268
8101
|
t
|
|
7269
8102
|
}),
|
|
7270
8103
|
(0, react_jsx_runtime.jsx)(TrajectoryTimeline, {
|
|
8104
|
+
t,
|
|
7271
8105
|
turns: timelineTurns,
|
|
7272
8106
|
mode: timelineMode,
|
|
7273
8107
|
range: timelineRange,
|
|
@@ -7282,6 +8116,8 @@ window.__ModuleLoader__.load({
|
|
|
7282
8116
|
(0, react_jsx_runtime.jsx)("div", {
|
|
7283
8117
|
className: views_module_css_default.ledger,
|
|
7284
8118
|
children: (0, react_jsx_runtime.jsx)(TrajectoryTable, {
|
|
8119
|
+
t,
|
|
8120
|
+
renderImages,
|
|
7285
8121
|
requestNumbers,
|
|
7286
8122
|
turns: timelineTurns,
|
|
7287
8123
|
streamingCells,
|
|
@@ -7303,8 +8139,8 @@ window.__ModuleLoader__.load({
|
|
|
7303
8139
|
onToggleTurn: toggleTurn,
|
|
7304
8140
|
collapsedAssistants,
|
|
7305
8141
|
onToggleAssistant: toggleAssistant,
|
|
7306
|
-
inspectCallId
|
|
7307
|
-
onInspectApplied:
|
|
8142
|
+
inspectCallId,
|
|
8143
|
+
onInspectApplied: completeViewRequest
|
|
7308
8144
|
})
|
|
7309
8145
|
})
|
|
7310
8146
|
]
|
|
@@ -7315,9 +8151,9 @@ window.__ModuleLoader__.load({
|
|
|
7315
8151
|
/** Required services: the conversation slot, registries, ordinary Session paging, and the locale service. */
|
|
7316
8152
|
const inject = [
|
|
7317
8153
|
"slots",
|
|
7318
|
-
"conversationEvents",
|
|
7319
|
-
"conversationViews",
|
|
7320
8154
|
"sessions",
|
|
8155
|
+
"uiSession",
|
|
8156
|
+
"uiConversation",
|
|
7321
8157
|
"locale"
|
|
7322
8158
|
];
|
|
7323
8159
|
/**
|
|
@@ -7326,6 +8162,19 @@ window.__ModuleLoader__.load({
|
|
|
7326
8162
|
* @param ctx - client root context.
|
|
7327
8163
|
*/
|
|
7328
8164
|
function apply(ctx) {
|
|
8165
|
+
const trajectorySources = /* @__PURE__ */ new WeakMap();
|
|
8166
|
+
const trajectorySource = (binding) => {
|
|
8167
|
+
let source = trajectorySources.get(binding);
|
|
8168
|
+
if (source === void 0) {
|
|
8169
|
+
const target = ctx.uiConversation.binding(binding).target("trajectory");
|
|
8170
|
+
source = {
|
|
8171
|
+
getSnapshot: () => target.getSnapshot() ?? EMPTY_TRAJECTORY_SNAPSHOT,
|
|
8172
|
+
subscribe: (listener) => target.subscribe(listener)
|
|
8173
|
+
};
|
|
8174
|
+
trajectorySources.set(binding, source);
|
|
8175
|
+
}
|
|
8176
|
+
return source;
|
|
8177
|
+
};
|
|
7329
8178
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
7330
8179
|
zh,
|
|
7331
8180
|
en
|
|
@@ -7338,22 +8187,32 @@ window.__ModuleLoader__.load({
|
|
|
7338
8187
|
registerTrajectoryToolDefinition(ctx);
|
|
7339
8188
|
registerTrajectoryCompactionDefinitions(ctx);
|
|
7340
8189
|
registerTrajectoryConversationView(ctx);
|
|
8190
|
+
ctx.uiSession.provide({
|
|
8191
|
+
hooks: ["trajectory"],
|
|
8192
|
+
resolve: (binding) => ({ hooks: { trajectory: trajectorySource(binding) } })
|
|
8193
|
+
});
|
|
7341
8194
|
ctx.slots.inject("conversation.view", () => ctx.slots.register({
|
|
7342
8195
|
name: "conversation.view",
|
|
7343
8196
|
id: "trajectory",
|
|
7344
8197
|
order: 10,
|
|
7345
8198
|
locale: NS,
|
|
7346
8199
|
label: () => t("view.trajectory"),
|
|
8200
|
+
children: { "conversation.trajectory.images": {
|
|
8201
|
+
kind: "single",
|
|
8202
|
+
scope: "session"
|
|
8203
|
+
} },
|
|
7347
8204
|
inject: (sessionId) => {
|
|
7348
8205
|
const session = ctx.sessions.binding(sessionId)?.session;
|
|
7349
8206
|
if (session === void 0) throw new Error(`ui-trajectory: session "${sessionId}" is unavailable`);
|
|
8207
|
+
const trajectory = ctx.uiConversation.binding(sessionId).target("trajectory");
|
|
7350
8208
|
return {
|
|
7351
8209
|
hooks: { duration },
|
|
7352
8210
|
loadOlder: async () => {
|
|
7353
|
-
const before =
|
|
8211
|
+
const before = trajectory.getSnapshot();
|
|
7354
8212
|
await session.loadOlder();
|
|
7355
|
-
return
|
|
8213
|
+
return trajectory.getSnapshot() !== before;
|
|
7356
8214
|
},
|
|
8215
|
+
loadImage: Object.assign((attachment) => ctx.uiConversation.imageUrl(sessionId, attachment), { peek: (attachment) => ctx.uiConversation.peekImageUrl(sessionId, attachment) }),
|
|
7357
8216
|
setActualDuration: (value) => {
|
|
7358
8217
|
duration.set(value);
|
|
7359
8218
|
}
|