@shipfox/client-logs 27.0.0 → 29.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +17 -0
- package/dist/components/agent-session-rows.js +273 -232
- package/dist/components/agent-session-rows.js.map +1 -1
- package/dist/components/log-view.d.ts.map +1 -1
- package/dist/components/log-view.js +4 -1
- package/dist/components/log-view.js.map +1 -1
- package/dist/core/log-tree.d.ts.map +1 -1
- package/dist/core/log-tree.js +109 -123
- package/dist/core/log-tree.js.map +1 -1
- package/dist/hooks/api/step-logs.d.ts.map +1 -1
- package/dist/hooks/api/step-logs.js +51 -38
- package/dist/hooks/api/step-logs.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/agent-session-rows.tsx +259 -177
- package/src/components/log-view.tsx +7 -5
- package/src/core/log-tree.ts +117 -104
- package/src/hooks/api/step-logs.ts +73 -47
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 14 files with swc (
|
|
2
|
+
Successfully compiled: 14 files with swc (397.33ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @shipfox/client-logs
|
|
2
2
|
|
|
3
|
+
## 29.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b416c4c: Preserves existing package behavior while simplifying internal control flow.
|
|
8
|
+
- Updated dependencies [b416c4c]
|
|
9
|
+
- @shipfox/react-ui@2.3.3
|
|
10
|
+
- @shipfox/api-logs-dto@17.0.0
|
|
11
|
+
- @shipfox/client-api@6.0.1
|
|
12
|
+
|
|
13
|
+
## 27.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [87b71ed]
|
|
18
|
+
- @shipfox/react-ui@2.3.2
|
|
19
|
+
|
|
3
20
|
## 27.0.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -31,272 +31,313 @@ function AgentSessionRowView({ row, resolvedToolCallIds, toolCallNames, indent,
|
|
|
31
31
|
};
|
|
32
32
|
switch(row.kind){
|
|
33
33
|
case 'message':
|
|
34
|
-
return /*#__PURE__*/ _jsx(
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
return /*#__PURE__*/ _jsx(SessionMessageRow, {
|
|
35
|
+
row: row,
|
|
36
|
+
indent: indent
|
|
37
|
+
});
|
|
38
|
+
case 'thinking':
|
|
39
|
+
return /*#__PURE__*/ _jsx(SessionThinkingRow, {
|
|
40
|
+
row: row,
|
|
37
41
|
indent: indent,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
disclosure: disclosureProps
|
|
43
|
+
});
|
|
44
|
+
case 'tool-call':
|
|
45
|
+
return /*#__PURE__*/ _jsx(SessionToolCallRow, {
|
|
46
|
+
row: row,
|
|
47
|
+
indent: indent,
|
|
48
|
+
disclosure: disclosureProps,
|
|
49
|
+
resolvedToolCallIds: resolvedToolCallIds
|
|
50
|
+
});
|
|
51
|
+
case 'tool-result':
|
|
52
|
+
return /*#__PURE__*/ _jsx(SessionToolResultRow, {
|
|
53
|
+
row: row,
|
|
54
|
+
indent: indent,
|
|
55
|
+
disclosure: disclosureProps,
|
|
56
|
+
toolCallNames: toolCallNames
|
|
57
|
+
});
|
|
58
|
+
case 'lifecycle':
|
|
59
|
+
return /*#__PURE__*/ _jsx(SessionLifecycleRow, {
|
|
60
|
+
row: row,
|
|
61
|
+
indent: indent
|
|
62
|
+
});
|
|
63
|
+
case 'raw':
|
|
64
|
+
return /*#__PURE__*/ _jsx(SessionRawRow, {
|
|
65
|
+
row: row,
|
|
66
|
+
indent: indent,
|
|
67
|
+
disclosure: disclosureProps
|
|
68
|
+
});
|
|
69
|
+
default:
|
|
70
|
+
return assertNever(row);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function SessionMessageRow({ row, indent }) {
|
|
74
|
+
return /*#__PURE__*/ _jsx(LogRow, {
|
|
75
|
+
lineNumber: null,
|
|
76
|
+
timestamp: new Date(row.timestamp),
|
|
77
|
+
indent: indent,
|
|
78
|
+
tone: row.terminalFailure ? 'error' : 'default',
|
|
79
|
+
"data-log-terminal-failure": row.terminalFailure ? 'true' : undefined,
|
|
80
|
+
children: /*#__PURE__*/ _jsx(LogContent, {
|
|
81
|
+
className: "text-foreground-contrast-primary",
|
|
82
|
+
children: /*#__PURE__*/ _jsxs("span", {
|
|
83
|
+
className: "flex min-w-0 items-start gap-inline",
|
|
84
|
+
children: [
|
|
85
|
+
/*#__PURE__*/ _jsx(MessageIcon, {
|
|
86
|
+
role: row.role,
|
|
87
|
+
terminalFailure: row.terminalFailure
|
|
88
|
+
}),
|
|
89
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
90
|
+
className: "flex min-w-0 flex-1 flex-col gap-tight",
|
|
44
91
|
children: [
|
|
45
|
-
/*#__PURE__*/ _jsx(MessageIcon, {
|
|
46
|
-
role: row.role,
|
|
47
|
-
terminalFailure: row.terminalFailure
|
|
48
|
-
}),
|
|
49
92
|
/*#__PURE__*/ _jsxs("span", {
|
|
50
|
-
className: "flex min-w-0
|
|
93
|
+
className: "flex min-w-0 items-center gap-inline",
|
|
51
94
|
children: [
|
|
52
|
-
/*#__PURE__*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/*#__PURE__*/ _jsx(MessageRoleLabel, {
|
|
56
|
-
label: row.label,
|
|
57
|
-
terminalFailure: row.terminalFailure
|
|
58
|
-
}),
|
|
59
|
-
/*#__PURE__*/ _jsx(RowMetadata, {
|
|
60
|
-
meta: row.meta,
|
|
61
|
-
className: "ml-auto flex-none"
|
|
62
|
-
})
|
|
63
|
-
]
|
|
95
|
+
/*#__PURE__*/ _jsx(MessageRoleLabel, {
|
|
96
|
+
label: row.label,
|
|
97
|
+
terminalFailure: row.terminalFailure
|
|
64
98
|
}),
|
|
65
|
-
/*#__PURE__*/ _jsx(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
text: row.text
|
|
69
|
-
})
|
|
99
|
+
/*#__PURE__*/ _jsx(RowMetadata, {
|
|
100
|
+
meta: row.meta,
|
|
101
|
+
className: "ml-auto flex-none"
|
|
70
102
|
})
|
|
71
103
|
]
|
|
104
|
+
}),
|
|
105
|
+
/*#__PURE__*/ _jsx("span", {
|
|
106
|
+
className: "block min-w-0",
|
|
107
|
+
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
108
|
+
text: row.text
|
|
109
|
+
})
|
|
72
110
|
})
|
|
73
111
|
]
|
|
74
112
|
})
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
-
case 'thinking':
|
|
78
|
-
return /*#__PURE__*/ _jsxs(LogDisclosure, {
|
|
79
|
-
indent: indent,
|
|
80
|
-
...disclosureProps,
|
|
81
|
-
children: [
|
|
82
|
-
/*#__PURE__*/ _jsx(LogDisclosureTrigger, {
|
|
83
|
-
summary: wordSummary(row.text),
|
|
84
|
-
timestamp: new Date(row.timestamp),
|
|
85
|
-
className: "text-foreground-contrast-secondary",
|
|
86
|
-
children: "thinking"
|
|
87
|
-
}),
|
|
88
|
-
/*#__PURE__*/ _jsx(LogDisclosureContent, {
|
|
89
|
-
className: "text-foreground-contrast-secondary",
|
|
90
|
-
children: /*#__PURE__*/ _jsx(LogContent, {
|
|
91
|
-
className: "text-foreground-contrast-secondary",
|
|
92
|
-
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
93
|
-
text: row.text
|
|
94
|
-
})
|
|
95
|
-
})
|
|
96
|
-
})
|
|
97
113
|
]
|
|
98
|
-
})
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function SessionThinkingRow({ row, indent, disclosure }) {
|
|
119
|
+
return /*#__PURE__*/ _jsxs(LogDisclosure, {
|
|
120
|
+
indent: indent,
|
|
121
|
+
...disclosure,
|
|
122
|
+
children: [
|
|
123
|
+
/*#__PURE__*/ _jsx(LogDisclosureTrigger, {
|
|
124
|
+
summary: wordSummary(row.text),
|
|
125
|
+
timestamp: new Date(row.timestamp),
|
|
126
|
+
className: "text-foreground-contrast-secondary",
|
|
127
|
+
children: "thinking"
|
|
128
|
+
}),
|
|
129
|
+
/*#__PURE__*/ _jsx(LogDisclosureContent, {
|
|
130
|
+
className: "text-foreground-contrast-secondary",
|
|
131
|
+
children: /*#__PURE__*/ _jsx(LogContent, {
|
|
132
|
+
className: "text-foreground-contrast-secondary",
|
|
133
|
+
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
134
|
+
text: row.text
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function SessionToolCallRow({ row, indent, disclosure, resolvedToolCallIds }) {
|
|
142
|
+
const awaitingResult = row.id != null && !resolvedToolCallIds.has(row.id);
|
|
143
|
+
return /*#__PURE__*/ _jsxs(LogDisclosure, {
|
|
144
|
+
indent: indent,
|
|
145
|
+
...disclosure,
|
|
146
|
+
children: [
|
|
147
|
+
/*#__PURE__*/ _jsx(LogDisclosureTrigger, {
|
|
148
|
+
timestamp: new Date(row.timestamp),
|
|
149
|
+
summary: compactPreview(row.summary ?? row.input),
|
|
150
|
+
trailing: awaitingResult ? /*#__PURE__*/ _jsxs("span", {
|
|
151
|
+
className: "inline-flex items-center gap-tight",
|
|
105
152
|
children: [
|
|
106
|
-
/*#__PURE__*/ _jsx(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
className: "inline-flex items-center gap-tight",
|
|
111
|
-
children: [
|
|
112
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
113
|
-
name: "loader4Line",
|
|
114
|
-
className: "size-12 motion-safe:animate-spin",
|
|
115
|
-
"aria-hidden": "true"
|
|
116
|
-
}),
|
|
117
|
-
"awaiting result"
|
|
118
|
-
]
|
|
119
|
-
}) : null,
|
|
120
|
-
children: /*#__PURE__*/ _jsxs("span", {
|
|
121
|
-
className: "inline-flex min-w-0 items-center gap-inline",
|
|
122
|
-
children: [
|
|
123
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
124
|
-
name: "terminalBoxLine",
|
|
125
|
-
className: "size-14 flex-none",
|
|
126
|
-
"aria-hidden": "true"
|
|
127
|
-
}),
|
|
128
|
-
/*#__PURE__*/ _jsxs("span", {
|
|
129
|
-
className: "truncate",
|
|
130
|
-
children: [
|
|
131
|
-
"tool ",
|
|
132
|
-
row.name
|
|
133
|
-
]
|
|
134
|
-
})
|
|
135
|
-
]
|
|
136
|
-
})
|
|
153
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
154
|
+
name: "loader4Line",
|
|
155
|
+
className: "size-12 motion-safe:animate-spin",
|
|
156
|
+
"aria-hidden": "true"
|
|
137
157
|
}),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
156
|
-
text: row.input
|
|
157
|
-
})
|
|
158
|
-
})
|
|
158
|
+
"awaiting result"
|
|
159
|
+
]
|
|
160
|
+
}) : null,
|
|
161
|
+
children: /*#__PURE__*/ _jsxs("span", {
|
|
162
|
+
className: "inline-flex min-w-0 items-center gap-inline",
|
|
163
|
+
children: [
|
|
164
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
165
|
+
name: "terminalBoxLine",
|
|
166
|
+
className: "size-14 flex-none",
|
|
167
|
+
"aria-hidden": "true"
|
|
168
|
+
}),
|
|
169
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
170
|
+
className: "truncate",
|
|
171
|
+
children: [
|
|
172
|
+
"tool ",
|
|
173
|
+
row.name
|
|
174
|
+
]
|
|
159
175
|
})
|
|
160
176
|
]
|
|
161
|
-
})
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const toolName = row.toolName === 'tool' ? (row.toolCallId != null ? toolCallNames.get(row.toolCallId) : undefined) ?? '(unmatched)' : row.toolName;
|
|
166
|
-
return /*#__PURE__*/ _jsxs(LogDisclosure, {
|
|
167
|
-
indent: indent,
|
|
168
|
-
...disclosureProps,
|
|
177
|
+
})
|
|
178
|
+
}),
|
|
179
|
+
/*#__PURE__*/ _jsx(LogDisclosureContent, {
|
|
180
|
+
children: row.summary != null ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
169
181
|
children: [
|
|
170
|
-
/*#__PURE__*/ _jsx(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
trailing: /*#__PURE__*/ _jsxs("span", {
|
|
174
|
-
className: cn('inline-flex items-center gap-tight', row.isError ? 'text-tag-error-icon' : 'text-foreground-contrast-secondary'),
|
|
175
|
-
children: [
|
|
176
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
177
|
-
name: row.isError ? 'closeCircleLine' : 'checkLine',
|
|
178
|
-
className: "size-12",
|
|
179
|
-
"aria-hidden": "true"
|
|
180
|
-
}),
|
|
181
|
-
row.isError ? 'error' : 'ok'
|
|
182
|
-
]
|
|
183
|
-
}),
|
|
184
|
-
children: /*#__PURE__*/ _jsxs("span", {
|
|
185
|
-
className: "inline-flex min-w-0 items-center gap-inline",
|
|
186
|
-
children: [
|
|
187
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
188
|
-
name: "terminalWindowLine",
|
|
189
|
-
className: "size-14 flex-none",
|
|
190
|
-
"aria-hidden": "true"
|
|
191
|
-
}),
|
|
192
|
-
/*#__PURE__*/ _jsxs("span", {
|
|
193
|
-
className: "truncate",
|
|
194
|
-
children: [
|
|
195
|
-
"result ",
|
|
196
|
-
toolName
|
|
197
|
-
]
|
|
198
|
-
})
|
|
199
|
-
]
|
|
182
|
+
/*#__PURE__*/ _jsx(LogContent, {
|
|
183
|
+
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
184
|
+
text: row.summary
|
|
200
185
|
})
|
|
201
186
|
}),
|
|
202
|
-
/*#__PURE__*/ _jsx(
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
207
|
-
text: row.output
|
|
208
|
-
})
|
|
187
|
+
/*#__PURE__*/ _jsx(LogContent, {
|
|
188
|
+
variant: "code",
|
|
189
|
+
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
190
|
+
text: row.input
|
|
209
191
|
})
|
|
210
192
|
})
|
|
211
193
|
]
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
194
|
+
}) : /*#__PURE__*/ _jsx(LogContent, {
|
|
195
|
+
variant: "code",
|
|
196
|
+
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
197
|
+
text: row.input
|
|
198
|
+
})
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
]
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function SessionToolResultRow({ row, indent, disclosure, toolCallNames }) {
|
|
205
|
+
const toolName = row.toolName === 'tool' ? (row.toolCallId != null ? toolCallNames.get(row.toolCallId) : undefined) ?? '(unmatched)' : row.toolName;
|
|
206
|
+
return /*#__PURE__*/ _jsxs(LogDisclosure, {
|
|
207
|
+
indent: indent,
|
|
208
|
+
...disclosure,
|
|
209
|
+
children: [
|
|
210
|
+
/*#__PURE__*/ _jsx(LogDisclosureTrigger, {
|
|
217
211
|
timestamp: new Date(row.timestamp),
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
212
|
+
summary: compactPreview(row.output),
|
|
213
|
+
trailing: /*#__PURE__*/ _jsxs("span", {
|
|
214
|
+
className: cn('inline-flex items-center gap-tight', row.isError ? 'text-tag-error-icon' : 'text-foreground-contrast-secondary'),
|
|
215
|
+
children: [
|
|
216
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
217
|
+
name: row.isError ? 'closeCircleLine' : 'checkLine',
|
|
218
|
+
className: "size-12",
|
|
219
|
+
"aria-hidden": "true"
|
|
220
|
+
}),
|
|
221
|
+
row.isError ? 'error' : 'ok'
|
|
222
|
+
]
|
|
223
|
+
}),
|
|
224
|
+
children: /*#__PURE__*/ _jsxs("span", {
|
|
225
|
+
className: "inline-flex min-w-0 items-center gap-inline",
|
|
226
|
+
children: [
|
|
227
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
228
|
+
name: "terminalWindowLine",
|
|
229
|
+
className: "size-14 flex-none",
|
|
230
|
+
"aria-hidden": "true"
|
|
231
|
+
}),
|
|
232
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
233
|
+
className: "truncate",
|
|
234
|
+
children: [
|
|
235
|
+
"result ",
|
|
236
|
+
toolName
|
|
237
|
+
]
|
|
238
|
+
})
|
|
239
|
+
]
|
|
240
|
+
})
|
|
241
|
+
}),
|
|
242
|
+
/*#__PURE__*/ _jsx(LogDisclosureContent, {
|
|
221
243
|
children: /*#__PURE__*/ _jsx(LogContent, {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
244
|
+
variant: "code",
|
|
245
|
+
className: "text-foreground-contrast-primary",
|
|
246
|
+
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
247
|
+
text: row.output
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
})
|
|
251
|
+
]
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function SessionLifecycleRow({ row, indent }) {
|
|
255
|
+
return /*#__PURE__*/ _jsx(LogRow, {
|
|
256
|
+
lineNumber: null,
|
|
257
|
+
timestamp: new Date(row.timestamp),
|
|
258
|
+
indent: indent,
|
|
259
|
+
tone: row.tone,
|
|
260
|
+
"data-log-terminal-failure": row.terminalFailure ? 'true' : undefined,
|
|
261
|
+
children: /*#__PURE__*/ _jsx(LogContent, {
|
|
262
|
+
className: "text-foreground-contrast-secondary",
|
|
263
|
+
children: /*#__PURE__*/ _jsxs("span", {
|
|
264
|
+
className: "inline-flex w-full items-center gap-inline",
|
|
265
|
+
children: [
|
|
266
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
267
|
+
name: "informationLine",
|
|
268
|
+
className: "size-14 flex-none",
|
|
269
|
+
"aria-hidden": "true"
|
|
270
|
+
}),
|
|
271
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
272
|
+
className: "min-w-0",
|
|
225
273
|
children: [
|
|
226
|
-
/*#__PURE__*/ _jsx(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"aria-hidden": "true"
|
|
274
|
+
/*#__PURE__*/ _jsx("span", {
|
|
275
|
+
className: "font-medium",
|
|
276
|
+
children: row.label
|
|
230
277
|
}),
|
|
231
|
-
/*#__PURE__*/ _jsxs(
|
|
232
|
-
className: "min-w-0",
|
|
278
|
+
row.detail != null ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
233
279
|
children: [
|
|
280
|
+
' · ',
|
|
234
281
|
/*#__PURE__*/ _jsx("span", {
|
|
235
|
-
className: "
|
|
236
|
-
children: row.
|
|
237
|
-
})
|
|
238
|
-
row.detail != null ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
239
|
-
children: [
|
|
240
|
-
' · ',
|
|
241
|
-
/*#__PURE__*/ _jsx("span", {
|
|
242
|
-
className: "text-foreground-contrast-secondary",
|
|
243
|
-
children: row.detail
|
|
244
|
-
})
|
|
245
|
-
]
|
|
246
|
-
}) : null
|
|
282
|
+
className: "text-foreground-contrast-secondary",
|
|
283
|
+
children: row.detail
|
|
284
|
+
})
|
|
247
285
|
]
|
|
248
|
-
})
|
|
249
|
-
/*#__PURE__*/ _jsx("span", {
|
|
250
|
-
"aria-hidden": "true",
|
|
251
|
-
className: "h-px flex-1 border-t border-dashed border-current opacity-30"
|
|
252
|
-
}),
|
|
253
|
-
/*#__PURE__*/ _jsx(RowMetadata, {
|
|
254
|
-
meta: row.meta
|
|
255
|
-
})
|
|
286
|
+
}) : null
|
|
256
287
|
]
|
|
257
|
-
})
|
|
258
|
-
})
|
|
259
|
-
});
|
|
260
|
-
case 'raw':
|
|
261
|
-
return /*#__PURE__*/ _jsxs(LogDisclosure, {
|
|
262
|
-
indent: indent,
|
|
263
|
-
...disclosureProps,
|
|
264
|
-
children: [
|
|
265
|
-
/*#__PURE__*/ _jsx(LogDisclosureTrigger, {
|
|
266
|
-
timestamp: new Date(row.timestamp),
|
|
267
|
-
summary: compactPreview(row.raw),
|
|
268
|
-
className: "text-foreground-contrast-primary",
|
|
269
|
-
children: /*#__PURE__*/ _jsxs("span", {
|
|
270
|
-
className: "inline-flex min-w-0 items-center gap-inline",
|
|
271
|
-
children: [
|
|
272
|
-
/*#__PURE__*/ _jsx(Icon, {
|
|
273
|
-
name: "errorWarningLine",
|
|
274
|
-
className: "size-14 flex-none text-tag-warning-icon",
|
|
275
|
-
"aria-hidden": "true"
|
|
276
|
-
}),
|
|
277
|
-
/*#__PURE__*/ _jsx("span", {
|
|
278
|
-
className: "truncate",
|
|
279
|
-
children: row.label
|
|
280
|
-
})
|
|
281
|
-
]
|
|
282
|
-
})
|
|
283
288
|
}),
|
|
284
|
-
/*#__PURE__*/ _jsx(
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
})
|
|
289
|
+
/*#__PURE__*/ _jsx("span", {
|
|
290
|
+
"aria-hidden": "true",
|
|
291
|
+
className: "h-px flex-1 border-t border-dashed border-current opacity-30"
|
|
292
|
+
}),
|
|
293
|
+
/*#__PURE__*/ _jsx(RowMetadata, {
|
|
294
|
+
meta: row.meta
|
|
291
295
|
})
|
|
292
296
|
]
|
|
293
|
-
})
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
+
})
|
|
298
|
+
})
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function SessionRawRow({ row, indent, disclosure }) {
|
|
302
|
+
return /*#__PURE__*/ _jsxs(LogDisclosure, {
|
|
303
|
+
indent: indent,
|
|
304
|
+
...disclosure,
|
|
305
|
+
children: [
|
|
306
|
+
/*#__PURE__*/ _jsx(LogDisclosureTrigger, {
|
|
307
|
+
timestamp: new Date(row.timestamp),
|
|
308
|
+
summary: compactPreview(row.raw),
|
|
309
|
+
className: "text-foreground-contrast-primary",
|
|
310
|
+
children: /*#__PURE__*/ _jsxs("span", {
|
|
311
|
+
className: "inline-flex min-w-0 items-center gap-inline",
|
|
312
|
+
children: [
|
|
313
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
314
|
+
name: "errorWarningLine",
|
|
315
|
+
className: "size-14 flex-none text-tag-warning-icon",
|
|
316
|
+
"aria-hidden": "true"
|
|
317
|
+
}),
|
|
318
|
+
/*#__PURE__*/ _jsx("span", {
|
|
319
|
+
className: "truncate",
|
|
320
|
+
children: row.label
|
|
321
|
+
})
|
|
322
|
+
]
|
|
323
|
+
})
|
|
324
|
+
}),
|
|
325
|
+
/*#__PURE__*/ _jsx(LogDisclosureContent, {
|
|
326
|
+
children: /*#__PURE__*/ _jsx(LogContent, {
|
|
327
|
+
variant: "code",
|
|
328
|
+
children: /*#__PURE__*/ _jsx(PreviewText, {
|
|
329
|
+
text: row.raw
|
|
330
|
+
})
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
|
+
]
|
|
334
|
+
});
|
|
297
335
|
}
|
|
298
336
|
function MessageIcon({ role, terminalFailure }) {
|
|
299
|
-
|
|
337
|
+
let name = 'message2Line';
|
|
338
|
+
if (terminalFailure) name = 'closeCircleLine';
|
|
339
|
+
else if (role === 'user') name = 'userLine';
|
|
340
|
+
else if (role === 'assistant') name = 'robot2Line';
|
|
300
341
|
return /*#__PURE__*/ _jsx(Icon, {
|
|
301
342
|
name: name,
|
|
302
343
|
className: cn('mt-[2px] size-14 flex-none', terminalFailure ? 'text-tag-error-icon' : 'text-foreground-contrast-secondary'),
|