@adecore/agents-react 0.70.0 → 0.71.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/dist/chat/logic/fork.js +1 -0
- package/dist/chat/logic/thread-cards.js +1 -0
- package/dist/chat/logic/timeline.js +7 -0
- package/dist/chat/ui/CodeBlock.d.ts +6 -1
- package/dist/chat/ui/CodeBlock.js +39 -23
- package/dist/chat/ui/intelligent-ui/UiReply.js +11 -2
- package/dist/chat/ui/intelligent-ui/key-caps.d.ts +1 -0
- package/dist/chat/ui/intelligent-ui/key-caps.js +45 -0
- package/dist/chat/ui/intelligent-ui/link-action.d.ts +9 -0
- package/dist/chat/ui/intelligent-ui/link-action.js +32 -0
- package/dist/chat/ui/intelligent-ui/node-text.js +1 -1
- package/dist/chat/ui/intelligent-ui/patch-clip.d.ts +4 -0
- package/dist/chat/ui/intelligent-ui/patch-clip.js +64 -0
- package/dist/chat/ui/intelligent-ui/registry.js +31 -5
- package/dist/chat/ui/intelligent-ui/render-context.d.ts +13 -0
- package/dist/chat/ui/intelligent-ui/renderers/alternatives.d.ts +6 -0
- package/dist/chat/ui/intelligent-ui/renderers/alternatives.js +296 -0
- package/dist/chat/ui/intelligent-ui/renderers/changes.d.ts +4 -0
- package/dist/chat/ui/intelligent-ui/renderers/changes.js +266 -0
- package/dist/chat/ui/intelligent-ui/renderers/chart.js +522 -371
- package/dist/chat/ui/intelligent-ui/renderers/content.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/content.js +94 -43
- package/dist/chat/ui/intelligent-ui/renderers/data.js +478 -245
- package/dist/chat/ui/intelligent-ui/renderers/diff.d.ts +4 -0
- package/dist/chat/ui/intelligent-ui/renderers/diff.js +427 -0
- package/dist/chat/ui/intelligent-ui/renderers/inputs.d.ts +1 -0
- package/dist/chat/ui/intelligent-ui/renderers/inputs.js +354 -110
- package/dist/chat/ui/intelligent-ui/renderers/keys.d.ts +3 -0
- package/dist/chat/ui/intelligent-ui/renderers/keys.js +60 -0
- package/dist/chat/ui/intelligent-ui/renderers/links.d.ts +13 -2
- package/dist/chat/ui/intelligent-ui/renderers/links.js +65 -85
- package/dist/chat/ui/intelligent-ui/renderers/meter.d.ts +4 -0
- package/dist/chat/ui/intelligent-ui/renderers/meter.js +371 -0
- package/dist/chat/ui/intelligent-ui/renderers/quote.d.ts +3 -0
- package/dist/chat/ui/intelligent-ui/renderers/quote.js +123 -0
- package/dist/chat/ui/intelligent-ui/renderers/radio.d.ts +3 -0
- package/dist/chat/ui/intelligent-ui/renderers/radio.js +205 -0
- package/dist/chat/ui/intelligent-ui/renderers/structure.d.ts +2 -0
- package/dist/chat/ui/intelligent-ui/renderers/structure.js +156 -45
- package/dist/chat/ui/intelligent-ui/renderers/text.js +365 -215
- package/dist/chat/ui/intelligent-ui/renderers/tree.d.ts +5 -0
- package/dist/chat/ui/intelligent-ui/renderers/tree.js +284 -0
- package/dist/chat/ui/intelligent-ui/table-data.d.ts +9 -2
- package/dist/chat/ui/intelligent-ui/table-data.js +68 -3
- package/dist/chat/ui/intelligent-ui/tones.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/tones.js +7 -7
- package/dist/chat/ui/intelligent-ui/use-ui-diffs.d.ts +4 -0
- package/dist/chat/ui/intelligent-ui/use-ui-diffs.js +201 -0
- package/dist/chat/ui/rows/MessageRows.d.ts +4 -1
- package/dist/chat/ui/rows/MessageRows.js +92 -1
- package/dist/chat/ui/rows/Rows.js +45 -31
- package/dist/host/host.d.ts +2 -1
- package/dist/host/timeline-row.d.ts +5 -1
- package/dist/locales/en/agent-chat.d.ts +62 -0
- package/dist/locales/en/agent-chat.js +63 -1
- package/dist/locales/nl/agent-chat.d.ts +62 -0
- package/dist/locales/nl/agent-chat.js +63 -1
- package/dist/theme.css +6 -0
- package/package.json +9 -9
- package/src/chat/logic/fork.ts +1 -0
- package/src/chat/logic/thread-cards.ts +1 -0
- package/src/chat/logic/timeline.ts +4 -0
- package/src/chat/ui/CodeBlock.tsx +38 -18
- package/src/chat/ui/intelligent-ui/UiReply.tsx +13 -2
- package/src/chat/ui/intelligent-ui/key-caps.ts +51 -0
- package/src/chat/ui/intelligent-ui/link-action.ts +32 -0
- package/src/chat/ui/intelligent-ui/node-text.ts +1 -0
- package/src/chat/ui/intelligent-ui/patch-clip.ts +83 -0
- package/src/chat/ui/intelligent-ui/registry.ts +31 -4
- package/src/chat/ui/intelligent-ui/render-context.ts +21 -0
- package/src/chat/ui/intelligent-ui/renderers/alternatives.tsx +76 -0
- package/src/chat/ui/intelligent-ui/renderers/changes.tsx +97 -0
- package/src/chat/ui/intelligent-ui/renderers/chart.tsx +122 -46
- package/src/chat/ui/intelligent-ui/renderers/content.tsx +27 -7
- package/src/chat/ui/intelligent-ui/renderers/data.tsx +165 -52
- package/src/chat/ui/intelligent-ui/renderers/diff.tsx +144 -0
- package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +111 -19
- package/src/chat/ui/intelligent-ui/renderers/keys.tsx +26 -0
- package/src/chat/ui/intelligent-ui/renderers/links.tsx +40 -24
- package/src/chat/ui/intelligent-ui/renderers/meter.tsx +105 -0
- package/src/chat/ui/intelligent-ui/renderers/quote.tsx +29 -0
- package/src/chat/ui/intelligent-ui/renderers/radio.tsx +130 -0
- package/src/chat/ui/intelligent-ui/renderers/structure.tsx +54 -7
- package/src/chat/ui/intelligent-ui/renderers/text.tsx +70 -36
- package/src/chat/ui/intelligent-ui/renderers/tree.tsx +85 -0
- package/src/chat/ui/intelligent-ui/table-data.ts +84 -6
- package/src/chat/ui/intelligent-ui/tones.ts +7 -7
- package/src/chat/ui/intelligent-ui/use-ui-diffs.ts +119 -0
- package/src/chat/ui/rows/MessageRows.tsx +23 -0
- package/src/chat/ui/rows/Rows.tsx +3 -0
- package/src/host/host.ts +4 -0
- package/src/host/timeline-row.ts +3 -0
- package/src/locales/en/agent-chat.ts +63 -1
- package/src/locales/nl/agent-chat.ts +63 -1
- package/src/theme.css +6 -0
|
@@ -8,7 +8,7 @@ import { useContext } from 'react';
|
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { uiEventTime, uiNodeLabel } from '../node-text.js';
|
|
10
10
|
import { UiHeadContext } from '../render-context.js';
|
|
11
|
-
import {
|
|
11
|
+
import { UI_TONE_FILL, UI_TONE_ICONS, UI_TONE_PILL, UI_TONE_SURFACE, UI_TONE_TEXT } from '../tones.js';
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const STEP_ICONS = {
|
|
14
14
|
done: CircleCheck,
|
|
@@ -34,12 +34,13 @@ const ICON_ROW = 'flex items-start gap-3 rounded-xl p-3';
|
|
|
34
34
|
const ICON_SQUARE = 'grid size-8.5 shrink-0 place-items-center rounded-lg';
|
|
35
35
|
const ICON_TEXT = 'flex min-h-8.5 min-w-0 grow flex-col justify-center gap-0.5';
|
|
36
36
|
/*
|
|
37
|
-
* A tile in its tone
|
|
38
|
-
* carries its icon in a square of its own, a
|
|
39
|
-
* icon is the ground's ink in the dark theme,
|
|
37
|
+
* A tile in its tone. A short badge is a tag at the end of the row; a longer one stands under the
|
|
38
|
+
* title, since a tag cannot wrap. The head of the block carries its icon in a square of its own, a
|
|
39
|
+
* Summary further down is a subheading without one. The icon is the ground's ink in the dark theme,
|
|
40
|
+
* where its tones are too light for white.
|
|
40
41
|
*/
|
|
41
42
|
export function SummaryRenderer(t0) {
|
|
42
|
-
const $ = _c(
|
|
43
|
+
const $ = _c(28);
|
|
43
44
|
const {
|
|
44
45
|
node,
|
|
45
46
|
children
|
|
@@ -48,9 +49,12 @@ export function SummaryRenderer(t0) {
|
|
|
48
49
|
const head = headId === undefined || headId === node.id;
|
|
49
50
|
const {
|
|
50
51
|
tone,
|
|
51
|
-
badge
|
|
52
|
+
badge,
|
|
53
|
+
detail
|
|
52
54
|
} = node.props;
|
|
53
55
|
const shown = tone ?? "neutral";
|
|
56
|
+
const badged = badge !== undefined && badge !== "";
|
|
57
|
+
const tagged = badged && badge.length <= DETAIL_AS_TAG;
|
|
54
58
|
const t1 = tone === undefined ? "bg-ui-tile" : UI_TONE_SURFACE[tone];
|
|
55
59
|
let t2;
|
|
56
60
|
if ($[0] !== t1) {
|
|
@@ -88,47 +92,83 @@ export function SummaryRenderer(t0) {
|
|
|
88
92
|
t4 = $[6];
|
|
89
93
|
}
|
|
90
94
|
let t5;
|
|
91
|
-
if ($[7] !==
|
|
92
|
-
t5 =
|
|
93
|
-
className: clsx("text-
|
|
94
|
-
children:
|
|
95
|
+
if ($[7] !== detail || $[8] !== tone) {
|
|
96
|
+
t5 = detail !== undefined && detail !== "" && /*#__PURE__*/_jsx("p", {
|
|
97
|
+
className: clsx("text-xs wrap-break-word", tone === undefined ? "text-text-muted" : "text-text"),
|
|
98
|
+
children: detail
|
|
95
99
|
});
|
|
96
|
-
$[7] =
|
|
100
|
+
$[7] = detail;
|
|
97
101
|
$[8] = tone;
|
|
98
102
|
$[9] = t5;
|
|
99
103
|
} else {
|
|
100
104
|
t5 = $[9];
|
|
101
105
|
}
|
|
102
106
|
let t6;
|
|
103
|
-
if ($[10] !==
|
|
104
|
-
t6 = /*#__PURE__*/
|
|
105
|
-
className:
|
|
106
|
-
children:
|
|
107
|
+
if ($[10] !== badge || $[11] !== badged || $[12] !== tagged || $[13] !== tone) {
|
|
108
|
+
t6 = badged && !tagged && /*#__PURE__*/_jsx("p", {
|
|
109
|
+
className: clsx("text-2xs font-medium wrap-anywhere", tone === undefined ? "text-text-muted" : UI_TONE_TEXT[tone]),
|
|
110
|
+
children: badge
|
|
107
111
|
});
|
|
108
|
-
$[10] =
|
|
109
|
-
$[11] =
|
|
110
|
-
$[12] =
|
|
112
|
+
$[10] = badge;
|
|
113
|
+
$[11] = badged;
|
|
114
|
+
$[12] = tagged;
|
|
115
|
+
$[13] = tone;
|
|
116
|
+
$[14] = t6;
|
|
111
117
|
} else {
|
|
112
|
-
t6 = $[
|
|
118
|
+
t6 = $[14];
|
|
113
119
|
}
|
|
114
120
|
let t7;
|
|
115
|
-
if ($[
|
|
121
|
+
if ($[15] !== t4 || $[16] !== t5 || $[17] !== t6) {
|
|
116
122
|
t7 = /*#__PURE__*/_jsxs("div", {
|
|
123
|
+
className: ICON_TEXT,
|
|
124
|
+
children: [t4, t5, t6]
|
|
125
|
+
});
|
|
126
|
+
$[15] = t4;
|
|
127
|
+
$[16] = t5;
|
|
128
|
+
$[17] = t6;
|
|
129
|
+
$[18] = t7;
|
|
130
|
+
} else {
|
|
131
|
+
t7 = $[18];
|
|
132
|
+
}
|
|
133
|
+
let t8;
|
|
134
|
+
if ($[19] !== badge || $[20] !== shown || $[21] !== tagged) {
|
|
135
|
+
t8 = tagged && /*#__PURE__*/_jsx(Pill, {
|
|
136
|
+
shape: "tag",
|
|
137
|
+
size: "sm",
|
|
138
|
+
tone: UI_TONE_PILL[shown],
|
|
139
|
+
className: "mt-0.5 shrink-0",
|
|
140
|
+
children: badge
|
|
141
|
+
});
|
|
142
|
+
$[19] = badge;
|
|
143
|
+
$[20] = shown;
|
|
144
|
+
$[21] = tagged;
|
|
145
|
+
$[22] = t8;
|
|
146
|
+
} else {
|
|
147
|
+
t8 = $[22];
|
|
148
|
+
}
|
|
149
|
+
let t9;
|
|
150
|
+
if ($[23] !== t2 || $[24] !== t3 || $[25] !== t7 || $[26] !== t8) {
|
|
151
|
+
t9 = /*#__PURE__*/_jsxs("div", {
|
|
117
152
|
className: t2,
|
|
118
|
-
children: [t3,
|
|
153
|
+
children: [t3, t7, t8]
|
|
119
154
|
});
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
155
|
+
$[23] = t2;
|
|
156
|
+
$[24] = t3;
|
|
157
|
+
$[25] = t7;
|
|
158
|
+
$[26] = t8;
|
|
159
|
+
$[27] = t9;
|
|
124
160
|
} else {
|
|
125
|
-
|
|
161
|
+
t9 = $[27];
|
|
126
162
|
}
|
|
127
|
-
return
|
|
163
|
+
return t9;
|
|
128
164
|
}
|
|
129
|
-
/*
|
|
165
|
+
/*
|
|
166
|
+
* A quiet tile whose icon square wears the tone. A warning and a danger take the surface of their tone
|
|
167
|
+
* for the whole tile, and keep it inside a Section, where a quiet tile goes flat. Their words are the full
|
|
168
|
+
* text color: muted text does not reach 4.5 to 1 on a tinted surface.
|
|
169
|
+
*/
|
|
130
170
|
export function CalloutRenderer(t0) {
|
|
131
|
-
const $ = _c(
|
|
171
|
+
const $ = _c(22);
|
|
132
172
|
const {
|
|
133
173
|
node,
|
|
134
174
|
children
|
|
@@ -137,96 +177,102 @@ export function CalloutRenderer(t0) {
|
|
|
137
177
|
tone,
|
|
138
178
|
title
|
|
139
179
|
} = node.props;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
180
|
+
const tinted = tone === "warning" || tone === "danger";
|
|
181
|
+
const t1 = tinted ? UI_TONE_SURFACE[tone] : "chat-ui-flat bg-ui-tile";
|
|
182
|
+
let t2;
|
|
183
|
+
if ($[0] !== t1) {
|
|
184
|
+
t2 = clsx("text-xs", ICON_ROW, t1);
|
|
143
185
|
$[0] = t1;
|
|
186
|
+
$[1] = t2;
|
|
144
187
|
} else {
|
|
145
|
-
|
|
188
|
+
t2 = $[1];
|
|
146
189
|
}
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
if ($[
|
|
151
|
-
|
|
152
|
-
$[1] = t2;
|
|
190
|
+
const t3 = UI_TONE_SURFACE[tone];
|
|
191
|
+
const t4 = UI_TONE_TEXT[tone];
|
|
192
|
+
let t5;
|
|
193
|
+
if ($[2] !== t3 || $[3] !== t4) {
|
|
194
|
+
t5 = clsx(ICON_SQUARE, t3, t4);
|
|
153
195
|
$[2] = t3;
|
|
154
196
|
$[3] = t4;
|
|
197
|
+
$[4] = t5;
|
|
155
198
|
} else {
|
|
156
|
-
|
|
199
|
+
t5 = $[4];
|
|
157
200
|
}
|
|
158
|
-
const
|
|
159
|
-
let
|
|
160
|
-
if ($[
|
|
161
|
-
|
|
162
|
-
icon:
|
|
201
|
+
const t6 = UI_TONE_ICONS[tone];
|
|
202
|
+
let t7;
|
|
203
|
+
if ($[5] !== t6) {
|
|
204
|
+
t7 = /*#__PURE__*/_jsx(Icon, {
|
|
205
|
+
icon: t6,
|
|
163
206
|
size: 16
|
|
164
207
|
});
|
|
165
|
-
$[4] = t5;
|
|
166
208
|
$[5] = t6;
|
|
209
|
+
$[6] = t7;
|
|
167
210
|
} else {
|
|
168
|
-
|
|
211
|
+
t7 = $[6];
|
|
169
212
|
}
|
|
170
|
-
let
|
|
171
|
-
if ($[
|
|
172
|
-
|
|
213
|
+
let t8;
|
|
214
|
+
if ($[7] !== t5 || $[8] !== t7) {
|
|
215
|
+
t8 = /*#__PURE__*/_jsx("span", {
|
|
173
216
|
"aria-hidden": true,
|
|
174
|
-
className:
|
|
175
|
-
children:
|
|
217
|
+
className: t5,
|
|
218
|
+
children: t7
|
|
176
219
|
});
|
|
177
|
-
$[
|
|
178
|
-
$[7] = t6;
|
|
220
|
+
$[7] = t5;
|
|
179
221
|
$[8] = t7;
|
|
222
|
+
$[9] = t8;
|
|
180
223
|
} else {
|
|
181
|
-
|
|
224
|
+
t8 = $[9];
|
|
182
225
|
}
|
|
183
|
-
let
|
|
184
|
-
if ($[
|
|
185
|
-
|
|
226
|
+
let t9;
|
|
227
|
+
if ($[10] !== title) {
|
|
228
|
+
t9 = title !== undefined && title !== "" && /*#__PURE__*/_jsx("div", {
|
|
186
229
|
className: "font-semibold text-text",
|
|
187
230
|
children: title
|
|
188
231
|
});
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
232
|
+
$[10] = title;
|
|
233
|
+
$[11] = t9;
|
|
191
234
|
} else {
|
|
192
|
-
|
|
235
|
+
t9 = $[11];
|
|
193
236
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
237
|
+
const t10 = tinted ? "text-text" : "text-text-muted";
|
|
238
|
+
let t11;
|
|
239
|
+
if ($[12] !== children || $[13] !== t10) {
|
|
240
|
+
t11 = /*#__PURE__*/_jsx("div", {
|
|
241
|
+
className: t10,
|
|
198
242
|
children: children
|
|
199
243
|
});
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
244
|
+
$[12] = children;
|
|
245
|
+
$[13] = t10;
|
|
246
|
+
$[14] = t11;
|
|
202
247
|
} else {
|
|
203
|
-
|
|
248
|
+
t11 = $[14];
|
|
204
249
|
}
|
|
205
|
-
let
|
|
206
|
-
if ($[
|
|
207
|
-
|
|
250
|
+
let t12;
|
|
251
|
+
if ($[15] !== t11 || $[16] !== t9) {
|
|
252
|
+
t12 = /*#__PURE__*/_jsxs("div", {
|
|
208
253
|
className: ICON_TEXT,
|
|
209
|
-
children: [
|
|
254
|
+
children: [t9, t11]
|
|
210
255
|
});
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
256
|
+
$[15] = t11;
|
|
257
|
+
$[16] = t9;
|
|
258
|
+
$[17] = t12;
|
|
214
259
|
} else {
|
|
215
|
-
|
|
260
|
+
t12 = $[17];
|
|
216
261
|
}
|
|
217
|
-
let
|
|
218
|
-
if ($[
|
|
219
|
-
|
|
220
|
-
className:
|
|
221
|
-
children: [
|
|
262
|
+
let t13;
|
|
263
|
+
if ($[18] !== t12 || $[19] !== t2 || $[20] !== t8) {
|
|
264
|
+
t13 = /*#__PURE__*/_jsxs("div", {
|
|
265
|
+
className: t2,
|
|
266
|
+
children: [t8, t12]
|
|
222
267
|
});
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
268
|
+
$[18] = t12;
|
|
269
|
+
$[19] = t2;
|
|
270
|
+
$[20] = t8;
|
|
271
|
+
$[21] = t13;
|
|
226
272
|
} else {
|
|
227
|
-
|
|
273
|
+
t13 = $[21];
|
|
228
274
|
}
|
|
229
|
-
return
|
|
275
|
+
return t13;
|
|
230
276
|
}
|
|
231
277
|
export function TagRenderer(t0) {
|
|
232
278
|
const $ = _c(3);
|
|
@@ -254,9 +300,12 @@ export function TagRenderer(t0) {
|
|
|
254
300
|
}
|
|
255
301
|
return t2;
|
|
256
302
|
}
|
|
257
|
-
/*
|
|
303
|
+
/*
|
|
304
|
+
* Without a value the progress is indeterminate; without a max the value is a percentage. The tone colors
|
|
305
|
+
* the reading and gives it the tone's icon; the bar stays the accent.
|
|
306
|
+
*/
|
|
258
307
|
export function ProgressRenderer(t0) {
|
|
259
|
-
const $ = _c(
|
|
308
|
+
const $ = _c(43);
|
|
260
309
|
const {
|
|
261
310
|
node,
|
|
262
311
|
children,
|
|
@@ -267,9 +316,12 @@ export function ProgressRenderer(t0) {
|
|
|
267
316
|
} = useTranslation("agent-chat");
|
|
268
317
|
const {
|
|
269
318
|
value,
|
|
270
|
-
max
|
|
319
|
+
max,
|
|
320
|
+
tone,
|
|
321
|
+
detail
|
|
271
322
|
} = node.props;
|
|
272
323
|
const limit = max ?? 100;
|
|
324
|
+
const toned = tone !== undefined && tone !== "neutral";
|
|
273
325
|
let t1;
|
|
274
326
|
if ($[0] !== limit || $[1] !== t || $[2] !== value) {
|
|
275
327
|
t1 = value === undefined ? null : limit === 100 ? formatPercent(value) : t("blocks.progress.of", {
|
|
@@ -284,93 +336,157 @@ export function ProgressRenderer(t0) {
|
|
|
284
336
|
t1 = $[3];
|
|
285
337
|
}
|
|
286
338
|
const reading = t1;
|
|
287
|
-
|
|
288
|
-
if ($[4] !== node) {
|
|
289
|
-
t2 = uiNodeLabel(node);
|
|
290
|
-
$[4] = node;
|
|
291
|
-
$[5] = t2;
|
|
292
|
-
} else {
|
|
293
|
-
t2 = $[5];
|
|
294
|
-
}
|
|
295
|
-
const label = t2;
|
|
339
|
+
const t2 = reading ?? "";
|
|
296
340
|
let t3;
|
|
297
|
-
if ($[6] !==
|
|
298
|
-
t3 =
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
$[6] = children;
|
|
341
|
+
if ($[4] !== t || $[5] !== tone || $[6] !== toned) {
|
|
342
|
+
t3 = toned ? t(`blocks.event.tone.${tone}`) : "";
|
|
343
|
+
$[4] = t;
|
|
344
|
+
$[5] = tone;
|
|
345
|
+
$[6] = toned;
|
|
303
346
|
$[7] = t3;
|
|
304
347
|
} else {
|
|
305
348
|
t3 = $[7];
|
|
306
349
|
}
|
|
307
350
|
let t4;
|
|
308
|
-
if ($[8] !==
|
|
309
|
-
t4 =
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}) : isLive(context) && /*#__PURE__*/_jsx(Spinner, {
|
|
313
|
-
size: 12,
|
|
314
|
-
className: "shrink-0 self-center text-text-faint"
|
|
315
|
-
});
|
|
316
|
-
$[8] = context;
|
|
317
|
-
$[9] = reading;
|
|
351
|
+
if ($[8] !== t2 || $[9] !== t3) {
|
|
352
|
+
t4 = [t2, t3].filter(_temp);
|
|
353
|
+
$[8] = t2;
|
|
354
|
+
$[9] = t3;
|
|
318
355
|
$[10] = t4;
|
|
319
356
|
} else {
|
|
320
357
|
t4 = $[10];
|
|
321
358
|
}
|
|
359
|
+
const said = t4.join(", ");
|
|
322
360
|
let t5;
|
|
323
|
-
if ($[11] !==
|
|
324
|
-
t5 =
|
|
325
|
-
|
|
326
|
-
|
|
361
|
+
if ($[11] !== node) {
|
|
362
|
+
t5 = uiNodeLabel(node);
|
|
363
|
+
$[11] = node;
|
|
364
|
+
$[12] = t5;
|
|
365
|
+
} else {
|
|
366
|
+
t5 = $[12];
|
|
367
|
+
}
|
|
368
|
+
const label = t5;
|
|
369
|
+
let t6;
|
|
370
|
+
if ($[13] !== children) {
|
|
371
|
+
t6 = /*#__PURE__*/_jsx("span", {
|
|
372
|
+
className: "min-w-0 text-text",
|
|
373
|
+
children: children
|
|
327
374
|
});
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
330
|
-
$[13] = t5;
|
|
375
|
+
$[13] = children;
|
|
376
|
+
$[14] = t6;
|
|
331
377
|
} else {
|
|
332
|
-
|
|
378
|
+
t6 = $[14];
|
|
333
379
|
}
|
|
334
|
-
const t6 = value ?? null;
|
|
335
380
|
let t7;
|
|
336
|
-
if ($[
|
|
337
|
-
t7 =
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
381
|
+
if ($[15] !== tone || $[16] !== toned) {
|
|
382
|
+
t7 = toned && /*#__PURE__*/_jsx(Icon, {
|
|
383
|
+
icon: UI_TONE_ICONS[tone],
|
|
384
|
+
size: 12,
|
|
385
|
+
className: clsx("self-center", UI_TONE_TEXT[tone])
|
|
386
|
+
});
|
|
387
|
+
$[15] = tone;
|
|
388
|
+
$[16] = toned;
|
|
389
|
+
$[17] = t7;
|
|
390
|
+
} else {
|
|
391
|
+
t7 = $[17];
|
|
392
|
+
}
|
|
393
|
+
let t8;
|
|
394
|
+
if ($[18] !== context || $[19] !== reading || $[20] !== tone || $[21] !== toned) {
|
|
395
|
+
t8 = reading !== null ? /*#__PURE__*/_jsx("span", {
|
|
396
|
+
className: toned ? UI_TONE_TEXT[tone] : "text-text-muted",
|
|
397
|
+
children: reading
|
|
398
|
+
}) : isLive(context) && /*#__PURE__*/_jsx(Spinner, {
|
|
399
|
+
size: 12,
|
|
400
|
+
className: "self-center text-text-faint"
|
|
401
|
+
});
|
|
402
|
+
$[18] = context;
|
|
403
|
+
$[19] = reading;
|
|
404
|
+
$[20] = tone;
|
|
405
|
+
$[21] = toned;
|
|
406
|
+
$[22] = t8;
|
|
341
407
|
} else {
|
|
342
|
-
|
|
408
|
+
t8 = $[22];
|
|
343
409
|
}
|
|
344
|
-
const t8 = reading ?? undefined;
|
|
345
410
|
let t9;
|
|
346
|
-
if ($[
|
|
347
|
-
t9 = /*#__PURE__*/
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
valueText: t8
|
|
411
|
+
if ($[23] !== t7 || $[24] !== t8) {
|
|
412
|
+
t9 = /*#__PURE__*/_jsxs("span", {
|
|
413
|
+
"aria-hidden": true,
|
|
414
|
+
className: "flex shrink-0 items-baseline gap-1 tabular-nums",
|
|
415
|
+
children: [t7, t8]
|
|
352
416
|
});
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[20] = t8;
|
|
357
|
-
$[21] = t9;
|
|
417
|
+
$[23] = t7;
|
|
418
|
+
$[24] = t8;
|
|
419
|
+
$[25] = t9;
|
|
358
420
|
} else {
|
|
359
|
-
t9 = $[
|
|
421
|
+
t9 = $[25];
|
|
360
422
|
}
|
|
361
423
|
let t10;
|
|
362
|
-
if ($[
|
|
424
|
+
if ($[26] !== t6 || $[27] !== t9) {
|
|
363
425
|
t10 = /*#__PURE__*/_jsxs("div", {
|
|
426
|
+
className: "flex items-baseline justify-between gap-3 text-xs",
|
|
427
|
+
children: [t6, t9]
|
|
428
|
+
});
|
|
429
|
+
$[26] = t6;
|
|
430
|
+
$[27] = t9;
|
|
431
|
+
$[28] = t10;
|
|
432
|
+
} else {
|
|
433
|
+
t10 = $[28];
|
|
434
|
+
}
|
|
435
|
+
const t11 = value ?? null;
|
|
436
|
+
let t12;
|
|
437
|
+
if ($[29] !== label || $[30] !== t) {
|
|
438
|
+
t12 = label === "" ? t("blocks.progress.label") : label;
|
|
439
|
+
$[29] = label;
|
|
440
|
+
$[30] = t;
|
|
441
|
+
$[31] = t12;
|
|
442
|
+
} else {
|
|
443
|
+
t12 = $[31];
|
|
444
|
+
}
|
|
445
|
+
const t13 = said === "" ? undefined : said;
|
|
446
|
+
let t14;
|
|
447
|
+
if ($[32] !== limit || $[33] !== t11 || $[34] !== t12 || $[35] !== t13) {
|
|
448
|
+
t14 = /*#__PURE__*/_jsx(Meter, {
|
|
449
|
+
value: t11,
|
|
450
|
+
max: limit,
|
|
451
|
+
label: t12,
|
|
452
|
+
valueText: t13
|
|
453
|
+
});
|
|
454
|
+
$[32] = limit;
|
|
455
|
+
$[33] = t11;
|
|
456
|
+
$[34] = t12;
|
|
457
|
+
$[35] = t13;
|
|
458
|
+
$[36] = t14;
|
|
459
|
+
} else {
|
|
460
|
+
t14 = $[36];
|
|
461
|
+
}
|
|
462
|
+
let t15;
|
|
463
|
+
if ($[37] !== detail) {
|
|
464
|
+
t15 = detail !== undefined && detail !== "" && /*#__PURE__*/_jsx("p", {
|
|
465
|
+
className: "text-2xs wrap-anywhere text-text-muted",
|
|
466
|
+
children: detail
|
|
467
|
+
});
|
|
468
|
+
$[37] = detail;
|
|
469
|
+
$[38] = t15;
|
|
470
|
+
} else {
|
|
471
|
+
t15 = $[38];
|
|
472
|
+
}
|
|
473
|
+
let t16;
|
|
474
|
+
if ($[39] !== t10 || $[40] !== t14 || $[41] !== t15) {
|
|
475
|
+
t16 = /*#__PURE__*/_jsxs("div", {
|
|
364
476
|
className: "chat-ui-flat flex flex-col gap-2 rounded-xl bg-ui-tile p-3",
|
|
365
|
-
children: [
|
|
477
|
+
children: [t10, t14, t15]
|
|
366
478
|
});
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
479
|
+
$[39] = t10;
|
|
480
|
+
$[40] = t14;
|
|
481
|
+
$[41] = t15;
|
|
482
|
+
$[42] = t16;
|
|
370
483
|
} else {
|
|
371
|
-
|
|
484
|
+
t16 = $[42];
|
|
372
485
|
}
|
|
373
|
-
return
|
|
486
|
+
return t16;
|
|
487
|
+
}
|
|
488
|
+
function _temp(part) {
|
|
489
|
+
return part !== "";
|
|
374
490
|
}
|
|
375
491
|
export function StepsRenderer(t0) {
|
|
376
492
|
const $ = _c(2);
|
|
@@ -380,7 +496,7 @@ export function StepsRenderer(t0) {
|
|
|
380
496
|
let t1;
|
|
381
497
|
if ($[0] !== children) {
|
|
382
498
|
t1 = /*#__PURE__*/_jsx("ol", {
|
|
383
|
-
className: "chat-ui-nodes flex flex-col
|
|
499
|
+
className: "chat-ui-nodes chat-ui-flat flex flex-col rounded-xl bg-ui-tile p-3",
|
|
384
500
|
children: children
|
|
385
501
|
});
|
|
386
502
|
$[0] = children;
|
|
@@ -390,9 +506,14 @@ export function StepsRenderer(t0) {
|
|
|
390
506
|
}
|
|
391
507
|
return t1;
|
|
392
508
|
}
|
|
393
|
-
/*
|
|
509
|
+
/*
|
|
510
|
+
* A row of the sequence's tile: the state as an icon on a rail that runs to the next step, the label, and
|
|
511
|
+
* the detail at the end, or under the label once it does not fit beside it. Only a failed step says its
|
|
512
|
+
* state in sight; every other one says it to a screen reader. A running step spins only while the block
|
|
513
|
+
* is live; in a quiet block it is a still dot.
|
|
514
|
+
*/
|
|
394
515
|
export function StepRenderer(t0) {
|
|
395
|
-
const $ = _c(
|
|
516
|
+
const $ = _c(33);
|
|
396
517
|
const {
|
|
397
518
|
node,
|
|
398
519
|
children,
|
|
@@ -444,90 +565,119 @@ export function StepRenderer(t0) {
|
|
|
444
565
|
} else {
|
|
445
566
|
t4 = $[7];
|
|
446
567
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
568
|
+
let t5;
|
|
569
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
570
|
+
t5 = /*#__PURE__*/_jsx("span", {
|
|
571
|
+
"aria-hidden": true,
|
|
572
|
+
className: "my-1 w-px grow bg-border group-last:hidden"
|
|
573
|
+
});
|
|
451
574
|
$[8] = t5;
|
|
452
|
-
$[9] = t6;
|
|
453
575
|
} else {
|
|
454
|
-
|
|
576
|
+
t5 = $[8];
|
|
455
577
|
}
|
|
456
|
-
let
|
|
457
|
-
if ($[
|
|
458
|
-
|
|
459
|
-
className:
|
|
460
|
-
children:
|
|
578
|
+
let t6;
|
|
579
|
+
if ($[9] !== t4) {
|
|
580
|
+
t6 = /*#__PURE__*/_jsxs("span", {
|
|
581
|
+
className: "flex w-4 shrink-0 flex-col items-center",
|
|
582
|
+
children: [t4, t5]
|
|
461
583
|
});
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
$[12] = t7;
|
|
584
|
+
$[9] = t4;
|
|
585
|
+
$[10] = t6;
|
|
465
586
|
} else {
|
|
466
|
-
|
|
587
|
+
t6 = $[10];
|
|
467
588
|
}
|
|
589
|
+
const t7 = quiet ? "text-text-muted" : "text-text";
|
|
468
590
|
let t8;
|
|
469
|
-
if ($[
|
|
470
|
-
t8 =
|
|
591
|
+
if ($[11] !== t7) {
|
|
592
|
+
t8 = clsx("max-w-full min-w-0 font-medium wrap-break-word", t7);
|
|
593
|
+
$[11] = t7;
|
|
594
|
+
$[12] = t8;
|
|
595
|
+
} else {
|
|
596
|
+
t8 = $[12];
|
|
597
|
+
}
|
|
598
|
+
let t9;
|
|
599
|
+
if ($[13] !== children || $[14] !== t8) {
|
|
600
|
+
t9 = /*#__PURE__*/_jsx("span", {
|
|
601
|
+
className: t8,
|
|
602
|
+
children: children
|
|
603
|
+
});
|
|
604
|
+
$[13] = children;
|
|
605
|
+
$[14] = t8;
|
|
606
|
+
$[15] = t9;
|
|
607
|
+
} else {
|
|
608
|
+
t9 = $[15];
|
|
609
|
+
}
|
|
610
|
+
let t10;
|
|
611
|
+
if ($[16] !== detail) {
|
|
612
|
+
t10 = detail !== undefined && detail !== "" && /*#__PURE__*/_jsx("span", {
|
|
471
613
|
className: "max-w-full text-2xs wrap-anywhere text-text-muted tabular-nums",
|
|
472
614
|
children: detail
|
|
473
615
|
});
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
616
|
+
$[16] = detail;
|
|
617
|
+
$[17] = t10;
|
|
476
618
|
} else {
|
|
477
|
-
|
|
619
|
+
t10 = $[17];
|
|
478
620
|
}
|
|
479
|
-
let
|
|
480
|
-
if ($[
|
|
481
|
-
|
|
482
|
-
className: "flex min-w-0
|
|
483
|
-
children: [
|
|
621
|
+
let t11;
|
|
622
|
+
if ($[18] !== t10 || $[19] !== t9) {
|
|
623
|
+
t11 = /*#__PURE__*/_jsxs("span", {
|
|
624
|
+
className: "flex min-w-0 flex-wrap items-baseline justify-between gap-x-3",
|
|
625
|
+
children: [t9, t10]
|
|
484
626
|
});
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
627
|
+
$[18] = t10;
|
|
628
|
+
$[19] = t9;
|
|
629
|
+
$[20] = t11;
|
|
488
630
|
} else {
|
|
489
|
-
|
|
631
|
+
t11 = $[20];
|
|
490
632
|
}
|
|
491
|
-
const
|
|
492
|
-
const
|
|
493
|
-
let
|
|
494
|
-
if ($[
|
|
495
|
-
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
633
|
+
const t12 = state === "failed" ? "text-2xs text-status-error" : "sr-only";
|
|
634
|
+
const t13 = `blocks.step.${state}`;
|
|
635
|
+
let t14;
|
|
636
|
+
if ($[21] !== t || $[22] !== t13) {
|
|
637
|
+
t14 = t(t13);
|
|
638
|
+
$[21] = t;
|
|
639
|
+
$[22] = t13;
|
|
640
|
+
$[23] = t14;
|
|
499
641
|
} else {
|
|
500
|
-
|
|
642
|
+
t14 = $[23];
|
|
501
643
|
}
|
|
502
|
-
let
|
|
503
|
-
if ($[
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
tone: t10,
|
|
508
|
-
className: "shrink-0",
|
|
509
|
-
children: t12
|
|
644
|
+
let t15;
|
|
645
|
+
if ($[24] !== t12 || $[25] !== t14) {
|
|
646
|
+
t15 = /*#__PURE__*/_jsx("span", {
|
|
647
|
+
className: t12,
|
|
648
|
+
children: t14
|
|
510
649
|
});
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
650
|
+
$[24] = t12;
|
|
651
|
+
$[25] = t14;
|
|
652
|
+
$[26] = t15;
|
|
514
653
|
} else {
|
|
515
|
-
|
|
654
|
+
t15 = $[26];
|
|
516
655
|
}
|
|
517
|
-
let
|
|
518
|
-
if ($[
|
|
519
|
-
|
|
520
|
-
className: "flex min-
|
|
521
|
-
children: [
|
|
656
|
+
let t16;
|
|
657
|
+
if ($[27] !== t11 || $[28] !== t15) {
|
|
658
|
+
t16 = /*#__PURE__*/_jsxs("span", {
|
|
659
|
+
className: "flex min-w-0 grow flex-col gap-0.5 pb-3 group-last:pb-0",
|
|
660
|
+
children: [t11, t15]
|
|
522
661
|
});
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[
|
|
526
|
-
$[27] = t14;
|
|
662
|
+
$[27] = t11;
|
|
663
|
+
$[28] = t15;
|
|
664
|
+
$[29] = t16;
|
|
527
665
|
} else {
|
|
528
|
-
|
|
666
|
+
t16 = $[29];
|
|
529
667
|
}
|
|
530
|
-
|
|
668
|
+
let t17;
|
|
669
|
+
if ($[30] !== t16 || $[31] !== t6) {
|
|
670
|
+
t17 = /*#__PURE__*/_jsxs("li", {
|
|
671
|
+
className: "group flex items-stretch gap-3 text-xs",
|
|
672
|
+
children: [t6, t16]
|
|
673
|
+
});
|
|
674
|
+
$[30] = t16;
|
|
675
|
+
$[31] = t6;
|
|
676
|
+
$[32] = t17;
|
|
677
|
+
} else {
|
|
678
|
+
t17 = $[32];
|
|
679
|
+
}
|
|
680
|
+
return t17;
|
|
531
681
|
}
|
|
532
682
|
export function TimelineRenderer(t0) {
|
|
533
683
|
const $ = _c(2);
|
|
@@ -591,7 +741,7 @@ export function EventRenderer(t0) {
|
|
|
591
741
|
const t4 = detail ?? "";
|
|
592
742
|
let t5;
|
|
593
743
|
if ($[7] !== t2 || $[8] !== t3 || $[9] !== t4 || $[10] !== time) {
|
|
594
|
-
t5 = [time, t2, t3, t4].filter(
|
|
744
|
+
t5 = [time, t2, t3, t4].filter(_temp2);
|
|
595
745
|
$[7] = t2;
|
|
596
746
|
$[8] = t3;
|
|
597
747
|
$[9] = t4;
|
|
@@ -709,6 +859,6 @@ export function EventRenderer(t0) {
|
|
|
709
859
|
}
|
|
710
860
|
return t14;
|
|
711
861
|
}
|
|
712
|
-
function
|
|
862
|
+
function _temp2(part) {
|
|
713
863
|
return part !== "";
|
|
714
864
|
}
|