@actioneer/ads 0.5.5 → 0.5.7
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/components/agent-icon.js +3 -2
- package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
- package/components/ai-elements/chain-of-thought-icon.js +341 -201
- package/components/ai-elements/chain-of-thought.d.ts +1 -1
- package/components/answer-sources.d.ts +42 -0
- package/components/answer-sources.js +111 -0
- package/components/answer.d.ts +1 -0
- package/components/answer.js +665 -671
- package/components/assistant-ui/answer-tool-ui.js +11 -7
- package/components/assistant-ui/attachment.js +39 -39
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/assistant-ui/follow-up-suggestions.d.ts +5 -1
- package/components/assistant-ui/follow-up-suggestions.js +47 -19
- package/components/assistant-ui/thread-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +41 -40
- package/components/avatar.js +14 -14
- package/components/dropdown.d.ts +1 -1
- package/components/dropdown.js +1 -1
- package/components/empty-state.d.ts +4 -4
- package/components/field.js +16 -16
- package/components/index.d.ts +1 -0
- package/components/index.js +414 -408
- package/components/infinite-canvas.js +1 -1
- package/components/pixel-icon.d.ts +3 -1
- package/components/pixel-icon.js +294 -214
- package/components/segmented.d.ts +4 -1
- package/components/segmented.js +9 -8
- package/components/sidebar.d.ts +2 -2
- package/components/switch.js +22 -4
- package/components/table.d.ts +15 -7
- package/components/table.js +313 -199
- package/components/textarea.js +1 -2
- package/components/tooltip.js +1 -1
- package/components/ui/tooltip.js +5 -5
- package/lib/icons.d.ts +8 -0
- package/lib/icons.js +103 -101
- package/llms.txt +18 -7
- package/manifest.json +125 -13
- package/package.json +1 -1
- package/styles.css +42 -47
- package/theme.css +24 -45
package/components/answer.js
CHANGED
|
@@ -1,425 +1,427 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as t, Fragment as D } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as p from "react";
|
|
4
4
|
import { cva as H } from "class-variance-authority";
|
|
5
|
-
import { z as
|
|
5
|
+
import { z as e } from "zod/v4";
|
|
6
6
|
import { Alert as T, AlertTitle as O, AlertDescription as L } from "./alert.js";
|
|
7
7
|
import { Badge as w } from "./badge.js";
|
|
8
8
|
import { Button as Ne } from "./button.js";
|
|
9
9
|
import { CodeBlock as R } from "./code-block.js";
|
|
10
10
|
import { Popover as we, PopoverTrigger as ve, PopoverContent as ke } from "./popover.js";
|
|
11
|
-
import {
|
|
11
|
+
import { FollowUpQuestion as Ae } from "./assistant-ui/follow-up-suggestions.js";
|
|
12
12
|
import { Source as je, SourceTitle as Se } from "./assistant-ui/sources.js";
|
|
13
13
|
import { AreaChart as Ce, BarChart as Re, LineChart as Te } from "./chart.js";
|
|
14
14
|
import { Progress as Oe } from "./progress.js";
|
|
15
|
-
import { Skeleton as
|
|
15
|
+
import { Skeleton as u } from "./skeleton.js";
|
|
16
16
|
import { Table as Le, TableHeader as ze, TableRow as B, TableColumn as De, TableBody as qe, TableCell as M } from "./table.js";
|
|
17
|
-
import { Check as q, Minus as Be, WarningCircle as Ke, Clock as Ee, Database as
|
|
17
|
+
import { Check as q, Minus as Be, WarningCircle as Ke, Clock as Ee, Database as Fe } from "../lib/icons.js";
|
|
18
18
|
import { cn as g } from "../lib/cn.js";
|
|
19
|
-
const
|
|
19
|
+
const We = "render_answer", Pe = "Render the final answer with one curated ADS template. Choose the semantic kind that best matches the answer — data kinds (fact, table, ranking, trend, comparison, breakdown, report), narrative kinds (explanation, knowledge, decision, status), task kinds (confirmation), and situation kinds (clarification, empty, error, refusal) — and provide only validated data; the application owns the layout.", N = e.enum([
|
|
20
20
|
"default",
|
|
21
21
|
"primary",
|
|
22
22
|
"success",
|
|
23
23
|
"warning",
|
|
24
24
|
"danger",
|
|
25
25
|
"info"
|
|
26
|
-
]), $e =
|
|
27
|
-
id:
|
|
28
|
-
label:
|
|
29
|
-
prompt:
|
|
30
|
-
}), Ve =
|
|
31
|
-
id:
|
|
32
|
-
label:
|
|
33
|
-
description:
|
|
34
|
-
prompt:
|
|
35
|
-
}), Me =
|
|
36
|
-
id:
|
|
37
|
-
label:
|
|
38
|
-
description:
|
|
39
|
-
href:
|
|
40
|
-
if (
|
|
26
|
+
]), $e = e.object({
|
|
27
|
+
id: e.string().min(1),
|
|
28
|
+
label: e.string().min(1),
|
|
29
|
+
prompt: e.string().min(1).optional()
|
|
30
|
+
}), Ve = e.object({
|
|
31
|
+
id: e.string().min(1),
|
|
32
|
+
label: e.string().min(1),
|
|
33
|
+
description: e.string().optional(),
|
|
34
|
+
prompt: e.string().min(1).optional()
|
|
35
|
+
}), Me = e.object({
|
|
36
|
+
id: e.string().min(1),
|
|
37
|
+
label: e.string().min(1),
|
|
38
|
+
description: e.string().optional(),
|
|
39
|
+
href: e.string().min(1).refine((a) => {
|
|
40
|
+
if (a.startsWith("/") || a.startsWith("#")) return !0;
|
|
41
41
|
try {
|
|
42
|
-
const l = new URL(
|
|
42
|
+
const l = new URL(a).protocol;
|
|
43
43
|
return l === "http:" || l === "https:";
|
|
44
44
|
} catch {
|
|
45
45
|
return !1;
|
|
46
46
|
}
|
|
47
|
-
}, "Source link must be HTTP(S) or app-relative").optional().describe(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
}, "Source link must be HTTP(S) or app-relative").optional().describe(
|
|
48
|
+
"Fallback destination when the host does not handle source selection in its inspector"
|
|
49
|
+
)
|
|
50
|
+
}), v = e.object({
|
|
51
|
+
label: e.string().optional(),
|
|
52
|
+
text: e.string().min(1),
|
|
51
53
|
tone: N.optional()
|
|
52
|
-
}), _e =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
label:
|
|
56
|
-
query:
|
|
57
|
-
source:
|
|
58
|
-
rows:
|
|
54
|
+
}), _e = e.union([
|
|
55
|
+
e.string().min(1),
|
|
56
|
+
e.object({
|
|
57
|
+
label: e.string().min(1),
|
|
58
|
+
query: e.string().optional().describe("The SQL that produced the cited value — shown when opened"),
|
|
59
|
+
source: e.string().optional().describe("Connection or table the query ran against"),
|
|
60
|
+
rows: e.number().int().nonnegative().optional().describe("Row count the query returned")
|
|
59
61
|
})
|
|
60
|
-
]), S =
|
|
61
|
-
label:
|
|
62
|
-
value:
|
|
63
|
-
code:
|
|
62
|
+
]), S = e.array(_e).max(6), P = e.object({
|
|
63
|
+
label: e.string().min(1),
|
|
64
|
+
value: e.string().min(1),
|
|
65
|
+
code: e.boolean().optional().describe("Render the value monospace — table paths, filters, identifiers"),
|
|
64
66
|
tone: N.optional()
|
|
65
|
-
}), Q =
|
|
66
|
-
label:
|
|
67
|
-
value:
|
|
68
|
-
change:
|
|
67
|
+
}), Q = e.object({
|
|
68
|
+
label: e.string().min(1),
|
|
69
|
+
value: e.string().min(1),
|
|
70
|
+
change: e.string().optional(),
|
|
69
71
|
tone: N.optional()
|
|
70
72
|
}), x = {
|
|
71
|
-
eyebrow:
|
|
72
|
-
headline:
|
|
73
|
-
summary:
|
|
74
|
-
method:
|
|
75
|
-
caveats:
|
|
76
|
-
followUps:
|
|
77
|
-
sources:
|
|
78
|
-
}, _ =
|
|
79
|
-
value:
|
|
80
|
-
detail:
|
|
73
|
+
eyebrow: e.string().optional(),
|
|
74
|
+
headline: e.string().min(1),
|
|
75
|
+
summary: e.string().optional(),
|
|
76
|
+
method: e.string().optional().describe("One-line methodology note — how the number was computed"),
|
|
77
|
+
caveats: e.array(e.string().min(1)).max(4).optional().describe("Assumptions, limitations, freshness or partial-period notes"),
|
|
78
|
+
followUps: e.array($e).max(3).optional(),
|
|
79
|
+
sources: e.array(Me).max(8).optional()
|
|
80
|
+
}, _ = e.object({
|
|
81
|
+
value: e.string().min(1),
|
|
82
|
+
detail: e.string().optional(),
|
|
81
83
|
tone: N.optional()
|
|
82
|
-
}), Ie =
|
|
84
|
+
}), Ie = e.object({
|
|
83
85
|
...x,
|
|
84
|
-
kind:
|
|
85
|
-
subjects:
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
kind: e.literal("comparison"),
|
|
87
|
+
subjects: e.tuple([
|
|
88
|
+
e.object({ label: e.string().min(1), description: e.string().optional() }),
|
|
89
|
+
e.object({ label: e.string().min(1), description: e.string().optional() })
|
|
88
90
|
]),
|
|
89
|
-
rows:
|
|
90
|
-
|
|
91
|
-
label:
|
|
92
|
-
description:
|
|
93
|
-
values:
|
|
94
|
-
delta:
|
|
95
|
-
value:
|
|
91
|
+
rows: e.array(
|
|
92
|
+
e.object({
|
|
93
|
+
label: e.string().min(1),
|
|
94
|
+
description: e.string().min(1).optional().describe("Methodology, grain, or scope shown beneath the measure"),
|
|
95
|
+
values: e.tuple([_, _]),
|
|
96
|
+
delta: e.object({
|
|
97
|
+
value: e.string().min(1),
|
|
96
98
|
tone: N.optional()
|
|
97
99
|
}).optional()
|
|
98
100
|
})
|
|
99
101
|
).min(1).max(8),
|
|
100
102
|
takeaway: v.optional()
|
|
101
|
-
}), K =
|
|
103
|
+
}), K = e.enum([
|
|
102
104
|
"primary",
|
|
103
105
|
"success",
|
|
104
106
|
"warning",
|
|
105
107
|
"danger",
|
|
106
108
|
"info"
|
|
107
|
-
]), He =
|
|
108
|
-
|
|
109
|
-
kind:
|
|
110
|
-
value:
|
|
111
|
-
axis:
|
|
112
|
-
label:
|
|
109
|
+
]), He = e.discriminatedUnion("kind", [
|
|
110
|
+
e.object({
|
|
111
|
+
kind: e.literal("line"),
|
|
112
|
+
value: e.union([e.number(), e.string()]),
|
|
113
|
+
axis: e.enum(["x", "y"]).optional(),
|
|
114
|
+
label: e.string().optional(),
|
|
113
115
|
color: K.optional()
|
|
114
116
|
}),
|
|
115
|
-
|
|
116
|
-
kind:
|
|
117
|
-
from:
|
|
118
|
-
to:
|
|
119
|
-
axis:
|
|
120
|
-
label:
|
|
117
|
+
e.object({
|
|
118
|
+
kind: e.literal("band"),
|
|
119
|
+
from: e.union([e.number(), e.string()]),
|
|
120
|
+
to: e.union([e.number(), e.string()]),
|
|
121
|
+
axis: e.enum(["x", "y"]).optional(),
|
|
122
|
+
label: e.string().optional(),
|
|
121
123
|
color: K.optional()
|
|
122
124
|
}),
|
|
123
|
-
|
|
124
|
-
kind:
|
|
125
|
-
x:
|
|
126
|
-
y:
|
|
127
|
-
label:
|
|
128
|
-
description:
|
|
125
|
+
e.object({
|
|
126
|
+
kind: e.literal("point"),
|
|
127
|
+
x: e.union([e.number(), e.string()]),
|
|
128
|
+
y: e.number(),
|
|
129
|
+
label: e.string().min(1),
|
|
130
|
+
description: e.string().optional(),
|
|
129
131
|
color: K.optional()
|
|
130
132
|
})
|
|
131
|
-
]), Qe =
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
), Y =
|
|
135
|
-
type:
|
|
136
|
-
data:
|
|
137
|
-
categoryKey:
|
|
138
|
-
series:
|
|
139
|
-
seriesLabels:
|
|
140
|
-
highlight:
|
|
141
|
-
forecastKeys:
|
|
142
|
-
unit:
|
|
143
|
-
annotations:
|
|
144
|
-
}), Ye =
|
|
133
|
+
]), Qe = e.record(
|
|
134
|
+
e.string(),
|
|
135
|
+
e.union([e.string(), e.number(), e.null()])
|
|
136
|
+
), Y = e.object({
|
|
137
|
+
type: e.enum(["line", "area", "bar"]),
|
|
138
|
+
data: e.array(Qe).min(1).max(100),
|
|
139
|
+
categoryKey: e.string().min(1),
|
|
140
|
+
series: e.array(e.string().min(1)).min(1).max(4),
|
|
141
|
+
seriesLabels: e.record(e.string(), e.string()).optional(),
|
|
142
|
+
highlight: e.string().optional(),
|
|
143
|
+
forecastKeys: e.array(e.string().min(1)).max(2).optional().describe("Series keys drawn dashed as projections (line and area only)"),
|
|
144
|
+
unit: e.string().optional(),
|
|
145
|
+
annotations: e.array(He).max(8).optional()
|
|
146
|
+
}), Ye = e.object({
|
|
145
147
|
...x,
|
|
146
|
-
kind:
|
|
147
|
-
metric:
|
|
148
|
-
label:
|
|
149
|
-
value:
|
|
150
|
-
change:
|
|
148
|
+
kind: e.literal("trend"),
|
|
149
|
+
metric: e.object({
|
|
150
|
+
label: e.string().min(1),
|
|
151
|
+
value: e.string().min(1),
|
|
152
|
+
change: e.string().optional(),
|
|
151
153
|
tone: N.optional()
|
|
152
154
|
}).optional(),
|
|
153
155
|
chart: Y,
|
|
154
156
|
insight: v.optional()
|
|
155
|
-
}), Ge =
|
|
157
|
+
}), Ge = e.object({
|
|
156
158
|
...x,
|
|
157
|
-
kind:
|
|
158
|
-
overall:
|
|
159
|
-
label:
|
|
160
|
-
value:
|
|
159
|
+
kind: e.literal("status"),
|
|
160
|
+
overall: e.object({
|
|
161
|
+
label: e.string().min(1),
|
|
162
|
+
value: e.string().min(1),
|
|
161
163
|
tone: N.optional()
|
|
162
164
|
}).optional(),
|
|
163
|
-
items:
|
|
164
|
-
|
|
165
|
-
label:
|
|
166
|
-
status:
|
|
167
|
-
detail:
|
|
168
|
-
meta:
|
|
165
|
+
items: e.array(
|
|
166
|
+
e.object({
|
|
167
|
+
label: e.string().min(1),
|
|
168
|
+
status: e.string().min(1),
|
|
169
|
+
detail: e.string().optional(),
|
|
170
|
+
meta: e.string().optional(),
|
|
169
171
|
tone: N.optional()
|
|
170
172
|
})
|
|
171
173
|
).min(1).max(12),
|
|
172
174
|
recommendation: v.optional()
|
|
173
|
-
}), Xe =
|
|
175
|
+
}), Xe = e.object({
|
|
174
176
|
...x,
|
|
175
|
-
kind:
|
|
176
|
-
total:
|
|
177
|
-
items:
|
|
178
|
-
|
|
179
|
-
label:
|
|
180
|
-
value:
|
|
181
|
-
share:
|
|
182
|
-
detail:
|
|
177
|
+
kind: e.literal("breakdown"),
|
|
178
|
+
total: e.object({ label: e.string().min(1), value: e.string().min(1) }).optional(),
|
|
179
|
+
items: e.array(
|
|
180
|
+
e.object({
|
|
181
|
+
label: e.string().min(1),
|
|
182
|
+
value: e.string().min(1),
|
|
183
|
+
share: e.number().min(0).max(100),
|
|
184
|
+
detail: e.string().optional(),
|
|
183
185
|
tone: N.optional()
|
|
184
186
|
})
|
|
185
187
|
).min(1).max(12),
|
|
186
188
|
insight: v.optional()
|
|
187
|
-
}), Je =
|
|
189
|
+
}), Je = e.object({
|
|
188
190
|
...x,
|
|
189
|
-
kind:
|
|
190
|
-
sections:
|
|
191
|
-
|
|
192
|
-
title:
|
|
193
|
-
body:
|
|
194
|
-
bullets:
|
|
195
|
-
code:
|
|
196
|
-
codeLanguage:
|
|
191
|
+
kind: e.literal("explanation"),
|
|
192
|
+
sections: e.array(
|
|
193
|
+
e.object({
|
|
194
|
+
title: e.string().min(1),
|
|
195
|
+
body: e.string().optional(),
|
|
196
|
+
bullets: e.array(e.string().min(1)).max(5).optional(),
|
|
197
|
+
code: e.string().optional().describe("A formula or query illustrating the section"),
|
|
198
|
+
codeLanguage: e.string().optional()
|
|
197
199
|
})
|
|
198
200
|
).min(1).max(6),
|
|
199
201
|
takeaway: v.optional()
|
|
200
|
-
}), Ze =
|
|
202
|
+
}), Ze = e.object({
|
|
201
203
|
...x,
|
|
202
|
-
kind:
|
|
203
|
-
lead:
|
|
204
|
-
blocks:
|
|
205
|
-
|
|
206
|
-
heading:
|
|
207
|
-
lead:
|
|
208
|
-
body:
|
|
209
|
-
bullets:
|
|
204
|
+
kind: e.literal("narrative"),
|
|
205
|
+
lead: e.string().optional().describe("The opening framing paragraph — supports blank-line breaks"),
|
|
206
|
+
blocks: e.array(
|
|
207
|
+
e.object({
|
|
208
|
+
heading: e.string().optional(),
|
|
209
|
+
lead: e.string().optional().describe("Bold lead phrase before the body — the finding, the claim"),
|
|
210
|
+
body: e.string().min(1).describe("Prose; blank lines (\\n\\n) split into paragraphs"),
|
|
211
|
+
bullets: e.array(e.string().min(1)).max(6).optional(),
|
|
210
212
|
citations: S.optional(),
|
|
211
213
|
tone: N.optional()
|
|
212
214
|
})
|
|
213
215
|
).min(1).max(10),
|
|
214
|
-
takeaways:
|
|
215
|
-
|
|
216
|
+
takeaways: e.array(
|
|
217
|
+
e.object({ lead: e.string().optional(), body: e.string().min(1) })
|
|
216
218
|
).max(6).optional().describe("Key-takeaways tail — bold lead, then elaboration"),
|
|
217
219
|
bottomLine: v.optional().describe(
|
|
218
220
|
"The emphasized closing verdict"
|
|
219
221
|
)
|
|
220
|
-
}), Ue =
|
|
222
|
+
}), Ue = e.object({
|
|
221
223
|
...x,
|
|
222
|
-
kind:
|
|
223
|
-
value:
|
|
224
|
-
label:
|
|
225
|
-
value:
|
|
226
|
-
change:
|
|
227
|
-
asOf:
|
|
224
|
+
kind: e.literal("fact"),
|
|
225
|
+
value: e.object({
|
|
226
|
+
label: e.string().min(1),
|
|
227
|
+
value: e.string().min(1),
|
|
228
|
+
change: e.string().optional(),
|
|
229
|
+
asOf: e.string().optional().describe('Freshness qualifier, e.g. "as of Apr 18, latest ingested"'),
|
|
228
230
|
tone: N.optional()
|
|
229
231
|
}),
|
|
230
|
-
facts:
|
|
232
|
+
facts: e.array(Q).max(6).optional(),
|
|
231
233
|
citations: S.optional(),
|
|
232
234
|
insight: v.optional()
|
|
233
|
-
}), ea =
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
}), ea = e.union([
|
|
236
|
+
e.string(),
|
|
237
|
+
e.object({ value: e.string(), tone: N.optional() })
|
|
236
238
|
]), G = {
|
|
237
|
-
columns:
|
|
238
|
-
|
|
239
|
-
key:
|
|
240
|
-
label:
|
|
241
|
-
align:
|
|
239
|
+
columns: e.array(
|
|
240
|
+
e.object({
|
|
241
|
+
key: e.string().min(1),
|
|
242
|
+
label: e.string().min(1),
|
|
243
|
+
align: e.enum(["left", "right"]).optional()
|
|
242
244
|
})
|
|
243
245
|
).min(2).max(6),
|
|
244
|
-
rows:
|
|
245
|
-
|
|
246
|
-
cells:
|
|
247
|
-
emphasis:
|
|
246
|
+
rows: e.array(
|
|
247
|
+
e.object({
|
|
248
|
+
cells: e.record(e.string(), ea),
|
|
249
|
+
emphasis: e.boolean().optional().describe("Bold the row — the winner, the current period")
|
|
248
250
|
})
|
|
249
251
|
).min(1).max(12),
|
|
250
|
-
totals:
|
|
251
|
-
label:
|
|
252
|
-
cells:
|
|
252
|
+
totals: e.object({
|
|
253
|
+
label: e.string().min(1).optional(),
|
|
254
|
+
cells: e.record(e.string(), e.string())
|
|
253
255
|
}).optional(),
|
|
254
|
-
note:
|
|
256
|
+
note: e.string().optional().describe(
|
|
255
257
|
'Footnote under the table — row caps ("showing 10 of 1,000"), provenance, partial periods'
|
|
256
258
|
),
|
|
257
259
|
citations: S.optional()
|
|
258
|
-
}, aa =
|
|
260
|
+
}, aa = e.object({
|
|
259
261
|
...x,
|
|
260
|
-
kind:
|
|
262
|
+
kind: e.literal("table"),
|
|
261
263
|
...G,
|
|
262
264
|
insight: v.optional()
|
|
263
|
-
}), ta =
|
|
265
|
+
}), ta = e.object({
|
|
264
266
|
...x,
|
|
265
|
-
kind:
|
|
266
|
-
metricLabel:
|
|
267
|
-
items:
|
|
268
|
-
|
|
269
|
-
label:
|
|
270
|
-
value:
|
|
271
|
-
detail:
|
|
272
|
-
delta:
|
|
273
|
-
value:
|
|
267
|
+
kind: e.literal("ranking"),
|
|
268
|
+
metricLabel: e.string().optional().describe('What the ranked value measures, e.g. "Total fee · EUR"'),
|
|
269
|
+
items: e.array(
|
|
270
|
+
e.object({
|
|
271
|
+
label: e.string().min(1),
|
|
272
|
+
value: e.string().min(1),
|
|
273
|
+
detail: e.string().optional().describe("Secondary metric, coverage, or an ineligibility reason"),
|
|
274
|
+
delta: e.object({
|
|
275
|
+
value: e.string().min(1),
|
|
274
276
|
tone: N.optional()
|
|
275
277
|
}).optional(),
|
|
276
|
-
highlight:
|
|
278
|
+
highlight: e.boolean().optional().describe("Mark the winner — set on every member of a tie group"),
|
|
277
279
|
tone: N.optional()
|
|
278
280
|
})
|
|
279
281
|
).min(1).max(10),
|
|
280
|
-
tiebreak:
|
|
282
|
+
tiebreak: e.string().optional().describe("How a tie between highlighted items resolves"),
|
|
281
283
|
citations: S.optional(),
|
|
282
284
|
insight: v.optional()
|
|
283
|
-
}), na =
|
|
285
|
+
}), na = e.object({
|
|
284
286
|
...x,
|
|
285
|
-
kind:
|
|
286
|
-
outcome:
|
|
287
|
-
label:
|
|
288
|
-
detail:
|
|
287
|
+
kind: e.literal("confirmation"),
|
|
288
|
+
outcome: e.object({
|
|
289
|
+
label: e.string().min(1).describe('The receipt verdict, e.g. "Deployed"'),
|
|
290
|
+
detail: e.string().optional().describe('e.g. "schema version 62"'),
|
|
289
291
|
tone: N.optional()
|
|
290
292
|
}),
|
|
291
|
-
changes:
|
|
292
|
-
steps:
|
|
293
|
-
|
|
294
|
-
label:
|
|
295
|
-
status:
|
|
296
|
-
detail:
|
|
293
|
+
changes: e.array(P).max(8).optional().describe("What was added or configured, as label–value pairs"),
|
|
294
|
+
steps: e.array(
|
|
295
|
+
e.object({
|
|
296
|
+
label: e.string().min(1),
|
|
297
|
+
status: e.enum(["done", "pending", "failed", "skipped"]),
|
|
298
|
+
detail: e.string().optional()
|
|
297
299
|
})
|
|
298
300
|
).max(10).optional(),
|
|
299
|
-
safety:
|
|
300
|
-
next:
|
|
301
|
+
safety: e.string().optional().describe('The no-side-effects line, e.g. "No existing cubes were modified."'),
|
|
302
|
+
next: e.string().optional().describe("Forward behavior or the step the system takes next"),
|
|
301
303
|
warning: v.optional()
|
|
302
|
-
}), ra =
|
|
304
|
+
}), ra = e.object({
|
|
303
305
|
...x,
|
|
304
|
-
kind:
|
|
305
|
-
findings:
|
|
306
|
-
question:
|
|
307
|
-
options:
|
|
308
|
-
}), ia =
|
|
306
|
+
kind: e.literal("clarification"),
|
|
307
|
+
findings: e.array(P).max(6).optional().describe("What was already established — the facts that framed the ask"),
|
|
308
|
+
question: e.string().min(1),
|
|
309
|
+
options: e.array(Ve).min(1).max(4).optional()
|
|
310
|
+
}), ia = e.object({
|
|
309
311
|
...x,
|
|
310
|
-
kind:
|
|
311
|
-
checks:
|
|
312
|
-
|
|
313
|
-
label:
|
|
314
|
-
result:
|
|
312
|
+
kind: e.literal("empty"),
|
|
313
|
+
checks: e.array(
|
|
314
|
+
e.object({
|
|
315
|
+
label: e.string().min(1),
|
|
316
|
+
result: e.string().min(1).describe('e.g. "0 rows"'),
|
|
315
317
|
tone: N.optional()
|
|
316
318
|
})
|
|
317
319
|
).max(8).optional().describe("What was searched, with each probe's outcome — the proof of absence"),
|
|
318
|
-
reason:
|
|
319
|
-
baseline:
|
|
320
|
+
reason: e.string().optional().describe("Why the result is empty — cause hypothesis or table semantics"),
|
|
321
|
+
baseline: e.object({ label: e.string().min(1), value: e.string().min(1) }).optional().describe("An adjacent known-good value for calibration"),
|
|
320
322
|
citations: S.optional(),
|
|
321
323
|
alternative: v.optional()
|
|
322
|
-
}), la =
|
|
324
|
+
}), la = e.object({
|
|
323
325
|
...x,
|
|
324
|
-
kind:
|
|
325
|
-
failure:
|
|
326
|
-
summary:
|
|
327
|
-
tally:
|
|
328
|
-
detail:
|
|
326
|
+
kind: e.literal("error"),
|
|
327
|
+
failure: e.object({
|
|
328
|
+
summary: e.string().min(1),
|
|
329
|
+
tally: e.string().optional().describe('Repeat-attempt tally, e.g. "12+ attempts over 7 weeks"'),
|
|
330
|
+
detail: e.string().optional().describe("The verbatim error, rendered monospace")
|
|
329
331
|
}),
|
|
330
|
-
attempts:
|
|
331
|
-
|
|
332
|
-
label:
|
|
333
|
-
result:
|
|
332
|
+
attempts: e.array(
|
|
333
|
+
e.object({
|
|
334
|
+
label: e.string().min(1).describe("What was tried — a path, a query"),
|
|
335
|
+
result: e.string().min(1)
|
|
334
336
|
})
|
|
335
337
|
).max(6).optional(),
|
|
336
|
-
resolution:
|
|
337
|
-
|
|
338
|
-
action:
|
|
339
|
-
owner:
|
|
338
|
+
resolution: e.array(
|
|
339
|
+
e.object({
|
|
340
|
+
action: e.string().min(1),
|
|
341
|
+
owner: e.enum(["user", "admin", "platform", "agent"]).optional()
|
|
340
342
|
})
|
|
341
343
|
).max(5).optional(),
|
|
342
|
-
preserved:
|
|
343
|
-
label:
|
|
344
|
-
code:
|
|
345
|
-
language:
|
|
344
|
+
preserved: e.object({
|
|
345
|
+
label: e.string().optional(),
|
|
346
|
+
code: e.string().min(1),
|
|
347
|
+
language: e.string().optional()
|
|
346
348
|
}).optional().describe("Prepared work that survives the failure — ready-to-run SQL, a chart config")
|
|
347
|
-
}), sa =
|
|
349
|
+
}), sa = e.object({
|
|
348
350
|
...x,
|
|
349
|
-
kind:
|
|
350
|
-
reason:
|
|
351
|
-
scope:
|
|
352
|
-
completed:
|
|
353
|
-
alternatives:
|
|
354
|
-
|
|
355
|
-
label:
|
|
356
|
-
description:
|
|
351
|
+
kind: e.literal("refusal"),
|
|
352
|
+
reason: e.string().min(1),
|
|
353
|
+
scope: e.string().optional().describe('The role statement, e.g. "read-only data analysis assistant"'),
|
|
354
|
+
completed: e.string().optional().describe("The allowed portion that WAS carried out before declining"),
|
|
355
|
+
alternatives: e.array(
|
|
356
|
+
e.object({
|
|
357
|
+
label: e.string().min(1),
|
|
358
|
+
description: e.string().optional()
|
|
357
359
|
})
|
|
358
360
|
).max(4).optional()
|
|
359
|
-
}), oa =
|
|
361
|
+
}), oa = e.object({
|
|
360
362
|
...x,
|
|
361
|
-
kind:
|
|
362
|
-
entries:
|
|
363
|
-
|
|
364
|
-
term:
|
|
365
|
-
category:
|
|
366
|
-
body:
|
|
367
|
-
formula:
|
|
368
|
-
items:
|
|
363
|
+
kind: e.literal("knowledge"),
|
|
364
|
+
entries: e.array(
|
|
365
|
+
e.object({
|
|
366
|
+
term: e.string().min(1),
|
|
367
|
+
category: e.string().optional().describe('e.g. "Formula", "Field", "Rule"'),
|
|
368
|
+
body: e.string().optional(),
|
|
369
|
+
formula: e.string().optional(),
|
|
370
|
+
items: e.array(P).max(6).optional()
|
|
369
371
|
})
|
|
370
372
|
).min(1).max(6),
|
|
371
|
-
gaps:
|
|
372
|
-
compliance:
|
|
373
|
+
gaps: e.array(e.string().min(1)).max(5).optional().describe("What the knowledge base does NOT cover"),
|
|
374
|
+
compliance: e.string().optional().describe('The constraint honored, e.g. "No SQL was executed."'),
|
|
373
375
|
citations: S.optional()
|
|
374
|
-
}), da =
|
|
376
|
+
}), da = e.object({
|
|
375
377
|
...x,
|
|
376
|
-
kind:
|
|
377
|
-
options:
|
|
378
|
-
|
|
379
|
-
name:
|
|
380
|
-
tag:
|
|
381
|
-
description:
|
|
382
|
-
pros:
|
|
383
|
-
cons:
|
|
384
|
-
recommended:
|
|
378
|
+
kind: e.literal("decision"),
|
|
379
|
+
options: e.array(
|
|
380
|
+
e.object({
|
|
381
|
+
name: e.string().min(1),
|
|
382
|
+
tag: e.string().optional().describe('e.g. "Forward-looking", "Requires input"'),
|
|
383
|
+
description: e.string().optional(),
|
|
384
|
+
pros: e.array(e.string().min(1)).max(5).optional(),
|
|
385
|
+
cons: e.array(e.string().min(1)).max(5).optional(),
|
|
386
|
+
recommended: e.boolean().optional()
|
|
385
387
|
})
|
|
386
388
|
).min(2).max(4),
|
|
387
|
-
guidance:
|
|
388
|
-
}), ca =
|
|
389
|
-
|
|
390
|
-
type:
|
|
391
|
-
title:
|
|
392
|
-
body:
|
|
389
|
+
guidance: e.array(e.object({ when: e.string().min(1), choose: e.string().min(1) })).max(5).optional().describe('Goal-to-option mapping — "if you want X, pick Y"')
|
|
390
|
+
}), ca = e.discriminatedUnion("type", [
|
|
391
|
+
e.object({
|
|
392
|
+
type: e.literal("text"),
|
|
393
|
+
title: e.string().optional(),
|
|
394
|
+
body: e.string().min(1)
|
|
393
395
|
}),
|
|
394
|
-
|
|
395
|
-
type:
|
|
396
|
-
title:
|
|
397
|
-
items:
|
|
396
|
+
e.object({
|
|
397
|
+
type: e.literal("metrics"),
|
|
398
|
+
title: e.string().optional(),
|
|
399
|
+
items: e.array(Q).min(2).max(4)
|
|
398
400
|
}),
|
|
399
|
-
|
|
400
|
-
type:
|
|
401
|
-
title:
|
|
401
|
+
e.object({
|
|
402
|
+
type: e.literal("table"),
|
|
403
|
+
title: e.string().optional(),
|
|
402
404
|
...G
|
|
403
405
|
}),
|
|
404
|
-
|
|
405
|
-
type:
|
|
406
|
-
title:
|
|
406
|
+
e.object({
|
|
407
|
+
type: e.literal("chart"),
|
|
408
|
+
title: e.string().optional(),
|
|
407
409
|
chart: Y,
|
|
408
|
-
note:
|
|
410
|
+
note: e.string().optional()
|
|
409
411
|
}),
|
|
410
|
-
|
|
411
|
-
type:
|
|
412
|
-
title:
|
|
413
|
-
items:
|
|
414
|
-
|
|
412
|
+
e.object({
|
|
413
|
+
type: e.literal("list"),
|
|
414
|
+
title: e.string().optional(),
|
|
415
|
+
items: e.array(
|
|
416
|
+
e.object({ lead: e.string().optional(), body: e.string().min(1) })
|
|
415
417
|
).min(1).max(6)
|
|
416
418
|
})
|
|
417
|
-
]), ma =
|
|
419
|
+
]), ma = e.object({
|
|
418
420
|
...x,
|
|
419
|
-
kind:
|
|
420
|
-
sections:
|
|
421
|
-
definitions:
|
|
422
|
-
}), ha =
|
|
421
|
+
kind: e.literal("report"),
|
|
422
|
+
sections: e.array(ca).min(2).max(8),
|
|
423
|
+
definitions: e.array(e.object({ term: e.string().min(1), meaning: e.string().min(1) })).max(8).optional()
|
|
424
|
+
}), ha = e.discriminatedUnion("kind", [
|
|
423
425
|
Ie,
|
|
424
426
|
Ye,
|
|
425
427
|
Ge,
|
|
@@ -437,7 +439,7 @@ const Fe = "render_answer", Pe = "Render the final answer with one curated ADS t
|
|
|
437
439
|
oa,
|
|
438
440
|
da,
|
|
439
441
|
ma
|
|
440
|
-
]),
|
|
442
|
+
]), Fa = [
|
|
441
443
|
"comparison",
|
|
442
444
|
"trend",
|
|
443
445
|
"status",
|
|
@@ -455,8 +457,8 @@ const Fe = "render_answer", Pe = "Render the final answer with one curated ADS t
|
|
|
455
457
|
"knowledge",
|
|
456
458
|
"decision",
|
|
457
459
|
"report"
|
|
458
|
-
],
|
|
459
|
-
name:
|
|
460
|
+
], Wa = {
|
|
461
|
+
name: We,
|
|
460
462
|
description: Pe,
|
|
461
463
|
inputSchema: ha
|
|
462
464
|
}, A = H("font-semibold tabular-nums text-foreground", {
|
|
@@ -486,67 +488,71 @@ const Fe = "render_answer", Pe = "Render the final answer with one curated ADS t
|
|
|
486
488
|
}), ga = new Intl.NumberFormat("en-US", {
|
|
487
489
|
notation: "compact",
|
|
488
490
|
maximumFractionDigits: 1
|
|
489
|
-
}), X = (
|
|
490
|
-
function f({ spec:
|
|
491
|
-
return
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
491
|
+
}), X = (a) => a === "success" || a === "warning" || a === "danger" || a === "info" ? a : "default", ba = (a) => a === "success" || a === "warning" || a === "danger" || a === "info" ? a : "primary", J = p.createContext(void 0);
|
|
492
|
+
function f({ spec: a }) {
|
|
493
|
+
return (
|
|
494
|
+
// `flex-1 min-w-0` lets the header fill its available width, including in
|
|
495
|
+
// answer kinds that intentionally pair it with a trailing metric.
|
|
496
|
+
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1 space-y-3", children: [
|
|
497
|
+
a.eyebrow && /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: a.eyebrow }),
|
|
498
|
+
/* @__PURE__ */ t("h2", { className: "text-xl font-normal leading-tight tracking-tight text-foreground", children: a.headline }),
|
|
499
|
+
a.summary && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-secondary", children: a.summary })
|
|
500
|
+
] })
|
|
501
|
+
);
|
|
496
502
|
}
|
|
497
|
-
function k({ signal:
|
|
503
|
+
function k({ signal: a }) {
|
|
498
504
|
return /* @__PURE__ */ n(
|
|
499
505
|
T,
|
|
500
506
|
{
|
|
501
|
-
variant: X(
|
|
507
|
+
variant: X(a.tone),
|
|
502
508
|
className: "border border-border bg-card",
|
|
503
509
|
children: [
|
|
504
|
-
/* @__PURE__ */ t(O, { children:
|
|
505
|
-
/* @__PURE__ */ t(L, { className: "text-base leading-6", children:
|
|
510
|
+
/* @__PURE__ */ t(O, { children: a.label ?? "Takeaway" }),
|
|
511
|
+
/* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.text })
|
|
506
512
|
]
|
|
507
513
|
}
|
|
508
514
|
);
|
|
509
515
|
}
|
|
510
|
-
function
|
|
511
|
-
text:
|
|
516
|
+
function W({
|
|
517
|
+
text: a,
|
|
512
518
|
lead: l,
|
|
513
519
|
className: c
|
|
514
520
|
}) {
|
|
515
|
-
const d =
|
|
516
|
-
return /* @__PURE__ */ t("div", { className: g("space-y-2 text-sm leading-6 text-secondary", c), children: d.map((m,
|
|
517
|
-
|
|
521
|
+
const d = a.split(/\n{2,}/).map((m) => m.trim()).filter(Boolean);
|
|
522
|
+
return /* @__PURE__ */ t("div", { className: g("space-y-2 text-sm leading-6 text-secondary", c), children: d.map((m, o) => /* @__PURE__ */ n("p", { children: [
|
|
523
|
+
o === 0 && l && /* @__PURE__ */ n("span", { className: "font-semibold text-foreground", children: [
|
|
518
524
|
l,
|
|
519
525
|
" — "
|
|
520
526
|
] }),
|
|
521
527
|
m
|
|
522
|
-
] },
|
|
528
|
+
] }, o)) });
|
|
523
529
|
}
|
|
524
|
-
const Z = (
|
|
525
|
-
function
|
|
526
|
-
const l =
|
|
530
|
+
const Z = (a) => typeof a == "string" ? { label: a } : a, pa = (a) => a == null ? void 0 : a.split(" · ")[0], E = "inline-flex items-center gap-1 rounded-md px-2 py-0.5 font-mono text-xs tabular-nums", I = "cursor-pointer bg-info-50 text-info-700 outline-none transition-colors hover:bg-info-100 focus-visible:ring-3 focus-visible:ring-info/40 active:scale-(--scale-press)";
|
|
531
|
+
function F({ citation: a }) {
|
|
532
|
+
const l = pa(a.source);
|
|
527
533
|
return /* @__PURE__ */ n(D, { children: [
|
|
528
|
-
/* @__PURE__ */ t(
|
|
529
|
-
/* @__PURE__ */ t("span", { children:
|
|
534
|
+
/* @__PURE__ */ t(Fe, { "aria-hidden": !0, className: "size-3 shrink-0 opacity-70" }),
|
|
535
|
+
/* @__PURE__ */ t("span", { children: a.label }),
|
|
530
536
|
l && /* @__PURE__ */ n("span", { className: "max-w-[12ch] truncate font-normal opacity-70", children: [
|
|
531
537
|
"· ",
|
|
532
538
|
l
|
|
533
539
|
] }),
|
|
534
|
-
|
|
540
|
+
a.rows != null && /* @__PURE__ */ n("span", { className: "font-normal opacity-60", children: [
|
|
535
541
|
"· ",
|
|
536
|
-
|
|
542
|
+
a.rows.toLocaleString()
|
|
537
543
|
] })
|
|
538
544
|
] });
|
|
539
545
|
}
|
|
540
|
-
function U({ citation:
|
|
541
|
-
const l =
|
|
546
|
+
function U({ citation: a }) {
|
|
547
|
+
const l = p.useContext(J), c = !!(a.query || a.source || a.rows != null);
|
|
542
548
|
return l ? /* @__PURE__ */ t(
|
|
543
549
|
"button",
|
|
544
550
|
{
|
|
545
551
|
type: "button",
|
|
546
552
|
className: g(E, I),
|
|
547
|
-
"aria-label": `Inspect the query behind ${
|
|
548
|
-
onClick: () => l(
|
|
549
|
-
children: /* @__PURE__ */ t(
|
|
553
|
+
"aria-label": `Inspect the query behind ${a.label}`,
|
|
554
|
+
onClick: () => l(a),
|
|
555
|
+
children: /* @__PURE__ */ t(F, { citation: a })
|
|
550
556
|
}
|
|
551
557
|
) : c ? /* @__PURE__ */ n(we, { children: [
|
|
552
558
|
/* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(
|
|
@@ -554,8 +560,8 @@ function U({ citation: e }) {
|
|
|
554
560
|
{
|
|
555
561
|
type: "button",
|
|
556
562
|
className: g(E, I),
|
|
557
|
-
"aria-label": `Show the query behind ${
|
|
558
|
-
children: /* @__PURE__ */ t(
|
|
563
|
+
"aria-label": `Show the query behind ${a.label}`,
|
|
564
|
+
children: /* @__PURE__ */ t(F, { citation: a })
|
|
559
565
|
}
|
|
560
566
|
) }),
|
|
561
567
|
/* @__PURE__ */ n(
|
|
@@ -566,42 +572,42 @@ function U({ citation: e }) {
|
|
|
566
572
|
children: [
|
|
567
573
|
/* @__PURE__ */ n("div", { className: "space-y-1 px-3 pb-2 pt-3", children: [
|
|
568
574
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-3", children: [
|
|
569
|
-
/* @__PURE__ */ t("span", { className: "font-mono text-xs font-semibold text-foreground", children:
|
|
570
|
-
|
|
571
|
-
|
|
575
|
+
/* @__PURE__ */ t("span", { className: "font-mono text-xs font-semibold text-foreground", children: a.label }),
|
|
576
|
+
a.rows != null && /* @__PURE__ */ n("span", { className: "text-xs tabular-nums text-tertiary", children: [
|
|
577
|
+
a.rows.toLocaleString(),
|
|
572
578
|
" ",
|
|
573
|
-
|
|
579
|
+
a.rows === 1 ? "row" : "rows"
|
|
574
580
|
] })
|
|
575
581
|
] }),
|
|
576
|
-
|
|
582
|
+
a.source && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: a.source })
|
|
577
583
|
] }),
|
|
578
|
-
|
|
584
|
+
a.query && /* @__PURE__ */ t(
|
|
579
585
|
R,
|
|
580
586
|
{
|
|
581
587
|
language: "sql",
|
|
582
588
|
className: "max-h-56 rounded-none",
|
|
583
|
-
children:
|
|
589
|
+
children: a.query
|
|
584
590
|
}
|
|
585
591
|
)
|
|
586
592
|
]
|
|
587
593
|
}
|
|
588
594
|
)
|
|
589
|
-
] }) : /* @__PURE__ */ t("span", { className: g(E, "bg-surface text-tertiary"), children: /* @__PURE__ */ t(
|
|
595
|
+
] }) : /* @__PURE__ */ t("span", { className: g(E, "bg-surface text-tertiary"), children: /* @__PURE__ */ t(F, { citation: a }) });
|
|
590
596
|
}
|
|
591
597
|
function z({
|
|
592
|
-
citations:
|
|
598
|
+
citations: a,
|
|
593
599
|
className: l
|
|
594
600
|
}) {
|
|
595
|
-
return
|
|
601
|
+
return a != null && a.length ? /* @__PURE__ */ t("div", { className: g("flex flex-wrap items-center gap-1", l), children: a.map((c, d) => {
|
|
596
602
|
const m = Z(c);
|
|
597
603
|
return /* @__PURE__ */ t(U, { citation: m }, `${m.label}-${d}`);
|
|
598
604
|
}) }) : null;
|
|
599
605
|
}
|
|
600
606
|
function ee({
|
|
601
|
-
items:
|
|
607
|
+
items: a,
|
|
602
608
|
className: l
|
|
603
609
|
}) {
|
|
604
|
-
return /* @__PURE__ */ t("dl", { className: g("rounded-2xl border border-border bg-card px-4 py-2", l), children:
|
|
610
|
+
return /* @__PURE__ */ t("dl", { className: g("rounded-2xl border border-border bg-card px-4 py-2", l), children: a.map((c) => /* @__PURE__ */ n(
|
|
605
611
|
"div",
|
|
606
612
|
{
|
|
607
613
|
className: "flex items-baseline justify-between gap-4 py-1.5",
|
|
@@ -622,8 +628,8 @@ function ee({
|
|
|
622
628
|
c.label
|
|
623
629
|
)) });
|
|
624
630
|
}
|
|
625
|
-
function
|
|
626
|
-
return /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 @lg:grid-cols-3", children:
|
|
631
|
+
function ua({ items: a }) {
|
|
632
|
+
return /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 @lg:grid-cols-3", children: a.map((l) => /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
|
|
627
633
|
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: l.label }),
|
|
628
634
|
/* @__PURE__ */ t(
|
|
629
635
|
"p",
|
|
@@ -639,10 +645,10 @@ function pa({ items: e }) {
|
|
|
639
645
|
] }, l.label)) });
|
|
640
646
|
}
|
|
641
647
|
function ae({
|
|
642
|
-
table:
|
|
648
|
+
table: a,
|
|
643
649
|
caption: l
|
|
644
650
|
}) {
|
|
645
|
-
const c = (
|
|
651
|
+
const c = (o) => o === void 0 ? void 0 : typeof o == "string" ? o : o.value, d = (o) => o !== void 0 && typeof o == "object" ? o.tone : void 0, m = (o, h, { first: r, emphasis: i }) => o === void 0 || o === "" ? /* @__PURE__ */ t("span", { "aria-label": "Not available", className: "text-tertiary", children: "—" }) : /* @__PURE__ */ t(
|
|
646
652
|
"span",
|
|
647
653
|
{
|
|
648
654
|
className: g(
|
|
@@ -652,22 +658,22 @@ function ae({
|
|
|
652
658
|
i && "font-semibold"
|
|
653
659
|
)
|
|
654
660
|
),
|
|
655
|
-
children:
|
|
661
|
+
children: o
|
|
656
662
|
}
|
|
657
663
|
);
|
|
658
664
|
return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
659
665
|
/* @__PURE__ */ n(Le, { "aria-label": l, isStatic: !0, children: [
|
|
660
|
-
/* @__PURE__ */ t(ze, { children: /* @__PURE__ */ t(B, { children:
|
|
666
|
+
/* @__PURE__ */ t(ze, { children: /* @__PURE__ */ t(B, { children: a.columns.map((o) => /* @__PURE__ */ t(De, { align: o.align, children: o.label }, o.key)) }) }),
|
|
661
667
|
/* @__PURE__ */ n(qe, { children: [
|
|
662
|
-
|
|
663
|
-
c(
|
|
664
|
-
d(
|
|
665
|
-
{ first: i === 0, emphasis:
|
|
668
|
+
a.rows.map((o, h) => /* @__PURE__ */ t(B, { children: a.columns.map((r, i) => /* @__PURE__ */ t(M, { align: r.align, children: m(
|
|
669
|
+
c(o.cells[r.key]),
|
|
670
|
+
d(o.cells[r.key]),
|
|
671
|
+
{ first: i === 0, emphasis: o.emphasis }
|
|
666
672
|
) }, r.key)) }, h)),
|
|
667
|
-
|
|
668
|
-
var i,
|
|
669
|
-
const r = ((i =
|
|
670
|
-
return /* @__PURE__ */ t(M, { align:
|
|
673
|
+
a.totals && /* @__PURE__ */ t(B, { children: a.columns.map((o, h) => {
|
|
674
|
+
var i, s;
|
|
675
|
+
const r = ((i = a.totals) == null ? void 0 : i.cells[o.key]) ?? (h === 0 ? ((s = a.totals) == null ? void 0 : s.label) ?? "Total" : "");
|
|
676
|
+
return /* @__PURE__ */ t(M, { align: o.align, children: /* @__PURE__ */ t(
|
|
671
677
|
"span",
|
|
672
678
|
{
|
|
673
679
|
className: g(
|
|
@@ -676,37 +682,37 @@ function ae({
|
|
|
676
682
|
),
|
|
677
683
|
children: r
|
|
678
684
|
}
|
|
679
|
-
) },
|
|
685
|
+
) }, o.key);
|
|
680
686
|
}) })
|
|
681
687
|
] })
|
|
682
688
|
] }),
|
|
683
|
-
|
|
684
|
-
/* @__PURE__ */ t(z, { citations:
|
|
689
|
+
a.note && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-tertiary", children: a.note }),
|
|
690
|
+
/* @__PURE__ */ t(z, { citations: a.citations })
|
|
685
691
|
] });
|
|
686
692
|
}
|
|
687
|
-
function te({ chart:
|
|
688
|
-
const l =
|
|
689
|
-
() =>
|
|
690
|
-
[
|
|
693
|
+
function te({ chart: a }) {
|
|
694
|
+
const l = p.useMemo(
|
|
695
|
+
() => a.unit ? (d) => `${ga.format(d)}${a.unit}` : void 0,
|
|
696
|
+
[a.unit]
|
|
691
697
|
), c = {
|
|
692
|
-
data:
|
|
693
|
-
categoryKey:
|
|
694
|
-
series:
|
|
695
|
-
seriesLabels:
|
|
696
|
-
highlight:
|
|
697
|
-
annotations:
|
|
698
|
+
data: a.data,
|
|
699
|
+
categoryKey: a.categoryKey,
|
|
700
|
+
series: a.series,
|
|
701
|
+
seriesLabels: a.seriesLabels,
|
|
702
|
+
highlight: a.highlight,
|
|
703
|
+
annotations: a.annotations,
|
|
698
704
|
formatValue: l,
|
|
699
705
|
height: 224
|
|
700
706
|
};
|
|
701
|
-
return /* @__PURE__ */ t("div", { className: "rounded-2xl border border-border bg-card px-3 pb-2 pt-4 @md:px-4", children:
|
|
707
|
+
return /* @__PURE__ */ t("div", { className: "rounded-2xl border border-border bg-card px-3 pb-2 pt-4 @md:px-4", children: a.type === "area" ? /* @__PURE__ */ t(Ce, { ...c, forecastKeys: a.forecastKeys }) : a.type === "bar" ? /* @__PURE__ */ t(Re, { ...c }) : /* @__PURE__ */ t(Te, { ...c, forecastKeys: a.forecastKeys }) });
|
|
702
708
|
}
|
|
703
709
|
function y({
|
|
704
|
-
spec:
|
|
710
|
+
spec: a,
|
|
705
711
|
citations: l,
|
|
706
712
|
onFollowUp: c,
|
|
707
713
|
onSourceSelect: d
|
|
708
714
|
}) {
|
|
709
|
-
const { method: m, caveats:
|
|
715
|
+
const { method: m, caveats: o, followUps: h, sources: r } = a, i = !!(m || o != null && o.length || l != null && l.length || r != null && r.length);
|
|
710
716
|
return !i && !(h != null && h.length) ? null : /* @__PURE__ */ n("div", { className: "space-y-4 pt-1", children: [
|
|
711
717
|
i && /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
712
718
|
(m || !!(l != null && l.length)) && /* @__PURE__ */ n("p", { className: "text-base leading-6 text-tertiary", children: [
|
|
@@ -715,12 +721,12 @@ function y({
|
|
|
715
721
|
" · ",
|
|
716
722
|
m
|
|
717
723
|
] }),
|
|
718
|
-
l == null ? void 0 : l.map((
|
|
724
|
+
l == null ? void 0 : l.map((s, b) => /* @__PURE__ */ n(p.Fragment, { children: [
|
|
719
725
|
" ",
|
|
720
|
-
/* @__PURE__ */ t(U, { citation: Z(
|
|
726
|
+
/* @__PURE__ */ t(U, { citation: Z(s) })
|
|
721
727
|
] }, b))
|
|
722
728
|
] }),
|
|
723
|
-
!!(
|
|
729
|
+
!!(o != null && o.length) && /* @__PURE__ */ t("ul", { className: "space-y-1", children: o.map((s) => /* @__PURE__ */ n(
|
|
724
730
|
"li",
|
|
725
731
|
{
|
|
726
732
|
className: "flex items-start gap-2 text-base leading-6 text-tertiary",
|
|
@@ -732,67 +738,70 @@ function y({
|
|
|
732
738
|
className: "mt-2.5 size-1 shrink-0 rounded-dot bg-muted-foreground"
|
|
733
739
|
}
|
|
734
740
|
),
|
|
735
|
-
/* @__PURE__ */ t("span", { children:
|
|
741
|
+
/* @__PURE__ */ t("span", { children: s })
|
|
736
742
|
]
|
|
737
743
|
},
|
|
738
|
-
|
|
744
|
+
s
|
|
739
745
|
)) }),
|
|
740
746
|
!!(r != null && r.length) && /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
741
747
|
/* @__PURE__ */ t("span", { className: "mx-0.5 text-xs font-normal text-tertiary", children: "Sources" }),
|
|
742
748
|
r == null ? void 0 : r.map(
|
|
743
|
-
(
|
|
749
|
+
(s) => d ? /* @__PURE__ */ t(
|
|
750
|
+
Ne,
|
|
751
|
+
{
|
|
752
|
+
type: "button",
|
|
753
|
+
size: "xs",
|
|
754
|
+
variant: "ghost",
|
|
755
|
+
title: s.description,
|
|
756
|
+
className: "h-6 rounded-full bg-info-50 px-2 text-info-700 hover:bg-info-100 focus-visible:ring-info/40",
|
|
757
|
+
onClick: () => d(s),
|
|
758
|
+
children: s.label
|
|
759
|
+
},
|
|
760
|
+
s.id
|
|
761
|
+
) : s.href ? /* @__PURE__ */ n(
|
|
744
762
|
je,
|
|
745
763
|
{
|
|
746
|
-
href:
|
|
747
|
-
variant: "
|
|
764
|
+
href: s.href,
|
|
765
|
+
variant: "info",
|
|
748
766
|
size: "sm",
|
|
749
|
-
title:
|
|
767
|
+
title: s.description,
|
|
750
768
|
className: "h-6 rounded-full px-2",
|
|
751
769
|
children: [
|
|
752
|
-
/* @__PURE__ */ t(Se, { children:
|
|
770
|
+
/* @__PURE__ */ t(Se, { children: s.label }),
|
|
753
771
|
/* @__PURE__ */ t("span", { className: "sr-only", children: " (opens in a new tab)" })
|
|
754
772
|
]
|
|
755
773
|
},
|
|
756
|
-
|
|
757
|
-
) :
|
|
758
|
-
Ne,
|
|
759
|
-
{
|
|
760
|
-
type: "button",
|
|
761
|
-
size: "xs",
|
|
762
|
-
variant: "ghost",
|
|
763
|
-
title: o.description,
|
|
764
|
-
className: "h-6 rounded-full px-2 text-muted-foreground",
|
|
765
|
-
onClick: () => d(o),
|
|
766
|
-
children: o.label
|
|
767
|
-
},
|
|
768
|
-
o.id
|
|
769
|
-
) : /* @__PURE__ */ t(w, { variant: "soft", title: o.description, children: o.label }, o.id)
|
|
774
|
+
s.id
|
|
775
|
+
) : /* @__PURE__ */ t(w, { variant: "soft", title: s.description, children: s.label }, s.id)
|
|
770
776
|
)
|
|
771
777
|
] })
|
|
772
778
|
] }),
|
|
773
|
-
!!(h != null && h.length) && /* @__PURE__ */
|
|
774
|
-
|
|
775
|
-
{
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
779
|
+
!!(h != null && h.length) && /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
780
|
+
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: "Ask a follow-up" }),
|
|
781
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-2", children: h.map((s) => /* @__PURE__ */ t(
|
|
782
|
+
Ae,
|
|
783
|
+
{
|
|
784
|
+
type: "button",
|
|
785
|
+
disabled: !c,
|
|
786
|
+
onClick: () => c == null ? void 0 : c(s),
|
|
787
|
+
children: s.prompt ?? s.label
|
|
788
|
+
},
|
|
789
|
+
s.id
|
|
790
|
+
)) })
|
|
791
|
+
] })
|
|
783
792
|
] });
|
|
784
793
|
}
|
|
785
|
-
const ne =
|
|
794
|
+
const ne = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
786
795
|
"div",
|
|
787
796
|
{
|
|
788
797
|
ref: h,
|
|
789
|
-
"data-answer-kind":
|
|
798
|
+
"data-answer-kind": a.kind,
|
|
790
799
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
791
|
-
...
|
|
800
|
+
...o,
|
|
792
801
|
children: [
|
|
793
|
-
/* @__PURE__ */ t(f, { spec:
|
|
802
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
794
803
|
/* @__PURE__ */ t("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "w-full min-w-[32rem] border-separate border-spacing-y-1 text-left", children: [
|
|
795
|
-
/* @__PURE__ */ t("caption", { className: "sr-only", children:
|
|
804
|
+
/* @__PURE__ */ t("caption", { className: "sr-only", children: a.headline }),
|
|
796
805
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", { children: [
|
|
797
806
|
/* @__PURE__ */ t(
|
|
798
807
|
"th",
|
|
@@ -802,7 +811,7 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
802
811
|
children: "Measure"
|
|
803
812
|
}
|
|
804
813
|
),
|
|
805
|
-
|
|
814
|
+
a.subjects.map((r) => /* @__PURE__ */ n(
|
|
806
815
|
"th",
|
|
807
816
|
{
|
|
808
817
|
scope: "col",
|
|
@@ -817,14 +826,14 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
817
826
|
/* @__PURE__ */ n("th", { scope: "col", className: "px-3 py-2 align-bottom", children: [
|
|
818
827
|
/* @__PURE__ */ t("span", { className: "block text-sm font-semibold text-foreground", children: "Difference" }),
|
|
819
828
|
/* @__PURE__ */ n("span", { className: "mt-0.5 block text-xs font-normal text-tertiary", children: [
|
|
820
|
-
|
|
829
|
+
a.subjects[1].label,
|
|
821
830
|
" − ",
|
|
822
|
-
|
|
831
|
+
a.subjects[0].label
|
|
823
832
|
] })
|
|
824
833
|
] })
|
|
825
834
|
] }) }),
|
|
826
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
827
|
-
const i = r.values[0].detail === r.values[1].detail ? r.values[0].detail : void 0,
|
|
835
|
+
/* @__PURE__ */ t("tbody", { children: a.rows.map((r) => {
|
|
836
|
+
const i = r.values[0].detail === r.values[1].detail ? r.values[0].detail : void 0, s = r.description ?? i;
|
|
828
837
|
return /* @__PURE__ */ n("tr", { className: "[&>*]:bg-surface", children: [
|
|
829
838
|
/* @__PURE__ */ n(
|
|
830
839
|
"th",
|
|
@@ -833,7 +842,7 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
833
842
|
className: "rounded-l-xl px-3 py-3 align-top text-left",
|
|
834
843
|
children: [
|
|
835
844
|
/* @__PURE__ */ t("span", { className: "block text-base font-normal text-secondary", children: r.label }),
|
|
836
|
-
|
|
845
|
+
s && /* @__PURE__ */ t("span", { className: "mt-0.5 block text-xs font-normal text-tertiary", children: s })
|
|
837
846
|
]
|
|
838
847
|
}
|
|
839
848
|
),
|
|
@@ -852,7 +861,7 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
852
861
|
}
|
|
853
862
|
)
|
|
854
863
|
},
|
|
855
|
-
`${r.label}-${
|
|
864
|
+
`${r.label}-${a.subjects[j].label}`
|
|
856
865
|
)),
|
|
857
866
|
/* @__PURE__ */ t("td", { className: "rounded-r-xl px-3 py-3 align-top", children: r.delta ? /* @__PURE__ */ t(
|
|
858
867
|
"span",
|
|
@@ -867,11 +876,11 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
867
876
|
] }, r.label);
|
|
868
877
|
}) })
|
|
869
878
|
] }) }),
|
|
870
|
-
|
|
879
|
+
a.takeaway && /* @__PURE__ */ t(k, { signal: a.takeaway }),
|
|
871
880
|
/* @__PURE__ */ t(
|
|
872
881
|
y,
|
|
873
882
|
{
|
|
874
|
-
spec:
|
|
883
|
+
spec: a,
|
|
875
884
|
onFollowUp: l,
|
|
876
885
|
onSourceSelect: d
|
|
877
886
|
}
|
|
@@ -880,38 +889,38 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
880
889
|
}
|
|
881
890
|
));
|
|
882
891
|
ne.displayName = "ComparisonAnswer";
|
|
883
|
-
const re =
|
|
884
|
-
({ spec:
|
|
892
|
+
const re = p.forwardRef(
|
|
893
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
885
894
|
"div",
|
|
886
895
|
{
|
|
887
896
|
ref: h,
|
|
888
|
-
"data-answer-kind":
|
|
897
|
+
"data-answer-kind": a.kind,
|
|
889
898
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
890
|
-
...
|
|
899
|
+
...o,
|
|
891
900
|
children: [
|
|
892
901
|
/* @__PURE__ */ n("div", { className: "flex flex-col justify-between gap-4 @md:flex-row @md:items-end", children: [
|
|
893
|
-
/* @__PURE__ */ t(f, { spec:
|
|
894
|
-
|
|
895
|
-
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children:
|
|
902
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
903
|
+
a.metric && /* @__PURE__ */ n("div", { className: "shrink-0 rounded-xl border border-border bg-card px-4 py-3 text-left", children: [
|
|
904
|
+
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.metric.label }),
|
|
896
905
|
/* @__PURE__ */ t(
|
|
897
906
|
"p",
|
|
898
907
|
{
|
|
899
908
|
className: g(
|
|
900
|
-
A({ tone:
|
|
909
|
+
A({ tone: a.metric.tone }),
|
|
901
910
|
"mt-1 text-2xl tracking-tight"
|
|
902
911
|
),
|
|
903
|
-
children:
|
|
912
|
+
children: a.metric.value
|
|
904
913
|
}
|
|
905
914
|
),
|
|
906
|
-
|
|
915
|
+
a.metric.change && /* @__PURE__ */ t("p", { className: "mt-0.5 text-xs text-secondary", children: a.metric.change })
|
|
907
916
|
] })
|
|
908
917
|
] }),
|
|
909
|
-
/* @__PURE__ */ t(te, { chart:
|
|
910
|
-
|
|
918
|
+
/* @__PURE__ */ t(te, { chart: a.chart }),
|
|
919
|
+
a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
|
|
911
920
|
/* @__PURE__ */ t(
|
|
912
921
|
y,
|
|
913
922
|
{
|
|
914
|
-
spec:
|
|
923
|
+
spec: a,
|
|
915
924
|
onFollowUp: l,
|
|
916
925
|
onSourceSelect: d
|
|
917
926
|
}
|
|
@@ -921,32 +930,17 @@ const re = u.forwardRef(
|
|
|
921
930
|
)
|
|
922
931
|
);
|
|
923
932
|
re.displayName = "TrendAnswer";
|
|
924
|
-
const ie =
|
|
925
|
-
({ spec:
|
|
933
|
+
const ie = p.forwardRef(
|
|
934
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
926
935
|
"div",
|
|
927
936
|
{
|
|
928
937
|
ref: h,
|
|
929
|
-
"data-answer-kind":
|
|
930
|
-
className: g("@container w-full max-w-2xl space-y-
|
|
931
|
-
...
|
|
938
|
+
"data-answer-kind": a.kind,
|
|
939
|
+
className: g("@container w-full max-w-2xl space-y-6", m),
|
|
940
|
+
...o,
|
|
932
941
|
children: [
|
|
933
|
-
/* @__PURE__ */
|
|
934
|
-
|
|
935
|
-
e.overall && /* @__PURE__ */ n(
|
|
936
|
-
w,
|
|
937
|
-
{
|
|
938
|
-
variant: "soft",
|
|
939
|
-
color: e.overall.tone ?? "default",
|
|
940
|
-
className: "self-start",
|
|
941
|
-
children: [
|
|
942
|
-
e.overall.label,
|
|
943
|
-
" · ",
|
|
944
|
-
e.overall.value
|
|
945
|
-
]
|
|
946
|
-
}
|
|
947
|
-
)
|
|
948
|
-
] }),
|
|
949
|
-
/* @__PURE__ */ t("ul", { className: "space-y-2", children: e.items.map((r) => /* @__PURE__ */ n(
|
|
942
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
943
|
+
/* @__PURE__ */ t("div", { className: "space-y-3", children: /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.items.map((r) => /* @__PURE__ */ n(
|
|
950
944
|
"li",
|
|
951
945
|
{
|
|
952
946
|
className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-3",
|
|
@@ -962,12 +956,12 @@ const ie = u.forwardRef(
|
|
|
962
956
|
]
|
|
963
957
|
},
|
|
964
958
|
r.label
|
|
965
|
-
)) }),
|
|
966
|
-
|
|
959
|
+
)) }) }),
|
|
960
|
+
a.recommendation && /* @__PURE__ */ t(k, { signal: a.recommendation }),
|
|
967
961
|
/* @__PURE__ */ t(
|
|
968
962
|
y,
|
|
969
963
|
{
|
|
970
|
-
spec:
|
|
964
|
+
spec: a,
|
|
971
965
|
onFollowUp: l,
|
|
972
966
|
onSourceSelect: d
|
|
973
967
|
}
|
|
@@ -977,22 +971,22 @@ const ie = u.forwardRef(
|
|
|
977
971
|
)
|
|
978
972
|
);
|
|
979
973
|
ie.displayName = "StatusAnswer";
|
|
980
|
-
const le =
|
|
974
|
+
const le = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
981
975
|
"div",
|
|
982
976
|
{
|
|
983
977
|
ref: h,
|
|
984
|
-
"data-answer-kind":
|
|
978
|
+
"data-answer-kind": a.kind,
|
|
985
979
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
986
|
-
...
|
|
980
|
+
...o,
|
|
987
981
|
children: [
|
|
988
982
|
/* @__PURE__ */ n("div", { className: "flex flex-col justify-between gap-3 @md:flex-row @md:items-end", children: [
|
|
989
|
-
/* @__PURE__ */ t(f, { spec:
|
|
990
|
-
|
|
991
|
-
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children:
|
|
992
|
-
/* @__PURE__ */ t("p", { className: "mt-1 text-2xl font-semibold tabular-nums tracking-tight text-foreground", children:
|
|
983
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
984
|
+
a.total && /* @__PURE__ */ n("div", { className: "shrink-0 @md:text-right", children: [
|
|
985
|
+
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.total.label }),
|
|
986
|
+
/* @__PURE__ */ t("p", { className: "mt-1 text-2xl font-semibold tabular-nums tracking-tight text-foreground", children: a.total.value })
|
|
993
987
|
] })
|
|
994
988
|
] }),
|
|
995
|
-
/* @__PURE__ */ t("ol", { className: "space-y-2", children:
|
|
989
|
+
/* @__PURE__ */ t("ol", { className: "space-y-2", children: a.items.map((r, i) => /* @__PURE__ */ n("li", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
|
|
996
990
|
/* @__PURE__ */ n("div", { className: "mb-2 flex items-start justify-between gap-4", children: [
|
|
997
991
|
/* @__PURE__ */ n("div", { className: "flex min-w-0 items-start gap-2.5", children: [
|
|
998
992
|
/* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 tabular-nums", children: i + 1 }),
|
|
@@ -1019,11 +1013,11 @@ const le = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1019
1013
|
}
|
|
1020
1014
|
)
|
|
1021
1015
|
] }, r.label)) }),
|
|
1022
|
-
|
|
1016
|
+
a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
|
|
1023
1017
|
/* @__PURE__ */ t(
|
|
1024
1018
|
y,
|
|
1025
1019
|
{
|
|
1026
|
-
spec:
|
|
1020
|
+
spec: a,
|
|
1027
1021
|
onFollowUp: l,
|
|
1028
1022
|
onSourceSelect: d
|
|
1029
1023
|
}
|
|
@@ -1032,23 +1026,23 @@ const le = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1032
1026
|
}
|
|
1033
1027
|
));
|
|
1034
1028
|
le.displayName = "BreakdownAnswer";
|
|
1035
|
-
const se =
|
|
1029
|
+
const se = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
1036
1030
|
"div",
|
|
1037
1031
|
{
|
|
1038
1032
|
ref: h,
|
|
1039
|
-
"data-answer-kind":
|
|
1033
|
+
"data-answer-kind": a.kind,
|
|
1040
1034
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1041
|
-
...
|
|
1035
|
+
...o,
|
|
1042
1036
|
children: [
|
|
1043
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1044
|
-
/* @__PURE__ */ t("ol", { className: "space-y-2", children:
|
|
1045
|
-
var
|
|
1037
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1038
|
+
/* @__PURE__ */ t("ol", { className: "space-y-2", children: a.sections.map((r, i) => {
|
|
1039
|
+
var s;
|
|
1046
1040
|
return /* @__PURE__ */ n("li", { className: "flex gap-3 rounded-xl border border-border bg-card px-4 py-3.5", children: [
|
|
1047
1041
|
/* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 h-fit tabular-nums", children: i + 1 }),
|
|
1048
1042
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
1049
1043
|
/* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: r.title }),
|
|
1050
1044
|
r.body && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: r.body }),
|
|
1051
|
-
!!((
|
|
1045
|
+
!!((s = r.bullets) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: r.bullets.map((b) => /* @__PURE__ */ n("li", { className: "flex items-start gap-2 text-xs leading-5 text-secondary", children: [
|
|
1052
1046
|
/* @__PURE__ */ t(
|
|
1053
1047
|
"span",
|
|
1054
1048
|
{
|
|
@@ -1070,11 +1064,11 @@ const se = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1070
1064
|
] })
|
|
1071
1065
|
] }, r.title);
|
|
1072
1066
|
}) }),
|
|
1073
|
-
|
|
1067
|
+
a.takeaway && /* @__PURE__ */ t(k, { signal: a.takeaway }),
|
|
1074
1068
|
/* @__PURE__ */ t(
|
|
1075
1069
|
y,
|
|
1076
1070
|
{
|
|
1077
|
-
spec:
|
|
1071
|
+
spec: a,
|
|
1078
1072
|
onFollowUp: l,
|
|
1079
1073
|
onSourceSelect: d
|
|
1080
1074
|
}
|
|
@@ -1083,19 +1077,19 @@ const se = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1083
1077
|
}
|
|
1084
1078
|
));
|
|
1085
1079
|
se.displayName = "ExplanationAnswer";
|
|
1086
|
-
const oe =
|
|
1080
|
+
const oe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1087
1081
|
var r;
|
|
1088
1082
|
return /* @__PURE__ */ n(
|
|
1089
1083
|
"div",
|
|
1090
1084
|
{
|
|
1091
1085
|
ref: h,
|
|
1092
|
-
"data-answer-kind":
|
|
1086
|
+
"data-answer-kind": a.kind,
|
|
1093
1087
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1094
|
-
...
|
|
1088
|
+
...o,
|
|
1095
1089
|
children: [
|
|
1096
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1097
|
-
|
|
1098
|
-
/* @__PURE__ */ t("div", { className: "space-y-5", children:
|
|
1090
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1091
|
+
a.lead && /* @__PURE__ */ t(W, { text: a.lead, className: "text-base" }),
|
|
1092
|
+
/* @__PURE__ */ t("div", { className: "space-y-5", children: a.blocks.map((i, s) => {
|
|
1099
1093
|
var b;
|
|
1100
1094
|
return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1101
1095
|
i.heading && /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.heading }),
|
|
@@ -1109,7 +1103,7 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1109
1103
|
/* @__PURE__ */ t(L, { className: "text-base leading-6", children: i.body })
|
|
1110
1104
|
]
|
|
1111
1105
|
}
|
|
1112
|
-
) : /* @__PURE__ */ t(
|
|
1106
|
+
) : /* @__PURE__ */ t(W, { text: i.body, lead: i.lead }),
|
|
1113
1107
|
!!((b = i.bullets) != null && b.length) && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.bullets.map((j) => /* @__PURE__ */ n(
|
|
1114
1108
|
"li",
|
|
1115
1109
|
{
|
|
@@ -1128,11 +1122,11 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1128
1122
|
j
|
|
1129
1123
|
)) }),
|
|
1130
1124
|
/* @__PURE__ */ t(z, { citations: i.citations })
|
|
1131
|
-
] },
|
|
1125
|
+
] }, s);
|
|
1132
1126
|
}) }),
|
|
1133
|
-
!!((r =
|
|
1127
|
+
!!((r = a.takeaways) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2 rounded-2xl border border-border bg-card px-4 py-3.5", children: [
|
|
1134
1128
|
/* @__PURE__ */ t("p", { className: "text-xs font-semibold uppercase tracking-wider text-tertiary", children: "Key takeaways" }),
|
|
1135
|
-
/* @__PURE__ */ t("ul", { className: "space-y-1.5", children:
|
|
1129
|
+
/* @__PURE__ */ t("ul", { className: "space-y-1.5", children: a.takeaways.map((i, s) => /* @__PURE__ */ n(
|
|
1136
1130
|
"li",
|
|
1137
1131
|
{
|
|
1138
1132
|
className: "flex items-start gap-2 text-sm leading-6 text-secondary",
|
|
@@ -1154,14 +1148,14 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1154
1148
|
] })
|
|
1155
1149
|
]
|
|
1156
1150
|
},
|
|
1157
|
-
|
|
1151
|
+
s
|
|
1158
1152
|
)) })
|
|
1159
1153
|
] }),
|
|
1160
|
-
|
|
1154
|
+
a.bottomLine && /* @__PURE__ */ t(k, { signal: a.bottomLine }),
|
|
1161
1155
|
/* @__PURE__ */ t(
|
|
1162
1156
|
y,
|
|
1163
1157
|
{
|
|
1164
|
-
spec:
|
|
1158
|
+
spec: a,
|
|
1165
1159
|
onFollowUp: l,
|
|
1166
1160
|
onSourceSelect: d
|
|
1167
1161
|
}
|
|
@@ -1171,53 +1165,53 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1171
1165
|
);
|
|
1172
1166
|
});
|
|
1173
1167
|
oe.displayName = "NarrativeAnswer";
|
|
1174
|
-
const de =
|
|
1175
|
-
({ spec:
|
|
1168
|
+
const de = p.forwardRef(
|
|
1169
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1176
1170
|
var i;
|
|
1177
|
-
const r = [
|
|
1171
|
+
const r = [a.value.change, a.value.asOf].filter(Boolean).join(" · ");
|
|
1178
1172
|
return /* @__PURE__ */ n(
|
|
1179
1173
|
"div",
|
|
1180
1174
|
{
|
|
1181
1175
|
ref: h,
|
|
1182
|
-
"data-answer-kind":
|
|
1176
|
+
"data-answer-kind": a.kind,
|
|
1183
1177
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1184
|
-
...
|
|
1178
|
+
...o,
|
|
1185
1179
|
children: [
|
|
1186
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1180
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1187
1181
|
/* @__PURE__ */ n("div", { className: "rounded-2xl border border-border px-5 py-4", children: [
|
|
1188
|
-
/* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children:
|
|
1182
|
+
/* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: a.value.label }),
|
|
1189
1183
|
/* @__PURE__ */ t(
|
|
1190
1184
|
"p",
|
|
1191
1185
|
{
|
|
1192
1186
|
className: g(
|
|
1193
|
-
A({ tone:
|
|
1187
|
+
A({ tone: a.value.tone }),
|
|
1194
1188
|
"mt-1 text-3xl font-normal tracking-tight"
|
|
1195
1189
|
),
|
|
1196
|
-
children:
|
|
1190
|
+
children: a.value.value
|
|
1197
1191
|
}
|
|
1198
1192
|
),
|
|
1199
1193
|
r && /* @__PURE__ */ t("p", { className: "mt-1 text-base text-secondary", children: r }),
|
|
1200
|
-
!!((i =
|
|
1201
|
-
/* @__PURE__ */ t("dt", { className: "text-xs font-normal text-tertiary", children:
|
|
1194
|
+
!!((i = a.facts) != null && i.length) && /* @__PURE__ */ t("dl", { className: "mt-4 flex flex-wrap items-baseline gap-x-6 gap-y-1.5 border-t border-border pt-3", children: a.facts.map((s) => /* @__PURE__ */ n("div", { className: "flex items-baseline gap-1.5", children: [
|
|
1195
|
+
/* @__PURE__ */ t("dt", { className: "text-xs font-normal text-tertiary", children: s.label }),
|
|
1202
1196
|
/* @__PURE__ */ t(
|
|
1203
1197
|
"dd",
|
|
1204
1198
|
{
|
|
1205
1199
|
className: g(
|
|
1206
|
-
A({ tone:
|
|
1200
|
+
A({ tone: s.tone }),
|
|
1207
1201
|
"text-base font-normal tabular-nums"
|
|
1208
1202
|
),
|
|
1209
|
-
children:
|
|
1203
|
+
children: s.value
|
|
1210
1204
|
}
|
|
1211
1205
|
),
|
|
1212
|
-
|
|
1213
|
-
] },
|
|
1206
|
+
s.change && /* @__PURE__ */ t("dd", { className: "text-xs text-secondary", children: s.change })
|
|
1207
|
+
] }, s.label)) })
|
|
1214
1208
|
] }),
|
|
1215
|
-
|
|
1209
|
+
a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
|
|
1216
1210
|
/* @__PURE__ */ t(
|
|
1217
1211
|
y,
|
|
1218
1212
|
{
|
|
1219
|
-
spec:
|
|
1220
|
-
citations:
|
|
1213
|
+
spec: a,
|
|
1214
|
+
citations: a.citations,
|
|
1221
1215
|
onFollowUp: l,
|
|
1222
1216
|
onSourceSelect: d
|
|
1223
1217
|
}
|
|
@@ -1228,22 +1222,22 @@ const de = u.forwardRef(
|
|
|
1228
1222
|
}
|
|
1229
1223
|
);
|
|
1230
1224
|
de.displayName = "FactAnswer";
|
|
1231
|
-
const ce =
|
|
1232
|
-
({ spec:
|
|
1225
|
+
const ce = p.forwardRef(
|
|
1226
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
1233
1227
|
"div",
|
|
1234
1228
|
{
|
|
1235
1229
|
ref: h,
|
|
1236
|
-
"data-answer-kind":
|
|
1230
|
+
"data-answer-kind": a.kind,
|
|
1237
1231
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1238
|
-
...
|
|
1232
|
+
...o,
|
|
1239
1233
|
children: [
|
|
1240
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1241
|
-
/* @__PURE__ */ t(ae, { table:
|
|
1242
|
-
|
|
1234
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1235
|
+
/* @__PURE__ */ t(ae, { table: a, caption: a.headline }),
|
|
1236
|
+
a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
|
|
1243
1237
|
/* @__PURE__ */ t(
|
|
1244
1238
|
y,
|
|
1245
1239
|
{
|
|
1246
|
-
spec:
|
|
1240
|
+
spec: a,
|
|
1247
1241
|
onFollowUp: l,
|
|
1248
1242
|
onSourceSelect: d
|
|
1249
1243
|
}
|
|
@@ -1253,19 +1247,19 @@ const ce = u.forwardRef(
|
|
|
1253
1247
|
)
|
|
1254
1248
|
);
|
|
1255
1249
|
ce.displayName = "TableAnswer";
|
|
1256
|
-
const me =
|
|
1257
|
-
({ spec:
|
|
1250
|
+
const me = p.forwardRef(
|
|
1251
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
1258
1252
|
"div",
|
|
1259
1253
|
{
|
|
1260
1254
|
ref: h,
|
|
1261
|
-
"data-answer-kind":
|
|
1255
|
+
"data-answer-kind": a.kind,
|
|
1262
1256
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1263
|
-
...
|
|
1257
|
+
...o,
|
|
1264
1258
|
children: [
|
|
1265
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1259
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1266
1260
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
1267
|
-
|
|
1268
|
-
/* @__PURE__ */ t("ol", { className: "space-y-2", children:
|
|
1261
|
+
a.metricLabel && /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: a.metricLabel }),
|
|
1262
|
+
/* @__PURE__ */ t("ol", { className: "space-y-2", children: a.items.map((r, i) => /* @__PURE__ */ n(
|
|
1269
1263
|
"li",
|
|
1270
1264
|
{
|
|
1271
1265
|
className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-3",
|
|
@@ -1321,14 +1315,14 @@ const me = u.forwardRef(
|
|
|
1321
1315
|
},
|
|
1322
1316
|
r.label
|
|
1323
1317
|
)) }),
|
|
1324
|
-
|
|
1325
|
-
/* @__PURE__ */ t(z, { citations:
|
|
1318
|
+
a.tiebreak && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-tertiary", children: a.tiebreak }),
|
|
1319
|
+
/* @__PURE__ */ t(z, { citations: a.citations })
|
|
1326
1320
|
] }),
|
|
1327
|
-
|
|
1321
|
+
a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
|
|
1328
1322
|
/* @__PURE__ */ t(
|
|
1329
1323
|
y,
|
|
1330
1324
|
{
|
|
1331
|
-
spec:
|
|
1325
|
+
spec: a,
|
|
1332
1326
|
onFollowUp: l,
|
|
1333
1327
|
onSourceSelect: d
|
|
1334
1328
|
}
|
|
@@ -1348,71 +1342,71 @@ const xa = {
|
|
|
1348
1342
|
pending: "Pending",
|
|
1349
1343
|
failed: "Failed",
|
|
1350
1344
|
skipped: "Skipped"
|
|
1351
|
-
}, he =
|
|
1345
|
+
}, he = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1352
1346
|
var r, i;
|
|
1353
1347
|
return /* @__PURE__ */ n(
|
|
1354
1348
|
"div",
|
|
1355
1349
|
{
|
|
1356
1350
|
ref: h,
|
|
1357
|
-
"data-answer-kind":
|
|
1351
|
+
"data-answer-kind": a.kind,
|
|
1358
1352
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1359
|
-
...
|
|
1353
|
+
...o,
|
|
1360
1354
|
children: [
|
|
1361
1355
|
/* @__PURE__ */ n("div", { className: "flex flex-col justify-between gap-3 @md:flex-row @md:items-start", children: [
|
|
1362
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1356
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1363
1357
|
/* @__PURE__ */ n(
|
|
1364
1358
|
w,
|
|
1365
1359
|
{
|
|
1366
1360
|
variant: "soft",
|
|
1367
|
-
color:
|
|
1361
|
+
color: a.outcome.tone ?? "success",
|
|
1368
1362
|
className: "self-start",
|
|
1369
1363
|
children: [
|
|
1370
|
-
|
|
1371
|
-
|
|
1364
|
+
a.outcome.label,
|
|
1365
|
+
a.outcome.detail && ` · ${a.outcome.detail}`
|
|
1372
1366
|
]
|
|
1373
1367
|
}
|
|
1374
1368
|
)
|
|
1375
1369
|
] }),
|
|
1376
|
-
!!((r =
|
|
1377
|
-
!!((i =
|
|
1370
|
+
!!((r = a.changes) != null && r.length) && /* @__PURE__ */ t(ee, { items: a.changes }),
|
|
1371
|
+
!!((i = a.steps) != null && i.length) && /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.steps.map((s) => /* @__PURE__ */ n(
|
|
1378
1372
|
"li",
|
|
1379
1373
|
{
|
|
1380
1374
|
className: "flex items-start gap-3 rounded-xl border border-border bg-card px-4 py-3",
|
|
1381
1375
|
children: [
|
|
1382
|
-
/* @__PURE__ */ t("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center [&_svg]:size-4", children: xa[
|
|
1376
|
+
/* @__PURE__ */ t("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center [&_svg]:size-4", children: xa[s.status] }),
|
|
1383
1377
|
/* @__PURE__ */ n("div", { className: "min-w-0", children: [
|
|
1384
1378
|
/* @__PURE__ */ n(
|
|
1385
1379
|
"p",
|
|
1386
1380
|
{
|
|
1387
1381
|
className: g(
|
|
1388
1382
|
"text-sm font-normal",
|
|
1389
|
-
|
|
1383
|
+
s.status === "skipped" ? "text-tertiary" : "text-foreground"
|
|
1390
1384
|
),
|
|
1391
1385
|
children: [
|
|
1392
|
-
|
|
1386
|
+
s.label,
|
|
1393
1387
|
/* @__PURE__ */ n("span", { className: "sr-only", children: [
|
|
1394
1388
|
" — ",
|
|
1395
|
-
fa[
|
|
1389
|
+
fa[s.status]
|
|
1396
1390
|
] })
|
|
1397
1391
|
]
|
|
1398
1392
|
}
|
|
1399
1393
|
),
|
|
1400
|
-
|
|
1394
|
+
s.detail && /* @__PURE__ */ t("p", { className: "mt-0.5 text-xs leading-5 text-secondary", children: s.detail })
|
|
1401
1395
|
] })
|
|
1402
1396
|
]
|
|
1403
1397
|
},
|
|
1404
|
-
|
|
1398
|
+
s.label
|
|
1405
1399
|
)) }),
|
|
1406
|
-
|
|
1400
|
+
a.safety && /* @__PURE__ */ n("p", { className: "flex items-center gap-1.5 text-xs text-tertiary", children: [
|
|
1407
1401
|
/* @__PURE__ */ t(q, { "aria-hidden": !0, className: "size-3.5 shrink-0 text-success-700" }),
|
|
1408
|
-
|
|
1402
|
+
a.safety
|
|
1409
1403
|
] }),
|
|
1410
|
-
|
|
1411
|
-
|
|
1404
|
+
a.next && /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-secondary", children: a.next }),
|
|
1405
|
+
a.warning && /* @__PURE__ */ t(k, { signal: a.warning }),
|
|
1412
1406
|
/* @__PURE__ */ t(
|
|
1413
1407
|
y,
|
|
1414
1408
|
{
|
|
1415
|
-
spec:
|
|
1409
|
+
spec: a,
|
|
1416
1410
|
onFollowUp: l,
|
|
1417
1411
|
onSourceSelect: d
|
|
1418
1412
|
}
|
|
@@ -1422,21 +1416,21 @@ const xa = {
|
|
|
1422
1416
|
);
|
|
1423
1417
|
});
|
|
1424
1418
|
he.displayName = "ConfirmationAnswer";
|
|
1425
|
-
const ge =
|
|
1426
|
-
var i,
|
|
1419
|
+
const ge = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1420
|
+
var i, s;
|
|
1427
1421
|
const r = c ?? l;
|
|
1428
1422
|
return /* @__PURE__ */ n(
|
|
1429
1423
|
"div",
|
|
1430
1424
|
{
|
|
1431
1425
|
ref: h,
|
|
1432
|
-
"data-answer-kind":
|
|
1426
|
+
"data-answer-kind": a.kind,
|
|
1433
1427
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1434
|
-
...
|
|
1428
|
+
...o,
|
|
1435
1429
|
children: [
|
|
1436
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1437
|
-
!!((i =
|
|
1438
|
-
/* @__PURE__ */ t("p", { className: "text-sm font-semibold leading-6 text-foreground", children:
|
|
1439
|
-
!!((
|
|
1430
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1431
|
+
!!((i = a.findings) != null && i.length) && /* @__PURE__ */ t(ee, { items: a.findings }),
|
|
1432
|
+
/* @__PURE__ */ t("p", { className: "text-sm font-semibold leading-6 text-foreground", children: a.question }),
|
|
1433
|
+
!!((s = a.options) != null && s.length) && /* @__PURE__ */ t("div", { className: "space-y-2", children: a.options.map((b) => /* @__PURE__ */ n(
|
|
1440
1434
|
"button",
|
|
1441
1435
|
{
|
|
1442
1436
|
type: "button",
|
|
@@ -1459,7 +1453,7 @@ const ge = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1459
1453
|
/* @__PURE__ */ t(
|
|
1460
1454
|
y,
|
|
1461
1455
|
{
|
|
1462
|
-
spec:
|
|
1456
|
+
spec: a,
|
|
1463
1457
|
onFollowUp: l,
|
|
1464
1458
|
onSourceSelect: d
|
|
1465
1459
|
}
|
|
@@ -1469,20 +1463,20 @@ const ge = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1469
1463
|
);
|
|
1470
1464
|
});
|
|
1471
1465
|
ge.displayName = "ClarificationAnswer";
|
|
1472
|
-
const be =
|
|
1473
|
-
({ spec:
|
|
1466
|
+
const be = p.forwardRef(
|
|
1467
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1474
1468
|
var r;
|
|
1475
1469
|
return /* @__PURE__ */ n(
|
|
1476
1470
|
"div",
|
|
1477
1471
|
{
|
|
1478
1472
|
ref: h,
|
|
1479
|
-
"data-answer-kind":
|
|
1473
|
+
"data-answer-kind": a.kind,
|
|
1480
1474
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1481
|
-
...
|
|
1475
|
+
...o,
|
|
1482
1476
|
children: [
|
|
1483
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1484
|
-
!!((r =
|
|
1485
|
-
/* @__PURE__ */ t("ul", { className: "space-y-2", children:
|
|
1477
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1478
|
+
!!((r = a.checks) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1479
|
+
/* @__PURE__ */ t("ul", { className: "space-y-2", children: a.checks.map((i) => /* @__PURE__ */ n(
|
|
1486
1480
|
"li",
|
|
1487
1481
|
{
|
|
1488
1482
|
className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-2.5",
|
|
@@ -1502,18 +1496,18 @@ const be = u.forwardRef(
|
|
|
1502
1496
|
},
|
|
1503
1497
|
i.label
|
|
1504
1498
|
)) }),
|
|
1505
|
-
/* @__PURE__ */ t(z, { citations:
|
|
1499
|
+
/* @__PURE__ */ t(z, { citations: a.citations })
|
|
1506
1500
|
] }),
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children:
|
|
1510
|
-
/* @__PURE__ */ t("p", { className: "mt-1 text-lg font-semibold tabular-nums tracking-tight text-foreground", children:
|
|
1501
|
+
a.reason && /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-secondary", children: a.reason }),
|
|
1502
|
+
a.baseline && /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
|
|
1503
|
+
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.baseline.label }),
|
|
1504
|
+
/* @__PURE__ */ t("p", { className: "mt-1 text-lg font-semibold tabular-nums tracking-tight text-foreground", children: a.baseline.value })
|
|
1511
1505
|
] }),
|
|
1512
|
-
|
|
1506
|
+
a.alternative && /* @__PURE__ */ t(k, { signal: a.alternative }),
|
|
1513
1507
|
/* @__PURE__ */ t(
|
|
1514
1508
|
y,
|
|
1515
1509
|
{
|
|
1516
|
-
spec:
|
|
1510
|
+
spec: a,
|
|
1517
1511
|
onFollowUp: l,
|
|
1518
1512
|
onSourceSelect: d
|
|
1519
1513
|
}
|
|
@@ -1529,64 +1523,64 @@ const ya = {
|
|
|
1529
1523
|
admin: "Workspace admin",
|
|
1530
1524
|
platform: "Platform team",
|
|
1531
1525
|
agent: "Agent"
|
|
1532
|
-
},
|
|
1533
|
-
({ spec:
|
|
1526
|
+
}, pe = p.forwardRef(
|
|
1527
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1534
1528
|
var r, i;
|
|
1535
1529
|
return /* @__PURE__ */ n(
|
|
1536
1530
|
"div",
|
|
1537
1531
|
{
|
|
1538
1532
|
ref: h,
|
|
1539
|
-
"data-answer-kind":
|
|
1533
|
+
"data-answer-kind": a.kind,
|
|
1540
1534
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1541
|
-
...
|
|
1535
|
+
...o,
|
|
1542
1536
|
children: [
|
|
1543
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1537
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1544
1538
|
/* @__PURE__ */ n(T, { variant: "danger", className: "border border-border bg-card", children: [
|
|
1545
|
-
/* @__PURE__ */ t(O, { children:
|
|
1546
|
-
|
|
1539
|
+
/* @__PURE__ */ t(O, { children: a.failure.summary }),
|
|
1540
|
+
a.failure.tally && /* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.failure.tally })
|
|
1547
1541
|
] }),
|
|
1548
|
-
|
|
1549
|
-
!!((r =
|
|
1542
|
+
a.failure.detail && /* @__PURE__ */ t(R, { isCopyable: !1, children: a.failure.detail }),
|
|
1543
|
+
!!((r = a.attempts) != null && r.length) && /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.attempts.map((s) => /* @__PURE__ */ n(
|
|
1550
1544
|
"li",
|
|
1551
1545
|
{
|
|
1552
1546
|
className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-2.5",
|
|
1553
1547
|
children: [
|
|
1554
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 break-all font-mono text-xs leading-5 text-foreground", children:
|
|
1555
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-danger-700", children:
|
|
1548
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 break-all font-mono text-xs leading-5 text-foreground", children: s.label }),
|
|
1549
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-danger-700", children: s.result })
|
|
1556
1550
|
]
|
|
1557
1551
|
},
|
|
1558
|
-
|
|
1552
|
+
s.label
|
|
1559
1553
|
)) }),
|
|
1560
|
-
!!((i =
|
|
1554
|
+
!!((i = a.resolution) != null && i.length) && /* @__PURE__ */ t("ol", { className: "space-y-2", children: a.resolution.map((s, b) => /* @__PURE__ */ n(
|
|
1561
1555
|
"li",
|
|
1562
1556
|
{
|
|
1563
1557
|
className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-3",
|
|
1564
1558
|
children: [
|
|
1565
1559
|
/* @__PURE__ */ n("div", { className: "flex min-w-0 items-start gap-2.5", children: [
|
|
1566
1560
|
/* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 tabular-nums", children: b + 1 }),
|
|
1567
|
-
/* @__PURE__ */ t("p", { className: "text-sm leading-6 text-foreground", children:
|
|
1561
|
+
/* @__PURE__ */ t("p", { className: "text-sm leading-6 text-foreground", children: s.action })
|
|
1568
1562
|
] }),
|
|
1569
|
-
|
|
1563
|
+
s.owner && /* @__PURE__ */ t(w, { variant: "soft", className: "shrink-0", children: ya[s.owner] })
|
|
1570
1564
|
]
|
|
1571
1565
|
},
|
|
1572
|
-
|
|
1566
|
+
s.action
|
|
1573
1567
|
)) }),
|
|
1574
|
-
|
|
1568
|
+
a.preserved && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1575
1569
|
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: "Ready to run once the connection is back" }),
|
|
1576
1570
|
/* @__PURE__ */ t(
|
|
1577
1571
|
R,
|
|
1578
1572
|
{
|
|
1579
|
-
language:
|
|
1580
|
-
filename:
|
|
1573
|
+
language: a.preserved.language,
|
|
1574
|
+
filename: a.preserved.label,
|
|
1581
1575
|
className: "max-h-64",
|
|
1582
|
-
children:
|
|
1576
|
+
children: a.preserved.code
|
|
1583
1577
|
}
|
|
1584
1578
|
)
|
|
1585
1579
|
] }),
|
|
1586
1580
|
/* @__PURE__ */ t(
|
|
1587
1581
|
y,
|
|
1588
1582
|
{
|
|
1589
|
-
spec:
|
|
1583
|
+
spec: a,
|
|
1590
1584
|
onFollowUp: l,
|
|
1591
1585
|
onSourceSelect: d
|
|
1592
1586
|
}
|
|
@@ -1596,31 +1590,31 @@ const ya = {
|
|
|
1596
1590
|
);
|
|
1597
1591
|
}
|
|
1598
1592
|
);
|
|
1599
|
-
|
|
1600
|
-
const
|
|
1601
|
-
({ spec:
|
|
1593
|
+
pe.displayName = "ErrorAnswer";
|
|
1594
|
+
const ue = p.forwardRef(
|
|
1595
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1602
1596
|
var r;
|
|
1603
1597
|
return /* @__PURE__ */ n(
|
|
1604
1598
|
"div",
|
|
1605
1599
|
{
|
|
1606
1600
|
ref: h,
|
|
1607
|
-
"data-answer-kind":
|
|
1601
|
+
"data-answer-kind": a.kind,
|
|
1608
1602
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1609
|
-
...
|
|
1603
|
+
...o,
|
|
1610
1604
|
children: [
|
|
1611
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1612
|
-
|
|
1605
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1606
|
+
a.completed && /* @__PURE__ */ n("p", { className: "flex items-start gap-2 text-sm leading-6 text-secondary", children: [
|
|
1613
1607
|
/* @__PURE__ */ t(q, { "aria-hidden": !0, className: "mt-1 size-4 shrink-0 text-success-700" }),
|
|
1614
|
-
/* @__PURE__ */ t("span", { children:
|
|
1608
|
+
/* @__PURE__ */ t("span", { children: a.completed })
|
|
1615
1609
|
] }),
|
|
1616
1610
|
/* @__PURE__ */ n(T, { variant: "warning", className: "border border-border bg-card", children: [
|
|
1617
1611
|
/* @__PURE__ */ t(O, { children: "Declined" }),
|
|
1618
|
-
/* @__PURE__ */ t(L, { className: "text-base leading-6", children:
|
|
1612
|
+
/* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.reason })
|
|
1619
1613
|
] }),
|
|
1620
|
-
|
|
1621
|
-
!!((r =
|
|
1614
|
+
a.scope && /* @__PURE__ */ t("p", { className: "text-xs leading-5 text-tertiary", children: a.scope }),
|
|
1615
|
+
!!((r = a.alternatives) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1622
1616
|
/* @__PURE__ */ t("p", { className: "text-xs font-semibold uppercase tracking-wider text-tertiary", children: "Available instead" }),
|
|
1623
|
-
/* @__PURE__ */ t("ul", { className: "space-y-2", children:
|
|
1617
|
+
/* @__PURE__ */ t("ul", { className: "space-y-2", children: a.alternatives.map((i) => /* @__PURE__ */ n(
|
|
1624
1618
|
"li",
|
|
1625
1619
|
{
|
|
1626
1620
|
className: "rounded-xl border border-border bg-card px-4 py-3",
|
|
@@ -1635,7 +1629,7 @@ const pe = u.forwardRef(
|
|
|
1635
1629
|
/* @__PURE__ */ t(
|
|
1636
1630
|
y,
|
|
1637
1631
|
{
|
|
1638
|
-
spec:
|
|
1632
|
+
spec: a,
|
|
1639
1633
|
onFollowUp: l,
|
|
1640
1634
|
onSourceSelect: d
|
|
1641
1635
|
}
|
|
@@ -1645,21 +1639,21 @@ const pe = u.forwardRef(
|
|
|
1645
1639
|
);
|
|
1646
1640
|
}
|
|
1647
1641
|
);
|
|
1648
|
-
|
|
1649
|
-
const xe =
|
|
1642
|
+
ue.displayName = "RefusalAnswer";
|
|
1643
|
+
const xe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1650
1644
|
var r;
|
|
1651
1645
|
return /* @__PURE__ */ n(
|
|
1652
1646
|
"div",
|
|
1653
1647
|
{
|
|
1654
1648
|
ref: h,
|
|
1655
|
-
"data-answer-kind":
|
|
1649
|
+
"data-answer-kind": a.kind,
|
|
1656
1650
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1657
|
-
...
|
|
1651
|
+
...o,
|
|
1658
1652
|
children: [
|
|
1659
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1653
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1660
1654
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1661
|
-
|
|
1662
|
-
var
|
|
1655
|
+
a.entries.map((i) => {
|
|
1656
|
+
var s;
|
|
1663
1657
|
return /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3.5", children: [
|
|
1664
1658
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1665
1659
|
/* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.term }),
|
|
@@ -1667,7 +1661,7 @@ const xe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1667
1661
|
] }),
|
|
1668
1662
|
i.body && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: i.body }),
|
|
1669
1663
|
i.formula && /* @__PURE__ */ t(R, { isCopyable: !1, className: "mt-2", children: i.formula }),
|
|
1670
|
-
!!((
|
|
1664
|
+
!!((s = i.items) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: i.items.map((b) => /* @__PURE__ */ n(
|
|
1671
1665
|
"li",
|
|
1672
1666
|
{
|
|
1673
1667
|
className: "flex items-baseline justify-between gap-4 text-xs leading-5",
|
|
@@ -1689,20 +1683,20 @@ const xe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1689
1683
|
)) })
|
|
1690
1684
|
] }, i.term);
|
|
1691
1685
|
}),
|
|
1692
|
-
/* @__PURE__ */ t(z, { citations:
|
|
1686
|
+
/* @__PURE__ */ t(z, { citations: a.citations })
|
|
1693
1687
|
] }),
|
|
1694
|
-
!!((r =
|
|
1688
|
+
!!((r = a.gaps) != null && r.length) && /* @__PURE__ */ n(T, { variant: "warning", className: "border border-border bg-card", children: [
|
|
1695
1689
|
/* @__PURE__ */ t(O, { children: "Not found" }),
|
|
1696
|
-
/* @__PURE__ */ t(L, { className: "text-base leading-6", children:
|
|
1690
|
+
/* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.gaps.map((i) => /* @__PURE__ */ t("span", { className: "mt-1 block first:mt-0", children: i }, i)) })
|
|
1697
1691
|
] }),
|
|
1698
|
-
|
|
1692
|
+
a.compliance && /* @__PURE__ */ n("p", { className: "flex items-center gap-1.5 text-xs text-tertiary", children: [
|
|
1699
1693
|
/* @__PURE__ */ t(q, { "aria-hidden": !0, className: "size-3.5 shrink-0 text-success-700" }),
|
|
1700
|
-
|
|
1694
|
+
a.compliance
|
|
1701
1695
|
] }),
|
|
1702
1696
|
/* @__PURE__ */ t(
|
|
1703
1697
|
y,
|
|
1704
1698
|
{
|
|
1705
|
-
spec:
|
|
1699
|
+
spec: a,
|
|
1706
1700
|
onFollowUp: l,
|
|
1707
1701
|
onSourceSelect: d
|
|
1708
1702
|
}
|
|
@@ -1712,20 +1706,20 @@ const xe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1712
1706
|
);
|
|
1713
1707
|
});
|
|
1714
1708
|
xe.displayName = "KnowledgeAnswer";
|
|
1715
|
-
const fe =
|
|
1716
|
-
({ spec:
|
|
1709
|
+
const fe = p.forwardRef(
|
|
1710
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1717
1711
|
var r;
|
|
1718
1712
|
return /* @__PURE__ */ n(
|
|
1719
1713
|
"div",
|
|
1720
1714
|
{
|
|
1721
1715
|
ref: h,
|
|
1722
|
-
"data-answer-kind":
|
|
1716
|
+
"data-answer-kind": a.kind,
|
|
1723
1717
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1724
|
-
...
|
|
1718
|
+
...o,
|
|
1725
1719
|
children: [
|
|
1726
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1727
|
-
/* @__PURE__ */ t("div", { className: "space-y-2", children:
|
|
1728
|
-
var
|
|
1720
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1721
|
+
/* @__PURE__ */ t("div", { className: "space-y-2", children: a.options.map((i) => {
|
|
1722
|
+
var s, b, j, V;
|
|
1729
1723
|
return /* @__PURE__ */ n("div", { className: "rounded-2xl border border-border bg-card p-4", children: [
|
|
1730
1724
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1731
1725
|
/* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.name }),
|
|
@@ -1733,7 +1727,7 @@ const fe = u.forwardRef(
|
|
|
1733
1727
|
i.recommended && /* @__PURE__ */ t(w, { variant: "soft", color: "primary", children: "Recommended" })
|
|
1734
1728
|
] }),
|
|
1735
1729
|
i.description && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: i.description }),
|
|
1736
|
-
(!!((
|
|
1730
|
+
(!!((s = i.pros) != null && s.length) || !!((b = i.cons) != null && b.length)) && /* @__PURE__ */ n("div", { className: "mt-3 grid gap-x-6 gap-y-1.5 @lg:grid-cols-2", children: [
|
|
1737
1731
|
!!((j = i.pros) != null && j.length) && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.pros.map((C) => /* @__PURE__ */ n(
|
|
1738
1732
|
"li",
|
|
1739
1733
|
{
|
|
@@ -1771,7 +1765,7 @@ const fe = u.forwardRef(
|
|
|
1771
1765
|
] })
|
|
1772
1766
|
] }, i.name);
|
|
1773
1767
|
}) }),
|
|
1774
|
-
!!((r =
|
|
1768
|
+
!!((r = a.guidance) != null && r.length) && /* @__PURE__ */ t("dl", { className: "rounded-2xl border border-border bg-card px-4 py-2", children: a.guidance.map((i) => /* @__PURE__ */ n(
|
|
1775
1769
|
"div",
|
|
1776
1770
|
{
|
|
1777
1771
|
className: "flex items-baseline justify-between gap-4 py-1.5",
|
|
@@ -1785,7 +1779,7 @@ const fe = u.forwardRef(
|
|
|
1785
1779
|
/* @__PURE__ */ t(
|
|
1786
1780
|
y,
|
|
1787
1781
|
{
|
|
1788
|
-
spec:
|
|
1782
|
+
spec: a,
|
|
1789
1783
|
onFollowUp: l,
|
|
1790
1784
|
onSourceSelect: d
|
|
1791
1785
|
}
|
|
@@ -1796,27 +1790,27 @@ const fe = u.forwardRef(
|
|
|
1796
1790
|
}
|
|
1797
1791
|
);
|
|
1798
1792
|
fe.displayName = "DecisionAnswer";
|
|
1799
|
-
const ye =
|
|
1800
|
-
({ spec:
|
|
1793
|
+
const ye = p.forwardRef(
|
|
1794
|
+
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1801
1795
|
var r;
|
|
1802
1796
|
return /* @__PURE__ */ n(
|
|
1803
1797
|
"div",
|
|
1804
1798
|
{
|
|
1805
1799
|
ref: h,
|
|
1806
|
-
"data-answer-kind":
|
|
1800
|
+
"data-answer-kind": a.kind,
|
|
1807
1801
|
className: g("@container w-full max-w-2xl space-y-5", m),
|
|
1808
|
-
...
|
|
1802
|
+
...o,
|
|
1809
1803
|
children: [
|
|
1810
|
-
/* @__PURE__ */ t(f, { spec:
|
|
1811
|
-
|
|
1804
|
+
/* @__PURE__ */ t(f, { spec: a }),
|
|
1805
|
+
a.sections.map((i, s) => /* @__PURE__ */ n("section", { className: "space-y-2", children: [
|
|
1812
1806
|
i.title && /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.title }),
|
|
1813
|
-
i.type === "text" && /* @__PURE__ */ t(
|
|
1814
|
-
i.type === "metrics" && /* @__PURE__ */ t(
|
|
1807
|
+
i.type === "text" && /* @__PURE__ */ t(W, { text: i.body }),
|
|
1808
|
+
i.type === "metrics" && /* @__PURE__ */ t(ua, { items: i.items }),
|
|
1815
1809
|
i.type === "table" && /* @__PURE__ */ t(
|
|
1816
1810
|
ae,
|
|
1817
1811
|
{
|
|
1818
1812
|
table: i,
|
|
1819
|
-
caption: i.title ??
|
|
1813
|
+
caption: i.title ?? a.headline
|
|
1820
1814
|
}
|
|
1821
1815
|
),
|
|
1822
1816
|
i.type === "chart" && /* @__PURE__ */ n(D, { children: [
|
|
@@ -1847,10 +1841,10 @@ const ye = u.forwardRef(
|
|
|
1847
1841
|
},
|
|
1848
1842
|
b.body
|
|
1849
1843
|
)) })
|
|
1850
|
-
] },
|
|
1851
|
-
!!((r =
|
|
1844
|
+
] }, s)),
|
|
1845
|
+
!!((r = a.definitions) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-1.5 pt-1", children: [
|
|
1852
1846
|
/* @__PURE__ */ t("p", { className: "text-xs font-semibold uppercase tracking-wider text-tertiary", children: "Definitions" }),
|
|
1853
|
-
/* @__PURE__ */ t("dl", { className: "space-y-1", children:
|
|
1847
|
+
/* @__PURE__ */ t("dl", { className: "space-y-1", children: a.definitions.map((i) => /* @__PURE__ */ n("div", { className: "text-xs leading-5", children: [
|
|
1854
1848
|
/* @__PURE__ */ t("dt", { className: "inline font-semibold text-secondary", children: i.term }),
|
|
1855
1849
|
" ",
|
|
1856
1850
|
/* @__PURE__ */ n("dd", { className: "inline text-tertiary", children: [
|
|
@@ -1862,7 +1856,7 @@ const ye = u.forwardRef(
|
|
|
1862
1856
|
/* @__PURE__ */ t(
|
|
1863
1857
|
y,
|
|
1864
1858
|
{
|
|
1865
|
-
spec:
|
|
1859
|
+
spec: a,
|
|
1866
1860
|
onFollowUp: l,
|
|
1867
1861
|
onSourceSelect: d
|
|
1868
1862
|
}
|
|
@@ -1873,89 +1867,89 @@ const ye = u.forwardRef(
|
|
|
1873
1867
|
}
|
|
1874
1868
|
);
|
|
1875
1869
|
ye.displayName = "ReportAnswer";
|
|
1876
|
-
const Na =
|
|
1877
|
-
({ kind:
|
|
1878
|
-
const m =
|
|
1870
|
+
const Na = p.forwardRef(
|
|
1871
|
+
({ kind: a, className: l, ...c }, d) => {
|
|
1872
|
+
const m = a === "trend" ? "chart" : a === "fact" ? "tiles" : a === "table" || a === "comparison" || a === "report" ? "table" : a === "narrative" || a === "explanation" || a === "refusal" ? "prose" : a ? "rows" : "block";
|
|
1879
1873
|
return /* @__PURE__ */ n(
|
|
1880
1874
|
"div",
|
|
1881
1875
|
{
|
|
1882
1876
|
ref: d,
|
|
1883
|
-
"data-answer-kind":
|
|
1877
|
+
"data-answer-kind": a,
|
|
1884
1878
|
"aria-label": "Building answer",
|
|
1885
1879
|
className: g("w-full max-w-2xl space-y-4", l),
|
|
1886
1880
|
...c,
|
|
1887
1881
|
children: [
|
|
1888
1882
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1889
|
-
/* @__PURE__ */ t(
|
|
1890
|
-
/* @__PURE__ */ t(
|
|
1891
|
-
/* @__PURE__ */ t(
|
|
1883
|
+
/* @__PURE__ */ t(u, { className: "h-3 w-24" }),
|
|
1884
|
+
/* @__PURE__ */ t(u, { className: "h-7 w-4/5" }),
|
|
1885
|
+
/* @__PURE__ */ t(u, { className: "h-4 w-full" })
|
|
1892
1886
|
] }),
|
|
1893
|
-
m === "chart" && /* @__PURE__ */ t(
|
|
1887
|
+
m === "chart" && /* @__PURE__ */ t(u, { className: "h-56 w-full rounded-2xl" }),
|
|
1894
1888
|
m === "tiles" && /* @__PURE__ */ n(D, { children: [
|
|
1895
|
-
/* @__PURE__ */ t(
|
|
1889
|
+
/* @__PURE__ */ t(u, { className: "h-24 w-full rounded-2xl" }),
|
|
1896
1890
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1897
|
-
/* @__PURE__ */ t(
|
|
1898
|
-
/* @__PURE__ */ t(
|
|
1891
|
+
/* @__PURE__ */ t(u, { className: "h-16 rounded-xl" }),
|
|
1892
|
+
/* @__PURE__ */ t(u, { className: "h-16 rounded-xl" })
|
|
1899
1893
|
] })
|
|
1900
1894
|
] }),
|
|
1901
|
-
m === "table" && /* @__PURE__ */ t(
|
|
1895
|
+
m === "table" && /* @__PURE__ */ t(u, { className: "h-48 w-full rounded-2xl" }),
|
|
1902
1896
|
m === "rows" && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1903
|
-
/* @__PURE__ */ t(
|
|
1904
|
-
/* @__PURE__ */ t(
|
|
1905
|
-
/* @__PURE__ */ t(
|
|
1897
|
+
/* @__PURE__ */ t(u, { className: "h-12 w-full rounded-xl" }),
|
|
1898
|
+
/* @__PURE__ */ t(u, { className: "h-12 w-full rounded-xl" }),
|
|
1899
|
+
/* @__PURE__ */ t(u, { className: "h-12 w-full rounded-xl" })
|
|
1906
1900
|
] }),
|
|
1907
1901
|
m === "prose" && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1908
|
-
/* @__PURE__ */ t(
|
|
1909
|
-
/* @__PURE__ */ t(
|
|
1910
|
-
/* @__PURE__ */ t(
|
|
1911
|
-
/* @__PURE__ */ t(
|
|
1912
|
-
/* @__PURE__ */ t(
|
|
1902
|
+
/* @__PURE__ */ t(u, { className: "h-4 w-full" }),
|
|
1903
|
+
/* @__PURE__ */ t(u, { className: "h-4 w-full" }),
|
|
1904
|
+
/* @__PURE__ */ t(u, { className: "h-4 w-11/12" }),
|
|
1905
|
+
/* @__PURE__ */ t(u, { className: "h-4 w-full" }),
|
|
1906
|
+
/* @__PURE__ */ t(u, { className: "h-4 w-4/5" })
|
|
1913
1907
|
] }),
|
|
1914
|
-
m === "block" && /* @__PURE__ */ t(
|
|
1908
|
+
m === "block" && /* @__PURE__ */ t(u, { className: "h-48 w-full rounded-2xl" })
|
|
1915
1909
|
]
|
|
1916
1910
|
}
|
|
1917
1911
|
);
|
|
1918
1912
|
}
|
|
1919
1913
|
);
|
|
1920
1914
|
Na.displayName = "AnswerSkeleton";
|
|
1921
|
-
const wa =
|
|
1922
|
-
({ spec:
|
|
1915
|
+
const wa = p.forwardRef(
|
|
1916
|
+
({ spec: a, onCitationSelect: l, ...c }, d) => {
|
|
1923
1917
|
const m = (() => {
|
|
1924
|
-
switch (
|
|
1918
|
+
switch (a.kind) {
|
|
1925
1919
|
case "comparison":
|
|
1926
|
-
return /* @__PURE__ */ t(ne, { ref: d, spec:
|
|
1920
|
+
return /* @__PURE__ */ t(ne, { ref: d, spec: a, ...c });
|
|
1927
1921
|
case "trend":
|
|
1928
|
-
return /* @__PURE__ */ t(re, { ref: d, spec:
|
|
1922
|
+
return /* @__PURE__ */ t(re, { ref: d, spec: a, ...c });
|
|
1929
1923
|
case "status":
|
|
1930
|
-
return /* @__PURE__ */ t(ie, { ref: d, spec:
|
|
1924
|
+
return /* @__PURE__ */ t(ie, { ref: d, spec: a, ...c });
|
|
1931
1925
|
case "breakdown":
|
|
1932
|
-
return /* @__PURE__ */ t(le, { ref: d, spec:
|
|
1926
|
+
return /* @__PURE__ */ t(le, { ref: d, spec: a, ...c });
|
|
1933
1927
|
case "explanation":
|
|
1934
|
-
return /* @__PURE__ */ t(se, { ref: d, spec:
|
|
1928
|
+
return /* @__PURE__ */ t(se, { ref: d, spec: a, ...c });
|
|
1935
1929
|
case "narrative":
|
|
1936
|
-
return /* @__PURE__ */ t(oe, { ref: d, spec:
|
|
1930
|
+
return /* @__PURE__ */ t(oe, { ref: d, spec: a, ...c });
|
|
1937
1931
|
case "fact":
|
|
1938
|
-
return /* @__PURE__ */ t(de, { ref: d, spec:
|
|
1932
|
+
return /* @__PURE__ */ t(de, { ref: d, spec: a, ...c });
|
|
1939
1933
|
case "table":
|
|
1940
|
-
return /* @__PURE__ */ t(ce, { ref: d, spec:
|
|
1934
|
+
return /* @__PURE__ */ t(ce, { ref: d, spec: a, ...c });
|
|
1941
1935
|
case "ranking":
|
|
1942
|
-
return /* @__PURE__ */ t(me, { ref: d, spec:
|
|
1936
|
+
return /* @__PURE__ */ t(me, { ref: d, spec: a, ...c });
|
|
1943
1937
|
case "confirmation":
|
|
1944
|
-
return /* @__PURE__ */ t(he, { ref: d, spec:
|
|
1938
|
+
return /* @__PURE__ */ t(he, { ref: d, spec: a, ...c });
|
|
1945
1939
|
case "clarification":
|
|
1946
|
-
return /* @__PURE__ */ t(ge, { ref: d, spec:
|
|
1940
|
+
return /* @__PURE__ */ t(ge, { ref: d, spec: a, ...c });
|
|
1947
1941
|
case "empty":
|
|
1948
|
-
return /* @__PURE__ */ t(be, { ref: d, spec:
|
|
1942
|
+
return /* @__PURE__ */ t(be, { ref: d, spec: a, ...c });
|
|
1949
1943
|
case "error":
|
|
1950
|
-
return /* @__PURE__ */ t(
|
|
1944
|
+
return /* @__PURE__ */ t(pe, { ref: d, spec: a, ...c });
|
|
1951
1945
|
case "refusal":
|
|
1952
|
-
return /* @__PURE__ */ t(
|
|
1946
|
+
return /* @__PURE__ */ t(ue, { ref: d, spec: a, ...c });
|
|
1953
1947
|
case "knowledge":
|
|
1954
|
-
return /* @__PURE__ */ t(xe, { ref: d, spec:
|
|
1948
|
+
return /* @__PURE__ */ t(xe, { ref: d, spec: a, ...c });
|
|
1955
1949
|
case "decision":
|
|
1956
|
-
return /* @__PURE__ */ t(fe, { ref: d, spec:
|
|
1950
|
+
return /* @__PURE__ */ t(fe, { ref: d, spec: a, ...c });
|
|
1957
1951
|
case "report":
|
|
1958
|
-
return /* @__PURE__ */ t(ye, { ref: d, spec:
|
|
1952
|
+
return /* @__PURE__ */ t(ye, { ref: d, spec: a, ...c });
|
|
1959
1953
|
}
|
|
1960
1954
|
})();
|
|
1961
1955
|
return /* @__PURE__ */ t(J.Provider, { value: l, children: m });
|
|
@@ -1963,9 +1957,9 @@ const wa = u.forwardRef(
|
|
|
1963
1957
|
);
|
|
1964
1958
|
wa.displayName = "AnswerRenderer";
|
|
1965
1959
|
export {
|
|
1966
|
-
|
|
1960
|
+
Fa as ANSWER_KINDS,
|
|
1967
1961
|
Pe as ANSWER_TOOL_DESCRIPTION,
|
|
1968
|
-
|
|
1962
|
+
We as ANSWER_TOOL_NAME,
|
|
1969
1963
|
Y as AnswerChartSchema,
|
|
1970
1964
|
_e as AnswerCitationSchema,
|
|
1971
1965
|
S as AnswerCitationsSchema,
|
|
@@ -1991,7 +1985,7 @@ export {
|
|
|
1991
1985
|
da as DecisionAnswerSchema,
|
|
1992
1986
|
be as EmptyAnswer,
|
|
1993
1987
|
ia as EmptyAnswerSchema,
|
|
1994
|
-
|
|
1988
|
+
pe as ErrorAnswer,
|
|
1995
1989
|
la as ErrorAnswerSchema,
|
|
1996
1990
|
se as ExplanationAnswer,
|
|
1997
1991
|
Je as ExplanationAnswerSchema,
|
|
@@ -2003,7 +1997,7 @@ export {
|
|
|
2003
1997
|
Ze as NarrativeAnswerSchema,
|
|
2004
1998
|
me as RankingAnswer,
|
|
2005
1999
|
ta as RankingAnswerSchema,
|
|
2006
|
-
|
|
2000
|
+
ue as RefusalAnswer,
|
|
2007
2001
|
sa as RefusalAnswerSchema,
|
|
2008
2002
|
ye as ReportAnswer,
|
|
2009
2003
|
ma as ReportAnswerSchema,
|
|
@@ -2013,5 +2007,5 @@ export {
|
|
|
2013
2007
|
aa as TableAnswerSchema,
|
|
2014
2008
|
re as TrendAnswer,
|
|
2015
2009
|
Ye as TrendAnswerSchema,
|
|
2016
|
-
|
|
2010
|
+
Wa as answerTool
|
|
2017
2011
|
};
|