@journeyrewards/hive-vercel 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +25 -7
- package/dist/index.mjs +25 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -363,13 +363,31 @@ function ConversationView({ conversationId, agentId, className }) {
|
|
|
363
363
|
style: { flex: 1, overflowY: "auto", padding: "16px" }
|
|
364
364
|
},
|
|
365
365
|
isLoading ? (0, import_react2.createElement)("div", { className: "jh-loading" }, "Loading messages...") : messages.map((msg) => {
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
366
|
+
const parts = msg.content || [];
|
|
367
|
+
const text = parts.map((c) => c.type === "output_text" ? c.text : "").join("") || "";
|
|
368
|
+
const chartParts = parts.filter((c) => c.type === "output_chart");
|
|
369
|
+
return (0, import_react2.createElement)(
|
|
370
|
+
"div",
|
|
371
|
+
{ key: msg.id },
|
|
372
|
+
(0, import_react2.createElement)(MessageBubble, {
|
|
373
|
+
key: `text-${msg.id}`,
|
|
374
|
+
role: msg.role,
|
|
375
|
+
content: text,
|
|
376
|
+
timestamp: msg.created_at
|
|
377
|
+
}),
|
|
378
|
+
...chartParts.map(
|
|
379
|
+
(chart) => (0, import_react2.createElement)("div", {
|
|
380
|
+
key: `chart-${chart.chart_id}`,
|
|
381
|
+
className: "jh-chart-embed",
|
|
382
|
+
style: { margin: "8px 0 16px", borderRadius: "12px", overflow: "hidden", border: "1px solid #e2e2ea", maxWidth: "640px" }
|
|
383
|
+
}, (0, import_react2.createElement)("iframe", {
|
|
384
|
+
src: chart.embed_url,
|
|
385
|
+
title: chart.title,
|
|
386
|
+
style: { width: "100%", height: "400px", border: "none" },
|
|
387
|
+
loading: "lazy"
|
|
388
|
+
}))
|
|
389
|
+
)
|
|
390
|
+
);
|
|
373
391
|
}),
|
|
374
392
|
(0, import_react2.createElement)("div", { ref: messagesEndRef })
|
|
375
393
|
),
|
package/dist/index.mjs
CHANGED
|
@@ -342,13 +342,31 @@ function ConversationView({ conversationId, agentId, className }) {
|
|
|
342
342
|
style: { flex: 1, overflowY: "auto", padding: "16px" }
|
|
343
343
|
},
|
|
344
344
|
isLoading ? createElement2("div", { className: "jh-loading" }, "Loading messages...") : messages.map((msg) => {
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
345
|
+
const parts = msg.content || [];
|
|
346
|
+
const text = parts.map((c) => c.type === "output_text" ? c.text : "").join("") || "";
|
|
347
|
+
const chartParts = parts.filter((c) => c.type === "output_chart");
|
|
348
|
+
return createElement2(
|
|
349
|
+
"div",
|
|
350
|
+
{ key: msg.id },
|
|
351
|
+
createElement2(MessageBubble, {
|
|
352
|
+
key: `text-${msg.id}`,
|
|
353
|
+
role: msg.role,
|
|
354
|
+
content: text,
|
|
355
|
+
timestamp: msg.created_at
|
|
356
|
+
}),
|
|
357
|
+
...chartParts.map(
|
|
358
|
+
(chart) => createElement2("div", {
|
|
359
|
+
key: `chart-${chart.chart_id}`,
|
|
360
|
+
className: "jh-chart-embed",
|
|
361
|
+
style: { margin: "8px 0 16px", borderRadius: "12px", overflow: "hidden", border: "1px solid #e2e2ea", maxWidth: "640px" }
|
|
362
|
+
}, createElement2("iframe", {
|
|
363
|
+
src: chart.embed_url,
|
|
364
|
+
title: chart.title,
|
|
365
|
+
style: { width: "100%", height: "400px", border: "none" },
|
|
366
|
+
loading: "lazy"
|
|
367
|
+
}))
|
|
368
|
+
)
|
|
369
|
+
);
|
|
352
370
|
}),
|
|
353
371
|
createElement2("div", { ref: messagesEndRef })
|
|
354
372
|
),
|