dsh-trajectory-traceview-plus 0.0.0-stage → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,366 @@
1
+ //#region locale dictionaries
2
+ /** `trajectoryTraceView` namespace dictionaries (tab label + panel strings). */
3
+ const NS = "trajectoryTraceView";
4
+ /** Simplified Chinese dictionary (the key-set source of truth). */
5
+ const zh = {
6
+ "note.wrapL": "『", "note.wrapM": "(", "note.wrapR": ")』",
7
+ "block.image": "[图片]",
8
+ "block.other": "[其他内容]",
9
+ "block.file": "[文件]",
10
+ "block.unknown": "[未知内容]",
11
+ "block.toolAdded": "[工具新增] {name}",
12
+ "block.toolRemoved": "[工具移除] {name}",
13
+ "block.toolsAdded": "[已添加工具] {names}",
14
+ "block.toolsRemoved": "[已移除工具] {names}",
15
+ "block.toolsChanged": "[工具变更] 新增 {added} 个、移除 {removed} 个",
16
+ "note.compaction": "上下文压缩:",
17
+ "note.compacted": "历史已压缩",
18
+ "note.replace": "替换",
19
+ "note.items": "项",
20
+ "note.about": "约",
21
+ "view.label": "轨迹视图",
22
+ "view.root": "会话轨迹",
23
+ "view.incompatible": "无法识别当前会话的轨迹数据格式(可能是 DSH 版本不兼容)",
24
+ "view.incompatibleHint": "本插件读取的是官方轨迹快照。如果 DSH 升级后字段结构发生变化,你会看到这条提示而不是崩溃或一片空白。请检查插件是否有对应 DSH 版本的更新。",
25
+ "view.drift": "{n} 条记录无法识别",
26
+ "view.malformed": "{n} 条记录结构异常",
27
+ "view.unplacedReq": "有 {n} 个请求没有对应步骤",
28
+ "view.unplacedReqTip": "这些请求记录在日志里,但无法定位到任何一个步骤(turn/step 对不上,或 purpose 本版本不识别)。它们不会被静默丢弃。",
29
+ "view.malformedTip": "这些记录的字段形状不符合预期(不影响其余记录的显示)。通常意味着 DSH 版本与本插件不匹配,或日志被截断。",
30
+ "view.driftTip": "这些记录的类型不在本插件已知范围内,已在时间轴上跳过;其余记录正常显示。若数量较大,通常意味着 DSH 版本与本插件不匹配。",
31
+ "view.invalid": "{n} 条记录结构异常",
32
+ "view.invalidTip": "这些记录缺少 kind 或 seq 等必要字段,已跳过。",
33
+ "view.loading": "正在读取会话轨迹…",
34
+ "view.empty": "暂无轨迹数据\n发送消息后,这里会以横向时间轴展示 AI 的执行流程:每一步的思考、工具调用与结果,以及每次发给大模型的原始请求,便于学习提示词。",
35
+ "node.turn": "轮次",
36
+ "node.systemTurn": "系统事件",
37
+ "node.step": "步骤",
38
+ "node.user": "用户",
39
+ "node.assistant": "助手",
40
+ "node.tool": "工具",
41
+ "node.subtool": "子调用",
42
+ "node.context": "上下文",
43
+ "node.compaction": "上下文压缩",
44
+ "node.error": "轮次失败",
45
+ "node.retry": "模型重试",
46
+ "node.maxTokens": "输出超限",
47
+ "node.command": "命令",
48
+ "node.unknown": "未知事件",
49
+ "error.render": "这一块渲染失败",
50
+ "anchor.jumpLabel": "锚点输入框:粘贴站点锚点后回车定位",
51
+ "search.label": "搜索站点",
52
+ "error.retry": "重试",
53
+ "error.renderHint": "其余部分不受影响:换个站点或重试即可继续。",
54
+ "detail.eventType": "事件类型",
55
+ "detail.rawPayload": "原始数据",
56
+ "meta.steps": "步",
57
+ "meta.tools": "次工具",
58
+ "meta.stepDur": "步骤耗时",
59
+ "meta.toolDur": "工具耗时",
60
+ "meta.turns": "个轮次",
61
+ "meta.error": "出错",
62
+ "meta.tokens": "tokens",
63
+ "stat.current": "当前",
64
+ "kpi.toolTime": "工具总耗时",
65
+ "kpi.tokensIn": "请求 tokens",
66
+ "kpi.tokensOut": "生成 tokens",
67
+ "kpi.errors": "错误",
68
+ "status.done": "已完成",
69
+ "status.retry": "重试",
70
+ "detail.args": "调用参数",
71
+ "detail.noArgs": "(无参数)",
72
+ "detail.subCalls": "子调用",
73
+ "detail.position": "站点",
74
+ "detail.result": "工具结果",
75
+ "detail.noResult": "(无结果内容)",
76
+ "detail.time": "时间",
77
+ "detail.requestApprox": "以下消息列表为按会话日志近似重建的请求载荷(与真正发出的大致一致,便于学习提示词)。",
78
+ "evidence.exact": "原始记录",
79
+ "evidence.exactTip": "直接来自会话日志的字段,未经推断。",
80
+ "evidence.reconstructed": "近似重建",
81
+ "evidence.reconstructedTip": "按会话日志重新拼出,供学习参考;它不是服务端实际收到的原始字节,不要把它当成唯一证据。",
82
+ "evidence.partial": "可能不全",
83
+ "evidence.partialTip": "窗口外的部分不在本地,当前结果可能缺少早期上下文。",
84
+ "detail.items": "项",
85
+ "detail.request": "请求配置",
86
+ "detail.systemPrompt": "系统提示",
87
+ "detail.toolsCatalog": "工具目录",
88
+ "detail.messages": "消息列表",
89
+ "detail.copy": "复制",
90
+ "detail.copied": "已复制",
91
+ "anchor.copy": "复制锚点",
92
+ "anchor.copied": "已复制",
93
+ "anchor.copyFailed": "复制失败",
94
+ "anchor.notPersisted": "未持久化,不可深链",
95
+ "anchor.notLoaded": "该记录不在当前窗口,需先拉取更早历史",
96
+ "anchor.capped": "已向前翻页 {n} 页仍未找到;可先手动点「加载更早历史」再重试",
97
+ "anchor.bad": "锚点格式无法识别",
98
+ "anchor.jump": "跳转到锚点",
99
+ "anchor.clear": "清除锚点",
100
+ "anchor.jumpPlaceholder": "粘贴锚点,如 tvp1:e3019,回车定位",
101
+ "anchor.jumpTip": "粘贴任意站点详情里「复制锚点」得到的串,回车即可精确定位;目标在未加载的历史里时会自动向前翻页加载(有页数上限,超出会明确提示)。",
102
+ "anchor.searching": "正在向前加载更早历史以定位…",
103
+ "anchor.searchingPages": "正在向前加载更早历史以定位…(第 {n}/{max} 页,已载入 {stations} 站)",
104
+ "anchor.upgraded": "该记录已落定,请改用 {ref}",
105
+ "anchor.copiedLink": "已复制到你名下",
106
+ "anchor.badInput": "无法识别的锚点",
107
+
108
+ "detail.start": "开始",
109
+ "detail.end": "结束",
110
+ "gap.idle": "空闲",
111
+ "node.orphanTool": "孤立工具结果",
112
+ "orphan.badge": "调用不在窗口内",
113
+ "orphan.noText": "(无结果文本)",
114
+ "timing.notRecorded": "未记录耗时",
115
+ "timing.notRecordedHint": "该步骤没有 timing 记录,无法得到耗时",
116
+ "timing.partial": "耗时不全",
117
+ "timing.edgeOutsideHint": "有 timing 记录,但开始或结束时刻在加载窗口之外",
118
+ "action.clockAxis": "等距",
119
+ "action.clockAxisOn": "按时钟",
120
+ "action.clockAxisHint": "切换:站点等距排布 ↔ 空闲间隔按真实耗时缩放",
121
+ "detail.chars": "字符",
122
+ "detail.msgCount": "条消息",
123
+ "detail.toolCount": "个工具",
124
+ "detail.toolUnnamed": "(未命名工具)",
125
+ "detail.usage": "Token 用量",
126
+ "detail.promptChanged": "系统提示/工具在此步骤前有变更",
127
+ "chip.running": "运行中",
128
+ "chip.error": "出错",
129
+ "chip.retry": "重试",
130
+ "chip.compacted": "已压缩",
131
+ "chip.thinking": "思考",
132
+ "action.toStart": "回到起点",
133
+ "action.prev": "上一步",
134
+ "action.play": "开始回放",
135
+ "action.pause": "暂停",
136
+ "action.toEnd": "显示全部",
137
+ "action.speed": "回放速度",
138
+ "action.locate": "定位当前",
139
+ "action.search": "搜索站点(工具名 / 参数 / 文本)",
140
+ "action.searchPrev": "上一个命中",
141
+ "action.searchNext": "下一个命中",
142
+ "action.searchClear": "清空搜索",
143
+ "action.follow": "跟随最新:新事件自动滚入视野",
144
+ "action.loadOlder": "加载更早历史",
145
+ "action.loadingOlder": "正在加载更早历史…",
146
+ "action.loadOlderFailed": "加载更早历史失败",
147
+ "action.exportMd": "导出 Markdown:整段轨迹复制为学习笔记",
148
+ "action.exported": "已复制",
149
+ "action.expandPanel": "展开详情面板",
150
+ "action.collapsePanel": "收起详情面板",
151
+ "action.prevTurn": "上一个轮次",
152
+ "action.nextTurn": "下一个轮次",
153
+ "search.matches": "命中",
154
+ "search.none": "无命中",
155
+ "search.scopePartial": "仅已加载范围",
156
+ "search.scopeLoading": "仅已加载 · 正在加载更早…",
157
+ "search.scopeTip": "检索只覆盖当前已加载的轨迹;更早的历史还没加载进来,点这里可以加载更早历史。未加载的部分不会被判定为“无命中”。",
158
+ "search.scopeTipStatic": "检索只覆盖当前已加载的轨迹;更早的历史还没加载进来,且当前无法加载。未加载的部分不会被判定为“无命中”。",
159
+ "chip.interrupted": "已停止",
160
+ "chip.ttft": "首 token",
161
+ "diff.initial": "初始系统提示",
162
+ "diff.system": "系统提示有变更",
163
+ "diff.tools": "工具目录有变更",
164
+ "diff.systemAndTools": "系统提示与工具均有变更",
165
+ "diff.toolsAdded": "新增工具",
166
+ "diff.toolsRemoved": "移除工具",
167
+ "diff.systemDelta": "系统提示字符",
168
+ "detail.promptDiff": "提示词变更",
169
+ "export.stepTitle": "单步复盘",
170
+ "action.exportStep": "复制本步复盘",
171
+ "diff.toolsChanged": "工具定义变了",
172
+ "diff.textDiff": "变更内容",
173
+ "diff.startLine": "从第 {n} 行起",
174
+ "diff.removed": "改前",
175
+ "diff.added": "改后",
176
+ "diff.truncated": "仅显示前 {n} 行",
177
+ "diff.noText": "纯空白/换行差异",
178
+ "detail.compactionOutput": "压缩产出全文",
179
+ "export.title": "会话轨迹导出",
180
+ "export.appendix": "附录:首个请求的系统提示与工具目录",
181
+ "tab.detail": "步骤详情",
182
+ "tab.request": "原始请求",
183
+ "hint.text": "点击站点或 ▶ 回放 · ← → 逐站 / 空格播放 / PgUp PgDn 跳轮次 / “/” 搜索 · 底部面板展示每步详情与发给大模型的原始请求"
184
+ };
185
+ /** English dictionary. */
186
+ const en = {
187
+ "note.wrapL": "", "note.wrapM": " (", "note.wrapR": ")",
188
+ "block.image": "[image]",
189
+ "block.other": "[other content]",
190
+ "block.file": "[file]",
191
+ "block.unknown": "[unknown content]",
192
+ "block.toolAdded": "[tool added] {name}",
193
+ "block.toolRemoved": "[tool removed] {name}",
194
+ "block.toolsAdded": "[tools added] {names}",
195
+ "block.toolsRemoved": "[tools removed] {names}",
196
+ "block.toolsChanged": "[tools changed] +{added} / -{removed}",
197
+ "note.compaction": "Context compacted: ",
198
+ "note.compacted": "history compacted",
199
+ "note.replace": "replaced",
200
+ "note.items": "item(s)",
201
+ "note.about": "about",
202
+ "view.label": "Trace View",
203
+ "view.root": "Session Trace",
204
+ "view.incompatible": "Cannot recognize this session's trajectory data (DSH version may be incompatible)",
205
+ "view.incompatibleHint": "This plugin reads the official trajectory snapshot. If DSH changed its field shape, you get this notice instead of a crash or a blank view. Check whether a plugin update matches your DSH version.",
206
+ "view.drift": "{n} record(s) not recognized",
207
+ "view.malformed": "{n} malformed record(s)",
208
+ "view.unplacedReq": "{n} request(s) with no matching step",
209
+ "view.unplacedReqTip": "The log carries these requests but they cannot be tied to any step (turn/step do not match, or the purpose is unknown to this build). They are counted here rather than dropped.",
210
+ "view.malformedTip": "These records have unexpected field shapes (the rest still renders). Usually a DSH version mismatch or a truncated log.",
211
+ "view.driftTip": "These record kinds are outside what this plugin knows, so they were skipped; everything else renders normally. A large number usually means a DSH version mismatch.",
212
+ "view.invalid": "{n} record(s) malformed",
213
+ "view.invalidTip": "These records lack required fields such as kind or seq, so they were skipped.",
214
+ "view.loading": "Reading this session's trajectory…",
215
+ "view.empty": "No trajectory data yet\nSend a message and the AI execution flow will appear here as a horizontal timeline: per-step thinking, tool calls and results, plus the raw requests sent to the model for prompt study.",
216
+ "node.turn": "Turn",
217
+ "node.systemTurn": "System events",
218
+ "node.step": "Step",
219
+ "node.user": "User",
220
+ "node.assistant": "Assistant",
221
+ "node.tool": "Tool",
222
+ "node.subtool": "Sub-call",
223
+ "node.context": "Context",
224
+ "node.compaction": "Compaction",
225
+ "node.error": "Turn error",
226
+ "node.retry": "Model retry",
227
+ "node.maxTokens": "Max tokens",
228
+ "node.command": "Command",
229
+ "node.unknown": "Unknown event",
230
+ "error.render": "This block failed to render",
231
+ "anchor.jumpLabel": "Anchor field: paste a station anchor and press Enter to locate it",
232
+ "search.label": "Search stations",
233
+ "error.retry": "Retry",
234
+ "error.renderHint": "The rest of the view is unaffected: pick another station or retry.",
235
+ "detail.eventType": "Event type",
236
+ "detail.rawPayload": "Raw payload",
237
+ "meta.steps": " steps",
238
+ "meta.tools": " tool calls",
239
+ "meta.stepDur": "step",
240
+ "meta.toolDur": "tool",
241
+ "meta.turns": " turns",
242
+ "meta.error": "error",
243
+ "meta.tokens": " tokens",
244
+ "stat.current": "current",
245
+ "kpi.toolTime": "Tool time",
246
+ "kpi.tokensIn": "Prompt tokens",
247
+ "kpi.tokensOut": "Output tokens",
248
+ "kpi.errors": "Errors",
249
+ "status.done": "Done",
250
+ "status.retry": "Retry",
251
+ "detail.args": "Call arguments",
252
+ "detail.noArgs": "(no arguments)",
253
+ "detail.subCalls": "Sub-calls",
254
+ "detail.position": "Station",
255
+ "detail.result": "Tool result",
256
+ "detail.noResult": "(no result content)",
257
+ "detail.time": "Time",
258
+ "detail.requestApprox": "The message list below is a close reconstruction of the request payload from the session log (for prompt study).",
259
+ "evidence.exact": "as recorded",
260
+ "evidence.exactTip": "Taken verbatim from the session log; nothing inferred.",
261
+ "evidence.reconstructed": "reconstructed",
262
+ "evidence.reconstructedTip": "Reassembled from the session log for study. It is not the exact byte payload the server received; do not treat it as sole evidence.",
263
+ "evidence.partial": "possibly incomplete",
264
+ "evidence.partialTip": "History outside the loaded window is not local, so earlier context may be missing.",
265
+ "detail.items": "items",
266
+ "detail.request": "Request config",
267
+ "detail.systemPrompt": "System prompt",
268
+ "detail.toolsCatalog": "Tool catalog",
269
+ "detail.messages": "Messages",
270
+ "detail.copy": "Copy",
271
+ "detail.copied": "Copied",
272
+ "anchor.copy": "Copy anchor",
273
+ "anchor.copied": "Copied",
274
+ "anchor.copyFailed": "Copy failed",
275
+ "anchor.notPersisted": "Not persisted; cannot deep-link",
276
+ "anchor.notLoaded": "Not in the loaded window; load older history first",
277
+ "anchor.capped": "Paged back {n} pages without finding it; load older history manually and retry",
278
+ "anchor.bad": "Unrecognized anchor format",
279
+ "anchor.jump": "Jump to anchor",
280
+ "anchor.clear": "Clear anchor",
281
+ "anchor.jumpPlaceholder": "Paste an anchor (e.g. tvp1:e3019) and press Enter",
282
+ "anchor.jumpTip": "Paste the string produced by \"Copy anchor\" in any station detail, then press Enter. If the target sits in unloaded history, older pages are loaded automatically (page-bounded; you are told when the bound is hit).",
283
+ "anchor.searching": "Loading older history to locate it…",
284
+ "anchor.searchingPages": "Loading older history to locate it… (page {n}/{max}, {stations} stations loaded)",
285
+ "anchor.upgraded": "This record is now durable; use {ref}",
286
+ "anchor.copiedLink": "Link copied",
287
+ "anchor.badInput": "Unrecognized anchor",
288
+
289
+ "detail.start": "Start",
290
+ "detail.end": "End",
291
+ "gap.idle": "Idle",
292
+ "node.orphanTool": "Orphan tool result",
293
+ "orphan.badge": "call outside window",
294
+ "orphan.noText": "(no result text)",
295
+ "timing.notRecorded": "no duration",
296
+ "timing.notRecordedHint": "This step has no timing record at all",
297
+ "timing.partial": "partial timing",
298
+ "timing.edgeOutsideHint": "Timing exists, but one edge lies outside the loaded window",
299
+ "action.clockAxis": "Even",
300
+ "action.clockAxisOn": "By clock",
301
+ "action.clockAxisHint": "Toggle: even station spacing vs idle gaps scaled by real elapsed time",
302
+ "detail.chars": "chars",
303
+ "detail.msgCount": " messages",
304
+ "detail.toolCount": " tools",
305
+ "detail.toolUnnamed": "(unnamed tool)",
306
+ "detail.usage": "Token usage",
307
+ "detail.promptChanged": "System prompt / tools changed before this step",
308
+ "chip.running": "running",
309
+ "chip.error": "error",
310
+ "chip.retry": "retry",
311
+ "chip.compacted": "compacted",
312
+ "chip.thinking": "thinking",
313
+ "action.toStart": "Jump to start",
314
+ "action.prev": "Previous step",
315
+ "action.play": "Play replay",
316
+ "action.pause": "Pause",
317
+ "action.toEnd": "Show all",
318
+ "action.speed": "Replay speed",
319
+ "action.locate": "Locate current",
320
+ "action.search": "Search stations (tool / args / text)",
321
+ "action.searchPrev": "Previous match",
322
+ "action.searchNext": "Next match",
323
+ "action.searchClear": "Clear search",
324
+ "action.follow": "Follow latest: auto-scroll new events into view",
325
+ "action.loadOlder": "Load older history",
326
+ "action.loadingOlder": "Loading older history…",
327
+ "action.loadOlderFailed": "Could not load older history",
328
+ "action.exportMd": "Export Markdown: copy the whole trace as study notes",
329
+ "action.exported": "Copied",
330
+ "action.expandPanel": "Expand detail panel",
331
+ "action.collapsePanel": "Collapse detail panel",
332
+ "action.prevTurn": "Previous turn",
333
+ "action.nextTurn": "Next turn",
334
+ "search.matches": "matches",
335
+ "search.none": "No matches",
336
+ "search.scopePartial": "loaded range only",
337
+ "search.scopeLoading": "loaded range · loading older…",
338
+ "search.scopeTip": "Search covers only the loaded part of the trace. Older history is not loaded yet; click to load it. Unloaded history is never reported as \"no match\".",
339
+ "search.scopeTipStatic": "Search covers only the loaded part of the trace. Older history is not loaded yet and cannot be loaded right now. Unloaded history is never reported as \"no match\".",
340
+ "chip.interrupted": "stopped",
341
+ "chip.ttft": "TTFT",
342
+ "diff.initial": "Initial system prompt",
343
+ "diff.system": "System prompt changed",
344
+ "diff.tools": "Tool catalog changed",
345
+ "diff.systemAndTools": "System prompt and tools changed",
346
+ "diff.toolsAdded": "Tools added",
347
+ "diff.toolsRemoved": "Tools removed",
348
+ "diff.systemDelta": "System prompt chars",
349
+ "detail.promptDiff": "Prompt changes",
350
+ "export.stepTitle": "Single-step review",
351
+ "action.exportStep": "Copy this step",
352
+ "diff.toolsChanged": "Tool definition changed",
353
+ "diff.textDiff": "What changed",
354
+ "diff.startLine": "from line {n}",
355
+ "diff.removed": "before",
356
+ "diff.added": "after",
357
+ "diff.truncated": "showing first {n} lines only",
358
+ "diff.noText": "whitespace-only change",
359
+ "detail.compactionOutput": "Full compaction output",
360
+ "export.title": "Session trace export",
361
+ "export.appendix": "Appendix: system prompt and tool catalog of the first request",
362
+ "tab.detail": "Step detail",
363
+ "tab.request": "Raw request",
364
+ "hint.text": "Click a station or ▶ to replay · ← → step / Space play / PgUp PgDn jump turns / “/” to search · The bottom panel shows each step and the raw request sent to the model"
365
+ };
366
+ //#endregion