@qilin-agent/client-ui-trajectory 0.0.0-stage → 3.1.4
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/LICENSE +21 -0
- package/README.i18n.yaml +55 -0
- package/README.md +120 -2
- package/README.zh.md +121 -0
- package/lib/client.js +11846 -0
- package/lib/index.js +6 -0
- package/lib/types/client/TrajectoryCell.d.ts +13 -0
- package/lib/types/client/TrajectoryGraphView.d.ts +37 -0
- package/lib/types/client/TrajectoryGroupHeader.d.ts +13 -0
- package/lib/types/client/TrajectoryTable.d.ts +111 -0
- package/lib/types/client/TrajectoryTimeline.d.ts +26 -0
- package/lib/types/client/TrajectoryToolbar.d.ts +34 -0
- package/lib/types/client/TrajectoryTurn.d.ts +17 -0
- package/lib/types/client/TrajectoryTurnHeader.d.ts +14 -0
- package/lib/types/client/TrajectoryView.d.ts +20 -0
- package/lib/types/client/code-program.d.ts +19 -0
- package/lib/types/client/copy-codes.d.ts +4 -0
- package/lib/types/client/duration-store.d.ts +7 -0
- package/lib/types/client/index.d.ts +20 -0
- package/lib/types/client/layout.d.ts +46 -0
- package/lib/types/client/locales.d.ts +293 -0
- package/lib/types/client/string-wrapping-store.d.ts +7 -0
- package/lib/types/client/timeline.d.ts +52 -0
- package/lib/types/client/trajectory-assistant-definition.d.ts +8 -0
- package/lib/types/client/trajectory-compaction-definition.d.ts +8 -0
- package/lib/types/client/trajectory-contract.d.ts +96 -0
- package/lib/types/client/trajectory-definition-common.d.ts +12 -0
- package/lib/types/client/trajectory-event-projection.d.ts +51 -0
- package/lib/types/client/trajectory-graph-canvas.d.ts +64 -0
- package/lib/types/client/trajectory-graph-inspector.d.ts +30 -0
- package/lib/types/client/trajectory-graph-layout.d.ts +98 -0
- package/lib/types/client/trajectory-graph-tab-definition.d.ts +19 -0
- package/lib/types/client/trajectory-graph.d.ts +239 -0
- package/lib/types/client/trajectory-message-definitions.d.ts +8 -0
- package/lib/types/client/trajectory-preview.d.ts +8 -0
- package/lib/types/client/trajectory-record.d.ts +114 -0
- package/lib/types/client/trajectory-request-header-definition.d.ts +18 -0
- package/lib/types/client/trajectory-search-index.d.ts +20 -0
- package/lib/types/client/trajectory-snapshot-builder.d.ts +29 -0
- package/lib/types/client/trajectory-tab-definition.d.ts +32 -0
- package/lib/types/client/trajectory-tool-definition.d.ts +8 -0
- package/lib/types/client/trajectory-virtual-rows.d.ts +34 -0
- package/lib/types/index.d.ts +4 -0
- package/package.json +81 -3
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/** `trajectory` namespace dictionaries for the complete trajectory surface. */
|
|
2
|
+
/** Dictionary namespace owned by this plugin. */
|
|
3
|
+
export declare const NS = "trajectory";
|
|
4
|
+
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
5
|
+
export declare const zh: {
|
|
6
|
+
readonly 'view.trajectory': "轨迹";
|
|
7
|
+
readonly 'toolbar.aria': "轨迹工具栏";
|
|
8
|
+
readonly 'toolbar.duration': "时长";
|
|
9
|
+
readonly 'toolbar.useActualDuration': "使用实际时长";
|
|
10
|
+
readonly 'toolbar.useEqualWidth': "使用等宽操作";
|
|
11
|
+
readonly 'toolbar.actualTime': "实际时间";
|
|
12
|
+
readonly 'toolbar.turns': "轮次";
|
|
13
|
+
readonly 'toolbar.expandTurns': "展开所有轮次";
|
|
14
|
+
readonly 'toolbar.collapseTurns': "收起所有轮次";
|
|
15
|
+
readonly 'toolbar.calls': "调用";
|
|
16
|
+
readonly 'toolbar.expandCalls': "展开所有调用";
|
|
17
|
+
readonly 'toolbar.collapseCalls': "收起所有调用";
|
|
18
|
+
readonly 'toolbar.search': "搜索轨迹";
|
|
19
|
+
readonly 'toolbar.searchPlaceholder': "搜索";
|
|
20
|
+
readonly 'kind.system': "系统";
|
|
21
|
+
readonly 'kind.user': "用户";
|
|
22
|
+
readonly 'kind.context': "上下文";
|
|
23
|
+
readonly 'kind.compacted': "已压缩";
|
|
24
|
+
readonly 'kind.message': "消息";
|
|
25
|
+
readonly 'kind.assistant': "助手";
|
|
26
|
+
readonly 'kind.tool': "工具";
|
|
27
|
+
readonly 'kind.subtool': "子工具";
|
|
28
|
+
readonly 'kind.sub': "子项";
|
|
29
|
+
readonly 'column.input': "输入";
|
|
30
|
+
readonly 'column.output': "输出";
|
|
31
|
+
readonly 'column.think': "思考";
|
|
32
|
+
readonly 'column.time': "时间";
|
|
33
|
+
readonly 'column.model': "模型";
|
|
34
|
+
readonly 'column.tools': "工具";
|
|
35
|
+
readonly 'turn.label': "第 {turn} 轮";
|
|
36
|
+
readonly 'section.betweenTurns': "轮次之间";
|
|
37
|
+
readonly 'group.message': "消息";
|
|
38
|
+
readonly 'group.step': "第 {step} 步";
|
|
39
|
+
readonly 'group.compaction': "压缩 {seq}";
|
|
40
|
+
readonly 'status.failed': "失败";
|
|
41
|
+
readonly 'status.pending': "等待中";
|
|
42
|
+
readonly 'status.completed': "已完成";
|
|
43
|
+
readonly 'timing.notAvailable': "不可用";
|
|
44
|
+
readonly 'timing.notRecorded': "未记录";
|
|
45
|
+
readonly 'timing.stepStartUnavailable': "步骤开始时间不可用";
|
|
46
|
+
readonly 'timing.firstTokenUnavailable': "首 token 时间不可用";
|
|
47
|
+
readonly 'timing.usageUnavailable': "用量不可用";
|
|
48
|
+
readonly 'timing.outputTokensUnavailable': "输出 token 数不可用";
|
|
49
|
+
readonly 'timing.durationTooShort': "时长过短";
|
|
50
|
+
readonly 'timing.showLocalTime': "显示本地时间";
|
|
51
|
+
readonly 'timing.showUnixTimestamp': "显示 Unix 时间戳";
|
|
52
|
+
readonly 'timing.started': "开始时间";
|
|
53
|
+
readonly 'timing.totalDuration': "总时长";
|
|
54
|
+
readonly 'timing.ttft': "首 token 延迟";
|
|
55
|
+
readonly 'timing.generation': "生成";
|
|
56
|
+
readonly 'timing.throughput': "吞吐量";
|
|
57
|
+
readonly 'timing.duration': "时长";
|
|
58
|
+
readonly 'timing.source': "计时来源";
|
|
59
|
+
readonly 'timing.sessionTimestamps': "会话时间戳";
|
|
60
|
+
readonly 'timing.sessionTimestampsRunning': "会话时间戳(运行中)";
|
|
61
|
+
readonly 'timing.request': "请求计时";
|
|
62
|
+
readonly 'unit.milliseconds': "{value} 毫秒";
|
|
63
|
+
readonly 'unit.seconds': "{value} 秒";
|
|
64
|
+
readonly 'unit.tokens': "{value} tok";
|
|
65
|
+
readonly 'unit.tokensPerSecond': "{value} tok/s";
|
|
66
|
+
readonly 'usage.tokens': "Token";
|
|
67
|
+
readonly 'usage.reasoning': "推理";
|
|
68
|
+
readonly 'usage.content': "内容";
|
|
69
|
+
readonly 'usage.notReported': "未报告用量";
|
|
70
|
+
readonly 'usage.input': "输入";
|
|
71
|
+
readonly 'usage.cached': "缓存读取";
|
|
72
|
+
readonly 'usage.cacheCreated': "缓存写入";
|
|
73
|
+
readonly 'usage.other': "其他";
|
|
74
|
+
readonly 'usage.output': "输出";
|
|
75
|
+
readonly 'usage.thisRequest': "本次请求";
|
|
76
|
+
readonly 'usage.sessionCumulative': "会话累计";
|
|
77
|
+
readonly 'options.notRecorded': "未记录选项";
|
|
78
|
+
readonly 'options.json': "请求选项 JSON";
|
|
79
|
+
readonly 'source.unknown': "未知";
|
|
80
|
+
readonly 'source.user': "用户";
|
|
81
|
+
readonly 'source.plugin': "插件";
|
|
82
|
+
readonly 'source.pluginNamed': "插件 · {plugin}";
|
|
83
|
+
readonly 'source.goal': "目标";
|
|
84
|
+
readonly 'source.goalRound': "目标 · Round {round}";
|
|
85
|
+
readonly 'source.notRecorded': "未记录来源";
|
|
86
|
+
readonly 'source.messageJson': "消息来源 JSON";
|
|
87
|
+
readonly 'tab.summary': "概述";
|
|
88
|
+
readonly 'tab.rawOutput': "原始输出";
|
|
89
|
+
readonly 'tab.preview': "预览";
|
|
90
|
+
readonly 'tab.raw': "原始内容";
|
|
91
|
+
readonly 'tab.source': "来源";
|
|
92
|
+
readonly 'tab.payload': "参数";
|
|
93
|
+
readonly 'tab.result': "结果";
|
|
94
|
+
readonly 'tab.schema': "Schema";
|
|
95
|
+
readonly 'tab.timing': "计时";
|
|
96
|
+
readonly 'tab.diff': "差异";
|
|
97
|
+
readonly 'tab.systemPrompt': "系统提示词";
|
|
98
|
+
readonly 'tab.tools': "工具";
|
|
99
|
+
readonly 'tab.options': "选项";
|
|
100
|
+
readonly 'tab.usage': "用量";
|
|
101
|
+
readonly 'record.toolCallOnly': "(仅工具调用)";
|
|
102
|
+
readonly 'record.noContent': "无内容";
|
|
103
|
+
readonly 'record.noPayload': "未捕获参数";
|
|
104
|
+
readonly 'record.noResult': "未捕获结果";
|
|
105
|
+
readonly 'record.noOutput': "无输出";
|
|
106
|
+
readonly 'record.schemaUnavailable': "Schema 不可用";
|
|
107
|
+
readonly 'record.parameters': "参数";
|
|
108
|
+
readonly 'record.resultJson': "结果 JSON";
|
|
109
|
+
readonly 'record.json': "JSON";
|
|
110
|
+
readonly 'record.parametersJson': "参数 JSON";
|
|
111
|
+
readonly 'record.namedParametersJson': "{name} 参数 JSON";
|
|
112
|
+
readonly 'record.payloadJson': "参数 JSON";
|
|
113
|
+
readonly 'record.outputJson': "结果 JSON";
|
|
114
|
+
readonly 'record.thinking': "思考";
|
|
115
|
+
readonly 'record.wrapLines': "自动换行";
|
|
116
|
+
readonly 'code.source': "代码";
|
|
117
|
+
readonly 'code.output': "输出";
|
|
118
|
+
readonly 'code.copySource': "复制代码";
|
|
119
|
+
readonly 'code.copyOutput': "复制输出";
|
|
120
|
+
readonly 'code.originalJson': "原始 JSON";
|
|
121
|
+
readonly 'code.running': "执行中…";
|
|
122
|
+
readonly 'record.systemPromptMissing': "本次请求没有系统提示词";
|
|
123
|
+
readonly 'record.toolsMissing': "本次请求没有工具";
|
|
124
|
+
readonly 'record.systemPrompt': "系统提示词";
|
|
125
|
+
readonly 'record.tools': "工具";
|
|
126
|
+
readonly 'block.openSummary': "打开第 {index} 个块的工具调用概述";
|
|
127
|
+
readonly 'block.openSummaryTitle': "打开工具调用概述";
|
|
128
|
+
readonly 'block.label': "块 #{index} {type}";
|
|
129
|
+
readonly 'history.loadingTrajectory': "正在加载轨迹…";
|
|
130
|
+
readonly 'history.loadingEarlier': "正在加载更早的历史…";
|
|
131
|
+
readonly 'history.loadingEarlierAria': "正在加载更早的历史…";
|
|
132
|
+
readonly 'history.loadEarlier': "加载更早的历史";
|
|
133
|
+
readonly 'history.clickToLoadEarlier': "点击加载更早的历史";
|
|
134
|
+
readonly 'request.label': "请求 #{request}";
|
|
135
|
+
readonly 'request.labelCompaction': "请求 #{request} · 压缩";
|
|
136
|
+
readonly 'request.compaction': "压缩 · {section}";
|
|
137
|
+
readonly 'request.compactionPurpose': "压缩";
|
|
138
|
+
readonly 'request.retryProgress': "{retry}/{maximum}";
|
|
139
|
+
readonly 'request.collapsedSummary': "已收起的{kind}概述,{summary}";
|
|
140
|
+
readonly 'request.collapsedTurn': "轮次";
|
|
141
|
+
readonly 'request.collapsedAssistant': "助手";
|
|
142
|
+
readonly 'request.rowAria': "{request}{kind},{content}";
|
|
143
|
+
readonly 'request.rowPrefix': "请求 {request},";
|
|
144
|
+
readonly 'request.rowAriaCompaction': "请求 {request},压缩";
|
|
145
|
+
readonly 'request.noContent': "无内容";
|
|
146
|
+
readonly 'summary.toolCalls.one': "{count} 个工具调用";
|
|
147
|
+
readonly 'summary.toolCalls.other': "{count} 个工具调用";
|
|
148
|
+
readonly 'summary.steps.one': "{count} 个步骤";
|
|
149
|
+
readonly 'summary.steps.other': "{count} 个步骤";
|
|
150
|
+
readonly 'details.event': "事件详情";
|
|
151
|
+
readonly 'details.resize': "调整事件详情宽度";
|
|
152
|
+
readonly 'details.resizeTitle': "拖动调整大小;双击恢复默认值。";
|
|
153
|
+
readonly 'details.close': "关闭详情";
|
|
154
|
+
readonly 'details.status': "状态";
|
|
155
|
+
readonly 'details.purpose': "用途";
|
|
156
|
+
readonly 'details.provider': "提供方";
|
|
157
|
+
readonly 'details.model': "模型";
|
|
158
|
+
readonly 'details.toolCalls': "工具调用";
|
|
159
|
+
readonly 'details.subtoolCalls': "子工具调用";
|
|
160
|
+
readonly 'details.error': "错误";
|
|
161
|
+
readonly 'details.lastAttemptError': "上次尝试错误";
|
|
162
|
+
readonly 'details.failure.auth': "API 密钥无效";
|
|
163
|
+
readonly 'details.retry': "重试";
|
|
164
|
+
readonly 'details.retryDelay': "重试延迟";
|
|
165
|
+
readonly 'details.result': "结果";
|
|
166
|
+
readonly 'details.compacted': "已压缩";
|
|
167
|
+
readonly 'details.assistantMessage': "助手消息";
|
|
168
|
+
readonly 'details.source': "来源";
|
|
169
|
+
readonly 'details.hierarchy': "层级";
|
|
170
|
+
readonly 'details.toolCall': "工具调用";
|
|
171
|
+
readonly 'timeline.aria': "轨迹时间线";
|
|
172
|
+
readonly 'timeline.overviewAria': "时间线概览;水平拖动可聚焦事件";
|
|
173
|
+
readonly 'timeline.noTimingData': "无计时数据";
|
|
174
|
+
readonly 'timeline.total': "总计 {duration}";
|
|
175
|
+
readonly 'timeline.started': "开始于 {time}";
|
|
176
|
+
readonly 'timeline.ttftDecoding': "首 token {ttft} · 解码 {decoding}";
|
|
177
|
+
readonly 'layout.compacting': "正在压缩上下文…";
|
|
178
|
+
readonly 'layout.compactionFailed': "上下文压缩失败";
|
|
179
|
+
readonly 'layout.compacted': "上下文已压缩";
|
|
180
|
+
readonly 'layout.toolCallOnly': "仅工具调用";
|
|
181
|
+
readonly 'attachment.list': "附件";
|
|
182
|
+
readonly 'attachment.imageName': "图片 {index}";
|
|
183
|
+
readonly 'layout.imageCount': "图片 ×{count}";
|
|
184
|
+
readonly 'layout.toolAdded': "已添加工具:{name}";
|
|
185
|
+
readonly 'layout.toolRemoved': "已移除工具:{name}";
|
|
186
|
+
readonly 'layout.toolUpdateNotice': "工具已更新";
|
|
187
|
+
readonly 'layout.toolsAdded': "新增:{names}";
|
|
188
|
+
readonly 'layout.toolsAddedCount': "新增 {count} 个";
|
|
189
|
+
readonly 'layout.toolsChanged': "新增 {added} 个,移除 {removed} 个";
|
|
190
|
+
readonly 'layout.toolsRemoved': "移除:{names}";
|
|
191
|
+
readonly 'layout.toolsRemovedCount': "移除 {count} 个";
|
|
192
|
+
readonly 'layout.fileAttachments': "文件 ×{count}";
|
|
193
|
+
readonly 'layout.initialSystemPrompt': "初始系统提示词";
|
|
194
|
+
readonly 'layout.systemPromptUpdated': "系统提示词已更新";
|
|
195
|
+
readonly 'layout.toolsUpdated': "工具已更新";
|
|
196
|
+
readonly 'layout.systemPromptAndToolsUpdated': "系统提示词和工具已更新";
|
|
197
|
+
readonly 'layout.compactionInterrupted': "上下文压缩在完成前被中断。";
|
|
198
|
+
readonly 'view.trajectoryGraph': "轨迹图";
|
|
199
|
+
readonly 'guide.graphDescription': "把轨迹账本画成节点与边的实时流动图";
|
|
200
|
+
readonly 'graph.toolbar': "轨迹图工具栏";
|
|
201
|
+
readonly 'graph.fit': "适应视图";
|
|
202
|
+
readonly 'graph.follow': "跟随最新";
|
|
203
|
+
readonly 'graph.pause': "暂停流动";
|
|
204
|
+
readonly 'graph.resume': "继续流动";
|
|
205
|
+
readonly 'graph.canvas': "轨迹图画布";
|
|
206
|
+
readonly 'graph.empty': "暂无可绘制的轨迹记录";
|
|
207
|
+
readonly 'graph.windowed': "仅显示最近 {count} 条记录";
|
|
208
|
+
readonly 'graph.hint': "点击节点查看参数与结果";
|
|
209
|
+
readonly 'graph.openLedger': "账本";
|
|
210
|
+
readonly 'graph.nodeAria': "{kind}节点:{label}";
|
|
211
|
+
readonly 'graph.live': "进行中";
|
|
212
|
+
readonly 'graph.sequence': "序号";
|
|
213
|
+
readonly 'graph.time': "时间";
|
|
214
|
+
readonly 'graph.duration': "耗时";
|
|
215
|
+
readonly 'graph.tokens': "令牌";
|
|
216
|
+
readonly 'graph.parameters': "参数";
|
|
217
|
+
readonly 'graph.result': "结果";
|
|
218
|
+
readonly 'graph.closeDetails': "关闭详情";
|
|
219
|
+
readonly 'graph.unrecorded': "未记录";
|
|
220
|
+
readonly 'graph.stats.nodes': "{count} 节点";
|
|
221
|
+
readonly 'graph.stats.edges': "{count} 边";
|
|
222
|
+
readonly 'graph.stats.turns': "{count} 轮";
|
|
223
|
+
readonly 'graph.stats.tokens': "{count} 令牌";
|
|
224
|
+
readonly 'graph.lane.input': "输入";
|
|
225
|
+
readonly 'graph.lane.model': "模型";
|
|
226
|
+
readonly 'graph.lane.tool': "工具";
|
|
227
|
+
readonly 'graph.context.inject': "注入";
|
|
228
|
+
readonly 'graph.context.recall': "召回";
|
|
229
|
+
readonly 'graph.status.idle': "空闲";
|
|
230
|
+
readonly 'graph.status.running': "进行中";
|
|
231
|
+
readonly 'graph.status.interrupted': "已中断";
|
|
232
|
+
readonly 'graph.node.system': "系统提示词";
|
|
233
|
+
readonly 'graph.node.user': "用户消息";
|
|
234
|
+
readonly 'graph.node.steering': "插话";
|
|
235
|
+
readonly 'graph.node.context': "上下文";
|
|
236
|
+
readonly 'graph.node.command': "命令";
|
|
237
|
+
readonly 'graph.node.request': "模型请求";
|
|
238
|
+
readonly 'graph.node.compactionRequest': "压缩请求";
|
|
239
|
+
readonly 'graph.node.assistant': "助手消息";
|
|
240
|
+
readonly 'graph.node.streaming': "流式输出";
|
|
241
|
+
readonly 'graph.node.compaction': "上下文压缩";
|
|
242
|
+
readonly 'graph.node.retryScheduled': "等待重试";
|
|
243
|
+
readonly 'graph.node.retryStarted': "重试中";
|
|
244
|
+
readonly 'graph.node.retryCancelled': "重试已取消";
|
|
245
|
+
readonly 'graph.node.error': "错误";
|
|
246
|
+
readonly 'graph.node.maxTokens': "输出上限";
|
|
247
|
+
readonly 'graph.node.tool': "工具";
|
|
248
|
+
readonly 'graph.node.runningCall': "调用中";
|
|
249
|
+
readonly 'graph.node.unknown': "未知事件";
|
|
250
|
+
readonly 'graph.search': "搜索记录";
|
|
251
|
+
readonly 'graph.search.count': "{index}/{total}";
|
|
252
|
+
readonly 'graph.search.none': "无匹配";
|
|
253
|
+
readonly 'graph.zoom.in': "放大";
|
|
254
|
+
readonly 'graph.zoom.out': "缩小";
|
|
255
|
+
readonly 'graph.replay': "回放";
|
|
256
|
+
readonly 'graph.replay.pause': "暂停回放";
|
|
257
|
+
readonly 'graph.replay.speed': "回放速度";
|
|
258
|
+
readonly 'graph.replay.stop': "停止回放";
|
|
259
|
+
readonly 'graph.edge.prompt': "提示";
|
|
260
|
+
readonly 'graph.edge.result': "结果";
|
|
261
|
+
readonly 'graph.edge.dispatch': "派发";
|
|
262
|
+
readonly 'graph.edge.subcall': "子调用";
|
|
263
|
+
readonly 'graph.edge.loop': "循环";
|
|
264
|
+
readonly 'graph.edge.hint': "悬停高亮,点击固定";
|
|
265
|
+
readonly 'graph.stats.slowest': "最慢 {name} {duration}";
|
|
266
|
+
readonly 'graph.stats.leader': "{name} {duration}";
|
|
267
|
+
readonly 'graph.tool.args': "参数 JSON";
|
|
268
|
+
readonly 'graph.tool.pending': "等待结果";
|
|
269
|
+
readonly 'graph.markdown.copy': "复制";
|
|
270
|
+
readonly 'graph.markdown.copied': "复制成功";
|
|
271
|
+
readonly 'graph.markdown.diagram': "Mermaid 图";
|
|
272
|
+
readonly 'graph.markdown.enlarged': "Mermaid 图(放大)";
|
|
273
|
+
readonly 'graph.markdown.footnotes': "脚注";
|
|
274
|
+
readonly 'graph.lightbox': "图片预览";
|
|
275
|
+
readonly 'graph.lightbox.close': "关闭图片预览";
|
|
276
|
+
readonly 'graph.attachment.file': "文件";
|
|
277
|
+
readonly 'graph.attachment.offloaded': "已卸载";
|
|
278
|
+
readonly 'graph.attachment.counts': "图片 {images} · 文件 {files}";
|
|
279
|
+
readonly 'graph.attachment.view': "查看大图";
|
|
280
|
+
};
|
|
281
|
+
/** The trajectory dictionary key union. */
|
|
282
|
+
export type TrajectoryKey = keyof typeof zh;
|
|
283
|
+
declare module '@qilin-agent/client-ui-slots' {
|
|
284
|
+
interface LocaleNamespaceMap {
|
|
285
|
+
/** The complete trajectory ledger, timeline, inspector, and toolbar copy. */
|
|
286
|
+
trajectory: TrajectoryKey;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
/** Namespace-bound translator threaded through trajectory presentation code. */
|
|
290
|
+
export type TrajectoryTranslate = import('@qilin-agent/client-ui-slots').TranslateNS<typeof NS>;
|
|
291
|
+
/** English dictionary, checked complete against the Chinese source of truth. */
|
|
292
|
+
export declare const en: Record<TrajectoryKey, string>;
|
|
293
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SnapshotStore } from '@qilin-agent/client-store';
|
|
2
|
+
/**
|
|
3
|
+
* Create the browser-wide default for expanded JSON strings.
|
|
4
|
+
* @returns A persisted preference sampled only when a string is expanded.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createTrajectoryStringWrappingStore(): SnapshotStore<boolean>;
|
|
7
|
+
//# sourceMappingURL=string-wrapping-store.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Operation-sequence and recorded-time projections for the trajectory overview. */
|
|
2
|
+
import type { TrajectoryTurnModel } from './layout.ts';
|
|
3
|
+
import type { TrajectoryTranslate } from './locales.ts';
|
|
4
|
+
import type { TrajectoryCellKind } from './trajectory-record.ts';
|
|
5
|
+
/** Horizontal projection used by the trajectory timeline. */
|
|
6
|
+
export type TrajectoryTimelineMode = 'sequence' | 'duration' | 'time' | 'actual';
|
|
7
|
+
/** Inclusive selection in the active timeline projection's domain. */
|
|
8
|
+
export interface TrajectoryTimeRange {
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
}
|
|
12
|
+
/** One ledger record projected into the active timeline domain. */
|
|
13
|
+
export interface TrajectoryTimelineSpan extends TrajectoryTimeRange {
|
|
14
|
+
index: number;
|
|
15
|
+
isError: boolean;
|
|
16
|
+
kind: TrajectoryCellKind;
|
|
17
|
+
label: string;
|
|
18
|
+
lane: number;
|
|
19
|
+
}
|
|
20
|
+
/** One turn boundary in the active timeline domain. */
|
|
21
|
+
export interface TrajectoryTimelineTurnBoundary {
|
|
22
|
+
turn: number;
|
|
23
|
+
time: number;
|
|
24
|
+
}
|
|
25
|
+
/** Full-domain model used by the overview. */
|
|
26
|
+
export interface TrajectoryTimelineModel extends TrajectoryTimeRange {
|
|
27
|
+
spans: readonly TrajectoryTimelineSpan[];
|
|
28
|
+
turnBoundaries: readonly TrajectoryTimelineTurnBoundary[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Format a timeline duration as an integer-millisecond label.
|
|
32
|
+
* @param milliseconds - Non-negative duration in milliseconds.
|
|
33
|
+
* @param t - Trajectory locale translator.
|
|
34
|
+
* @returns Millisecond label with thousands separators.
|
|
35
|
+
*/
|
|
36
|
+
export declare function formatTimelineOffset(milliseconds: number, t: TrajectoryTranslate): string;
|
|
37
|
+
/**
|
|
38
|
+
* Project every visible record into a stable three-lane timeline.
|
|
39
|
+
* @param turns - Unfiltered trajectory layout.
|
|
40
|
+
* @param mode - Independent equal/recorded duration and compressed/complete time projection.
|
|
41
|
+
* @returns Timeline model, or `null` when no record is visible.
|
|
42
|
+
*/
|
|
43
|
+
export declare function deriveTrajectoryTimeline(turns: readonly TrajectoryTurnModel[], mode?: TrajectoryTimelineMode): TrajectoryTimelineModel | null;
|
|
44
|
+
/**
|
|
45
|
+
* Identify records active at any point inside an inclusive selected interval.
|
|
46
|
+
* @param turns - Unfiltered trajectory layout.
|
|
47
|
+
* @param range - Selected interval in the active projection.
|
|
48
|
+
* @param mode - Independent equal/recorded duration and compressed/complete time projection.
|
|
49
|
+
* @returns Record indexes inside the focus interval.
|
|
50
|
+
*/
|
|
51
|
+
export declare function trajectoryTimelineFocusIndexes(turns: readonly TrajectoryTurnModel[], range: TrajectoryTimeRange, mode?: TrajectoryTimelineMode): ReadonlySet<number>;
|
|
52
|
+
//# sourceMappingURL=timeline.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Context } from '@qilin-agent/kylin';
|
|
2
|
+
/**
|
|
3
|
+
* Register the Trajectory Assistant lifecycle.
|
|
4
|
+
*
|
|
5
|
+
* @param ctx - Plugin context receiving the Definitions.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerTrajectoryAssistantDefinition(ctx: Context): void;
|
|
8
|
+
//# sourceMappingURL=trajectory-assistant-definition.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Context } from '@qilin-agent/kylin';
|
|
2
|
+
/**
|
|
3
|
+
* Register Trajectory compaction requests and session boundaries.
|
|
4
|
+
*
|
|
5
|
+
* @param ctx - Plugin context receiving the Definitions.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerTrajectoryCompactionDefinitions(ctx: Context): void;
|
|
8
|
+
//# sourceMappingURL=trajectory-compaction-definition.d.ts.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { AssistantMessageNode, ConversationLocation, ConversationNode, ConversationPromptSnapshot, ConversationViewNode, MessageImagesOwnerProps, PartialAssistant, RequestPromptChange, RequestView, RunningToolCall, SystemPromptNode, ToolCallBlock } from '@qilin-agent/client-ui-conversation/client';
|
|
2
|
+
import type { SnapshotSelectorHook } from '@qilin-agent/client-ui-slots';
|
|
3
|
+
/** Request-header facts retained by the Trajectory target. */
|
|
4
|
+
export interface TrajectoryRequestHeaderState {
|
|
5
|
+
readonly seq: number;
|
|
6
|
+
readonly time: number;
|
|
7
|
+
readonly prompt: ConversationPromptSnapshot;
|
|
8
|
+
readonly change?: RequestPromptChange;
|
|
9
|
+
readonly location: ConversationLocation;
|
|
10
|
+
}
|
|
11
|
+
/** In-flight assistant output with the loaded Step start and first token timestamps. */
|
|
12
|
+
export interface TrajectoryPartialAssistant extends PartialAssistant {
|
|
13
|
+
readonly timing?: Pick<NonNullable<AssistantMessageNode['timing']>, 'stepStartTime' | 'firstTokenTime'>;
|
|
14
|
+
}
|
|
15
|
+
/** One independently assembled contribution to the legacy Trajectory ledger. */
|
|
16
|
+
export type TrajectoryContribution = {
|
|
17
|
+
readonly kind: 'system-prompt';
|
|
18
|
+
readonly prompt: SystemPromptNode;
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: 'node';
|
|
21
|
+
readonly node: ConversationNode;
|
|
22
|
+
} | {
|
|
23
|
+
readonly kind: 'assistant';
|
|
24
|
+
readonly node?: AssistantMessageNode;
|
|
25
|
+
readonly partial: TrajectoryPartialAssistant | null;
|
|
26
|
+
readonly request?: Extract<RequestView, {
|
|
27
|
+
purpose: 'assistant';
|
|
28
|
+
}>;
|
|
29
|
+
} | {
|
|
30
|
+
readonly kind: 'tool';
|
|
31
|
+
readonly root: ToolCallBlock;
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: 'request-header';
|
|
34
|
+
readonly header: TrajectoryRequestHeaderState;
|
|
35
|
+
} | {
|
|
36
|
+
readonly kind: 'compaction';
|
|
37
|
+
readonly request: Extract<RequestView, {
|
|
38
|
+
purpose: 'compaction';
|
|
39
|
+
}>;
|
|
40
|
+
} | {
|
|
41
|
+
readonly kind: 'session-end';
|
|
42
|
+
readonly seq: number;
|
|
43
|
+
readonly time: number;
|
|
44
|
+
} | {
|
|
45
|
+
readonly kind: 'turn-end';
|
|
46
|
+
readonly turn: number;
|
|
47
|
+
readonly time: number;
|
|
48
|
+
readonly error?: string;
|
|
49
|
+
readonly errorCode?: string;
|
|
50
|
+
};
|
|
51
|
+
/** Target envelope consumed by the Trajectory snapshot builder. */
|
|
52
|
+
export interface TrajectoryConversationViewNode extends ConversationViewNode {
|
|
53
|
+
readonly target: 'trajectory';
|
|
54
|
+
readonly anchorSeq: number;
|
|
55
|
+
readonly location: ConversationLocation;
|
|
56
|
+
readonly data: TrajectoryContribution;
|
|
57
|
+
}
|
|
58
|
+
/** Stage-oriented Trajectory data assembled from registered business Contexts. */
|
|
59
|
+
export interface TrajectorySnapshot {
|
|
60
|
+
/** Complete loaded prompt text whose request header is outside the window. */
|
|
61
|
+
readonly systemPrompts?: readonly SystemPromptNode[];
|
|
62
|
+
readonly eventNodes: readonly ConversationNode[];
|
|
63
|
+
readonly eventLocations: ReadonlyMap<number, ConversationLocation>;
|
|
64
|
+
readonly requests: readonly RequestView[];
|
|
65
|
+
readonly callSchemas: ReadonlyMap<string, ConversationPromptSnapshot['tools'][number]>;
|
|
66
|
+
readonly partial: TrajectoryPartialAssistant | null;
|
|
67
|
+
readonly runningCalls: readonly RunningToolCall[];
|
|
68
|
+
}
|
|
69
|
+
/** Selector hook over the current Conversation binding's Trajectory target. */
|
|
70
|
+
export type UseTrajectory = SnapshotSelectorHook<TrajectorySnapshot>;
|
|
71
|
+
declare module '@qilin-agent/client-ui-conversation/client' {
|
|
72
|
+
interface ConversationViewSnapshotMap {
|
|
73
|
+
/** Independently assembled data consumed by the Trajectory view. */
|
|
74
|
+
trajectory: TrajectorySnapshot;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
declare module '@qilin-agent/client-ui-slots' {
|
|
78
|
+
interface SessionStandardProps {
|
|
79
|
+
/** Selector hook over the current Conversation binding's Trajectory target. */
|
|
80
|
+
useTrajectory: UseTrajectory;
|
|
81
|
+
}
|
|
82
|
+
interface SlotMap {
|
|
83
|
+
/**
|
|
84
|
+
* Renderer for one group of durable record images in the Trajectory
|
|
85
|
+
* ledger. The owner supplies image references, an authorized loader, and
|
|
86
|
+
* alignment. A registration replaces the shipped gallery; without one,
|
|
87
|
+
* images are omitted.
|
|
88
|
+
*/
|
|
89
|
+
'conversation.trajectory.images': {
|
|
90
|
+
kind: 'single';
|
|
91
|
+
scope: 'session';
|
|
92
|
+
owner: MessageImagesOwnerProps;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=trajectory-contract.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConversationNodeContext } from '@qilin-agent/client-ui-conversation/client';
|
|
2
|
+
import type { TrajectoryContribution, TrajectoryConversationViewNode } from './trajectory-contract.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Wrap one contribution in the Engine-owned target envelope.
|
|
5
|
+
*
|
|
6
|
+
* @param context - Context that owns the contribution identity.
|
|
7
|
+
* @param anchorSeq - Sequence used to order the contribution.
|
|
8
|
+
* @param data - Trajectory-specific contribution payload.
|
|
9
|
+
* @returns The contribution wrapped as a Trajectory view node.
|
|
10
|
+
*/
|
|
11
|
+
export declare function trajectoryNode(context: ConversationNodeContext, anchorSeq: number, data: TrajectoryContribution): TrajectoryConversationViewNode;
|
|
12
|
+
//# sourceMappingURL=trajectory-definition-common.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Trajectory-owned conversion from durable Session events to ledger view data. */
|
|
2
|
+
import type { ContentBlock, StreamChunk } from '@qilin-agent/llm/types';
|
|
3
|
+
import type { AssistantBlock, ContextProducerView, KnownContextForm } from '@qilin-agent/client-ui-conversation/client';
|
|
4
|
+
/**
|
|
5
|
+
* Read the target-supported presentation form from a durable message source.
|
|
6
|
+
* @param source - Logged `user/message` source.
|
|
7
|
+
* @returns Supported form, or null for the opaque presentation.
|
|
8
|
+
*/
|
|
9
|
+
export declare function contextForm(source: unknown): KnownContextForm | null;
|
|
10
|
+
/**
|
|
11
|
+
* Project a durable message source to the Trajectory row's role and producer label.
|
|
12
|
+
* @param source - Logged `user/message` source.
|
|
13
|
+
* @returns Role and label rendered by Trajectory.
|
|
14
|
+
*/
|
|
15
|
+
export declare function contextProducer(source: unknown): ContextProducerView;
|
|
16
|
+
/**
|
|
17
|
+
* Classify finalized Assistant content for Trajectory rendering.
|
|
18
|
+
* @param content - Core content blocks.
|
|
19
|
+
* @returns Trajectory blocks in source order.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toAssistantBlocks(content: readonly ContentBlock[]): AssistantBlock[];
|
|
22
|
+
/**
|
|
23
|
+
* Classify one finalized Assistant block for Trajectory rendering.
|
|
24
|
+
* @param block - Core content block.
|
|
25
|
+
* @returns Trajectory block.
|
|
26
|
+
*/
|
|
27
|
+
export declare function toAssistantBlock(block: ContentBlock): AssistantBlock;
|
|
28
|
+
/**
|
|
29
|
+
* Create the initial Trajectory block for one streamed Assistant block kind.
|
|
30
|
+
* @param blockType - Wire block kind.
|
|
31
|
+
* @returns Empty block ready to receive deltas.
|
|
32
|
+
*/
|
|
33
|
+
export declare function emptyAssistantBlock(blockType: string): AssistantBlock;
|
|
34
|
+
/** Display-safe failure fields retained by Trajectory projections. */
|
|
35
|
+
export interface DisplayFailure {
|
|
36
|
+
readonly code?: string;
|
|
37
|
+
readonly message: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Convert a durable failure to locale-independent fields safe for Trajectory.
|
|
41
|
+
* @param failure - Failure preserved by a Session event.
|
|
42
|
+
* @returns Sanitized message and optional stable provider code.
|
|
43
|
+
*/
|
|
44
|
+
export declare function displayFailure(failure: unknown): DisplayFailure;
|
|
45
|
+
/**
|
|
46
|
+
* Whether a stream chunk carries visible model output for Trajectory timing.
|
|
47
|
+
* @param chunk - Stream chunk to inspect.
|
|
48
|
+
* @returns true for a non-empty text, reasoning, or Tool-call delta.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isTokenDelta(chunk: StreamChunk): boolean;
|
|
51
|
+
//# sourceMappingURL=trajectory-event-projection.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure playback pacing and canvas-zoom arithmetic for the trajectory graph.
|
|
3
|
+
*
|
|
4
|
+
* The replay walks the ledger in the order the events actually happened,
|
|
5
|
+
* pacing each hop by the recorded timestamps: the gap between two adjacent
|
|
6
|
+
* records, clamped so a long tool call cannot freeze the replay and a burst
|
|
7
|
+
* of records cannot blur past, then divided by the selected speed. The zoom
|
|
8
|
+
* helpers keep the canvas point under the pointer fixed while the scale
|
|
9
|
+
* changes. The module carries no React and no DOM.
|
|
10
|
+
*/
|
|
11
|
+
import type { TrajectoryTimelineStep } from './trajectory-graph.ts';
|
|
12
|
+
/** Recorded-gap clamp for one replay hop, in milliseconds. */
|
|
13
|
+
export declare const HOP_MIN_MS = 90;
|
|
14
|
+
/** Upper bound of one replay hop's recorded gap, in milliseconds. */
|
|
15
|
+
export declare const HOP_MAX_MS = 1100;
|
|
16
|
+
/** Replay speeds, in the order the speed button cycles them. */
|
|
17
|
+
export declare const REPLAY_SPEEDS: readonly number[];
|
|
18
|
+
/** Zoom bounds for the canvas scale. */
|
|
19
|
+
export declare const ZOOM_MIN = 0.4;
|
|
20
|
+
/** Upper bound of the canvas scale. */
|
|
21
|
+
export declare const ZOOM_MAX = 2.4;
|
|
22
|
+
/** Scale applied per wheel notch. */
|
|
23
|
+
export declare const ZOOM_WHEEL_STEP = 1.1;
|
|
24
|
+
/**
|
|
25
|
+
* Keep a value inside a closed range.
|
|
26
|
+
* @param value - the number to confine.
|
|
27
|
+
* @param min - the inclusive lower bound.
|
|
28
|
+
* @param max - the inclusive upper bound.
|
|
29
|
+
* @returns `value` when inside the range, otherwise the violated bound.
|
|
30
|
+
*/
|
|
31
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
32
|
+
/**
|
|
33
|
+
* Replay pacing of one hop: the recorded gap to the previous record, clamped
|
|
34
|
+
* and scaled by the replay speed.
|
|
35
|
+
* @param timeline - the ledger-order walk with each record's timestamp.
|
|
36
|
+
* @param index - the hop whose pacing to read.
|
|
37
|
+
* @param speed - the replay speed divisor.
|
|
38
|
+
* @returns The delay in milliseconds before the hop's record lights up.
|
|
39
|
+
*/
|
|
40
|
+
export declare function hopDelay(timeline: readonly TrajectoryTimelineStep[], index: number, speed: number): number;
|
|
41
|
+
/**
|
|
42
|
+
* The next speed in the cycle after the given one.
|
|
43
|
+
* @param speed - the currently selected replay speed.
|
|
44
|
+
* @returns The following entry of `REPLAY_SPEEDS`, wrapping to the first.
|
|
45
|
+
*/
|
|
46
|
+
export declare function nextSpeed(speed: number): number;
|
|
47
|
+
/**
|
|
48
|
+
* Multiplicative zoom step, clamped to the canvas bounds.
|
|
49
|
+
* @param scale - the current scale.
|
|
50
|
+
* @param factor - the growth factor; values below 1 shrink.
|
|
51
|
+
* @returns The new scale inside `ZOOM_MIN`..`ZOOM_MAX`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function zoomedBy(scale: number, factor: number): number;
|
|
54
|
+
/**
|
|
55
|
+
* The scroll offset that keeps one content point fixed while the scale
|
|
56
|
+
* changes from `oldScale` to `newScale`.
|
|
57
|
+
* @param offsetInViewport - distance from the scroller's leading edge to the anchor point.
|
|
58
|
+
* @param scroll - the scroller's current scroll offset along the same axis.
|
|
59
|
+
* @param oldScale - the scale the current scroll offset was measured at.
|
|
60
|
+
* @param newScale - the scale to move to.
|
|
61
|
+
* @returns The scroll offset that leaves the anchored content point under the same viewport position.
|
|
62
|
+
*/
|
|
63
|
+
export declare function anchoredScroll(offsetInViewport: number, scroll: number, oldScale: number, newScale: number): number;
|
|
64
|
+
//# sourceMappingURL=trajectory-graph-canvas.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentation helpers for the trajectory graph's record inspector: the
|
|
3
|
+
* ordered attachment rows (localized names and recorded metadata) and the
|
|
4
|
+
* pretty-printed JSON the arguments disclosure renders.
|
|
5
|
+
*/
|
|
6
|
+
import type { TrajectoryTranslate } from './locales.ts';
|
|
7
|
+
import type { TrajectoryAttachment } from './trajectory-graph.ts';
|
|
8
|
+
/** One inspector attachment row's resolved copy. */
|
|
9
|
+
export interface AttachmentPresentation {
|
|
10
|
+
readonly kind: 'image' | 'file';
|
|
11
|
+
/** Recorded name, or the localized ordinal/backup label. */
|
|
12
|
+
readonly name: string;
|
|
13
|
+
/** One line of recorded metadata: size, media type, dimensions, offload marker. */
|
|
14
|
+
readonly meta: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resolve one attachment's display copy.
|
|
18
|
+
* @param attachment - the recorded reference.
|
|
19
|
+
* @param ordinal - one-based position among this record's attachments, for unnamed images.
|
|
20
|
+
* @param t - namespace-bound translate for the backup and metadata labels.
|
|
21
|
+
* @returns The row's kind, name, and metadata line (empty when nothing was recorded).
|
|
22
|
+
*/
|
|
23
|
+
export declare function attachmentPresentation(attachment: TrajectoryAttachment, ordinal: number, t: TrajectoryTranslate): AttachmentPresentation;
|
|
24
|
+
/**
|
|
25
|
+
* Pretty-print a JSON payload for the collapsible arguments disclosure.
|
|
26
|
+
* @param raw - the recorded payload, verbatim.
|
|
27
|
+
* @returns The payload re-printed with two-space indent, or the raw text when it is not JSON.
|
|
28
|
+
*/
|
|
29
|
+
export declare function prettyJson(raw: string): string;
|
|
30
|
+
//# sourceMappingURL=trajectory-graph-inspector.d.ts.map
|