@deepseek-ai/dsh-client-ui-trajectory 0.1.1-rc.2 → 0.1.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +83 -2
- package/README.zh.md +85 -4
- package/lib/client.js +1363 -592
- package/lib/types/client/TrajectoryCell.d.ts +4 -1
- package/lib/types/client/TrajectoryTable.d.ts +12 -4
- package/lib/types/client/TrajectoryTimeline.d.ts +3 -1
- package/lib/types/client/TrajectoryTurn.d.ts +4 -1
- package/lib/types/client/TrajectoryTurnHeader.d.ts +4 -1
- package/lib/types/client/TrajectoryView.d.ts +5 -4
- package/lib/types/client/copy-codes.d.ts +4 -0
- package/lib/types/client/duration-store.d.ts +1 -1
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/client/layout.d.ts +10 -6
- package/lib/types/client/locales.d.ts +185 -8
- package/lib/types/client/timeline.d.ts +3 -1
- package/lib/types/client/trajectory-contract.d.ts +25 -2
- package/lib/types/client/trajectory-definition-common.d.ts +1 -1
- package/lib/types/client/trajectory-event-projection.d.ts +51 -0
- package/lib/types/client/trajectory-record.d.ts +8 -5
- package/lib/types/client/trajectory-snapshot-builder.d.ts +1 -1
- package/package.json +24 -22
package/lib/client.js
CHANGED
|
@@ -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,8 +1126,8 @@ 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
|
|
@@ -562,8 +1171,8 @@ window.__ModuleLoader__.load({
|
|
|
562
1171
|
time: event.time,
|
|
563
1172
|
content: event.data.content,
|
|
564
1173
|
source: event.data.source,
|
|
565
|
-
provenance:
|
|
566
|
-
form:
|
|
1174
|
+
provenance: contextProvenance(event.data.source),
|
|
1175
|
+
form: contextForm(event.data.source)
|
|
567
1176
|
};
|
|
568
1177
|
return reader.previous("trajectory-inbox-next-step")?.state.claimed.has(String(event.data.id)) === true ? {
|
|
569
1178
|
kind: "steering",
|
|
@@ -592,68 +1201,58 @@ window.__ModuleLoader__.load({
|
|
|
592
1201
|
* @param ctx - Plugin context receiving the Definitions.
|
|
593
1202
|
*/
|
|
594
1203
|
function registerTrajectoryMessageDefinitions(ctx) {
|
|
595
|
-
ctx.
|
|
596
|
-
ctx.
|
|
1204
|
+
ctx.uiConversation.events.register(trajectoryInboxDefinition);
|
|
1205
|
+
ctx.uiConversation.events.register(trajectoryMessageDefinition);
|
|
597
1206
|
}
|
|
598
1207
|
//#endregion
|
|
599
1208
|
//#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;
|
|
1209
|
+
/**
|
|
1210
|
+
* Request-header fact Definition for the Trajectory target.
|
|
1211
|
+
* @param inspect - the shared prompt interpretation, supplied by the
|
|
1212
|
+
* uiConversation service (a client bundle cannot value-import it).
|
|
1213
|
+
* @returns the Trajectory request-header Definition.
|
|
1214
|
+
*/
|
|
1215
|
+
function trajectoryRequestHeaderDefinition(inspect) {
|
|
616
1216
|
return {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
1217
|
+
kind: "trajectory-request-header",
|
|
1218
|
+
target: "trajectory",
|
|
1219
|
+
match: (event) => event.type === "request/header" ? {
|
|
1220
|
+
id: String(event.seq),
|
|
1221
|
+
role: "start"
|
|
1222
|
+
} : null,
|
|
1223
|
+
start: (_context, match, reader) => {
|
|
1224
|
+
if (match.event.type !== "request/header") throw new Error("trajectory-request-header start requires request/header");
|
|
1225
|
+
const previous = reader.previous("trajectory-request-header")?.state.prompt;
|
|
1226
|
+
const { prompt, change } = inspect(previous, match.event);
|
|
1227
|
+
return {
|
|
1228
|
+
seq: match.event.seq,
|
|
1229
|
+
time: match.event.time,
|
|
1230
|
+
prompt,
|
|
1231
|
+
location: match.location,
|
|
1232
|
+
...change === void 0 ? {} : { change }
|
|
1233
|
+
};
|
|
1234
|
+
},
|
|
1235
|
+
update: (context) => context.state,
|
|
1236
|
+
buildViewNode: (context) => context.state === void 0 ? null : trajectoryNode(context, context.state.seq, {
|
|
1237
|
+
kind: "request-header",
|
|
1238
|
+
header: context.state
|
|
1239
|
+
})
|
|
621
1240
|
};
|
|
622
1241
|
}
|
|
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
1242
|
/**
|
|
649
1243
|
* Register Trajectory request-header facts.
|
|
650
1244
|
*
|
|
651
1245
|
* @param ctx - Plugin context receiving the Definition.
|
|
652
1246
|
*/
|
|
653
1247
|
function registerTrajectoryRequestHeaderDefinition(ctx) {
|
|
654
|
-
ctx.
|
|
1248
|
+
ctx.uiConversation.events.register(trajectoryRequestHeaderDefinition((previous, event) => ctx.uiConversation.inspectRequestPrompt(previous, event)));
|
|
655
1249
|
}
|
|
656
1250
|
//#endregion
|
|
1251
|
+
//#region lib/types/client/copy-codes.js
|
|
1252
|
+
/** Stable non-display markers for client-synthesized trajectory copy. */
|
|
1253
|
+
/** Error marker localized only when the trajectory renders it. */
|
|
1254
|
+
const COMPACTION_INTERRUPTED_ERROR = "trajectory.compaction-interrupted";
|
|
1255
|
+
//#endregion
|
|
657
1256
|
//#region lib/types/client/trajectory-snapshot-builder.js
|
|
658
1257
|
const EMPTY_LIST = [];
|
|
659
1258
|
/** Stable empty target used until a Session has assembled Trajectory records. */
|
|
@@ -673,13 +1272,16 @@ window.__ModuleLoader__.load({
|
|
|
673
1272
|
return location.kind === "step" ? stepKey(location.turn.turn, location.step.step) : void 0;
|
|
674
1273
|
}
|
|
675
1274
|
function headerFor(request, headersByStep, previous) {
|
|
676
|
-
return headersByStep.get(stepKey(request.turn, request.step)) ?? (previous !== void 0 && previous.seq < request.startSeq ?
|
|
1275
|
+
return headersByStep.get(stepKey(request.turn, request.step)) ?? (previous !== void 0 && previous.seq < request.startSeq ? {
|
|
1276
|
+
latest: previous,
|
|
1277
|
+
...previous.change === void 0 ? {} : { change: previous.change }
|
|
1278
|
+
} : void 0);
|
|
677
1279
|
}
|
|
678
1280
|
function applyHeader(request, header, includeChange) {
|
|
679
1281
|
return header === void 0 ? request : {
|
|
680
1282
|
...request,
|
|
681
|
-
prompt: header.prompt,
|
|
682
|
-
requestConfig: header.prompt.config,
|
|
1283
|
+
prompt: header.latest.prompt,
|
|
1284
|
+
requestConfig: header.latest.prompt.config,
|
|
683
1285
|
...includeChange && header.change !== void 0 ? { promptChange: header.change } : {}
|
|
684
1286
|
};
|
|
685
1287
|
}
|
|
@@ -717,7 +1319,7 @@ window.__ModuleLoader__.load({
|
|
|
717
1319
|
...request,
|
|
718
1320
|
completedAt: boundary.time,
|
|
719
1321
|
status: "error",
|
|
720
|
-
error:
|
|
1322
|
+
error: COMPACTION_INTERRUPTED_ERROR
|
|
721
1323
|
};
|
|
722
1324
|
}
|
|
723
1325
|
}
|
|
@@ -734,7 +1336,8 @@ window.__ModuleLoader__.load({
|
|
|
734
1336
|
...request,
|
|
735
1337
|
completedAt: request.completedAt ?? ending.time,
|
|
736
1338
|
status: "error",
|
|
737
|
-
error: ending.error
|
|
1339
|
+
error: ending.error,
|
|
1340
|
+
...ending.errorCode === void 0 ? {} : { errorCode: ending.errorCode }
|
|
738
1341
|
};
|
|
739
1342
|
}
|
|
740
1343
|
}
|
|
@@ -771,7 +1374,12 @@ window.__ModuleLoader__.load({
|
|
|
771
1374
|
for (const contribution of this.contributions) {
|
|
772
1375
|
if (contribution.data.kind !== "request-header") continue;
|
|
773
1376
|
const key = headerStepKey(contribution.data.header);
|
|
774
|
-
if (key
|
|
1377
|
+
if (key === void 0) continue;
|
|
1378
|
+
const previous = headersByStep.get(key);
|
|
1379
|
+
headersByStep.set(key, {
|
|
1380
|
+
latest: contribution.data.header,
|
|
1381
|
+
...contribution.data.header.change !== void 0 ? { change: contribution.data.header.change } : previous?.change === void 0 ? {} : { change: previous.change }
|
|
1382
|
+
});
|
|
775
1383
|
}
|
|
776
1384
|
const finalized = [];
|
|
777
1385
|
const eventLocations = /* @__PURE__ */ new Map();
|
|
@@ -798,12 +1406,13 @@ window.__ModuleLoader__.load({
|
|
|
798
1406
|
}
|
|
799
1407
|
if (data.kind === "assistant") {
|
|
800
1408
|
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));
|
|
1409
|
+
if (data.node !== void 0) finalized.push(withRequestConfig(data.node, header?.latest.prompt));
|
|
802
1410
|
if (data.partial !== null) partial = data.partial;
|
|
803
1411
|
if (data.request !== void 0) {
|
|
804
|
-
const
|
|
1412
|
+
const change = header?.change;
|
|
1413
|
+
const includeChange = change !== void 0 && !consumedPromptChanges.has(change.seq);
|
|
805
1414
|
requests.push(applyHeader(data.request, header, includeChange));
|
|
806
|
-
if (includeChange) consumedPromptChanges.add(
|
|
1415
|
+
if (includeChange) consumedPromptChanges.add(change.seq);
|
|
807
1416
|
}
|
|
808
1417
|
continue;
|
|
809
1418
|
}
|
|
@@ -827,7 +1436,8 @@ window.__ModuleLoader__.load({
|
|
|
827
1436
|
turnEndings.push({
|
|
828
1437
|
turn: data.turn,
|
|
829
1438
|
time: data.time,
|
|
830
|
-
...data.error === void 0 ? {} : { error: data.error }
|
|
1439
|
+
...data.error === void 0 ? {} : { error: data.error },
|
|
1440
|
+
...data.errorCode === void 0 ? {} : { errorCode: data.errorCode }
|
|
831
1441
|
});
|
|
832
1442
|
}
|
|
833
1443
|
requests.sort((left, right) => left.startSeq - right.startSeq);
|
|
@@ -860,7 +1470,7 @@ window.__ModuleLoader__.load({
|
|
|
860
1470
|
* @param ctx - Plugin context receiving the view Definition.
|
|
861
1471
|
*/
|
|
862
1472
|
function registerTrajectoryConversationView(ctx) {
|
|
863
|
-
ctx.
|
|
1473
|
+
ctx.uiConversation.views.register(trajectoryViewDefinition);
|
|
864
1474
|
}
|
|
865
1475
|
//#endregion
|
|
866
1476
|
//#region lib/types/client/trajectory-tool-definition.js
|
|
@@ -874,7 +1484,6 @@ window.__ModuleLoader__.load({
|
|
|
874
1484
|
turn: match.event.data.turn,
|
|
875
1485
|
step: match.event.data.step,
|
|
876
1486
|
time: match.event.time,
|
|
877
|
-
callView: match.view?.for === "call" ? match.view.view : null,
|
|
878
1487
|
subCalls: []
|
|
879
1488
|
};
|
|
880
1489
|
}
|
|
@@ -895,8 +1504,6 @@ window.__ModuleLoader__.load({
|
|
|
895
1504
|
isError: result.isError === true,
|
|
896
1505
|
...match.event.data.error === void 0 ? {} : { error: match.event.data.error },
|
|
897
1506
|
meta: match.event.data.meta,
|
|
898
|
-
callView: previous?.callView ?? null,
|
|
899
|
-
resultView: match.view?.for === "result" ? match.view.view : null,
|
|
900
1507
|
subCalls: []
|
|
901
1508
|
};
|
|
902
1509
|
}
|
|
@@ -909,12 +1516,12 @@ window.__ModuleLoader__.load({
|
|
|
909
1516
|
function childCall(match, data) {
|
|
910
1517
|
return {
|
|
911
1518
|
callId: data.subCallId,
|
|
1519
|
+
parentCallId: data.parentCallId,
|
|
912
1520
|
name: data.name,
|
|
913
1521
|
argsRaw: JSON.stringify(data.arguments),
|
|
914
1522
|
turn: locationTurn(match),
|
|
915
1523
|
step: locationStep(match),
|
|
916
1524
|
time: match.event.time,
|
|
917
|
-
callView: null,
|
|
918
1525
|
subCalls: []
|
|
919
1526
|
};
|
|
920
1527
|
}
|
|
@@ -924,6 +1531,7 @@ window.__ModuleLoader__.load({
|
|
|
924
1531
|
seq: match.event.seq,
|
|
925
1532
|
time: match.event.time,
|
|
926
1533
|
callId: data.subCallId,
|
|
1534
|
+
parentCallId: data.parentCallId,
|
|
927
1535
|
call: {
|
|
928
1536
|
name: data.name,
|
|
929
1537
|
argsRaw: JSON.stringify(data.arguments)
|
|
@@ -931,8 +1539,6 @@ window.__ModuleLoader__.load({
|
|
|
931
1539
|
callTime: previous === void 0 || "kind" in previous ? null : previous.time,
|
|
932
1540
|
content: data.content ?? [],
|
|
933
1541
|
isError: data.isError === true,
|
|
934
|
-
callView: null,
|
|
935
|
-
resultView: null,
|
|
936
1542
|
subCalls: []
|
|
937
1543
|
};
|
|
938
1544
|
}
|
|
@@ -1018,6 +1624,7 @@ window.__ModuleLoader__.load({
|
|
|
1018
1624
|
seq: interruptedAt.seq - .8,
|
|
1019
1625
|
time: interruptedAt.time,
|
|
1020
1626
|
callId: block.callId,
|
|
1627
|
+
...block.parentCallId === void 0 ? {} : { parentCallId: block.parentCallId },
|
|
1021
1628
|
call: {
|
|
1022
1629
|
name: block.name,
|
|
1023
1630
|
argsRaw: block.argsRaw
|
|
@@ -1029,8 +1636,6 @@ window.__ModuleLoader__.load({
|
|
|
1029
1636
|
name: "Interrupted",
|
|
1030
1637
|
code: "interrupted"
|
|
1031
1638
|
},
|
|
1032
|
-
callView: block.callView,
|
|
1033
|
-
resultView: null,
|
|
1034
1639
|
subCalls
|
|
1035
1640
|
};
|
|
1036
1641
|
}
|
|
@@ -1107,7 +1712,7 @@ window.__ModuleLoader__.load({
|
|
|
1107
1712
|
* @param ctx - Plugin context receiving the Definition.
|
|
1108
1713
|
*/
|
|
1109
1714
|
function registerTrajectoryToolDefinition(ctx) {
|
|
1110
|
-
ctx.
|
|
1715
|
+
ctx.uiConversation.events.register(trajectoryToolDefinition);
|
|
1111
1716
|
}
|
|
1112
1717
|
//#endregion
|
|
1113
1718
|
//#region ../../../node_modules/.pnpm/@tanstack+virtual-core@3.17.7/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js
|
|
@@ -2910,19 +3515,21 @@ window.__ModuleLoader__.load({
|
|
|
2910
3515
|
/**
|
|
2911
3516
|
* Format a duration in milliseconds with thousands separators.
|
|
2912
3517
|
* @param milliseconds - Duration in milliseconds, or `null` when absent.
|
|
3518
|
+
* @param t - Trajectory locale translator.
|
|
2913
3519
|
* @returns `—` when unknown, otherwise an integer-millisecond label.
|
|
2914
3520
|
*/
|
|
2915
|
-
function formatDurationMillis(milliseconds) {
|
|
3521
|
+
function formatDurationMillis(milliseconds, t) {
|
|
2916
3522
|
if (milliseconds === null || !Number.isFinite(milliseconds)) return "—";
|
|
2917
|
-
return
|
|
3523
|
+
return t("unit.milliseconds", { value: String(Math.round(milliseconds)).replace(/\B(?=(\d{3})+(?!\d))/g, ",") });
|
|
2918
3524
|
}
|
|
2919
3525
|
/**
|
|
2920
3526
|
* Format an elapsed duration given in seconds as a millisecond label.
|
|
2921
3527
|
* @param seconds - Duration seconds, or `null` when absent.
|
|
3528
|
+
* @param t - Trajectory locale translator.
|
|
2922
3529
|
* @returns `—` when unknown, otherwise an integer-millisecond label.
|
|
2923
3530
|
*/
|
|
2924
|
-
function formatElapsedSeconds(seconds) {
|
|
2925
|
-
return formatDurationMillis(seconds === null ? null : seconds * 1e3);
|
|
3531
|
+
function formatElapsedSeconds(seconds, t) {
|
|
3532
|
+
return formatDurationMillis(seconds === null ? null : seconds * 1e3, t);
|
|
2926
3533
|
}
|
|
2927
3534
|
//#endregion
|
|
2928
3535
|
//#region lib/types/client/trajectory-virtual-rows.js
|
|
@@ -2992,7 +3599,7 @@ window.__ModuleLoader__.load({
|
|
|
2992
3599
|
}
|
|
2993
3600
|
//#endregion
|
|
2994
3601
|
//#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}}";
|
|
3602
|
+
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_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}}";
|
|
2996
3603
|
const tagId$3 = "@deepseek-ai/dsh-client-ui-trajectory/TrajectoryTable.module.css";
|
|
2997
3604
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
2998
3605
|
const tag = document.createElement("style");
|
|
@@ -3071,9 +3678,6 @@ window.__ModuleLoader__.load({
|
|
|
3071
3678
|
"overviewSections": "Y0dWHa_overviewSections",
|
|
3072
3679
|
"overviewTitle": "Y0dWHa_overviewTitle",
|
|
3073
3680
|
"overviewTitleIcon": "Y0dWHa_overviewTitleIcon",
|
|
3074
|
-
"panelImage": "Y0dWHa_panelImage",
|
|
3075
|
-
"panelImageLink": "Y0dWHa_panelImageLink",
|
|
3076
|
-
"panelImageLinkPreview": "Y0dWHa_panelImageLinkPreview",
|
|
3077
3681
|
"payload": "Y0dWHa_payload",
|
|
3078
3682
|
"payloadPreview": "Y0dWHa_payloadPreview",
|
|
3079
3683
|
"promptDiff": "Y0dWHa_promptDiff",
|
|
@@ -3158,14 +3762,14 @@ window.__ModuleLoader__.load({
|
|
|
3158
3762
|
const VIRTUALIZATION_THRESHOLD = 100;
|
|
3159
3763
|
const VIRTUAL_OVERSCAN_ROWS = 12;
|
|
3160
3764
|
const VIRTUAL_INITIAL_VIEWPORT_HEIGHT_PX = 600;
|
|
3161
|
-
const
|
|
3162
|
-
system: "
|
|
3163
|
-
user: "
|
|
3164
|
-
context: "
|
|
3165
|
-
compacted: "
|
|
3166
|
-
message: "
|
|
3167
|
-
tool: "
|
|
3168
|
-
subtool: "
|
|
3765
|
+
const KIND_LABEL_KEY = {
|
|
3766
|
+
system: "kind.system",
|
|
3767
|
+
user: "kind.user",
|
|
3768
|
+
context: "kind.context",
|
|
3769
|
+
compacted: "kind.compacted",
|
|
3770
|
+
message: "kind.assistant",
|
|
3771
|
+
tool: "kind.tool",
|
|
3772
|
+
subtool: "kind.subtool"
|
|
3169
3773
|
};
|
|
3170
3774
|
function ToolWrenchIcon() {
|
|
3171
3775
|
return (0, react_jsx_runtime.jsx)("svg", {
|
|
@@ -3272,33 +3876,56 @@ window.__ModuleLoader__.load({
|
|
|
3272
3876
|
const DEFAULT_TOOL_REQUEST_OFFSET = 56;
|
|
3273
3877
|
const SYSTEM_PROMPT_TABS = [{
|
|
3274
3878
|
id: "system-prompt",
|
|
3275
|
-
|
|
3879
|
+
labelKey: "tab.systemPrompt"
|
|
3276
3880
|
}, {
|
|
3277
3881
|
id: "tools",
|
|
3278
|
-
|
|
3882
|
+
labelKey: "tab.tools"
|
|
3279
3883
|
}];
|
|
3280
3884
|
const SYSTEM_UPDATE_TABS = [{
|
|
3281
3885
|
id: "diff",
|
|
3282
|
-
|
|
3886
|
+
labelKey: "tab.diff"
|
|
3283
3887
|
}, ...SYSTEM_PROMPT_TABS];
|
|
3284
3888
|
const REQUEST_TABS = [
|
|
3285
3889
|
{
|
|
3286
3890
|
id: "overview",
|
|
3287
|
-
|
|
3891
|
+
labelKey: "tab.summary"
|
|
3288
3892
|
},
|
|
3289
3893
|
{
|
|
3290
3894
|
id: "options",
|
|
3291
|
-
|
|
3895
|
+
labelKey: "tab.options"
|
|
3292
3896
|
},
|
|
3293
3897
|
{
|
|
3294
3898
|
id: "usage",
|
|
3295
|
-
|
|
3899
|
+
labelKey: "tab.usage"
|
|
3296
3900
|
},
|
|
3297
3901
|
{
|
|
3298
3902
|
id: "timing",
|
|
3299
|
-
|
|
3903
|
+
labelKey: "tab.timing"
|
|
3300
3904
|
}
|
|
3301
3905
|
];
|
|
3906
|
+
function jsonTreeLabels(t) {
|
|
3907
|
+
return {
|
|
3908
|
+
copyValue: t("copy.value"),
|
|
3909
|
+
copyJson: t("copy.json"),
|
|
3910
|
+
copyPath: t("copy.path"),
|
|
3911
|
+
copyPrettyJson: t("copy.prettyJson"),
|
|
3912
|
+
copyCompactJson: t("copy.compactJson"),
|
|
3913
|
+
copied: t("copied"),
|
|
3914
|
+
copyFailed: t("copy.failed"),
|
|
3915
|
+
collapseNode: t("json.collapseNode"),
|
|
3916
|
+
expandNode: t("json.expandNode"),
|
|
3917
|
+
copyButtonTitle: (action) => t("copy.optionsHint", { action })
|
|
3918
|
+
};
|
|
3919
|
+
}
|
|
3920
|
+
function markdownLabels(t) {
|
|
3921
|
+
return {
|
|
3922
|
+
code: {
|
|
3923
|
+
copyLabel: t("copy"),
|
|
3924
|
+
copiedLabel: t("copied")
|
|
3925
|
+
},
|
|
3926
|
+
footnotes: t("markdown.footnotes")
|
|
3927
|
+
};
|
|
3928
|
+
}
|
|
3302
3929
|
function clampDetailsWidth(width, splitWidth) {
|
|
3303
3930
|
const maxWidth = Math.max(DETAILS_MIN_WIDTH, Math.min(DETAILS_MAX_WIDTH, splitWidth - TABLE_MIN_WIDTH));
|
|
3304
3931
|
return Math.round(Math.min(Math.max(width, DETAILS_MIN_WIDTH), maxWidth));
|
|
@@ -3306,12 +3933,12 @@ window.__ModuleLoader__.load({
|
|
|
3306
3933
|
function defaultToolRequestWidth(splitWidth) {
|
|
3307
3934
|
return Math.min(Math.max(splitWidth * DEFAULT_TOOL_REQUEST_SHARE - DEFAULT_TOOL_REQUEST_OFFSET, TOOL_REQUEST_MIN_WIDTH), TOOL_REQUEST_MAX_WIDTH);
|
|
3308
3935
|
}
|
|
3309
|
-
function formatDurationMs(milliseconds) {
|
|
3310
|
-
if (milliseconds < 1e3) return
|
|
3311
|
-
return
|
|
3936
|
+
function formatDurationMs(milliseconds, t) {
|
|
3937
|
+
if (milliseconds < 1e3) return t("unit.milliseconds", { value: Math.round(milliseconds) });
|
|
3938
|
+
return t("unit.seconds", { value: (milliseconds / 1e3).toFixed(milliseconds < 1e4 ? 2 : 1) });
|
|
3312
3939
|
}
|
|
3313
|
-
function formatStartedAt(timestamp) {
|
|
3314
|
-
if (timestamp === null || !Number.isFinite(timestamp)) return "
|
|
3940
|
+
function formatStartedAt(timestamp, t) {
|
|
3941
|
+
if (timestamp === null || !Number.isFinite(timestamp)) return t("timing.notAvailable");
|
|
3315
3942
|
const date = new Date(timestamp);
|
|
3316
3943
|
const two = (value) => String(value).padStart(2, "0");
|
|
3317
3944
|
const three = (value) => String(value).padStart(3, "0");
|
|
@@ -3323,55 +3950,58 @@ window.__ModuleLoader__.load({
|
|
|
3323
3950
|
const selection = window.getSelection();
|
|
3324
3951
|
return selection !== null && !selection.isCollapsed && selection.rangeCount > 0 && selection.getRangeAt(0).intersectsNode(target);
|
|
3325
3952
|
}
|
|
3326
|
-
function StartedAtValue({ timestamp }) {
|
|
3953
|
+
function StartedAtValue({ timestamp, t }) {
|
|
3327
3954
|
const [showUnix, setShowUnix] = (0, react.useState)(false);
|
|
3328
|
-
if (timestamp === null || !Number.isFinite(timestamp)) return (0, react_jsx_runtime.jsx)("dd", { children: "
|
|
3955
|
+
if (timestamp === null || !Number.isFinite(timestamp)) return (0, react_jsx_runtime.jsx)("dd", { children: t("timing.notAvailable") });
|
|
3329
3956
|
return (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("button", {
|
|
3330
3957
|
type: "button",
|
|
3331
3958
|
className: TrajectoryTable_module_css_default.timestampToggle,
|
|
3332
|
-
title: showUnix ? "
|
|
3959
|
+
title: showUnix ? t("timing.showLocalTime") : t("timing.showUnixTimestamp"),
|
|
3333
3960
|
onClick: (event) => {
|
|
3334
3961
|
if (clickSelectsText(event.currentTarget)) return;
|
|
3335
3962
|
setShowUnix((current) => !current);
|
|
3336
3963
|
},
|
|
3337
|
-
children: showUnix ? (timestamp / 1e3).toFixed(3) : formatStartedAt(timestamp)
|
|
3964
|
+
children: showUnix ? (timestamp / 1e3).toFixed(3) : formatStartedAt(timestamp, t)
|
|
3338
3965
|
}) });
|
|
3339
3966
|
}
|
|
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 "
|
|
3967
|
+
function totalTime(metrics, t) {
|
|
3968
|
+
if (!metrics.timingRecorded) return t("timing.notRecorded");
|
|
3969
|
+
if (metrics.stepStartTime === null) return t("timing.stepStartUnavailable");
|
|
3970
|
+
if (metrics.completedTime === null) return t("status.pending");
|
|
3971
|
+
return formatDurationMs(Math.max(0, metrics.completedTime - metrics.stepStartTime), t);
|
|
3972
|
+
}
|
|
3973
|
+
function ttft(metrics, t) {
|
|
3974
|
+
if (!metrics.timingRecorded) return t("timing.notRecorded");
|
|
3975
|
+
if (metrics.stepStartTime === null) return t("timing.stepStartUnavailable");
|
|
3976
|
+
if (metrics.firstTokenTime === null) return t("timing.firstTokenUnavailable");
|
|
3977
|
+
return formatDurationMs(Math.max(0, metrics.firstTokenTime - metrics.stepStartTime), t);
|
|
3978
|
+
}
|
|
3979
|
+
function generationTime(metrics, t) {
|
|
3980
|
+
if (!metrics.timingRecorded || metrics.firstTokenTime === null) return t("timing.firstTokenUnavailable");
|
|
3981
|
+
if (metrics.completedTime === null) return t("status.pending");
|
|
3982
|
+
return formatDurationMs(Math.max(0, metrics.completedTime - metrics.firstTokenTime), t);
|
|
3983
|
+
}
|
|
3984
|
+
function throughput(metrics, t) {
|
|
3985
|
+
if (!metrics.usageProvided) return t("timing.usageUnavailable");
|
|
3986
|
+
if (metrics.outputTokens === null) return t("timing.outputTokensUnavailable");
|
|
3987
|
+
if (!metrics.timingRecorded || metrics.firstTokenTime === null) return t("timing.firstTokenUnavailable");
|
|
3988
|
+
if (metrics.completedTime === null) return t("status.pending");
|
|
3362
3989
|
const generationSeconds = (metrics.completedTime - metrics.firstTokenTime) / 1e3;
|
|
3363
|
-
if (generationSeconds <= 0) return "
|
|
3364
|
-
return
|
|
3990
|
+
if (generationSeconds <= 0) return t("timing.durationTooShort");
|
|
3991
|
+
return t("unit.tokensPerSecond", { value: (metrics.outputTokens / generationSeconds).toFixed(1) });
|
|
3365
3992
|
}
|
|
3366
|
-
function AssistantTimingPanel({ metrics }) {
|
|
3993
|
+
function AssistantTimingPanel({ metrics, t }) {
|
|
3367
3994
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
3368
3995
|
className: TrajectoryTable_module_css_default.overview,
|
|
3369
3996
|
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: "
|
|
3997
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
3998
|
+
timestamp: metrics.stepStartTime,
|
|
3999
|
+
t
|
|
4000
|
+
})] }),
|
|
4001
|
+
(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) })] }),
|
|
4002
|
+
(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) })] }),
|
|
4003
|
+
(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) })] }),
|
|
4004
|
+
(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
4005
|
]
|
|
3376
4006
|
});
|
|
3377
4007
|
}
|
|
@@ -3416,43 +4046,32 @@ window.__ModuleLoader__.load({
|
|
|
3416
4046
|
}
|
|
3417
4047
|
return filtered;
|
|
3418
4048
|
}
|
|
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
4049
|
function requestKey(turn, group) {
|
|
3425
4050
|
return `${turn}\u0000${group}`;
|
|
3426
4051
|
}
|
|
3427
|
-
function
|
|
4052
|
+
function requestIdentity(request) {
|
|
4053
|
+
return request.purpose === "compaction" ? `compaction\u0000${request.seq}` : `assistant\u0000${request.turn}\u0000${request.step}`;
|
|
4054
|
+
}
|
|
4055
|
+
function indexRequestBoundaries(records, requestGroups) {
|
|
3428
4056
|
const boundaries = /* @__PURE__ */ new Map();
|
|
3429
4057
|
for (const record of records) {
|
|
3430
4058
|
const key = requestKey(record.turn, record.group);
|
|
4059
|
+
if (!requestGroups.has(key)) continue;
|
|
3431
4060
|
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
4061
|
if (record.cell.kind === "user" || record.cell.kind === "context") continue;
|
|
3437
4062
|
boundaries.set(key, record.cell.index);
|
|
3438
4063
|
}
|
|
3439
4064
|
return boundaries;
|
|
3440
4065
|
}
|
|
3441
|
-
function sectionLabel(turn) {
|
|
3442
|
-
return turn === null ? "
|
|
4066
|
+
function sectionLabel(turn, t) {
|
|
4067
|
+
return turn === null ? t("section.betweenTurns") : t("turn.label", { turn });
|
|
3443
4068
|
}
|
|
3444
|
-
function indexRequestNumbers(
|
|
4069
|
+
function indexRequestNumbers(sessionNumbers) {
|
|
3445
4070
|
const numbers = /* @__PURE__ */ new Map();
|
|
3446
4071
|
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
4072
|
return numbers;
|
|
3454
4073
|
}
|
|
3455
|
-
function indexRequestBoundaryRuns(records) {
|
|
4074
|
+
function indexRequestBoundaryRuns(records, requestGroups) {
|
|
3456
4075
|
const indexes = /* @__PURE__ */ new Map();
|
|
3457
4076
|
let runLength = 0;
|
|
3458
4077
|
for (const record of records) {
|
|
@@ -3460,17 +4079,17 @@ window.__ModuleLoader__.load({
|
|
|
3460
4079
|
indexes.set(record.cell.index, runLength++);
|
|
3461
4080
|
continue;
|
|
3462
4081
|
}
|
|
3463
|
-
if (runLength > 0 && record.groupStart &&
|
|
4082
|
+
if (runLength > 0 && record.groupStart && requestGroups.has(requestKey(record.turn, record.group))) indexes.set(record.cell.index, runLength);
|
|
3464
4083
|
runLength = 0;
|
|
3465
4084
|
}
|
|
3466
4085
|
return indexes;
|
|
3467
4086
|
}
|
|
3468
|
-
function summarizeTurn(records) {
|
|
3469
|
-
const steps = new Set(records.map((record) => record.group).filter((
|
|
4087
|
+
function summarizeTurn(records, requestGroups, t) {
|
|
4088
|
+
const steps = new Set(records.map((record) => requestKey(record.turn, record.group)).filter((key) => requestGroups.has(key))).size;
|
|
3470
4089
|
const toolCalls = records.filter((record) => record.cell.kind === "tool" || record.cell.kind === "subtool").length;
|
|
3471
|
-
return [
|
|
4090
|
+
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
4091
|
}
|
|
3473
|
-
function collapseTurnRecords(records, collapsedTurns) {
|
|
4092
|
+
function collapseTurnRecords(records, collapsedTurns, requestGroups, t) {
|
|
3474
4093
|
const recordsByTurn = /* @__PURE__ */ new Map();
|
|
3475
4094
|
for (const record of records) {
|
|
3476
4095
|
if (record.turn === null) continue;
|
|
@@ -3493,7 +4112,7 @@ window.__ModuleLoader__.load({
|
|
|
3493
4112
|
groupStart: false,
|
|
3494
4113
|
turnStart: false,
|
|
3495
4114
|
turnEnd: true,
|
|
3496
|
-
collapsedSummary: summarizeTurn(contentRecords.slice(1)),
|
|
4115
|
+
collapsedSummary: summarizeTurn(contentRecords.slice(1), requestGroups, t),
|
|
3497
4116
|
collapsedSummaryKind: "turn"
|
|
3498
4117
|
}];
|
|
3499
4118
|
});
|
|
@@ -3510,16 +4129,16 @@ window.__ModuleLoader__.load({
|
|
|
3510
4129
|
}
|
|
3511
4130
|
return calls;
|
|
3512
4131
|
}
|
|
3513
|
-
function summarizeAssistantTools(records) {
|
|
4132
|
+
function summarizeAssistantTools(records, t) {
|
|
3514
4133
|
const names = [...new Set(records.map((record) => {
|
|
3515
4134
|
const separator = record.cell.text.indexOf(" · ");
|
|
3516
4135
|
return separator === -1 ? record.cell.text : record.cell.text.slice(0, separator);
|
|
3517
4136
|
}).filter((name) => name !== ""))];
|
|
3518
4137
|
const count = records.length;
|
|
3519
|
-
const summary =
|
|
4138
|
+
const summary = t(count === 1 ? "summary.toolCalls.one" : "summary.toolCalls.other", { count });
|
|
3520
4139
|
return names.length > 0 ? `${summary} · ${names.join(", ")}` : summary;
|
|
3521
4140
|
}
|
|
3522
|
-
function collapseAssistantRecords(records, collapsedAssistants) {
|
|
4141
|
+
function collapseAssistantRecords(records, collapsedAssistants, t) {
|
|
3523
4142
|
const out = [];
|
|
3524
4143
|
for (let i = 0; i < records.length; i++) {
|
|
3525
4144
|
const record = records[i];
|
|
@@ -3543,7 +4162,7 @@ window.__ModuleLoader__.load({
|
|
|
3543
4162
|
groupStart: false,
|
|
3544
4163
|
turnStart: false,
|
|
3545
4164
|
turnEnd: last?.turnEnd ?? false,
|
|
3546
|
-
collapsedSummary: summarizeAssistantTools(calls),
|
|
4165
|
+
collapsedSummary: summarizeAssistantTools(calls, t),
|
|
3547
4166
|
collapsedSummaryKind: "assistant"
|
|
3548
4167
|
});
|
|
3549
4168
|
i += calls.length;
|
|
@@ -3556,22 +4175,27 @@ window.__ModuleLoader__.load({
|
|
|
3556
4175
|
if ((record.cell.kind === "tool" || record.cell.kind === "subtool") && record.cell.outputDetail === void 0) return "running";
|
|
3557
4176
|
return "complete";
|
|
3558
4177
|
}
|
|
3559
|
-
function statusLabel(state) {
|
|
3560
|
-
if (state === "error") return "
|
|
3561
|
-
if (state === "running") return "
|
|
3562
|
-
return "
|
|
4178
|
+
function statusLabel(state, t) {
|
|
4179
|
+
if (state === "error") return t("status.failed");
|
|
4180
|
+
if (state === "running") return t("status.pending");
|
|
4181
|
+
return t("status.completed");
|
|
3563
4182
|
}
|
|
3564
|
-
function
|
|
4183
|
+
function requestErrorMessage(request, t) {
|
|
4184
|
+
if (request.errorCode === "AUTH") return t("details.failure.auth");
|
|
4185
|
+
if (request.error === "trajectory.compaction-interrupted") return t("layout.compactionInterrupted");
|
|
4186
|
+
return request.error;
|
|
4187
|
+
}
|
|
4188
|
+
function TokenRows({ cell, t }) {
|
|
3565
4189
|
const content = cell.output !== void 0 && cell.think !== void 0 ? Math.max(0, cell.output - cell.think) : void 0;
|
|
3566
4190
|
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: "
|
|
4191
|
+
(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
4192
|
cell.think !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3569
4193
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3570
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4194
|
+
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
4195
|
}),
|
|
3572
4196
|
content !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3573
4197
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3574
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4198
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.content") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: content }) })]
|
|
3575
4199
|
})
|
|
3576
4200
|
] });
|
|
3577
4201
|
}
|
|
@@ -3579,95 +4203,103 @@ window.__ModuleLoader__.load({
|
|
|
3579
4203
|
if (usage.input === void 0 && usage.cacheRead === void 0 && usage.cacheWrite === void 0) return void 0;
|
|
3580
4204
|
return (usage.input ?? 0) + (usage.cacheRead ?? 0) + (usage.cacheWrite ?? 0);
|
|
3581
4205
|
}
|
|
3582
|
-
function UsageRows({ usage }) {
|
|
4206
|
+
function UsageRows({ usage, t }) {
|
|
3583
4207
|
if (usage === void 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3584
4208
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3585
|
-
children: "
|
|
4209
|
+
children: t("usage.notReported")
|
|
3586
4210
|
});
|
|
3587
4211
|
const totalInput = inputTotal(usage);
|
|
3588
4212
|
const otherOutput = usage.output !== void 0 && usage.reasoning !== void 0 ? usage.output - usage.reasoning : void 0;
|
|
3589
4213
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
3590
4214
|
className: TrajectoryTable_module_css_default.overview,
|
|
3591
4215
|
children: [
|
|
3592
|
-
totalInput !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4216
|
+
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
4217
|
usage.cacheRead !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3594
4218
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3595
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4219
|
+
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
4220
|
}),
|
|
3597
4221
|
usage.cacheWrite !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3598
4222
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3599
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4223
|
+
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
4224
|
}),
|
|
3601
4225
|
usage.input !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3602
4226
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3603
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4227
|
+
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
4228
|
}),
|
|
3605
|
-
usage.output !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4229
|
+
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
4230
|
usage.reasoning !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3607
4231
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3608
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4232
|
+
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
4233
|
}),
|
|
3610
4234
|
otherOutput !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
3611
4235
|
className: TrajectoryTable_module_css_default.requestTokenDetail,
|
|
3612
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4236
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: t("usage.content") }), (0, react_jsx_runtime.jsx)("dd", { children: t("unit.tokens", { value: otherOutput }) })]
|
|
3613
4237
|
})
|
|
3614
4238
|
]
|
|
3615
4239
|
});
|
|
3616
4240
|
}
|
|
3617
|
-
function RequestUsagePanel({ usage, cumulative }) {
|
|
4241
|
+
function RequestUsagePanel({ usage, cumulative, t }) {
|
|
3618
4242
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
3619
4243
|
className: TrajectoryTable_module_css_default.usagePanel,
|
|
3620
4244
|
children: [(0, react_jsx_runtime.jsxs)("section", {
|
|
3621
4245
|
className: TrajectoryTable_module_css_default.usageGroup,
|
|
3622
4246
|
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
3623
4247
|
className: TrajectoryTable_module_css_default.usageHeading,
|
|
3624
|
-
children: "
|
|
3625
|
-
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4248
|
+
children: t("usage.thisRequest")
|
|
4249
|
+
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4250
|
+
usage,
|
|
4251
|
+
t
|
|
4252
|
+
})]
|
|
3626
4253
|
}), (0, react_jsx_runtime.jsxs)("section", {
|
|
3627
4254
|
className: TrajectoryTable_module_css_default.usageGroup,
|
|
3628
4255
|
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
3629
4256
|
className: TrajectoryTable_module_css_default.usageHeading,
|
|
3630
|
-
children: "
|
|
3631
|
-
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4257
|
+
children: t("usage.sessionCumulative")
|
|
4258
|
+
}), (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
4259
|
+
usage: cumulative,
|
|
4260
|
+
t
|
|
4261
|
+
})]
|
|
3632
4262
|
})]
|
|
3633
4263
|
});
|
|
3634
4264
|
}
|
|
3635
|
-
function RequestOptions({ options, preview = false }) {
|
|
4265
|
+
function RequestOptions({ options, preview = false, t }) {
|
|
3636
4266
|
if (options === void 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3637
4267
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3638
|
-
children: "
|
|
4268
|
+
children: t("options.notRecorded")
|
|
3639
4269
|
});
|
|
3640
4270
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
3641
4271
|
data: options,
|
|
3642
|
-
label: "
|
|
4272
|
+
label: t("options.json"),
|
|
4273
|
+
labels: jsonTreeLabels(t),
|
|
3643
4274
|
className: preview ? TrajectoryTable_module_css_default.jsonPreview : TrajectoryTable_module_css_default.jsonPayload
|
|
3644
4275
|
});
|
|
3645
4276
|
}
|
|
3646
|
-
function messageSourceLabel(source) {
|
|
3647
|
-
if (typeof source !== "object" || source === null || Array.isArray(source)) return "
|
|
4277
|
+
function messageSourceLabel(source, t) {
|
|
4278
|
+
if (typeof source !== "object" || source === null || Array.isArray(source)) return t("source.unknown");
|
|
3648
4279
|
const properties = source;
|
|
3649
4280
|
const kind = properties.kind;
|
|
3650
|
-
if (kind === "user") return "
|
|
4281
|
+
if (kind === "user") return t("source.user");
|
|
3651
4282
|
if (kind === "plugin") {
|
|
3652
4283
|
const plugin = properties.plugin;
|
|
3653
|
-
return typeof plugin === "string" && plugin !== "" ?
|
|
4284
|
+
return typeof plugin === "string" && plugin !== "" ? t("source.pluginNamed", { plugin }) : t("source.plugin");
|
|
3654
4285
|
}
|
|
3655
4286
|
if (kind === "goal") {
|
|
3656
4287
|
const round = properties.round;
|
|
3657
|
-
return typeof round === "number" && round > 0 ?
|
|
4288
|
+
return typeof round === "number" && round > 0 ? t("source.goalRound", { round }) : t("source.goal");
|
|
3658
4289
|
}
|
|
3659
|
-
if (typeof kind !== "string" || kind === "") return "
|
|
4290
|
+
if (typeof kind !== "string" || kind === "") return t("source.unknown");
|
|
3660
4291
|
return `${kind[0]?.toUpperCase() ?? ""}${kind.slice(1)}`;
|
|
3661
4292
|
}
|
|
3662
|
-
function MessageSource({ record }) {
|
|
4293
|
+
function MessageSource({ record, t }) {
|
|
3663
4294
|
const source = record.cell.messageSource;
|
|
3664
4295
|
if (source === void 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3665
4296
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3666
|
-
children: "
|
|
4297
|
+
children: t("source.notRecorded")
|
|
3667
4298
|
});
|
|
3668
4299
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
3669
4300
|
data: typeof source === "object" && source !== null ? source : { value: source },
|
|
3670
|
-
label: "
|
|
4301
|
+
label: t("source.messageJson"),
|
|
4302
|
+
labels: jsonTreeLabels(t),
|
|
3671
4303
|
className: TrajectoryTable_module_css_default.jsonPayload
|
|
3672
4304
|
});
|
|
3673
4305
|
}
|
|
@@ -3703,54 +4335,54 @@ window.__ModuleLoader__.load({
|
|
|
3703
4335
|
if (record.cell.kind === "system") return record.cell.previousPromptDetail === void 0 ? SYSTEM_PROMPT_TABS : SYSTEM_UPDATE_TABS;
|
|
3704
4336
|
if (record.cell.kind === "compacted") return [{
|
|
3705
4337
|
id: "overview",
|
|
3706
|
-
|
|
4338
|
+
labelKey: "tab.summary"
|
|
3707
4339
|
}, {
|
|
3708
4340
|
id: "raw",
|
|
3709
|
-
|
|
4341
|
+
labelKey: "tab.rawOutput"
|
|
3710
4342
|
}];
|
|
3711
4343
|
if (isMarkdownRecord(record)) return [
|
|
3712
4344
|
{
|
|
3713
4345
|
id: "overview",
|
|
3714
|
-
|
|
4346
|
+
labelKey: "tab.summary"
|
|
3715
4347
|
},
|
|
3716
4348
|
{
|
|
3717
4349
|
id: "rendered",
|
|
3718
|
-
|
|
4350
|
+
labelKey: "tab.preview"
|
|
3719
4351
|
},
|
|
3720
4352
|
{
|
|
3721
4353
|
id: "raw",
|
|
3722
|
-
|
|
4354
|
+
labelKey: "tab.raw"
|
|
3723
4355
|
},
|
|
3724
4356
|
...record.cell.messageSource === void 0 ? [] : [{
|
|
3725
4357
|
id: "source",
|
|
3726
|
-
|
|
4358
|
+
labelKey: "tab.source"
|
|
3727
4359
|
}]
|
|
3728
4360
|
];
|
|
3729
4361
|
return [
|
|
3730
4362
|
{
|
|
3731
4363
|
id: "overview",
|
|
3732
|
-
|
|
4364
|
+
labelKey: "tab.summary"
|
|
3733
4365
|
},
|
|
3734
4366
|
...record.cell.inputDetail ? [{
|
|
3735
4367
|
id: "input",
|
|
3736
|
-
|
|
4368
|
+
labelKey: "tab.payload"
|
|
3737
4369
|
}] : [],
|
|
3738
4370
|
...record.cell.outputDetail ? [{
|
|
3739
4371
|
id: "output",
|
|
3740
|
-
|
|
4372
|
+
labelKey: "tab.result"
|
|
3741
4373
|
}] : [],
|
|
3742
4374
|
{
|
|
3743
4375
|
id: "schema",
|
|
3744
|
-
|
|
4376
|
+
labelKey: "tab.schema"
|
|
3745
4377
|
},
|
|
3746
4378
|
{
|
|
3747
4379
|
id: "timing",
|
|
3748
|
-
|
|
4380
|
+
labelKey: "tab.timing"
|
|
3749
4381
|
}
|
|
3750
4382
|
];
|
|
3751
4383
|
}
|
|
3752
|
-
function recordDisplayText(cell) {
|
|
3753
|
-
if (isToolCallOnly(cell)) return "";
|
|
4384
|
+
function recordDisplayText(cell, t) {
|
|
4385
|
+
if (isToolCallOnly(cell, t)) return "";
|
|
3754
4386
|
if (cell.previewMarkdown !== void 0) {
|
|
3755
4387
|
const preview = trajectoryPreviewText(cell.previewMarkdown);
|
|
3756
4388
|
if (cell.text === "") return preview;
|
|
@@ -3772,33 +4404,34 @@ window.__ModuleLoader__.load({
|
|
|
3772
4404
|
args: text.slice(separator + 3)
|
|
3773
4405
|
};
|
|
3774
4406
|
}
|
|
3775
|
-
function isToolCallOnly(cell) {
|
|
3776
|
-
return cell.kind === "message" && !cell.outputDetail && !cell.thinkingDetail && cell.text === "
|
|
4407
|
+
function isToolCallOnly(cell, t) {
|
|
4408
|
+
return cell.kind === "message" && !cell.outputDetail && !cell.thinkingDetail && cell.text === t("layout.toolCallOnly");
|
|
3777
4409
|
}
|
|
3778
|
-
function RecordPresentation({ cell, children }) {
|
|
3779
|
-
const displayText = (0, react.useMemo)(() => recordDisplayText(cell), [
|
|
4410
|
+
function RecordPresentation({ cell, children, t }) {
|
|
4411
|
+
const displayText = (0, react.useMemo)(() => recordDisplayText(cell, t), [
|
|
3780
4412
|
cell.kind,
|
|
3781
4413
|
cell.text,
|
|
3782
4414
|
cell.previewMarkdown,
|
|
3783
4415
|
cell.inputDetail,
|
|
3784
4416
|
cell.outputDetail,
|
|
3785
|
-
cell.thinkingDetail
|
|
4417
|
+
cell.thinkingDetail,
|
|
4418
|
+
t
|
|
3786
4419
|
]);
|
|
3787
4420
|
const resultText = (0, react.useMemo)(() => recordResultText(cell), [cell.result, cell.resultPreviewMarkdown]);
|
|
3788
|
-
const toolCallOnly = isToolCallOnly(cell);
|
|
4421
|
+
const toolCallOnly = isToolCallOnly(cell, t);
|
|
3789
4422
|
const toolCallText = toolCallTextParts(cell.kind, displayText);
|
|
3790
4423
|
return children({
|
|
3791
4424
|
displayText,
|
|
3792
|
-
listDisplayText: toolCallOnly ? "
|
|
4425
|
+
listDisplayText: toolCallOnly ? t("record.toolCallOnly") : toolCallText === void 0 ? displayText : [toolCallText.name, toolCallText.args].filter(Boolean).join(" "),
|
|
3793
4426
|
resultText,
|
|
3794
4427
|
toolCallOnly,
|
|
3795
4428
|
toolCallText
|
|
3796
4429
|
});
|
|
3797
4430
|
}
|
|
3798
|
-
function RecordListText({ displayText, toolCallOnly, toolCallText }) {
|
|
4431
|
+
function RecordListText({ displayText, toolCallOnly, toolCallText, t }) {
|
|
3799
4432
|
if (toolCallOnly) return (0, react_jsx_runtime.jsx)("span", {
|
|
3800
4433
|
className: TrajectoryTable_module_css_default.toolCallOnly,
|
|
3801
|
-
children: "
|
|
4434
|
+
children: t("record.toolCallOnly")
|
|
3802
4435
|
});
|
|
3803
4436
|
if (toolCallText === void 0) return displayText || "—";
|
|
3804
4437
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
@@ -3809,17 +4442,21 @@ window.__ModuleLoader__.load({
|
|
|
3809
4442
|
children: toolCallText.args
|
|
3810
4443
|
})] });
|
|
3811
4444
|
}
|
|
3812
|
-
function MarkdownFragment({ text, rendered, preview }) {
|
|
4445
|
+
function MarkdownFragment({ text, rendered, preview, t }) {
|
|
4446
|
+
const labels = (0, react.useMemo)(() => markdownLabels(t), [t]);
|
|
3813
4447
|
if (rendered) return (0, react_jsx_runtime.jsx)("div", {
|
|
3814
4448
|
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, {
|
|
4449
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
4450
|
+
text,
|
|
4451
|
+
labels
|
|
4452
|
+
})
|
|
3816
4453
|
});
|
|
3817
4454
|
return (0, react_jsx_runtime.jsx)("pre", {
|
|
3818
4455
|
className: `${TrajectoryTable_module_css_default.payload} ${preview ? TrajectoryTable_module_css_default.payloadPreview : ""}`,
|
|
3819
4456
|
children: text
|
|
3820
4457
|
});
|
|
3821
4458
|
}
|
|
3822
|
-
function SourceBlocks({ blocks, onOpenCall }) {
|
|
4459
|
+
function SourceBlocks({ blocks, onOpenCall, renderImages, t }) {
|
|
3823
4460
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
3824
4461
|
className: TrajectoryTable_module_css_default.sourceBlocks,
|
|
3825
4462
|
children: blocks.map((block, index) => (0, react_jsx_runtime.jsxs)("section", {
|
|
@@ -3827,14 +4464,17 @@ window.__ModuleLoader__.load({
|
|
|
3827
4464
|
children: [block.callId !== void 0 ? (0, react_jsx_runtime.jsxs)("button", {
|
|
3828
4465
|
type: "button",
|
|
3829
4466
|
className: TrajectoryTable_module_css_default.sourceBlockJumpTarget,
|
|
3830
|
-
"aria-label":
|
|
3831
|
-
title: "
|
|
4467
|
+
"aria-label": t("block.openSummary", { index: index + 1 }),
|
|
4468
|
+
title: t("block.openSummaryTitle"),
|
|
3832
4469
|
onClick: () => {
|
|
3833
4470
|
if (block.callId !== void 0) onOpenCall(block.callId);
|
|
3834
4471
|
},
|
|
3835
4472
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
3836
4473
|
className: TrajectoryTable_module_css_default.sourceBlockLabel,
|
|
3837
|
-
children:
|
|
4474
|
+
children: t("block.label", {
|
|
4475
|
+
index: index + 1,
|
|
4476
|
+
type: block.type
|
|
4477
|
+
})
|
|
3838
4478
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
3839
4479
|
className: TrajectoryTable_module_css_default.sourceBlockJumpIcon,
|
|
3840
4480
|
size: 12
|
|
@@ -3843,42 +4483,36 @@ window.__ModuleLoader__.load({
|
|
|
3843
4483
|
className: TrajectoryTable_module_css_default.sourceBlockHeader,
|
|
3844
4484
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
3845
4485
|
className: TrajectoryTable_module_css_default.sourceBlockLabel,
|
|
3846
|
-
children:
|
|
4486
|
+
children: t("block.label", {
|
|
4487
|
+
index: index + 1,
|
|
4488
|
+
type: block.type
|
|
4489
|
+
})
|
|
3847
4490
|
})
|
|
3848
|
-
}), block.
|
|
4491
|
+
}), block.attachment !== void 0 ? renderImages({
|
|
4492
|
+
images: [{ attachment: block.attachment }],
|
|
4493
|
+
align: "start"
|
|
4494
|
+
}) : (0, react_jsx_runtime.jsx)("pre", {
|
|
3849
4495
|
className: TrajectoryTable_module_css_default.sourceBlockContent,
|
|
3850
4496
|
children: block.content
|
|
3851
4497
|
})]
|
|
3852
4498
|
}, index))
|
|
3853
4499
|
});
|
|
3854
4500
|
}
|
|
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
|
-
});
|
|
4501
|
+
function recordImages(blocks) {
|
|
4502
|
+
return (blocks ?? []).flatMap((block) => block.attachment !== void 0 ? [{ attachment: block.attachment }] : []);
|
|
3869
4503
|
}
|
|
3870
|
-
function MessageImages({ blocks, preview }) {
|
|
3871
|
-
const images = blocks
|
|
4504
|
+
function MessageImages({ blocks, preview, renderImages }) {
|
|
4505
|
+
const images = recordImages(blocks);
|
|
3872
4506
|
if (images.length === 0) return null;
|
|
3873
4507
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
3874
4508
|
className: preview ? `${TrajectoryTable_module_css_default.messageImages} ${TrajectoryTable_module_css_default.messageImagesPreview}` : TrajectoryTable_module_css_default.messageImages,
|
|
3875
|
-
children:
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
}
|
|
4509
|
+
children: renderImages({
|
|
4510
|
+
images,
|
|
4511
|
+
align: "start"
|
|
4512
|
+
})
|
|
3879
4513
|
});
|
|
3880
4514
|
}
|
|
3881
|
-
function AssistantToolCalls({ blocks, preview, onOpenCall }) {
|
|
4515
|
+
function AssistantToolCalls({ blocks, preview, onOpenCall, t }) {
|
|
3882
4516
|
const calls = blocks?.filter((block) => block.type === "tool-call") ?? [];
|
|
3883
4517
|
if (calls.length === 0) return null;
|
|
3884
4518
|
return (0, react_jsx_runtime.jsx)("ul", {
|
|
@@ -3886,7 +4520,7 @@ window.__ModuleLoader__.load({
|
|
|
3886
4520
|
children: calls.map((call, index) => (0, react_jsx_runtime.jsx)("li", { children: (0, react_jsx_runtime.jsxs)("button", {
|
|
3887
4521
|
type: "button",
|
|
3888
4522
|
className: TrajectoryTable_module_css_default.assistantToolCallButton,
|
|
3889
|
-
title: "
|
|
4523
|
+
title: t("block.openSummaryTitle"),
|
|
3890
4524
|
onClick: () => {
|
|
3891
4525
|
if (call.callId !== void 0) onOpenCall(call.callId);
|
|
3892
4526
|
},
|
|
@@ -3908,7 +4542,7 @@ window.__ModuleLoader__.load({
|
|
|
3908
4542
|
className: TrajectoryTable_module_css_default.assistantToolCallText,
|
|
3909
4543
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
3910
4544
|
className: TrajectoryTable_module_css_default.assistantToolCallName,
|
|
3911
|
-
children: call.toolName ?? "
|
|
4545
|
+
children: call.toolName ?? t("details.toolCall")
|
|
3912
4546
|
}), call.content !== "" && (0, react_jsx_runtime.jsx)("span", {
|
|
3913
4547
|
className: TrajectoryTable_module_css_default.assistantToolCallArgs,
|
|
3914
4548
|
children: call.content
|
|
@@ -3934,10 +4568,10 @@ window.__ModuleLoader__.load({
|
|
|
3934
4568
|
})
|
|
3935
4569
|
});
|
|
3936
4570
|
}
|
|
3937
|
-
function ToolCatalog({ tools }) {
|
|
4571
|
+
function ToolCatalog({ tools, t }) {
|
|
3938
4572
|
if (tools.length === 0) return (0, react_jsx_runtime.jsx)("p", {
|
|
3939
4573
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
3940
|
-
children: "
|
|
4574
|
+
children: t("record.toolsMissing")
|
|
3941
4575
|
});
|
|
3942
4576
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
3943
4577
|
className: TrajectoryTable_module_css_default.toolCatalog,
|
|
@@ -3967,7 +4601,8 @@ window.__ModuleLoader__.load({
|
|
|
3967
4601
|
children: tool.description
|
|
3968
4602
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
3969
4603
|
data: tool.parameters,
|
|
3970
|
-
label:
|
|
4604
|
+
label: t("record.namedParametersJson", { name: tool.name }),
|
|
4605
|
+
labels: jsonTreeLabels(t),
|
|
3971
4606
|
className: TrajectoryTable_module_css_default.toolCatalogTree
|
|
3972
4607
|
})]
|
|
3973
4608
|
})]
|
|
@@ -4018,48 +4653,57 @@ window.__ModuleLoader__.load({
|
|
|
4018
4653
|
})]
|
|
4019
4654
|
});
|
|
4020
4655
|
}
|
|
4021
|
-
function SystemPromptDiff({ before, after }) {
|
|
4656
|
+
function SystemPromptDiff({ before, after, t }) {
|
|
4022
4657
|
const toolsBefore = JSON.stringify(before.tools, null, 2);
|
|
4023
4658
|
const toolsAfter = JSON.stringify(after.tools, null, 2);
|
|
4024
4659
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
4025
4660
|
className: TrajectoryTable_module_css_default.promptDiffSections,
|
|
4026
4661
|
children: [before.system !== after.system && (0, react_jsx_runtime.jsx)(PromptDiffSection, {
|
|
4027
|
-
title: "
|
|
4662
|
+
title: t("record.systemPrompt"),
|
|
4028
4663
|
before: before.system,
|
|
4029
4664
|
after: after.system
|
|
4030
4665
|
}), toolsBefore !== toolsAfter && (0, react_jsx_runtime.jsx)(PromptDiffSection, {
|
|
4031
|
-
title: "
|
|
4666
|
+
title: t("record.tools"),
|
|
4032
4667
|
before: toolsBefore,
|
|
4033
4668
|
after: toolsAfter
|
|
4034
4669
|
})]
|
|
4035
4670
|
});
|
|
4036
4671
|
}
|
|
4037
|
-
function ToolOutputBlocks({ blocks, error, preview }) {
|
|
4038
|
-
return (0, react_jsx_runtime.
|
|
4672
|
+
function ToolOutputBlocks({ blocks, error, errorDetail, preview, renderImages }) {
|
|
4673
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
4039
4674
|
className: [
|
|
4040
4675
|
TrajectoryTable_module_css_default.resultBlocks,
|
|
4041
4676
|
preview ? TrajectoryTable_module_css_default.resultBlocksPreview : void 0,
|
|
4042
4677
|
error ? TrajectoryTable_module_css_default.errorPayload : void 0
|
|
4043
4678
|
].filter((value) => value !== void 0).join(" "),
|
|
4044
|
-
children:
|
|
4045
|
-
|
|
4046
|
-
|
|
4679
|
+
children: [error && errorDetail !== void 0 && errorDetail !== "" && (0, react_jsx_runtime.jsx)("pre", {
|
|
4680
|
+
className: TrajectoryTable_module_css_default.resultBlockText,
|
|
4681
|
+
children: errorDetail
|
|
4682
|
+
}), blocks.map((block, index) => block.attachment !== void 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
4683
|
+
className: TrajectoryTable_module_css_default.messageImages,
|
|
4684
|
+
children: renderImages({
|
|
4685
|
+
images: [{ attachment: block.attachment }],
|
|
4686
|
+
align: "start"
|
|
4687
|
+
})
|
|
4047
4688
|
}, index) : block.content !== "" ? (0, react_jsx_runtime.jsx)("pre", {
|
|
4048
4689
|
className: TrajectoryTable_module_css_default.resultBlockText,
|
|
4049
4690
|
children: block.content
|
|
4050
|
-
}, index) : null)
|
|
4691
|
+
}, index) : null)]
|
|
4051
4692
|
});
|
|
4052
4693
|
}
|
|
4053
|
-
function MarkdownRecordContent({ record, rendered, preview = false, thinkingExpanded, onThinkingExpandedChange, onOpenCall }) {
|
|
4694
|
+
function MarkdownRecordContent({ record, rendered, preview = false, thinkingExpanded, onThinkingExpandedChange, onOpenCall, renderImages, t }) {
|
|
4054
4695
|
if (!rendered && record.cell.sourceBlocks && record.cell.sourceBlocks.length > 0) return (0, react_jsx_runtime.jsx)(SourceBlocks, {
|
|
4055
4696
|
blocks: record.cell.sourceBlocks,
|
|
4056
|
-
onOpenCall
|
|
4697
|
+
onOpenCall,
|
|
4698
|
+
renderImages,
|
|
4699
|
+
t
|
|
4057
4700
|
});
|
|
4058
4701
|
if (record.cell.thinkingDetail) {
|
|
4059
4702
|
if (!rendered) return (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4060
4703
|
text: [record.cell.thinkingDetail, record.cell.outputDetail].filter((value) => value !== void 0 && value !== "").join("\n\n"),
|
|
4061
4704
|
rendered: false,
|
|
4062
|
-
preview
|
|
4705
|
+
preview,
|
|
4706
|
+
t
|
|
4063
4707
|
});
|
|
4064
4708
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
4065
4709
|
className: `${TrajectoryTable_module_css_default.assistantContent} ${TrajectoryTable_module_css_default.assistantContentRendered}`,
|
|
@@ -4073,14 +4717,15 @@ window.__ModuleLoader__.load({
|
|
|
4073
4717
|
onClick: () => {
|
|
4074
4718
|
onThinkingExpandedChange(!thinkingExpanded);
|
|
4075
4719
|
},
|
|
4076
|
-
children: ["
|
|
4720
|
+
children: [t("record.thinking"), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
4077
4721
|
className: TrajectoryTable_module_css_default.thinkingChevron,
|
|
4078
4722
|
size: 12
|
|
4079
4723
|
})]
|
|
4080
4724
|
}), thinkingExpanded && (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4081
4725
|
text: record.cell.thinkingDetail,
|
|
4082
4726
|
rendered,
|
|
4083
|
-
preview
|
|
4727
|
+
preview,
|
|
4728
|
+
t
|
|
4084
4729
|
})]
|
|
4085
4730
|
}),
|
|
4086
4731
|
record.cell.outputDetail && (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -4088,26 +4733,29 @@ window.__ModuleLoader__.load({
|
|
|
4088
4733
|
children: (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4089
4734
|
text: record.cell.outputDetail,
|
|
4090
4735
|
rendered,
|
|
4091
|
-
preview
|
|
4736
|
+
preview,
|
|
4737
|
+
t
|
|
4092
4738
|
})
|
|
4093
4739
|
}),
|
|
4094
4740
|
(0, react_jsx_runtime.jsx)(AssistantToolCalls, {
|
|
4095
4741
|
blocks: record.cell.sourceBlocks,
|
|
4096
4742
|
preview,
|
|
4097
|
-
onOpenCall
|
|
4743
|
+
onOpenCall,
|
|
4744
|
+
t
|
|
4098
4745
|
}),
|
|
4099
4746
|
(0, react_jsx_runtime.jsx)(MessageImages, {
|
|
4100
4747
|
blocks: record.cell.sourceBlocks,
|
|
4101
|
-
preview
|
|
4748
|
+
preview,
|
|
4749
|
+
renderImages
|
|
4102
4750
|
})
|
|
4103
4751
|
]
|
|
4104
4752
|
});
|
|
4105
4753
|
}
|
|
4106
4754
|
const source = markdownSource(record);
|
|
4107
|
-
const hasImages = record.cell.sourceBlocks?.some((block) => block.
|
|
4755
|
+
const hasImages = record.cell.sourceBlocks?.some((block) => block.attachment !== void 0) === true;
|
|
4108
4756
|
const hasToolCalls = record.cell.kind === "message" && record.cell.sourceBlocks?.some((block) => block.type === "tool-call") === true;
|
|
4109
4757
|
if (!source && !hasImages && !hasToolCalls) {
|
|
4110
|
-
const emptyLabel = isToolCallOnly(record.cell) ? "
|
|
4758
|
+
const emptyLabel = isToolCallOnly(record.cell, t) ? t("record.toolCallOnly") : record.cell.text || t("record.noContent");
|
|
4111
4759
|
return (0, react_jsx_runtime.jsx)("p", {
|
|
4112
4760
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
4113
4761
|
children: emptyLabel
|
|
@@ -4116,56 +4764,75 @@ window.__ModuleLoader__.load({
|
|
|
4116
4764
|
if (!rendered || !hasImages && !hasToolCalls) return (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4117
4765
|
text: source ?? "",
|
|
4118
4766
|
rendered,
|
|
4119
|
-
preview
|
|
4767
|
+
preview,
|
|
4768
|
+
t
|
|
4120
4769
|
});
|
|
4121
4770
|
return (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
4122
4771
|
source && (0, react_jsx_runtime.jsx)(MarkdownFragment, {
|
|
4123
4772
|
text: source,
|
|
4124
4773
|
rendered: true,
|
|
4125
|
-
preview
|
|
4774
|
+
preview,
|
|
4775
|
+
t
|
|
4126
4776
|
}),
|
|
4127
4777
|
record.cell.kind === "message" && (0, react_jsx_runtime.jsx)(AssistantToolCalls, {
|
|
4128
4778
|
blocks: record.cell.sourceBlocks,
|
|
4129
4779
|
preview,
|
|
4130
|
-
onOpenCall
|
|
4780
|
+
onOpenCall,
|
|
4781
|
+
t
|
|
4131
4782
|
}),
|
|
4132
4783
|
(0, react_jsx_runtime.jsx)(MessageImages, {
|
|
4133
4784
|
blocks: record.cell.sourceBlocks,
|
|
4134
|
-
preview
|
|
4785
|
+
preview,
|
|
4786
|
+
renderImages
|
|
4135
4787
|
})
|
|
4136
4788
|
] });
|
|
4137
4789
|
}
|
|
4138
|
-
function RecordTiming({ record }) {
|
|
4139
|
-
return record.cell.kind === "message" && record.cell.assistantMetrics !== void 0 ? (0, react_jsx_runtime.jsx)(AssistantTimingPanel, {
|
|
4790
|
+
function RecordTiming({ record, t }) {
|
|
4791
|
+
return record.cell.kind === "message" && record.cell.assistantMetrics !== void 0 ? (0, react_jsx_runtime.jsx)(AssistantTimingPanel, {
|
|
4792
|
+
metrics: record.cell.assistantMetrics,
|
|
4793
|
+
t
|
|
4794
|
+
}) : (0, react_jsx_runtime.jsxs)("dl", {
|
|
4140
4795
|
className: TrajectoryTable_module_css_default.overview,
|
|
4141
4796
|
children: [
|
|
4142
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4143
|
-
|
|
4144
|
-
|
|
4797
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
4798
|
+
timestamp: record.cell.startedAt ?? null,
|
|
4799
|
+
t
|
|
4800
|
+
})] }),
|
|
4801
|
+
(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) })] }),
|
|
4802
|
+
(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
4803
|
]
|
|
4146
4804
|
});
|
|
4147
4805
|
}
|
|
4148
|
-
function RequestTiming({ assistant, anchor, request }) {
|
|
4149
|
-
if (assistant !== void 0) return (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
4806
|
+
function RequestTiming({ assistant, anchor, request, t }) {
|
|
4807
|
+
if (assistant !== void 0) return (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
4808
|
+
record: assistant,
|
|
4809
|
+
t
|
|
4810
|
+
});
|
|
4150
4811
|
if (request?.startedAt !== void 0) {
|
|
4151
4812
|
const duration = request.completedAt === null || request.completedAt === void 0 ? null : Math.max(0, (request.completedAt - request.startedAt) / 1e3);
|
|
4152
4813
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
4153
4814
|
className: TrajectoryTable_module_css_default.overview,
|
|
4154
4815
|
children: [
|
|
4155
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4156
|
-
|
|
4157
|
-
|
|
4816
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
4817
|
+
timestamp: request.startedAt,
|
|
4818
|
+
t
|
|
4819
|
+
})] }),
|
|
4820
|
+
(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) })] }),
|
|
4821
|
+
(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
4822
|
]
|
|
4159
4823
|
});
|
|
4160
4824
|
}
|
|
4161
4825
|
return (0, react_jsx_runtime.jsxs)("dl", {
|
|
4162
4826
|
className: TrajectoryTable_module_css_default.overview,
|
|
4163
|
-
children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
4827
|
+
children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("timing.started") }), (0, react_jsx_runtime.jsx)(StartedAtValue, {
|
|
4828
|
+
timestamp: anchor?.cell.startedAt ?? null,
|
|
4829
|
+
t
|
|
4830
|
+
})] }), (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
4831
|
});
|
|
4165
4832
|
}
|
|
4166
|
-
function RecordPayload({ record, direction, preview = false }) {
|
|
4833
|
+
function RecordPayload({ record, direction, preview = false, renderImages, t }) {
|
|
4167
4834
|
const value = direction === "input" ? record.cell.inputDetail : record.cell.outputDetail;
|
|
4168
|
-
const missing = direction === "input" ? "
|
|
4835
|
+
const missing = direction === "input" ? t("record.noPayload") : t("record.noResult");
|
|
4169
4836
|
if (!value) return (0, react_jsx_runtime.jsx)("p", {
|
|
4170
4837
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
4171
4838
|
children: missing
|
|
@@ -4176,21 +4843,28 @@ window.__ModuleLoader__.load({
|
|
|
4176
4843
|
const json = parseJsonContainer(value);
|
|
4177
4844
|
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
4845
|
data: json,
|
|
4179
|
-
label: "
|
|
4846
|
+
label: t("record.resultJson"),
|
|
4847
|
+
labels: jsonTreeLabels(t),
|
|
4180
4848
|
className: payloadClassName
|
|
4181
4849
|
});
|
|
4182
|
-
if (direction === "output" && record.cell.outputBlocks?.some((block) => block.
|
|
4850
|
+
if (direction === "output" && record.cell.outputBlocks?.some((block) => block.attachment !== void 0 || block.content !== "") === true) return (0, react_jsx_runtime.jsx)(ToolOutputBlocks, {
|
|
4183
4851
|
blocks: record.cell.outputBlocks,
|
|
4184
4852
|
error,
|
|
4185
|
-
|
|
4853
|
+
errorDetail: error ? value : void 0,
|
|
4854
|
+
preview,
|
|
4855
|
+
renderImages
|
|
4186
4856
|
});
|
|
4187
4857
|
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
4858
|
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, {
|
|
4859
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
4860
|
+
text: value,
|
|
4861
|
+
labels: markdownLabels(t)
|
|
4862
|
+
})
|
|
4190
4863
|
});
|
|
4191
4864
|
if (json !== void 0) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
4192
4865
|
data: json,
|
|
4193
|
-
label:
|
|
4866
|
+
label: t(direction === "input" ? "record.payloadJson" : "record.outputJson"),
|
|
4867
|
+
labels: jsonTreeLabels(t),
|
|
4194
4868
|
className: payloadClassName
|
|
4195
4869
|
});
|
|
4196
4870
|
return (0, react_jsx_runtime.jsx)("pre", {
|
|
@@ -4198,15 +4872,15 @@ window.__ModuleLoader__.load({
|
|
|
4198
4872
|
TrajectoryTable_module_css_default.payload,
|
|
4199
4873
|
preview ? TrajectoryTable_module_css_default.payloadPreview : void 0,
|
|
4200
4874
|
error ? TrajectoryTable_module_css_default.errorPayload : void 0,
|
|
4201
|
-
value === "
|
|
4875
|
+
value === t("record.noOutput") ? TrajectoryTable_module_css_default.noOutputText : void 0
|
|
4202
4876
|
].filter((value) => value !== void 0).join(" "),
|
|
4203
4877
|
children: value
|
|
4204
4878
|
});
|
|
4205
4879
|
}
|
|
4206
|
-
function RecordSchema({ record, preview = false }) {
|
|
4880
|
+
function RecordSchema({ record, preview = false, t }) {
|
|
4207
4881
|
if (!record.cell.schemaDetail) return (0, react_jsx_runtime.jsx)("p", {
|
|
4208
4882
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
4209
|
-
children: "
|
|
4883
|
+
children: t("record.schemaUnavailable")
|
|
4210
4884
|
});
|
|
4211
4885
|
const schema = parseToolSchema(record.cell.schemaDetail);
|
|
4212
4886
|
if (schema !== void 0) return (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -4224,10 +4898,11 @@ window.__ModuleLoader__.load({
|
|
|
4224
4898
|
className: TrajectoryTable_module_css_default.schemaParameters,
|
|
4225
4899
|
children: [(0, react_jsx_runtime.jsx)("h4", {
|
|
4226
4900
|
className: TrajectoryTable_module_css_default.schemaParametersTitle,
|
|
4227
|
-
children: "
|
|
4901
|
+
children: t("record.parameters")
|
|
4228
4902
|
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
4229
4903
|
data: schema.parameters,
|
|
4230
|
-
label:
|
|
4904
|
+
label: t("record.namedParametersJson", { name: schema.name }),
|
|
4905
|
+
labels: jsonTreeLabels(t),
|
|
4231
4906
|
className: TrajectoryTable_module_css_default.schemaTree
|
|
4232
4907
|
})]
|
|
4233
4908
|
})]
|
|
@@ -4287,7 +4962,7 @@ window.__ModuleLoader__.load({
|
|
|
4287
4962
|
* @param props - Grouped trajectory data and whole-ledger fold state.
|
|
4288
4963
|
* @returns The ledger and an optional local record inspector.
|
|
4289
4964
|
*/
|
|
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 }) {
|
|
4965
|
+
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
4966
|
const [selectedRecordId, setSelectedRecordId] = (0, react.useState)(null);
|
|
4292
4967
|
const [selectedRequest, setSelectedRequest] = (0, react.useState)(null);
|
|
4293
4968
|
const [activeTab, setActiveTab] = (0, react.useState)("overview");
|
|
@@ -4322,21 +4997,20 @@ window.__ModuleLoader__.load({
|
|
|
4322
4997
|
(0, react.useEffect)(() => {
|
|
4323
4998
|
onSelectedIndexChange?.(selectedIndex);
|
|
4324
4999
|
}, [onSelectedIndexChange, selectedIndex]);
|
|
4325
|
-
const
|
|
4326
|
-
const
|
|
4327
|
-
|
|
4328
|
-
requestBoundaries,
|
|
4329
|
-
sessionRequestNumbers
|
|
4330
|
-
]);
|
|
5000
|
+
const requestGroups = (0, react.useMemo)(() => new Set((sessionRequestNumbers ?? []).map((request) => requestKey(request.turn, request.group))), [sessionRequestNumbers]);
|
|
5001
|
+
const requestBoundaries = (0, react.useMemo)(() => indexRequestBoundaries(allRecords, requestGroups), [allRecords, requestGroups]);
|
|
5002
|
+
const requestNumbers = (0, react.useMemo)(() => indexRequestNumbers(sessionRequestNumbers), [sessionRequestNumbers]);
|
|
4331
5003
|
const records = (0, react.useMemo)(() => {
|
|
4332
5004
|
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);
|
|
5005
|
+
const turnRecords = collapsedTurns.size === 0 ? allRecords : collapseTurnRecords(allRecords, collapsedTurns, requestGroups, t);
|
|
5006
|
+
return collapsedAssistants.size === 0 ? turnRecords : collapseAssistantRecords(turnRecords, collapsedAssistants, t);
|
|
4335
5007
|
}, [
|
|
4336
5008
|
allRecords,
|
|
4337
5009
|
collapsedAssistants,
|
|
4338
5010
|
collapsedTurns,
|
|
4339
|
-
|
|
5011
|
+
requestGroups,
|
|
5012
|
+
searchMatchIndexes,
|
|
5013
|
+
t
|
|
4340
5014
|
]);
|
|
4341
5015
|
const projectedVirtualRows = (0, react.useMemo)(() => groupTrajectoryVirtualRows(records), [records]);
|
|
4342
5016
|
const virtualRowStructure = useStableVirtualRowStructure(projectedVirtualRows);
|
|
@@ -4381,17 +5055,17 @@ window.__ModuleLoader__.load({
|
|
|
4381
5055
|
position,
|
|
4382
5056
|
terminalRequestBoundary: record.cell.requestOnly === true && position === records.length - 1
|
|
4383
5057
|
}));
|
|
4384
|
-
const requestBoundaryRuns = (0, react.useMemo)(() => indexRequestBoundaryRuns(records), [records]);
|
|
5058
|
+
const requestBoundaryRuns = (0, react.useMemo)(() => indexRequestBoundaryRuns(records, requestGroups), [records, requestGroups]);
|
|
4385
5059
|
const selectedPrompt = selected?.cell.kind === "system" ? selected.cell.promptDetail : void 0;
|
|
4386
5060
|
const selectedPreviousPrompt = selected?.cell.kind === "system" ? selected.cell.previousPromptDetail : void 0;
|
|
4387
5061
|
const promptSelected = selectedPrompt !== void 0;
|
|
4388
5062
|
const selectedState = selected === void 0 ? void 0 : stateOf(selected);
|
|
4389
|
-
const
|
|
5063
|
+
const selectedRequestInfo = selectedRequest === null ? void 0 : sessionRequestNumbers?.find((request) => requestIdentity(request) === selectedRequest.identity);
|
|
5064
|
+
const selectedRequestRecords = (0, react.useMemo)(() => selectedRequestInfo === void 0 ? [] : allRecords.filter((record) => record.turn === selectedRequestInfo.turn && record.group === selectedRequestInfo.group), [allRecords, selectedRequestInfo]).map(currentRecord);
|
|
4390
5065
|
const selectedRequestAssistant = selectedRequestRecords.find((record) => record.cell.kind === "message");
|
|
4391
5066
|
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");
|
|
5067
|
+
const selectedRequestNumber = selectedRequestInfo?.number;
|
|
5068
|
+
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
5069
|
const selectedRequestToolCalls = selectedRequestRecords.filter((record) => record.cell.kind === "tool").length;
|
|
4396
5070
|
const selectedRequestSubtoolCalls = selectedRequestRecords.filter((record) => record.cell.kind === "subtool").length;
|
|
4397
5071
|
const selectedRequestResultTemplate = selectedRequestInfo?.resultSeq === void 0 ? selectedRequestAssistant : allRecords.find((record) => record.cell.sourceSeq === selectedRequestInfo.resultSeq);
|
|
@@ -4405,19 +5079,15 @@ window.__ModuleLoader__.load({
|
|
|
4405
5079
|
});
|
|
4406
5080
|
const selectedRequestCumulativeUsage = selectedRequestInfo?.cumulativeUsage ?? selectedRequestUsage;
|
|
4407
5081
|
const selectedRequestOptions = selectedRequestInfo?.requestConfig;
|
|
4408
|
-
const activeTurn =
|
|
4409
|
-
const activeSection =
|
|
4410
|
-
const selectedTabs =
|
|
5082
|
+
const activeTurn = selectedRequestInfo === void 0 ? selected?.turn : selectedRequestInfo.turn;
|
|
5083
|
+
const activeSection = selectedRequestInfo === void 0 ? selected?.section : selectedRequestRecords[0]?.section;
|
|
5084
|
+
const selectedTabs = selectedRequestInfo !== void 0 ? REQUEST_TABS.filter((tab) => tab.id !== "options" || selectedRequestOptions !== void 0) : selected === void 0 ? [] : detailTabs(selected);
|
|
4411
5085
|
const selectedParents = selected === void 0 ? {} : parentRecords(allRecords, selected);
|
|
4412
5086
|
const selectedParentMessage = selectedParents.message;
|
|
4413
5087
|
const selectedParentTool = selectedParents.tool;
|
|
4414
5088
|
const selectedAssistantRequest = selected?.cell.kind === "message" ? requestNumbers.get(requestKey(selected.turn, selected.group)) : void 0;
|
|
4415
5089
|
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;
|
|
5090
|
+
const selectedAssistantRequestTarget = selectedAssistantRequestInfo === void 0 ? void 0 : { identity: requestIdentity(selectedAssistantRequestInfo) };
|
|
4421
5091
|
const hasSelectedHierarchy = selectedAssistantRequestTarget !== void 0 || selectedParents.message !== void 0 || selectedParents.tool !== void 0;
|
|
4422
5092
|
const splitStyle = toolRequestOffset === null ? void 0 : { "--trajectory-tool-request-width": `calc(58cqw - ${toolRequestOffset}px)` };
|
|
4423
5093
|
const activateTab = (tab) => {
|
|
@@ -4656,7 +5326,7 @@ window.__ModuleLoader__.load({
|
|
|
4656
5326
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4657
5327
|
className: TrajectoryTable_module_css_default.historyLoadingSpinner,
|
|
4658
5328
|
"aria-hidden": "true"
|
|
4659
|
-
}), "
|
|
5329
|
+
}), t("history.loadingTrajectory")]
|
|
4660
5330
|
})
|
|
4661
5331
|
}), (0, react_jsx_runtime.jsxs)("table", {
|
|
4662
5332
|
className: TrajectoryTable_module_css_default.table,
|
|
@@ -4673,7 +5343,7 @@ window.__ModuleLoader__.load({
|
|
|
4673
5343
|
type: "button",
|
|
4674
5344
|
className: TrajectoryTable_module_css_default.historyLoadButton,
|
|
4675
5345
|
disabled: olderBusy || onLoadOlder === void 0,
|
|
4676
|
-
"aria-label": olderBusy ? "
|
|
5346
|
+
"aria-label": olderBusy ? t("history.loadingEarlierAria") : t("history.loadEarlier"),
|
|
4677
5347
|
onClick: () => {
|
|
4678
5348
|
const pane = tablePaneRef.current;
|
|
4679
5349
|
if (pane !== null) requestOlder(pane, false);
|
|
@@ -4685,13 +5355,13 @@ window.__ModuleLoader__.load({
|
|
|
4685
5355
|
}),
|
|
4686
5356
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4687
5357
|
"aria-hidden": "true",
|
|
4688
|
-
children: olderBusy ? "
|
|
5358
|
+
children: olderBusy ? t("history.loadingEarlier") : t("history.loadEarlier")
|
|
4689
5359
|
}),
|
|
4690
5360
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4691
5361
|
className: TrajectoryTable_module_css_default.visuallyHidden,
|
|
4692
5362
|
role: "status",
|
|
4693
5363
|
"aria-live": "polite",
|
|
4694
|
-
children: olderBusy ? "
|
|
5364
|
+
children: olderBusy ? t("history.loadingEarlier") : ""
|
|
4695
5365
|
})
|
|
4696
5366
|
]
|
|
4697
5367
|
})
|
|
@@ -4708,6 +5378,7 @@ window.__ModuleLoader__.load({
|
|
|
4708
5378
|
}),
|
|
4709
5379
|
renderedRecords.map(({ record, position, terminalRequestBoundary }) => (0, react_jsx_runtime.jsx)(RecordPresentation, {
|
|
4710
5380
|
cell: record.cell,
|
|
5381
|
+
t,
|
|
4711
5382
|
children: ({ displayText, listDisplayText, resultText, toolCallOnly, toolCallText }) => {
|
|
4712
5383
|
const isCollapsedSummary = record.collapsedSummary !== void 0;
|
|
4713
5384
|
const isRequestOnly = record.cell.requestOnly === true;
|
|
@@ -4718,13 +5389,20 @@ window.__ModuleLoader__.load({
|
|
|
4718
5389
|
const requestStatus = requestInfo?.status ?? (record.cell.isError === true ? "error" : void 0);
|
|
4719
5390
|
const requestRunIndex = requestBoundaryRuns.get(record.cell.index) ?? 0;
|
|
4720
5391
|
const requestBoundaryStyle = { "--request-boundary-offset": `${requestRunIndex * 8}px` };
|
|
4721
|
-
const requestLabel = request === void 0 ? void 0 :
|
|
4722
|
-
const requestSelected =
|
|
5392
|
+
const requestLabel = request === void 0 ? void 0 : t(requestInfo?.purpose === "compaction" ? "request.labelCompaction" : "request.label", { request });
|
|
5393
|
+
const requestSelected = requestInfo !== void 0 && selectedRequest?.identity === requestIdentity(requestInfo);
|
|
4723
5394
|
const sectionActive = record.turn === null ? activeSection === record.section : activeTurn === record.turn;
|
|
4724
5395
|
return (0, react_jsx_runtime.jsxs)("tr", {
|
|
4725
5396
|
tabIndex: isRequestOnly ? -1 : 0,
|
|
4726
5397
|
"aria-rowindex": position + 1 + historyRowOffset,
|
|
4727
|
-
"aria-label": isCollapsedSummary ?
|
|
5398
|
+
"aria-label": isCollapsedSummary ? t("request.collapsedSummary", {
|
|
5399
|
+
kind: t(record.collapsedSummaryKind === "turn" ? "request.collapsedTurn" : "request.collapsedAssistant"),
|
|
5400
|
+
summary: record.collapsedSummary
|
|
5401
|
+
}) : isRequestOnly ? t("request.rowAriaCompaction", { request: request ?? "" }) : t("request.rowAria", {
|
|
5402
|
+
request: request === void 0 ? "" : t("request.rowPrefix", { request }),
|
|
5403
|
+
kind: t(KIND_LABEL_KEY[record.cell.kind]),
|
|
5404
|
+
content: listDisplayText || t("request.noContent")
|
|
5405
|
+
}),
|
|
4728
5406
|
"aria-selected": !isCollapsedSummary && !isRequestOnly && selectedIndex === record.cell.index,
|
|
4729
5407
|
"data-kind": record.cell.kind,
|
|
4730
5408
|
"data-trajectory-row-key": trajectoryVirtualRecordKey(record),
|
|
@@ -4789,11 +5467,7 @@ window.__ModuleLoader__.load({
|
|
|
4789
5467
|
style: requestBoundaryStyle,
|
|
4790
5468
|
onClick: (event) => {
|
|
4791
5469
|
event.stopPropagation();
|
|
4792
|
-
selectRequest({
|
|
4793
|
-
turn: record.turn,
|
|
4794
|
-
group: record.group,
|
|
4795
|
-
...requestInfo?.seq === void 0 ? {} : { seq: requestInfo.seq }
|
|
4796
|
-
});
|
|
5470
|
+
if (requestInfo !== void 0) selectRequest({ identity: requestIdentity(requestInfo) });
|
|
4797
5471
|
},
|
|
4798
5472
|
onDoubleClick: (event) => {
|
|
4799
5473
|
event.stopPropagation();
|
|
@@ -4809,11 +5483,11 @@ window.__ModuleLoader__.load({
|
|
|
4809
5483
|
}),
|
|
4810
5484
|
!isCollapsedSummary && !isRequestOnly && record.turnStart && (0, react_jsx_runtime.jsx)("span", {
|
|
4811
5485
|
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", {
|
|
5486
|
+
"aria-label": sectionLabel(record.turn, t),
|
|
5487
|
+
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
5488
|
className: TrajectoryTable_module_css_default.turnLabelFull,
|
|
4815
5489
|
"aria-hidden": "true",
|
|
4816
|
-
children: sectionLabel(record.turn)
|
|
5490
|
+
children: sectionLabel(record.turn, t)
|
|
4817
5491
|
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
4818
5492
|
className: TrajectoryTable_module_css_default.turnLabelCompact,
|
|
4819
5493
|
"aria-hidden": "true",
|
|
@@ -4828,7 +5502,7 @@ window.__ModuleLoader__.load({
|
|
|
4828
5502
|
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
5503
|
"data-role-kind": record.cell.kind,
|
|
4830
5504
|
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
4831
|
-
label:
|
|
5505
|
+
label: t(KIND_LABEL_KEY[record.cell.kind]),
|
|
4832
5506
|
side: "right",
|
|
4833
5507
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
4834
5508
|
className: TrajectoryTable_module_css_default.kindTagIcon,
|
|
@@ -4837,7 +5511,7 @@ window.__ModuleLoader__.load({
|
|
|
4837
5511
|
})
|
|
4838
5512
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4839
5513
|
className: TrajectoryTable_module_css_default.kindTagLabel,
|
|
4840
|
-
children:
|
|
5514
|
+
children: t(KIND_LABEL_KEY[record.cell.kind])
|
|
4841
5515
|
})]
|
|
4842
5516
|
})
|
|
4843
5517
|
})
|
|
@@ -4863,7 +5537,8 @@ window.__ModuleLoader__.load({
|
|
|
4863
5537
|
children: (0, react_jsx_runtime.jsx)(RecordListText, {
|
|
4864
5538
|
displayText,
|
|
4865
5539
|
toolCallOnly,
|
|
4866
|
-
toolCallText
|
|
5540
|
+
toolCallText,
|
|
5541
|
+
t
|
|
4867
5542
|
})
|
|
4868
5543
|
}), resultText !== void 0 && (0, react_jsx_runtime.jsxs)("span", {
|
|
4869
5544
|
className: record.cell.isError ? `${TrajectoryTable_module_css_default.inlineResult} ${TrajectoryTable_module_css_default.error}` : TrajectoryTable_module_css_default.inlineResult,
|
|
@@ -4871,7 +5546,7 @@ window.__ModuleLoader__.load({
|
|
|
4871
5546
|
className: TrajectoryTable_module_css_default.arrow,
|
|
4872
5547
|
children: "→"
|
|
4873
5548
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4874
|
-
className: resultText === "
|
|
5549
|
+
className: resultText === t("record.noOutput") ? `${TrajectoryTable_module_css_default.inlineResultText} ${TrajectoryTable_module_css_default.noOutputText}` : TrajectoryTable_module_css_default.inlineResultText,
|
|
4875
5550
|
children: resultText
|
|
4876
5551
|
})]
|
|
4877
5552
|
})]
|
|
@@ -4891,19 +5566,19 @@ window.__ModuleLoader__.load({
|
|
|
4891
5566
|
})
|
|
4892
5567
|
] })]
|
|
4893
5568
|
})]
|
|
4894
|
-
}), (
|
|
5569
|
+
}), (selectedRequestInfo !== void 0 || promptSelected || selected !== void 0 && selectedState !== void 0) && (0, react_jsx_runtime.jsxs)("aside", {
|
|
4895
5570
|
className: TrajectoryTable_module_css_default.details,
|
|
4896
|
-
"aria-label": "
|
|
5571
|
+
"aria-label": t("details.event"),
|
|
4897
5572
|
style: detailsWidth === null ? void 0 : { width: detailsWidth },
|
|
4898
5573
|
children: [
|
|
4899
5574
|
(0, react_jsx_runtime.jsx)("div", {
|
|
4900
5575
|
className: TrajectoryTable_module_css_default.detailsResizeHandle,
|
|
4901
5576
|
role: "separator",
|
|
4902
|
-
"aria-label": "
|
|
5577
|
+
"aria-label": t("details.resize"),
|
|
4903
5578
|
"aria-controls": "trajectory-detail-panel",
|
|
4904
5579
|
"aria-orientation": "vertical",
|
|
4905
5580
|
tabIndex: 0,
|
|
4906
|
-
title: "
|
|
5581
|
+
title: t("details.resizeTitle"),
|
|
4907
5582
|
onDoubleClick: () => {
|
|
4908
5583
|
setDetailsWidth(null);
|
|
4909
5584
|
setToolRequestOffset(null);
|
|
@@ -4960,36 +5635,36 @@ window.__ModuleLoader__.load({
|
|
|
4960
5635
|
className: TrajectoryTable_module_css_default.detailsHeader,
|
|
4961
5636
|
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
4962
5637
|
className: TrajectoryTable_module_css_default.detailsTitle,
|
|
4963
|
-
children:
|
|
5638
|
+
children: selectedRequestInfo !== void 0 ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
4964
5639
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4965
5640
|
className: TrajectoryTable_module_css_default.requestDetailsDot,
|
|
4966
5641
|
"aria-hidden": "true"
|
|
4967
5642
|
}),
|
|
4968
|
-
(0, react_jsx_runtime.
|
|
5643
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
4969
5644
|
className: TrajectoryTable_module_css_default.requestDetailsName,
|
|
4970
|
-
children:
|
|
5645
|
+
children: t("request.label", { request: selectedRequestNumber ?? "—" })
|
|
4971
5646
|
}),
|
|
4972
5647
|
(0, react_jsx_runtime.jsx)("span", {
|
|
4973
5648
|
className: TrajectoryTable_module_css_default.detailsLocation,
|
|
4974
|
-
children: selectedRequestInfo
|
|
5649
|
+
children: selectedRequestInfo.purpose === "compaction" ? t("request.compaction", { section: sectionLabel(selectedRequestInfo.turn, t) }) : sectionLabel(selectedRequestInfo.turn, t)
|
|
4975
5650
|
})
|
|
4976
5651
|
] }) : promptSelected ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4977
5652
|
className: `${TrajectoryTable_module_css_default.kindTag} ${TrajectoryTable_module_css_default.systemNeutral}`,
|
|
4978
|
-
children: "
|
|
5653
|
+
children: t("kind.system")
|
|
4979
5654
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4980
5655
|
className: TrajectoryTable_module_css_default.detailsLocation,
|
|
4981
5656
|
children: selected?.cell.text
|
|
4982
5657
|
})] }) : selected !== void 0 && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
4983
5658
|
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:
|
|
5659
|
+
children: t(KIND_LABEL_KEY[selected.cell.kind])
|
|
4985
5660
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
4986
5661
|
className: TrajectoryTable_module_css_default.detailsLocation,
|
|
4987
|
-
children: selected.cell.kind === "compacted" ? sectionLabel(selected.turn) : `${sectionLabel(selected.turn)} · ${selected.group}`
|
|
5662
|
+
children: selected.cell.kind === "compacted" ? sectionLabel(selected.turn, t) : `${sectionLabel(selected.turn, t)} · ${selected.group}`
|
|
4988
5663
|
})] })
|
|
4989
5664
|
}), (0, react_jsx_runtime.jsx)("button", {
|
|
4990
5665
|
type: "button",
|
|
4991
5666
|
className: TrajectoryTable_module_css_default.close,
|
|
4992
|
-
"aria-label": "
|
|
5667
|
+
"aria-label": t("details.close"),
|
|
4993
5668
|
onClick: clearInspectorSelection,
|
|
4994
5669
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
4995
5670
|
"aria-hidden": "true",
|
|
@@ -5000,7 +5675,7 @@ window.__ModuleLoader__.load({
|
|
|
5000
5675
|
(0, react_jsx_runtime.jsx)("div", {
|
|
5001
5676
|
className: TrajectoryTable_module_css_default.detailTabs,
|
|
5002
5677
|
role: "tablist",
|
|
5003
|
-
"aria-label": "
|
|
5678
|
+
"aria-label": t("details.event"),
|
|
5004
5679
|
children: selectedTabs.map((tab) => (0, react_jsx_runtime.jsx)("button", {
|
|
5005
5680
|
id: `trajectory-detail-${tab.id}`,
|
|
5006
5681
|
type: "button",
|
|
@@ -5011,7 +5686,7 @@ window.__ModuleLoader__.load({
|
|
|
5011
5686
|
onClick: () => {
|
|
5012
5687
|
activateTab(tab.id);
|
|
5013
5688
|
},
|
|
5014
|
-
children: tab.
|
|
5689
|
+
children: t(tab.labelKey)
|
|
5015
5690
|
}, tab.id))
|
|
5016
5691
|
}),
|
|
5017
5692
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -5020,30 +5695,33 @@ window.__ModuleLoader__.load({
|
|
|
5020
5695
|
role: "tabpanel",
|
|
5021
5696
|
"aria-labelledby": `trajectory-detail-${activeTab}`,
|
|
5022
5697
|
children: [
|
|
5023
|
-
|
|
5698
|
+
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
5699
|
className: `${TrajectoryTable_module_css_default.overview} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5025
5700
|
"data-summary-scroll-region": "",
|
|
5026
5701
|
children: [
|
|
5027
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5702
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.status") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5028
5703
|
className: selectedRequestState === "error" ? TrajectoryTable_module_css_default.error : void 0,
|
|
5029
|
-
children: statusLabel(selectedRequestState)
|
|
5704
|
+
children: statusLabel(selectedRequestState, t)
|
|
5030
5705
|
})] }),
|
|
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
|
|
5706
|
+
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") })] }),
|
|
5707
|
+
(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 })] }),
|
|
5708
|
+
(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 })] }),
|
|
5709
|
+
(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 })] }),
|
|
5710
|
+
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 })] }),
|
|
5711
|
+
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
5712
|
className: TrajectoryTable_module_css_default.error,
|
|
5038
|
-
children: selectedRequestInfo
|
|
5713
|
+
children: requestErrorMessage(selectedRequestInfo, t)
|
|
5039
5714
|
})] }),
|
|
5040
|
-
selectedRequestInfo
|
|
5041
|
-
"
|
|
5042
|
-
|
|
5043
|
-
selectedRequestInfo.maxRetries === void 0 ?
|
|
5715
|
+
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: [
|
|
5716
|
+
t("details.scheduled"),
|
|
5717
|
+
" ",
|
|
5718
|
+
selectedRequestInfo.maxRetries === void 0 ? selectedRequestInfo.retry : t("request.retryProgress", {
|
|
5719
|
+
retry: selectedRequestInfo.retry,
|
|
5720
|
+
maximum: selectedRequestInfo.maxRetries
|
|
5721
|
+
})
|
|
5044
5722
|
] })] }),
|
|
5045
|
-
selectedRequestInfo
|
|
5046
|
-
selectedRequestResult !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5723
|
+
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) })] }),
|
|
5724
|
+
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
5725
|
className: TrajectoryTable_module_css_default.overviewParentLinks,
|
|
5048
5726
|
children: (0, react_jsx_runtime.jsxs)("button", {
|
|
5049
5727
|
type: "button",
|
|
@@ -5051,7 +5729,7 @@ window.__ModuleLoader__.load({
|
|
|
5051
5729
|
onClick: () => {
|
|
5052
5730
|
openRecordSummary(selectedRequestResult);
|
|
5053
5731
|
},
|
|
5054
|
-
children: [(0, react_jsx_runtime.jsx)("span", { children: selectedRequestInfo
|
|
5732
|
+
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
5733
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5056
5734
|
size: 11
|
|
5057
5735
|
})]
|
|
@@ -5062,84 +5740,103 @@ window.__ModuleLoader__.load({
|
|
|
5062
5740
|
className: TrajectoryTable_module_css_default.overviewSections,
|
|
5063
5741
|
children: [
|
|
5064
5742
|
selectedRequestOptions !== void 0 && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5065
|
-
label: "
|
|
5743
|
+
label: t("tab.options"),
|
|
5066
5744
|
onOpen: () => {
|
|
5067
5745
|
activateTab("options");
|
|
5068
5746
|
},
|
|
5069
5747
|
children: (0, react_jsx_runtime.jsx)(RequestOptions, {
|
|
5070
5748
|
options: selectedRequestOptions,
|
|
5071
|
-
preview: true
|
|
5749
|
+
preview: true,
|
|
5750
|
+
t
|
|
5072
5751
|
})
|
|
5073
5752
|
}),
|
|
5074
5753
|
(0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5075
|
-
label: "
|
|
5754
|
+
label: t("tab.usage"),
|
|
5076
5755
|
onOpen: () => {
|
|
5077
5756
|
activateTab("usage");
|
|
5078
5757
|
},
|
|
5079
|
-
children: (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
5758
|
+
children: (0, react_jsx_runtime.jsx)(UsageRows, {
|
|
5759
|
+
usage: selectedRequestUsage,
|
|
5760
|
+
t
|
|
5761
|
+
})
|
|
5080
5762
|
}),
|
|
5081
5763
|
(0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5082
|
-
label: "
|
|
5764
|
+
label: t("tab.timing"),
|
|
5083
5765
|
onOpen: () => {
|
|
5084
5766
|
activateTab("timing");
|
|
5085
5767
|
},
|
|
5086
5768
|
children: (0, react_jsx_runtime.jsx)(RequestTiming, {
|
|
5087
5769
|
assistant: selectedRequestAssistant,
|
|
5088
5770
|
anchor: selectedRequestAnchor,
|
|
5089
|
-
request: selectedRequestInfo
|
|
5771
|
+
request: selectedRequestInfo,
|
|
5772
|
+
t
|
|
5090
5773
|
})
|
|
5091
5774
|
})
|
|
5092
5775
|
]
|
|
5093
5776
|
})] }),
|
|
5094
|
-
|
|
5095
|
-
|
|
5777
|
+
selectedRequestInfo !== void 0 && activeTab === "options" && (0, react_jsx_runtime.jsx)(RequestOptions, {
|
|
5778
|
+
options: selectedRequestOptions,
|
|
5779
|
+
t
|
|
5780
|
+
}),
|
|
5781
|
+
selectedRequestInfo !== void 0 && activeTab === "usage" && (0, react_jsx_runtime.jsx)(RequestUsagePanel, {
|
|
5096
5782
|
usage: selectedRequestUsage,
|
|
5097
|
-
cumulative: selectedRequestCumulativeUsage
|
|
5783
|
+
cumulative: selectedRequestCumulativeUsage,
|
|
5784
|
+
t
|
|
5098
5785
|
}),
|
|
5099
|
-
|
|
5786
|
+
selectedRequestInfo !== void 0 && activeTab === "timing" && (0, react_jsx_runtime.jsx)(RequestTiming, {
|
|
5100
5787
|
assistant: selectedRequestAssistant,
|
|
5101
5788
|
anchor: selectedRequestAnchor,
|
|
5102
|
-
request: selectedRequestInfo
|
|
5789
|
+
request: selectedRequestInfo,
|
|
5790
|
+
t
|
|
5103
5791
|
}),
|
|
5104
5792
|
promptSelected && selectedPreviousPrompt !== void 0 && activeTab === "diff" && (0, react_jsx_runtime.jsx)(SystemPromptDiff, {
|
|
5105
5793
|
before: selectedPreviousPrompt,
|
|
5106
|
-
after: selectedPrompt
|
|
5794
|
+
after: selectedPrompt,
|
|
5795
|
+
t
|
|
5107
5796
|
}),
|
|
5108
5797
|
promptSelected && activeTab === "system-prompt" && (selectedPrompt.system === "" ? (0, react_jsx_runtime.jsx)("p", {
|
|
5109
5798
|
className: TrajectoryTable_module_css_default.noPayload,
|
|
5110
|
-
children: "
|
|
5799
|
+
children: t("record.systemPromptMissing")
|
|
5111
5800
|
}) : (0, react_jsx_runtime.jsx)("div", {
|
|
5112
5801
|
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, {
|
|
5802
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
5803
|
+
text: selectedPrompt.system,
|
|
5804
|
+
labels: markdownLabels(t)
|
|
5805
|
+
})
|
|
5114
5806
|
})),
|
|
5115
|
-
promptSelected && activeTab === "tools" && (0, react_jsx_runtime.jsx)(ToolCatalog, {
|
|
5807
|
+
promptSelected && activeTab === "tools" && (0, react_jsx_runtime.jsx)(ToolCatalog, {
|
|
5808
|
+
tools: selectedPrompt.tools,
|
|
5809
|
+
t
|
|
5810
|
+
}),
|
|
5116
5811
|
!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
5812
|
className: `${TrajectoryTable_module_css_default.overview} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5118
5813
|
"data-summary-scroll-region": "",
|
|
5119
5814
|
children: [
|
|
5120
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5815
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.status") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5121
5816
|
className: selectedState === "error" ? TrajectoryTable_module_css_default.error : void 0,
|
|
5122
|
-
children: statusLabel(selectedState)
|
|
5817
|
+
children: statusLabel(selectedState, t)
|
|
5123
5818
|
})] }),
|
|
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: "
|
|
5819
|
+
(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) })] }),
|
|
5820
|
+
(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
5821
|
]
|
|
5127
5822
|
}), selected.cell.outputDetail !== void 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
5128
5823
|
className: `${TrajectoryTable_module_css_default.compactedSummary} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5129
5824
|
"data-summary-scroll-region": "",
|
|
5130
5825
|
children: (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5131
5826
|
record: selected,
|
|
5827
|
+
renderImages,
|
|
5132
5828
|
rendered: true,
|
|
5133
5829
|
thinkingExpanded,
|
|
5134
5830
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5135
|
-
onOpenCall: openCallSummary
|
|
5831
|
+
onOpenCall: openCallSummary,
|
|
5832
|
+
t
|
|
5136
5833
|
})
|
|
5137
5834
|
})] }),
|
|
5138
5835
|
!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
5836
|
className: `${TrajectoryTable_module_css_default.overview} ${TrajectoryTable_module_css_default.summaryScrollRegion}`,
|
|
5140
5837
|
"data-summary-scroll-region": "",
|
|
5141
5838
|
children: [
|
|
5142
|
-
selected.cell.messageSource !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5839
|
+
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
5840
|
className: TrajectoryTable_module_css_default.overviewParentLinks,
|
|
5144
5841
|
children: (0, react_jsx_runtime.jsxs)("button", {
|
|
5145
5842
|
type: "button",
|
|
@@ -5147,13 +5844,13 @@ window.__ModuleLoader__.load({
|
|
|
5147
5844
|
onClick: () => {
|
|
5148
5845
|
activateTab("source");
|
|
5149
5846
|
},
|
|
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, {
|
|
5847
|
+
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
5848
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5152
5849
|
size: 11
|
|
5153
5850
|
})]
|
|
5154
5851
|
})
|
|
5155
5852
|
})] }),
|
|
5156
|
-
hasSelectedHierarchy && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: selectedAssistantRequestTarget !== void 0 ? "
|
|
5853
|
+
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
5854
|
className: TrajectoryTable_module_css_default.overviewParentLinks,
|
|
5158
5855
|
children: [
|
|
5159
5856
|
selectedAssistantRequestTarget !== void 0 && (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -5162,7 +5859,7 @@ window.__ModuleLoader__.load({
|
|
|
5162
5859
|
onClick: () => {
|
|
5163
5860
|
selectRequest(selectedAssistantRequestTarget);
|
|
5164
5861
|
},
|
|
5165
|
-
children: [(0, react_jsx_runtime.
|
|
5862
|
+
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
5863
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5167
5864
|
size: 11
|
|
5168
5865
|
})]
|
|
@@ -5173,7 +5870,7 @@ window.__ModuleLoader__.load({
|
|
|
5173
5870
|
onClick: () => {
|
|
5174
5871
|
openRecordSummary(selectedParentMessage);
|
|
5175
5872
|
},
|
|
5176
|
-
children: [(0, react_jsx_runtime.jsx)("span", { children: "
|
|
5873
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("details.assistantMessage") }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5177
5874
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5178
5875
|
size: 11
|
|
5179
5876
|
})]
|
|
@@ -5184,111 +5881,144 @@ window.__ModuleLoader__.load({
|
|
|
5184
5881
|
onClick: () => {
|
|
5185
5882
|
openRecordSummary(selectedParentTool);
|
|
5186
5883
|
},
|
|
5187
|
-
children: [(0, react_jsx_runtime.jsx)("span", { children: "
|
|
5884
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("details.toolCall") }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, {
|
|
5188
5885
|
className: TrajectoryTable_module_css_default.overviewHierarchyJumpIconTight,
|
|
5189
5886
|
size: 11
|
|
5190
5887
|
})]
|
|
5191
5888
|
})
|
|
5192
5889
|
]
|
|
5193
5890
|
})] }),
|
|
5194
|
-
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: "
|
|
5891
|
+
(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("details.status") }), (0, react_jsx_runtime.jsx)("dd", {
|
|
5195
5892
|
className: selectedState === "error" ? TrajectoryTable_module_css_default.error : void 0,
|
|
5196
|
-
children: statusLabel(selectedState)
|
|
5893
|
+
children: statusLabel(selectedState, t)
|
|
5197
5894
|
})] }),
|
|
5198
|
-
selected.cell.kind === "message" && (0, react_jsx_runtime.jsx)(TokenRows, {
|
|
5199
|
-
|
|
5895
|
+
selected.cell.kind === "message" && (0, react_jsx_runtime.jsx)(TokenRows, {
|
|
5896
|
+
cell: selected.cell,
|
|
5897
|
+
t
|
|
5898
|
+
}),
|
|
5899
|
+
(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
5900
|
]
|
|
5201
5901
|
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
5202
5902
|
className: TrajectoryTable_module_css_default.overviewSections,
|
|
5203
5903
|
children: [
|
|
5204
5904
|
isMarkdownRecord(selected) ? (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5205
|
-
label: "
|
|
5905
|
+
label: t("tab.preview"),
|
|
5206
5906
|
onOpen: () => {
|
|
5207
5907
|
activateTab("rendered");
|
|
5208
5908
|
},
|
|
5209
5909
|
children: (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5210
5910
|
record: selected,
|
|
5911
|
+
renderImages,
|
|
5211
5912
|
rendered: true,
|
|
5212
5913
|
preview: true,
|
|
5213
5914
|
thinkingExpanded,
|
|
5214
5915
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5215
|
-
onOpenCall: openCallSummary
|
|
5916
|
+
onOpenCall: openCallSummary,
|
|
5917
|
+
t
|
|
5216
5918
|
})
|
|
5217
5919
|
}) }) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
5218
5920
|
selected.cell.inputDetail && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5219
|
-
label: "
|
|
5921
|
+
label: t("tab.payload"),
|
|
5220
5922
|
onOpen: () => {
|
|
5221
5923
|
activateTab("input");
|
|
5222
5924
|
},
|
|
5223
5925
|
children: (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5224
5926
|
record: selected,
|
|
5225
5927
|
direction: "input",
|
|
5226
|
-
preview: true
|
|
5928
|
+
preview: true,
|
|
5929
|
+
renderImages,
|
|
5930
|
+
t
|
|
5227
5931
|
})
|
|
5228
5932
|
}),
|
|
5229
5933
|
selected.cell.outputDetail && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5230
|
-
label: "
|
|
5934
|
+
label: t("tab.result"),
|
|
5231
5935
|
onOpen: () => {
|
|
5232
5936
|
activateTab("output");
|
|
5233
5937
|
},
|
|
5234
5938
|
children: (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5235
5939
|
record: selected,
|
|
5236
5940
|
direction: "output",
|
|
5237
|
-
preview: true
|
|
5941
|
+
preview: true,
|
|
5942
|
+
renderImages,
|
|
5943
|
+
t
|
|
5238
5944
|
})
|
|
5239
5945
|
}),
|
|
5240
5946
|
(0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5241
|
-
label: "
|
|
5947
|
+
label: t("tab.schema"),
|
|
5242
5948
|
onOpen: () => {
|
|
5243
5949
|
activateTab("schema");
|
|
5244
5950
|
},
|
|
5245
5951
|
children: (0, react_jsx_runtime.jsx)(RecordSchema, {
|
|
5246
5952
|
record: selected,
|
|
5247
|
-
preview: true
|
|
5953
|
+
preview: true,
|
|
5954
|
+
t
|
|
5248
5955
|
})
|
|
5249
5956
|
})
|
|
5250
5957
|
] }),
|
|
5251
5958
|
selectedAssistantRequestTarget !== void 0 && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5252
|
-
label: "
|
|
5959
|
+
label: t("timing.request"),
|
|
5253
5960
|
onOpen: () => {
|
|
5254
5961
|
selectRequest(selectedAssistantRequestTarget, "timing");
|
|
5255
5962
|
},
|
|
5256
|
-
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
5963
|
+
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
5964
|
+
record: selected,
|
|
5965
|
+
t
|
|
5966
|
+
})
|
|
5257
5967
|
}),
|
|
5258
5968
|
(selected.cell.kind === "tool" || selected.cell.kind === "subtool") && (0, react_jsx_runtime.jsx)(OverviewSection, {
|
|
5259
|
-
label: "
|
|
5969
|
+
label: t("tab.timing"),
|
|
5260
5970
|
onOpen: () => {
|
|
5261
5971
|
activateTab("timing");
|
|
5262
5972
|
},
|
|
5263
|
-
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
5973
|
+
children: (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
5974
|
+
record: selected,
|
|
5975
|
+
t
|
|
5976
|
+
})
|
|
5264
5977
|
})
|
|
5265
5978
|
]
|
|
5266
5979
|
})] }),
|
|
5267
5980
|
!promptSelected && selected !== void 0 && activeTab === "rendered" && (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5268
5981
|
record: selected,
|
|
5982
|
+
renderImages,
|
|
5269
5983
|
rendered: true,
|
|
5270
5984
|
thinkingExpanded,
|
|
5271
5985
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5272
|
-
onOpenCall: openCallSummary
|
|
5986
|
+
onOpenCall: openCallSummary,
|
|
5987
|
+
t
|
|
5273
5988
|
}),
|
|
5274
5989
|
!promptSelected && selected !== void 0 && activeTab === "raw" && (0, react_jsx_runtime.jsx)(MarkdownRecordContent, {
|
|
5275
5990
|
record: selected,
|
|
5991
|
+
renderImages,
|
|
5276
5992
|
rendered: false,
|
|
5277
5993
|
thinkingExpanded,
|
|
5278
5994
|
onThinkingExpandedChange: setThinkingExpanded,
|
|
5279
|
-
onOpenCall: openCallSummary
|
|
5995
|
+
onOpenCall: openCallSummary,
|
|
5996
|
+
t
|
|
5997
|
+
}),
|
|
5998
|
+
!promptSelected && selected !== void 0 && activeTab === "source" && (0, react_jsx_runtime.jsx)(MessageSource, {
|
|
5999
|
+
record: selected,
|
|
6000
|
+
t
|
|
5280
6001
|
}),
|
|
5281
|
-
!promptSelected && selected !== void 0 && activeTab === "source" && (0, react_jsx_runtime.jsx)(MessageSource, { record: selected }),
|
|
5282
6002
|
!promptSelected && selected !== void 0 && activeTab === "input" && (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5283
6003
|
record: selected,
|
|
5284
|
-
direction: "input"
|
|
6004
|
+
direction: "input",
|
|
6005
|
+
renderImages,
|
|
6006
|
+
t
|
|
5285
6007
|
}),
|
|
5286
6008
|
!promptSelected && selected !== void 0 && activeTab === "output" && (0, react_jsx_runtime.jsx)(RecordPayload, {
|
|
5287
6009
|
record: selected,
|
|
5288
|
-
direction: "output"
|
|
6010
|
+
direction: "output",
|
|
6011
|
+
renderImages,
|
|
6012
|
+
t
|
|
5289
6013
|
}),
|
|
5290
|
-
!promptSelected && selected !== void 0 && activeTab === "schema" && (0, react_jsx_runtime.jsx)(RecordSchema, {
|
|
5291
|
-
|
|
6014
|
+
!promptSelected && selected !== void 0 && activeTab === "schema" && (0, react_jsx_runtime.jsx)(RecordSchema, {
|
|
6015
|
+
record: selected,
|
|
6016
|
+
t
|
|
6017
|
+
}),
|
|
6018
|
+
!promptSelected && selected !== void 0 && activeTab === "timing" && (0, react_jsx_runtime.jsx)(RecordTiming, {
|
|
6019
|
+
record: selected,
|
|
6020
|
+
t
|
|
6021
|
+
})
|
|
5292
6022
|
]
|
|
5293
6023
|
})
|
|
5294
6024
|
]
|
|
@@ -5427,10 +6157,11 @@ window.__ModuleLoader__.load({
|
|
|
5427
6157
|
/**
|
|
5428
6158
|
* Format a timeline duration as an integer-millisecond label.
|
|
5429
6159
|
* @param milliseconds - Non-negative duration in milliseconds.
|
|
6160
|
+
* @param t - Trajectory locale translator.
|
|
5430
6161
|
* @returns Millisecond label with thousands separators.
|
|
5431
6162
|
*/
|
|
5432
|
-
function formatTimelineOffset(milliseconds) {
|
|
5433
|
-
return formatDurationMillis(milliseconds);
|
|
6163
|
+
function formatTimelineOffset(milliseconds, t) {
|
|
6164
|
+
return formatDurationMillis(milliseconds, t);
|
|
5434
6165
|
}
|
|
5435
6166
|
function laneFor(kind) {
|
|
5436
6167
|
if (kind === "tool" || kind === "subtool") return 2;
|
|
@@ -5601,15 +6332,15 @@ window.__ModuleLoader__.load({
|
|
|
5601
6332
|
...assistantTimingDetail(cell.assistantMetrics)
|
|
5602
6333
|
};
|
|
5603
6334
|
}
|
|
5604
|
-
function timelineKindLabel(kind) {
|
|
6335
|
+
function timelineKindLabel(kind, t) {
|
|
5605
6336
|
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 "
|
|
6337
|
+
case "system": return t("kind.system");
|
|
6338
|
+
case "user": return t("kind.user");
|
|
6339
|
+
case "context": return t("kind.context");
|
|
6340
|
+
case "compacted": return t("kind.compacted");
|
|
6341
|
+
case "message": return t("kind.assistant");
|
|
6342
|
+
case "tool": return t("kind.tool");
|
|
6343
|
+
case "subtool": return t("kind.subtool");
|
|
5613
6344
|
}
|
|
5614
6345
|
}
|
|
5615
6346
|
function formatRecordedTime(timestamp) {
|
|
@@ -5620,14 +6351,17 @@ window.__ModuleLoader__.load({
|
|
|
5620
6351
|
fractionalSecondDigits: 3
|
|
5621
6352
|
});
|
|
5622
6353
|
}
|
|
5623
|
-
function timelineTooltipLabel(kind, detail) {
|
|
5624
|
-
const heading = timelineKindLabel(kind);
|
|
6354
|
+
function timelineTooltipLabel(kind, detail, t) {
|
|
6355
|
+
const heading = timelineKindLabel(kind, t);
|
|
5625
6356
|
if (detail === void 0) return heading;
|
|
5626
|
-
const duration = detail.durationMs === void 0 ? null :
|
|
6357
|
+
const duration = detail.durationMs === void 0 ? null : t("timeline.total", { duration: formatTimelineOffset(detail.durationMs, t) });
|
|
5627
6358
|
return [
|
|
5628
6359
|
heading,
|
|
5629
|
-
detail.startedAt === void 0 ? null : detail.durationMs === void 0 ?
|
|
5630
|
-
[duration, detail.ttftMs === void 0 || detail.decodingMs === void 0 ? null :
|
|
6360
|
+
detail.startedAt === void 0 ? null : detail.durationMs === void 0 ? t("timeline.started", { time: formatRecordedTime(detail.startedAt) }) : `${formatRecordedTime(detail.startedAt)} → ${formatRecordedTime(detail.startedAt + detail.durationMs)}`,
|
|
6361
|
+
[duration, detail.ttftMs === void 0 || detail.decodingMs === void 0 ? null : t("timeline.ttftDecoding", {
|
|
6362
|
+
ttft: formatTimelineOffset(detail.ttftMs, t),
|
|
6363
|
+
decoding: formatTimelineOffset(detail.decodingMs, t)
|
|
6364
|
+
})].filter((value) => value !== null).join(" · ")
|
|
5631
6365
|
].filter((value) => value !== null && value !== "").join("\n");
|
|
5632
6366
|
}
|
|
5633
6367
|
function orderedRange(left, right) {
|
|
@@ -5657,20 +6391,20 @@ window.__ModuleLoader__.load({
|
|
|
5657
6391
|
end: (bounded.end - start) / duration
|
|
5658
6392
|
};
|
|
5659
6393
|
}
|
|
5660
|
-
function LaneLabels() {
|
|
6394
|
+
function LaneLabels({ t }) {
|
|
5661
6395
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
5662
6396
|
className: TrajectoryTimeline_module_css_default.labels,
|
|
5663
6397
|
"aria-hidden": "true",
|
|
5664
6398
|
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: "
|
|
6399
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("column.input") }),
|
|
6400
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("column.model") }),
|
|
6401
|
+
(0, react_jsx_runtime.jsx)("span", { children: t("column.tools") })
|
|
5668
6402
|
]
|
|
5669
6403
|
});
|
|
5670
6404
|
}
|
|
5671
|
-
function EarlierHistoryBoundary({ loading, onHover, onLoad }) {
|
|
6405
|
+
function EarlierHistoryBoundary({ loading, onHover, onLoad, t }) {
|
|
5672
6406
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
5673
|
-
label: loading ? "
|
|
6407
|
+
label: loading ? t("history.loadingEarlier") : t("history.clickToLoadEarlier"),
|
|
5674
6408
|
side: "right",
|
|
5675
6409
|
delayMs: TIMELINE_TOOLTIP_DELAY_MS,
|
|
5676
6410
|
children: (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -5678,7 +6412,7 @@ window.__ModuleLoader__.load({
|
|
|
5678
6412
|
className: TrajectoryTimeline_module_css_default.earlierHistory,
|
|
5679
6413
|
"data-earlier-history": true,
|
|
5680
6414
|
"data-loading": loading || void 0,
|
|
5681
|
-
"aria-label": loading ? "
|
|
6415
|
+
"aria-label": loading ? t("history.loadingEarlierAria") : t("history.loadEarlier"),
|
|
5682
6416
|
"aria-disabled": loading || onLoad === void 0,
|
|
5683
6417
|
onClick: onLoad,
|
|
5684
6418
|
onPointerEnter: (event) => {
|
|
@@ -5696,7 +6430,7 @@ window.__ModuleLoader__.load({
|
|
|
5696
6430
|
});
|
|
5697
6431
|
}
|
|
5698
6432
|
/** 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 }) {
|
|
6433
|
+
const TrajectoryTimeline = (0, react.memo)(function TrajectoryTimeline({ t, turns, mode, range, hasEarlierRecords = false, onLoadEarlier, selectedIndex = null, searchMatchIndexes = null, onRangeChange, onRecordSelect, onRecordFocus }) {
|
|
5700
6434
|
const model = (0, react.useMemo)(() => deriveTrajectoryTimeline(turns, mode), [mode, turns]);
|
|
5701
6435
|
const detailByIndex = (0, react.useMemo)(() => new Map(turns.flatMap((turn) => turn.groups.flatMap((group) => group.cells.map((cell) => [cell.index, timelineRecordDetail(cell)])))), [turns]);
|
|
5702
6436
|
const dragRef = (0, react.useRef)(null);
|
|
@@ -5794,20 +6528,21 @@ window.__ModuleLoader__.load({
|
|
|
5794
6528
|
if (model === null) return (0, react_jsx_runtime.jsx)("section", {
|
|
5795
6529
|
ref: rootRef,
|
|
5796
6530
|
className: TrajectoryTimeline_module_css_default.root,
|
|
5797
|
-
"aria-label": "
|
|
6531
|
+
"aria-label": t("timeline.aria"),
|
|
5798
6532
|
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
5799
6533
|
className: TrajectoryTimeline_module_css_default.plot,
|
|
5800
|
-
children: [(0, react_jsx_runtime.jsx)(LaneLabels, {}), (0, react_jsx_runtime.jsxs)("div", {
|
|
6534
|
+
children: [(0, react_jsx_runtime.jsx)(LaneLabels, { t }), (0, react_jsx_runtime.jsxs)("div", {
|
|
5801
6535
|
className: TrajectoryTimeline_module_css_default.track,
|
|
5802
6536
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
5803
6537
|
className: TrajectoryTimeline_module_css_default.empty,
|
|
5804
|
-
children: "
|
|
6538
|
+
children: t("timeline.noTimingData")
|
|
5805
6539
|
}), hasEarlierRecords && (0, react_jsx_runtime.jsx)(EarlierHistoryBoundary, {
|
|
5806
6540
|
loading: loadingEarlier,
|
|
5807
6541
|
onHover: () => {
|
|
5808
6542
|
setHover(null);
|
|
5809
6543
|
},
|
|
5810
|
-
onLoad: loadEarlier
|
|
6544
|
+
onLoad: loadEarlier,
|
|
6545
|
+
t
|
|
5811
6546
|
})]
|
|
5812
6547
|
})]
|
|
5813
6548
|
})
|
|
@@ -5954,14 +6689,14 @@ window.__ModuleLoader__.load({
|
|
|
5954
6689
|
return (0, react_jsx_runtime.jsx)("section", {
|
|
5955
6690
|
ref: rootRef,
|
|
5956
6691
|
className: TrajectoryTimeline_module_css_default.root,
|
|
5957
|
-
"aria-label": "
|
|
6692
|
+
"aria-label": t("timeline.aria"),
|
|
5958
6693
|
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
5959
6694
|
className: TrajectoryTimeline_module_css_default.plot,
|
|
5960
|
-
children: [(0, react_jsx_runtime.jsx)(LaneLabels, {}), (0, react_jsx_runtime.jsxs)("div", {
|
|
6695
|
+
children: [(0, react_jsx_runtime.jsx)(LaneLabels, { t }), (0, react_jsx_runtime.jsxs)("div", {
|
|
5961
6696
|
ref: trackRef,
|
|
5962
6697
|
className: TrajectoryTimeline_module_css_default.track,
|
|
5963
6698
|
"data-panning": panning || void 0,
|
|
5964
|
-
"aria-label": "
|
|
6699
|
+
"aria-label": t("timeline.overviewAria"),
|
|
5965
6700
|
tabIndex: 0,
|
|
5966
6701
|
onKeyDown,
|
|
5967
6702
|
onPointerDown,
|
|
@@ -5984,7 +6719,8 @@ window.__ModuleLoader__.load({
|
|
|
5984
6719
|
onHover: () => {
|
|
5985
6720
|
setHover(null);
|
|
5986
6721
|
},
|
|
5987
|
-
onLoad: loadEarlier
|
|
6722
|
+
onLoad: loadEarlier,
|
|
6723
|
+
t
|
|
5988
6724
|
}),
|
|
5989
6725
|
hover !== null && hover.recordIndex === null && draft === null && (0, react_jsx_runtime.jsx)("div", {
|
|
5990
6726
|
className: TrajectoryTimeline_module_css_default.hoverLine,
|
|
@@ -6033,7 +6769,7 @@ window.__ModuleLoader__.load({
|
|
|
6033
6769
|
const decodingMs = detail?.decodingMs;
|
|
6034
6770
|
const ttftFraction = ttftMs === void 0 || decodingMs === void 0 || ttftMs + decodingMs <= 0 ? null : ttftMs / (ttftMs + decodingMs);
|
|
6035
6771
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
6036
|
-
label: () => timelineTooltipLabel(span.kind, detail),
|
|
6772
|
+
label: () => timelineTooltipLabel(span.kind, detail, t),
|
|
6037
6773
|
side: "bottom",
|
|
6038
6774
|
delayMs: TIMELINE_TOOLTIP_DELAY_MS,
|
|
6039
6775
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6069,10 +6805,12 @@ window.__ModuleLoader__.load({
|
|
|
6069
6805
|
function layoutEntryOrder(entry) {
|
|
6070
6806
|
return entry.kind === "system" && entry.change.kind === "initial" ? Number.NEGATIVE_INFINITY : entry.seq;
|
|
6071
6807
|
}
|
|
6072
|
-
function inputCellDetail(node) {
|
|
6073
|
-
const
|
|
6808
|
+
function inputCellDetail(node, t) {
|
|
6809
|
+
const preview = previewContent(node.content);
|
|
6810
|
+
const previewMarkdown = preview === "" ? void 0 : preview;
|
|
6811
|
+
const images = imageBlockCount(node.content);
|
|
6074
6812
|
return {
|
|
6075
|
-
text: "",
|
|
6813
|
+
text: previewMarkdown === void 0 && images > 0 ? t("layout.imageOnly", { count: images }) : "",
|
|
6076
6814
|
...previewMarkdown === void 0 ? {} : { previewMarkdown },
|
|
6077
6815
|
sourceSeq: node.seq,
|
|
6078
6816
|
messageSource: node.source,
|
|
@@ -6085,9 +6823,10 @@ window.__ModuleLoader__.load({
|
|
|
6085
6823
|
/**
|
|
6086
6824
|
* Fold a snapshot into turn → Message/Step groups with expanded cells.
|
|
6087
6825
|
* @param input - nodes plus in-flight partial/runningCalls.
|
|
6826
|
+
* @param t - Trajectory locale translator.
|
|
6088
6827
|
* @returns turns ordered by first appearance.
|
|
6089
6828
|
*/
|
|
6090
|
-
function deriveTrajectoryLayout(input) {
|
|
6829
|
+
function deriveTrajectoryLayout(input, t) {
|
|
6091
6830
|
const { nodes, eventLocations, partial, runningCalls, requests = [], callSchemas } = input;
|
|
6092
6831
|
const resultByCall = indexResults(nodes);
|
|
6093
6832
|
const callById = new Map(resultByCall);
|
|
@@ -6119,19 +6858,19 @@ window.__ModuleLoader__.load({
|
|
|
6119
6858
|
const pushMessage = (turn, laid) => {
|
|
6120
6859
|
const groups = bucket(turn).groups;
|
|
6121
6860
|
const last = groups.at(-1);
|
|
6122
|
-
if (last?.title === "
|
|
6861
|
+
if (last?.title === t("group.message")) {
|
|
6123
6862
|
last.laid.push(laid);
|
|
6124
6863
|
return;
|
|
6125
6864
|
}
|
|
6126
6865
|
groups.push({
|
|
6127
|
-
title: "
|
|
6866
|
+
title: t("group.message"),
|
|
6128
6867
|
laid: [laid]
|
|
6129
6868
|
});
|
|
6130
6869
|
};
|
|
6131
6870
|
const pushStep = (turn, step, laid) => {
|
|
6132
6871
|
if (laid.length === 0) return;
|
|
6133
6872
|
const groups = bucket(turn).groups;
|
|
6134
|
-
const title =
|
|
6873
|
+
const title = t("group.step", { step });
|
|
6135
6874
|
const existing = groups.find((group) => group.title === title);
|
|
6136
6875
|
if (existing !== void 0) {
|
|
6137
6876
|
existing.laid.push(...laid);
|
|
@@ -6145,7 +6884,7 @@ window.__ModuleLoader__.load({
|
|
|
6145
6884
|
const pushStepInput = (turn, step, laid) => {
|
|
6146
6885
|
if (laid.length === 0) return;
|
|
6147
6886
|
const groups = bucket(turn).groups;
|
|
6148
|
-
const title =
|
|
6887
|
+
const title = t("group.step", { step });
|
|
6149
6888
|
const existing = groups.find((group) => group.title === title);
|
|
6150
6889
|
if (existing === void 0) {
|
|
6151
6890
|
groups.push({
|
|
@@ -6212,7 +6951,7 @@ window.__ModuleLoader__.load({
|
|
|
6212
6951
|
cell: {
|
|
6213
6952
|
index: ++index,
|
|
6214
6953
|
kind: "system",
|
|
6215
|
-
text: promptChangeLabel(change),
|
|
6954
|
+
text: promptChangeLabel(change, t),
|
|
6216
6955
|
sourceSeq: change.seq,
|
|
6217
6956
|
...request.prompt === void 0 ? {} : { promptDetail: request.prompt },
|
|
6218
6957
|
...change.previous === void 0 ? {} : { previousPromptDetail: change.previous },
|
|
@@ -6230,7 +6969,7 @@ window.__ModuleLoader__.load({
|
|
|
6230
6969
|
const cell = {
|
|
6231
6970
|
index: ++index,
|
|
6232
6971
|
kind: "compacted",
|
|
6233
|
-
text: request.status === "running" ? "
|
|
6972
|
+
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
6973
|
...request.status === "complete" && request.summary !== void 0 ? previewContentProperty(request.summary) : {},
|
|
6235
6974
|
sourceSeq: request.startSeq,
|
|
6236
6975
|
...request.summary === void 0 ? {} : {
|
|
@@ -6245,7 +6984,7 @@ window.__ModuleLoader__.load({
|
|
|
6245
6984
|
};
|
|
6246
6985
|
attachUsage(cell, request.usage);
|
|
6247
6986
|
const compaction = { groups: [{
|
|
6248
|
-
title:
|
|
6987
|
+
title: t("group.compaction", { seq: request.startSeq }),
|
|
6249
6988
|
laid: [{
|
|
6250
6989
|
absTime: finiteTime(request.startedAt),
|
|
6251
6990
|
cell
|
|
@@ -6263,7 +7002,7 @@ window.__ModuleLoader__.load({
|
|
|
6263
7002
|
cell: {
|
|
6264
7003
|
index: ++index,
|
|
6265
7004
|
kind: "user",
|
|
6266
|
-
...inputCellDetail(node),
|
|
7005
|
+
...inputCellDetail(node, t),
|
|
6267
7006
|
opensTurn: true
|
|
6268
7007
|
}
|
|
6269
7008
|
});
|
|
@@ -6277,7 +7016,7 @@ window.__ModuleLoader__.load({
|
|
|
6277
7016
|
cell: {
|
|
6278
7017
|
index: ++index,
|
|
6279
7018
|
kind: "user",
|
|
6280
|
-
...inputCellDetail(node)
|
|
7019
|
+
...inputCellDetail(node, t)
|
|
6281
7020
|
}
|
|
6282
7021
|
};
|
|
6283
7022
|
if (placement.step === void 0) pushMessage(placement.turn, laid);
|
|
@@ -6286,7 +7025,7 @@ window.__ModuleLoader__.load({
|
|
|
6286
7025
|
continue;
|
|
6287
7026
|
}
|
|
6288
7027
|
if (node.kind === "assistant") {
|
|
6289
|
-
const laidList = withSubCalls(expandAssistant(node, index + 1, prevAbsTime, resultByCall, callStartById, callById));
|
|
7028
|
+
const laidList = withSubCalls(expandAssistant(node, index + 1, prevAbsTime, resultByCall, callStartById, callById, t), t);
|
|
6290
7029
|
if (node.step > 0) pushStep(node.turn, node.step, laidList);
|
|
6291
7030
|
else for (const laid of laidList) pushMessage(node.turn, laid);
|
|
6292
7031
|
const last = laidList[laidList.length - 1];
|
|
@@ -6301,7 +7040,7 @@ window.__ModuleLoader__.load({
|
|
|
6301
7040
|
cell: {
|
|
6302
7041
|
index: ++index,
|
|
6303
7042
|
kind: "context",
|
|
6304
|
-
...inputCellDetail(node)
|
|
7043
|
+
...inputCellDetail(node, t)
|
|
6305
7044
|
}
|
|
6306
7045
|
});
|
|
6307
7046
|
prevAbsTime = finiteTime(node.time) ?? prevAbsTime;
|
|
@@ -6314,7 +7053,7 @@ window.__ModuleLoader__.load({
|
|
|
6314
7053
|
if (node.kind === "tool-result") {
|
|
6315
7054
|
if (!emittedCallIds.has(node.callId)) {
|
|
6316
7055
|
const toolName = node.call?.name;
|
|
6317
|
-
const resultPreview = summarizeResult(node);
|
|
7056
|
+
const resultPreview = summarizeResult(node, t);
|
|
6318
7057
|
const laidList = [{
|
|
6319
7058
|
absTime: finiteTime(node.callTime ?? node.time),
|
|
6320
7059
|
...toolName !== void 0 ? { toolName } : {},
|
|
@@ -6326,7 +7065,7 @@ window.__ModuleLoader__.load({
|
|
|
6326
7065
|
sourceSeq: node.seq,
|
|
6327
7066
|
...node.call !== null ? summarizeCall(node.call.name, node.call.argsRaw) : resultAsText(resultPreview),
|
|
6328
7067
|
...node.call !== null ? { inputDetail: node.call.argsRaw } : {},
|
|
6329
|
-
outputDetail: detailResult(node),
|
|
7068
|
+
outputDetail: detailResult(node, t),
|
|
6330
7069
|
outputBlocks: node.content.map((block) => sourceBlock(block)),
|
|
6331
7070
|
...resultPreview,
|
|
6332
7071
|
callId: node.callId,
|
|
@@ -6335,7 +7074,7 @@ window.__ModuleLoader__.load({
|
|
|
6335
7074
|
startedAt: finiteTime(node.callTime)
|
|
6336
7075
|
}
|
|
6337
7076
|
}];
|
|
6338
|
-
for (const laid of expandSubCalls(node.subCalls, index)) {
|
|
7077
|
+
for (const laid of expandSubCalls(node.subCalls, index, t)) {
|
|
6339
7078
|
laidList.push(laid);
|
|
6340
7079
|
index = laid.cell.index;
|
|
6341
7080
|
}
|
|
@@ -6352,7 +7091,7 @@ window.__ModuleLoader__.load({
|
|
|
6352
7091
|
turn: partial.turn,
|
|
6353
7092
|
step: partial.step,
|
|
6354
7093
|
blocks: partial.blocks
|
|
6355
|
-
}, index + 1, prevAbsTime, resultByCall, callStartById, callById, { streaming: true }));
|
|
7094
|
+
}, index + 1, prevAbsTime, resultByCall, callStartById, callById, t, { streaming: true }), t);
|
|
6356
7095
|
if (partial.step > 0) pushStep(partial.turn, partial.step, laidList);
|
|
6357
7096
|
else for (const laid of laidList) pushMessage(partial.turn, laid);
|
|
6358
7097
|
const last = laidList[laidList.length - 1];
|
|
@@ -6376,7 +7115,7 @@ window.__ModuleLoader__.load({
|
|
|
6376
7115
|
startedAt: finiteTime(call.time)
|
|
6377
7116
|
}
|
|
6378
7117
|
}];
|
|
6379
|
-
for (const laid of expandSubCalls(call.subCalls, index)) {
|
|
7118
|
+
for (const laid of expandSubCalls(call.subCalls, index, t)) {
|
|
6380
7119
|
laidList.push(laid);
|
|
6381
7120
|
index = laid.cell.index;
|
|
6382
7121
|
}
|
|
@@ -6392,22 +7131,23 @@ window.__ModuleLoader__.load({
|
|
|
6392
7131
|
turns.set(1, first);
|
|
6393
7132
|
}
|
|
6394
7133
|
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));
|
|
7134
|
+
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
7135
|
}
|
|
6397
7136
|
/**
|
|
6398
7137
|
* Append the changing in-flight assistant cells to a stable finalized layout.
|
|
6399
7138
|
* @param turns - Finalized layout derived with an empty-block partial anchor.
|
|
6400
7139
|
* @param partial - Current in-flight assistant projection.
|
|
6401
7140
|
* @param lastIndex - Highest cell index in the finalized layout.
|
|
7141
|
+
* @param t - Trajectory locale translator.
|
|
6402
7142
|
* @returns The original layout without a partial, otherwise a layout sharing every unaffected turn.
|
|
6403
7143
|
*/
|
|
6404
|
-
function appendTrajectoryPartialLayout(turns, partial, lastIndex) {
|
|
7144
|
+
function appendTrajectoryPartialLayout(turns, partial, lastIndex, t) {
|
|
6405
7145
|
if (partial === null) return turns;
|
|
6406
7146
|
const partialTurn = deriveTrajectoryLayout({
|
|
6407
7147
|
nodes: [],
|
|
6408
7148
|
partial,
|
|
6409
7149
|
runningCalls: []
|
|
6410
|
-
}).at(0);
|
|
7150
|
+
}, t).at(0);
|
|
6411
7151
|
if (partialTurn === void 0) return turns;
|
|
6412
7152
|
const streamed = {
|
|
6413
7153
|
...partialTurn,
|
|
@@ -6453,11 +7193,11 @@ window.__ModuleLoader__.load({
|
|
|
6453
7193
|
if (schema === void 0) return;
|
|
6454
7194
|
laid.cell.schemaDetail = JSON.stringify(schema, null, 2);
|
|
6455
7195
|
}
|
|
6456
|
-
function toTurnModel(turn, entry) {
|
|
7196
|
+
function toTurnModel(turn, entry, t) {
|
|
6457
7197
|
return {
|
|
6458
7198
|
turn,
|
|
6459
7199
|
groups: entry.groups.map(({ title, laid }) => {
|
|
6460
|
-
const description = groupDescription(laid);
|
|
7200
|
+
const description = groupDescription(laid, t);
|
|
6461
7201
|
return {
|
|
6462
7202
|
title,
|
|
6463
7203
|
...description !== void 0 ? { description } : {},
|
|
@@ -6471,7 +7211,7 @@ window.__ModuleLoader__.load({
|
|
|
6471
7211
|
return Math.min(...turn.groups.flatMap((group) => group.cells.map((cell) => cell.index)), Number.POSITIVE_INFINITY);
|
|
6472
7212
|
}
|
|
6473
7213
|
/** Wall-span duration + tool histogram, e.g. `1.5 s bash×6`. */
|
|
6474
|
-
function groupDescription(laid) {
|
|
7214
|
+
function groupDescription(laid, t) {
|
|
6475
7215
|
const parts = [];
|
|
6476
7216
|
const times = [];
|
|
6477
7217
|
for (const l of laid) {
|
|
@@ -6480,11 +7220,11 @@ window.__ModuleLoader__.load({
|
|
|
6480
7220
|
if (l.cell.kind === "tool" && l.cell.timeSeconds !== null && Number.isFinite(l.cell.timeSeconds)) times.push(l.absTime + l.cell.timeSeconds * 1e3);
|
|
6481
7221
|
}
|
|
6482
7222
|
if (times.length >= 2) {
|
|
6483
|
-
const span = formatGroupDuration((Math.max(...times) - Math.min(...times)) / 1e3);
|
|
7223
|
+
const span = formatGroupDuration((Math.max(...times) - Math.min(...times)) / 1e3, t);
|
|
6484
7224
|
if (span !== void 0) parts.push(span);
|
|
6485
7225
|
} else if (times.length === 1) {
|
|
6486
7226
|
const own = laid.find((l) => l.absTime === times[0])?.cell.timeSeconds;
|
|
6487
|
-
const span = own !== null && own !== void 0 ? formatGroupDuration(own) : void 0;
|
|
7227
|
+
const span = own !== null && own !== void 0 ? formatGroupDuration(own, t) : void 0;
|
|
6488
7228
|
if (span !== void 0) parts.push(span);
|
|
6489
7229
|
}
|
|
6490
7230
|
const tools = /* @__PURE__ */ new Map();
|
|
@@ -6495,9 +7235,9 @@ window.__ModuleLoader__.load({
|
|
|
6495
7235
|
for (const [name, count] of tools) parts.push(count > 1 ? `${name}×${count}` : name);
|
|
6496
7236
|
return parts.length === 0 ? void 0 : parts.join(" ");
|
|
6497
7237
|
}
|
|
6498
|
-
function formatGroupDuration(seconds) {
|
|
7238
|
+
function formatGroupDuration(seconds, t) {
|
|
6499
7239
|
if (!Number.isFinite(seconds)) return void 0;
|
|
6500
|
-
return formatElapsedSeconds(seconds);
|
|
7240
|
+
return formatElapsedSeconds(seconds, t);
|
|
6501
7241
|
}
|
|
6502
7242
|
/** Own-duration seconds from two epoch-ms stamps; null when either is unusable. */
|
|
6503
7243
|
function durationSeconds(later, earlier) {
|
|
@@ -6508,7 +7248,7 @@ window.__ModuleLoader__.load({
|
|
|
6508
7248
|
function finiteTime(time) {
|
|
6509
7249
|
return typeof time === "number" && Number.isFinite(time) ? time : null;
|
|
6510
7250
|
}
|
|
6511
|
-
function expandAssistant(node, startIndex, prevAbsTime, results, callStarts, calls, opts) {
|
|
7251
|
+
function expandAssistant(node, startIndex, prevAbsTime, results, callStarts, calls, t, opts) {
|
|
6512
7252
|
if (opts?.streaming === true && node.blocks.length === 0) return [];
|
|
6513
7253
|
const out = [];
|
|
6514
7254
|
let index = startIndex - 1;
|
|
@@ -6524,7 +7264,7 @@ window.__ModuleLoader__.load({
|
|
|
6524
7264
|
recordId: `assistant\u0000${node.turn}\u0000${node.step}`,
|
|
6525
7265
|
kind: "message",
|
|
6526
7266
|
sourceSeq: node.seq,
|
|
6527
|
-
text: messageText !== "" || thinkingText !== "" ? "" : summarizeAssistantActivity(node.blocks),
|
|
7267
|
+
text: messageText !== "" || thinkingText !== "" ? "" : summarizeAssistantActivity(node.blocks, t),
|
|
6528
7268
|
...messageText !== "" ? { previewMarkdown: messageText } : thinkingText !== "" ? { previewMarkdown: thinkingText } : {},
|
|
6529
7269
|
...messageText !== "" ? { outputDetail: messageText } : {},
|
|
6530
7270
|
...thinkingText !== "" ? { thinkingDetail: thinkingText } : {},
|
|
@@ -6551,7 +7291,7 @@ window.__ModuleLoader__.load({
|
|
|
6551
7291
|
const toolDuration = streaming || result === void 0 ? null : durationSeconds(result.time, result.callTime);
|
|
6552
7292
|
const callAbs = finiteTime(callStarts.get(block.callId));
|
|
6553
7293
|
const call = calls.get(block.callId);
|
|
6554
|
-
const resultPreview = result === void 0 ? void 0 : summarizeResult(result);
|
|
7294
|
+
const resultPreview = result === void 0 ? void 0 : summarizeResult(result, t);
|
|
6555
7295
|
out.push({
|
|
6556
7296
|
absTime: callAbs,
|
|
6557
7297
|
toolName: block.name,
|
|
@@ -6564,7 +7304,7 @@ window.__ModuleLoader__.load({
|
|
|
6564
7304
|
inputDetail: block.argsRaw,
|
|
6565
7305
|
callId: block.callId,
|
|
6566
7306
|
...result !== void 0 ? {
|
|
6567
|
-
outputDetail: detailResult(result),
|
|
7307
|
+
outputDetail: detailResult(result, t),
|
|
6568
7308
|
outputBlocks: result.content.map((block) => sourceBlock(block)),
|
|
6569
7309
|
...resultPreview,
|
|
6570
7310
|
isError: result.isError
|
|
@@ -6576,20 +7316,22 @@ window.__ModuleLoader__.load({
|
|
|
6576
7316
|
}
|
|
6577
7317
|
return out;
|
|
6578
7318
|
}
|
|
6579
|
-
function summarizeAssistantActivity(blocks) {
|
|
7319
|
+
function summarizeAssistantActivity(blocks, t) {
|
|
6580
7320
|
const tools = /* @__PURE__ */ new Map();
|
|
6581
7321
|
for (const block of blocks) {
|
|
6582
7322
|
if (block.kind !== "tool-call") continue;
|
|
6583
7323
|
tools.set(block.name, (tools.get(block.name) ?? 0) + 1);
|
|
6584
7324
|
}
|
|
6585
|
-
if (tools.size > 0) return "
|
|
7325
|
+
if (tools.size > 0) return t("layout.toolCallOnly");
|
|
7326
|
+
const images = blocks.filter((block) => block.kind === "image").length;
|
|
7327
|
+
if (images > 0) return t("layout.imageOnly", { count: images });
|
|
6586
7328
|
return "";
|
|
6587
7329
|
}
|
|
6588
|
-
function promptChangeLabel(change) {
|
|
6589
|
-
if (change.kind === "initial") return "
|
|
6590
|
-
if (change.kind === "system") return "
|
|
6591
|
-
if (change.kind === "tools") return "
|
|
6592
|
-
return "
|
|
7330
|
+
function promptChangeLabel(change, t) {
|
|
7331
|
+
if (change.kind === "initial") return t("layout.initialSystemPrompt");
|
|
7332
|
+
if (change.kind === "system") return t("layout.systemPromptUpdated");
|
|
7333
|
+
if (change.kind === "tools") return t("layout.toolsUpdated");
|
|
7334
|
+
return t("layout.systemPromptAndToolsUpdated");
|
|
6593
7335
|
}
|
|
6594
7336
|
function assistantSourceBlock(block) {
|
|
6595
7337
|
switch (block.kind) {
|
|
@@ -6609,7 +7351,8 @@ window.__ModuleLoader__.load({
|
|
|
6609
7351
|
};
|
|
6610
7352
|
case "image": return {
|
|
6611
7353
|
type: "image",
|
|
6612
|
-
content:
|
|
7354
|
+
content: "",
|
|
7355
|
+
attachment: block.attachment
|
|
6613
7356
|
};
|
|
6614
7357
|
case "other": return sourceBlock(block.block);
|
|
6615
7358
|
}
|
|
@@ -6625,40 +7368,18 @@ window.__ModuleLoader__.load({
|
|
|
6625
7368
|
type: type === "reasoning" ? "thinking" : type,
|
|
6626
7369
|
content: block.text
|
|
6627
7370
|
};
|
|
6628
|
-
|
|
6629
|
-
|
|
7371
|
+
if (type === "image" && typeof block.attachment === "object" && block.attachment !== null && typeof block.attachment.attachmentId === "string") return {
|
|
7372
|
+
type,
|
|
7373
|
+
content: "",
|
|
7374
|
+
attachment: block.attachment
|
|
7375
|
+
};
|
|
6630
7376
|
return {
|
|
6631
7377
|
type,
|
|
6632
|
-
content:
|
|
6633
|
-
...imageSrc !== void 0 ? { imageSrc } : {},
|
|
6634
|
-
...imageAlt !== void 0 ? { imageAlt } : {}
|
|
7378
|
+
content: stringifySourceValue(value)
|
|
6635
7379
|
};
|
|
6636
7380
|
}
|
|
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
|
-
}
|
|
7381
|
+
function imageBlockCount(content) {
|
|
7382
|
+
return content.filter((block) => block.type === "image").length;
|
|
6662
7383
|
}
|
|
6663
7384
|
function stringifySourceValue(value) {
|
|
6664
7385
|
return JSON.stringify(value, null, 2) || String(value);
|
|
@@ -6739,7 +7460,7 @@ window.__ModuleLoader__.load({
|
|
|
6739
7460
|
return ids;
|
|
6740
7461
|
}
|
|
6741
7462
|
/** Interleave each tool cell's nested child calls right after it, reindexing followers. */
|
|
6742
|
-
function withSubCalls(laidList) {
|
|
7463
|
+
function withSubCalls(laidList, t) {
|
|
6743
7464
|
if (!laidList.some((laid) => laid.subCalls !== void 0 && laid.subCalls.length > 0)) return laidList;
|
|
6744
7465
|
const out = [];
|
|
6745
7466
|
let index = laidList[0] !== void 0 ? laidList[0].cell.index - 1 : 0;
|
|
@@ -6751,7 +7472,7 @@ window.__ModuleLoader__.load({
|
|
|
6751
7472
|
index: ++index
|
|
6752
7473
|
}
|
|
6753
7474
|
});
|
|
6754
|
-
for (const sub of expandSubCalls(laid.subCalls, index)) {
|
|
7475
|
+
for (const sub of expandSubCalls(laid.subCalls, index, t)) {
|
|
6755
7476
|
out.push(sub);
|
|
6756
7477
|
index = sub.cell.index;
|
|
6757
7478
|
}
|
|
@@ -6759,13 +7480,13 @@ window.__ModuleLoader__.load({
|
|
|
6759
7480
|
return out;
|
|
6760
7481
|
}
|
|
6761
7482
|
/** Sub-dispatch cells for one run_code parent, in start order (running = null duration). */
|
|
6762
|
-
function expandSubCalls(subs, startIndex) {
|
|
7483
|
+
function expandSubCalls(subs, startIndex, t) {
|
|
6763
7484
|
if (subs === void 0 || subs.length === 0) return [];
|
|
6764
7485
|
const out = [];
|
|
6765
7486
|
let index = startIndex;
|
|
6766
7487
|
for (const sub of subs) {
|
|
6767
7488
|
const settled = "kind" in sub;
|
|
6768
|
-
const resultPreview = settled ? summarizeResult(sub) : void 0;
|
|
7489
|
+
const resultPreview = settled ? summarizeResult(sub, t) : void 0;
|
|
6769
7490
|
const laid = {
|
|
6770
7491
|
absTime: settled ? finiteTime(sub.callTime ?? sub.time) : finiteTime(sub.time),
|
|
6771
7492
|
toolName: settled ? sub.call?.name ?? sub.callId : sub.name,
|
|
@@ -6777,7 +7498,7 @@ window.__ModuleLoader__.load({
|
|
|
6777
7498
|
...settled ? sub.call !== null ? summarizeCall(sub.call.name, sub.call.argsRaw) : resultAsText(resultPreview) : summarizeCall(sub.name, sub.argsRaw),
|
|
6778
7499
|
...settled ? sub.call !== null ? { inputDetail: sub.call.argsRaw } : {} : { inputDetail: sub.argsRaw },
|
|
6779
7500
|
...settled ? {
|
|
6780
|
-
outputDetail: detailResult(sub),
|
|
7501
|
+
outputDetail: detailResult(sub, t),
|
|
6781
7502
|
outputBlocks: sub.content.map((block) => sourceBlock(block)),
|
|
6782
7503
|
...resultPreview,
|
|
6783
7504
|
isError: sub.isError
|
|
@@ -6787,7 +7508,7 @@ window.__ModuleLoader__.load({
|
|
|
6787
7508
|
}
|
|
6788
7509
|
};
|
|
6789
7510
|
out.push(laid);
|
|
6790
|
-
for (const child of expandSubCalls(sub.subCalls, index)) {
|
|
7511
|
+
for (const child of expandSubCalls(sub.subCalls, index, t)) {
|
|
6791
7512
|
out.push(child);
|
|
6792
7513
|
index = child.cell.index;
|
|
6793
7514
|
}
|
|
@@ -6800,13 +7521,15 @@ window.__ModuleLoader__.load({
|
|
|
6800
7521
|
...argsRaw === "" ? {} : { previewMarkdown: argsRaw }
|
|
6801
7522
|
};
|
|
6802
7523
|
}
|
|
6803
|
-
function summarizeResult(node) {
|
|
7524
|
+
function summarizeResult(node, t) {
|
|
6804
7525
|
if (node.isError) return { result: node.error?.code ?? "error" };
|
|
6805
7526
|
for (const block of node.content) if (block.type === "text" && typeof block.text === "string" && block.text !== "") return {
|
|
6806
7527
|
result: "",
|
|
6807
7528
|
resultPreviewMarkdown: block.text
|
|
6808
7529
|
};
|
|
6809
|
-
|
|
7530
|
+
const images = imageBlockCount(node.content);
|
|
7531
|
+
if (images > 0) return { result: t("layout.imageOnly", { count: images }) };
|
|
7532
|
+
return { result: t("record.noOutput") };
|
|
6810
7533
|
}
|
|
6811
7534
|
function resultAsText(result) {
|
|
6812
7535
|
return {
|
|
@@ -6814,11 +7537,13 @@ window.__ModuleLoader__.load({
|
|
|
6814
7537
|
...result?.resultPreviewMarkdown === void 0 ? {} : { previewMarkdown: result.resultPreviewMarkdown }
|
|
6815
7538
|
};
|
|
6816
7539
|
}
|
|
6817
|
-
function detailResult(node) {
|
|
7540
|
+
function detailResult(node, t) {
|
|
6818
7541
|
if (node.isError) return node.error === void 0 ? "error" : `${node.error.name}: ${node.error.code}`;
|
|
6819
7542
|
const text = node.content.filter((block) => block.type === "text" && typeof block.text === "string").map((block) => block.type === "text" ? block.text : "").join("\n");
|
|
6820
7543
|
if (text !== "") return text;
|
|
6821
|
-
|
|
7544
|
+
const images = imageBlockCount(node.content);
|
|
7545
|
+
if (images > 0) return t("layout.imageOnly", { count: images });
|
|
7546
|
+
if (node.content.length === 0 || node.content.every((block) => block.type === "text" && (typeof block.text !== "string" || block.text === ""))) return t("record.noOutput");
|
|
6822
7547
|
return JSON.stringify(node.content, null, 2);
|
|
6823
7548
|
}
|
|
6824
7549
|
function detailContent(content) {
|
|
@@ -6878,7 +7603,7 @@ window.__ModuleLoader__.load({
|
|
|
6878
7603
|
block.content,
|
|
6879
7604
|
block.callId ?? "",
|
|
6880
7605
|
block.toolName ?? "",
|
|
6881
|
-
block.
|
|
7606
|
+
block.attachment?.name ?? ""
|
|
6882
7607
|
]),
|
|
6883
7608
|
searchableJson(cell.messageSource),
|
|
6884
7609
|
searchableJson(cell.promptDetail),
|
|
@@ -7004,8 +7729,12 @@ window.__ModuleLoader__.load({
|
|
|
7004
7729
|
...total?.reasoning === void 0 && usage.reasoning === void 0 ? {} : { reasoning: (total?.reasoning ?? 0) + (usage.reasoning ?? 0) }
|
|
7005
7730
|
};
|
|
7006
7731
|
}
|
|
7007
|
-
function TrajectoryView({ useSession, useDuration, loadOlder, setActualDuration,
|
|
7732
|
+
function TrajectoryView({ useSession, useTrajectory, useDuration, loadOlder, loadImage, setActualDuration, viewRequest, completeViewRequest, renderSlot, t }) {
|
|
7008
7733
|
const [collapsedTurns, setCollapsedTurns] = (0, react.useState)(EMPTY_TURN_IDS);
|
|
7734
|
+
const renderImages = (0, react.useCallback)((owner) => renderSlot("conversation.trajectory.images", {
|
|
7735
|
+
...owner,
|
|
7736
|
+
loadImage
|
|
7737
|
+
}), [loadImage, renderSlot]);
|
|
7009
7738
|
const [collapsedAssistants, setCollapsedAssistants] = (0, react.useState)(EMPTY_RECORD_IDS);
|
|
7010
7739
|
const [timelineSelection, setTimelineSelection] = (0, react.useState)(null);
|
|
7011
7740
|
const actualDuration = useDuration((value) => value);
|
|
@@ -7018,7 +7747,7 @@ window.__ModuleLoader__.load({
|
|
|
7018
7747
|
const [selectedTimelineIndex, setSelectedTimelineIndex] = (0, react.useState)(null);
|
|
7019
7748
|
const [timelineRecordSelection, setTimelineRecordSelection] = (0, react.useState)(null);
|
|
7020
7749
|
const [timelineRecordFocus, setTimelineRecordFocus] = (0, react.useState)(null);
|
|
7021
|
-
const inspection =
|
|
7750
|
+
const inspection = useTrajectory((snapshot) => snapshot);
|
|
7022
7751
|
const historyLoading = useSession((snapshot) => snapshot.openState === "loading");
|
|
7023
7752
|
const olderHistoryLoading = useSession((snapshot) => snapshot.loadingOlder);
|
|
7024
7753
|
const hasOlderHistory = useSession((snapshot) => snapshot.hasMore);
|
|
@@ -7029,6 +7758,7 @@ window.__ModuleLoader__.load({
|
|
|
7029
7758
|
const runningCalls = inspection.runningCalls;
|
|
7030
7759
|
const requests = inspection.requests;
|
|
7031
7760
|
const callSchemas = inspection.callSchemas;
|
|
7761
|
+
const inspectCallId = viewRequest?.view === "trajectory" ? viewRequest.focus : null;
|
|
7032
7762
|
const requestNumbers = (0, react.useMemo)(() => {
|
|
7033
7763
|
const assistantsByStep = /* @__PURE__ */ new Map();
|
|
7034
7764
|
for (const node of nodes) {
|
|
@@ -7063,12 +7793,13 @@ window.__ModuleLoader__.load({
|
|
|
7063
7793
|
seq: entry.seq,
|
|
7064
7794
|
turn,
|
|
7065
7795
|
step,
|
|
7066
|
-
group:
|
|
7796
|
+
group: t("group.step", { step }),
|
|
7067
7797
|
number: index + 1,
|
|
7068
7798
|
...request?.status === void 0 ? {} : { status: request.status },
|
|
7069
7799
|
...request?.startedAt === void 0 ? {} : { startedAt: request.startedAt },
|
|
7070
7800
|
...request?.completedAt === void 0 ? {} : { completedAt: request.completedAt },
|
|
7071
7801
|
...request?.error === void 0 ? {} : { error: request.error },
|
|
7802
|
+
...request?.errorCode === void 0 ? {} : { errorCode: request.errorCode },
|
|
7072
7803
|
...request?.resultSeq === void 0 ? {} : { resultSeq: request.resultSeq },
|
|
7073
7804
|
...request?.retry === void 0 ? {} : { retry: request.retry },
|
|
7074
7805
|
...request?.maxRetries === void 0 ? {} : { maxRetries: request.maxRetries },
|
|
@@ -7086,13 +7817,14 @@ window.__ModuleLoader__.load({
|
|
|
7086
7817
|
seq: request.startSeq,
|
|
7087
7818
|
turn: request.turn,
|
|
7088
7819
|
step: 0,
|
|
7089
|
-
group:
|
|
7820
|
+
group: t("group.compaction", { seq: request.startSeq }),
|
|
7090
7821
|
number: index + 1,
|
|
7091
7822
|
purpose: "compaction",
|
|
7092
7823
|
status: request.status,
|
|
7093
7824
|
startedAt: request.startedAt,
|
|
7094
7825
|
completedAt: request.completedAt,
|
|
7095
7826
|
...request.error === void 0 ? {} : { error: request.error },
|
|
7827
|
+
...request.errorCode === void 0 ? {} : { errorCode: request.errorCode },
|
|
7096
7828
|
resultSeq: request.startSeq,
|
|
7097
7829
|
...request.provenance?.provider === void 0 ? {} : { provider: request.provenance.provider },
|
|
7098
7830
|
...request.provenance?.model === void 0 ? {} : { model: request.provenance.model },
|
|
@@ -7102,7 +7834,11 @@ window.__ModuleLoader__.load({
|
|
|
7102
7834
|
});
|
|
7103
7835
|
}
|
|
7104
7836
|
return numbered;
|
|
7105
|
-
}, [
|
|
7837
|
+
}, [
|
|
7838
|
+
nodes,
|
|
7839
|
+
requests,
|
|
7840
|
+
t
|
|
7841
|
+
]);
|
|
7106
7842
|
const partialTurn = partial?.turn ?? null;
|
|
7107
7843
|
const partialStep = partial?.step ?? null;
|
|
7108
7844
|
const finalized = (0, react.useMemo)(() => {
|
|
@@ -7117,7 +7853,7 @@ window.__ModuleLoader__.load({
|
|
|
7117
7853
|
runningCalls,
|
|
7118
7854
|
requests,
|
|
7119
7855
|
callSchemas
|
|
7120
|
-
});
|
|
7856
|
+
}, t);
|
|
7121
7857
|
return {
|
|
7122
7858
|
turns,
|
|
7123
7859
|
lastIndex: lastCellIndex(turns)
|
|
@@ -7129,7 +7865,8 @@ window.__ModuleLoader__.load({
|
|
|
7129
7865
|
partialStep,
|
|
7130
7866
|
runningCalls,
|
|
7131
7867
|
requests,
|
|
7132
|
-
callSchemas
|
|
7868
|
+
callSchemas,
|
|
7869
|
+
t
|
|
7133
7870
|
]);
|
|
7134
7871
|
const timelinePartial = (0, react.useMemo)(() => partial === null ? null : {
|
|
7135
7872
|
turn: partial.turn,
|
|
@@ -7140,9 +7877,17 @@ window.__ModuleLoader__.load({
|
|
|
7140
7877
|
partialTurn,
|
|
7141
7878
|
partialStructureSignature(partial)
|
|
7142
7879
|
]);
|
|
7143
|
-
const timelineTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout(finalized.turns, timelinePartial, finalized.lastIndex), [
|
|
7880
|
+
const timelineTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout(finalized.turns, timelinePartial, finalized.lastIndex, t), [
|
|
7881
|
+
finalized,
|
|
7882
|
+
timelinePartial,
|
|
7883
|
+
t
|
|
7884
|
+
]);
|
|
7144
7885
|
const timelineMode = actualDuration ? actualTime ? "actual" : "duration" : actualTime ? "time" : "sequence";
|
|
7145
|
-
const partialSearchTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout([], partial, finalized.lastIndex), [
|
|
7886
|
+
const partialSearchTurns = (0, react.useMemo)(() => appendTrajectoryPartialLayout([], partial, finalized.lastIndex, t), [
|
|
7887
|
+
finalized.lastIndex,
|
|
7888
|
+
partial,
|
|
7889
|
+
t
|
|
7890
|
+
]);
|
|
7146
7891
|
const searchLayouts = (0, react.useMemo)(() => [finalized.turns, partialSearchTurns], [finalized, partialSearchTurns]);
|
|
7147
7892
|
const latestSearchLayouts = (0, react.useRef)(searchLayouts);
|
|
7148
7893
|
latestSearchLayouts.current = searchLayouts;
|
|
@@ -7268,6 +8013,7 @@ window.__ModuleLoader__.load({
|
|
|
7268
8013
|
t
|
|
7269
8014
|
}),
|
|
7270
8015
|
(0, react_jsx_runtime.jsx)(TrajectoryTimeline, {
|
|
8016
|
+
t,
|
|
7271
8017
|
turns: timelineTurns,
|
|
7272
8018
|
mode: timelineMode,
|
|
7273
8019
|
range: timelineRange,
|
|
@@ -7282,6 +8028,8 @@ window.__ModuleLoader__.load({
|
|
|
7282
8028
|
(0, react_jsx_runtime.jsx)("div", {
|
|
7283
8029
|
className: views_module_css_default.ledger,
|
|
7284
8030
|
children: (0, react_jsx_runtime.jsx)(TrajectoryTable, {
|
|
8031
|
+
t,
|
|
8032
|
+
renderImages,
|
|
7285
8033
|
requestNumbers,
|
|
7286
8034
|
turns: timelineTurns,
|
|
7287
8035
|
streamingCells,
|
|
@@ -7303,8 +8051,8 @@ window.__ModuleLoader__.load({
|
|
|
7303
8051
|
onToggleTurn: toggleTurn,
|
|
7304
8052
|
collapsedAssistants,
|
|
7305
8053
|
onToggleAssistant: toggleAssistant,
|
|
7306
|
-
inspectCallId
|
|
7307
|
-
onInspectApplied:
|
|
8054
|
+
inspectCallId,
|
|
8055
|
+
onInspectApplied: completeViewRequest
|
|
7308
8056
|
})
|
|
7309
8057
|
})
|
|
7310
8058
|
]
|
|
@@ -7315,9 +8063,9 @@ window.__ModuleLoader__.load({
|
|
|
7315
8063
|
/** Required services: the conversation slot, registries, ordinary Session paging, and the locale service. */
|
|
7316
8064
|
const inject = [
|
|
7317
8065
|
"slots",
|
|
7318
|
-
"conversationEvents",
|
|
7319
|
-
"conversationViews",
|
|
7320
8066
|
"sessions",
|
|
8067
|
+
"uiSession",
|
|
8068
|
+
"uiConversation",
|
|
7321
8069
|
"locale"
|
|
7322
8070
|
];
|
|
7323
8071
|
/**
|
|
@@ -7326,6 +8074,19 @@ window.__ModuleLoader__.load({
|
|
|
7326
8074
|
* @param ctx - client root context.
|
|
7327
8075
|
*/
|
|
7328
8076
|
function apply(ctx) {
|
|
8077
|
+
const trajectorySources = /* @__PURE__ */ new WeakMap();
|
|
8078
|
+
const trajectorySource = (binding) => {
|
|
8079
|
+
let source = trajectorySources.get(binding);
|
|
8080
|
+
if (source === void 0) {
|
|
8081
|
+
const target = ctx.uiConversation.binding(binding).target("trajectory");
|
|
8082
|
+
source = {
|
|
8083
|
+
getSnapshot: () => target.getSnapshot() ?? EMPTY_TRAJECTORY_SNAPSHOT,
|
|
8084
|
+
subscribe: (listener) => target.subscribe(listener)
|
|
8085
|
+
};
|
|
8086
|
+
trajectorySources.set(binding, source);
|
|
8087
|
+
}
|
|
8088
|
+
return source;
|
|
8089
|
+
};
|
|
7329
8090
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
7330
8091
|
zh,
|
|
7331
8092
|
en
|
|
@@ -7338,22 +8099,32 @@ window.__ModuleLoader__.load({
|
|
|
7338
8099
|
registerTrajectoryToolDefinition(ctx);
|
|
7339
8100
|
registerTrajectoryCompactionDefinitions(ctx);
|
|
7340
8101
|
registerTrajectoryConversationView(ctx);
|
|
8102
|
+
ctx.uiSession.provide({
|
|
8103
|
+
hooks: ["trajectory"],
|
|
8104
|
+
resolve: (binding) => ({ hooks: { trajectory: trajectorySource(binding) } })
|
|
8105
|
+
});
|
|
7341
8106
|
ctx.slots.inject("conversation.view", () => ctx.slots.register({
|
|
7342
8107
|
name: "conversation.view",
|
|
7343
8108
|
id: "trajectory",
|
|
7344
8109
|
order: 10,
|
|
7345
8110
|
locale: NS,
|
|
7346
8111
|
label: () => t("view.trajectory"),
|
|
8112
|
+
children: { "conversation.trajectory.images": {
|
|
8113
|
+
kind: "single",
|
|
8114
|
+
scope: "session"
|
|
8115
|
+
} },
|
|
7347
8116
|
inject: (sessionId) => {
|
|
7348
8117
|
const session = ctx.sessions.binding(sessionId)?.session;
|
|
7349
8118
|
if (session === void 0) throw new Error(`ui-trajectory: session "${sessionId}" is unavailable`);
|
|
8119
|
+
const trajectory = ctx.uiConversation.binding(sessionId).target("trajectory");
|
|
7350
8120
|
return {
|
|
7351
8121
|
hooks: { duration },
|
|
7352
8122
|
loadOlder: async () => {
|
|
7353
|
-
const before =
|
|
8123
|
+
const before = trajectory.getSnapshot();
|
|
7354
8124
|
await session.loadOlder();
|
|
7355
|
-
return
|
|
8125
|
+
return trajectory.getSnapshot() !== before;
|
|
7356
8126
|
},
|
|
8127
|
+
loadImage: Object.assign((attachment) => ctx.uiConversation.imageUrl(sessionId, attachment), { peek: (attachment) => ctx.uiConversation.peekImageUrl(sessionId, attachment) }),
|
|
7357
8128
|
setActualDuration: (value) => {
|
|
7358
8129
|
duration.set(value);
|
|
7359
8130
|
}
|