@apteva/apteva-kit 0.1.23 → 0.1.24
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 +20 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -20
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1275,12 +1275,12 @@ function MarkdownContent({ content, className = "" }) {
|
|
|
1275
1275
|
|
|
1276
1276
|
function ToolCall({ name, status }) {
|
|
1277
1277
|
if (status === "running") {
|
|
1278
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "
|
|
1279
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "
|
|
1280
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { className: "
|
|
1281
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { className: "
|
|
1278
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-tool-card apteva-tool-card-running", children: [
|
|
1279
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "apteva-tool-icon apteva-tool-icon-spin", fill: "none", viewBox: "0 0 24 24", children: [
|
|
1280
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { className: "apteva-tool-spinner-track", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1281
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { className: "apteva-tool-spinner-fill", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
|
|
1282
1282
|
] }),
|
|
1283
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1283
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-label", children: [
|
|
1284
1284
|
"Calling ",
|
|
1285
1285
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: name }),
|
|
1286
1286
|
"..."
|
|
@@ -1288,17 +1288,17 @@ function ToolCall({ name, status }) {
|
|
|
1288
1288
|
] });
|
|
1289
1289
|
}
|
|
1290
1290
|
if (status === "completed") {
|
|
1291
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "
|
|
1292
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "
|
|
1293
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1291
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-tool-card apteva-tool-card-completed", children: [
|
|
1292
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "apteva-tool-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
|
|
1293
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-label", children: [
|
|
1294
1294
|
"Tool completed: ",
|
|
1295
1295
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: name })
|
|
1296
1296
|
] })
|
|
1297
1297
|
] });
|
|
1298
1298
|
}
|
|
1299
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "
|
|
1300
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "
|
|
1301
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1299
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-tool-card apteva-tool-card-error", children: [
|
|
1300
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "apteva-tool-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }),
|
|
1301
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-label", children: [
|
|
1302
1302
|
"Tool failed: ",
|
|
1303
1303
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: name })
|
|
1304
1304
|
] })
|
|
@@ -1363,10 +1363,10 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
const renderContent = () => {
|
|
1365
1365
|
if (isUser) {
|
|
1366
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "
|
|
1366
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-text", children: message.content });
|
|
1367
1367
|
}
|
|
1368
1368
|
if (isStreaming && !hasContent) {
|
|
1369
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-typing-indicator
|
|
1369
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-typing-indicator", children: [
|
|
1370
1370
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", {}),
|
|
1371
1371
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", {}),
|
|
1372
1372
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", {})
|
|
@@ -1394,13 +1394,13 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
|
|
|
1394
1394
|
"div",
|
|
1395
1395
|
{
|
|
1396
1396
|
className: cn(
|
|
1397
|
-
"
|
|
1398
|
-
isUser ? "
|
|
1397
|
+
"apteva-message-bubble",
|
|
1398
|
+
isUser ? "apteva-message-user" : "apteva-message-assistant"
|
|
1399
1399
|
),
|
|
1400
1400
|
children: [
|
|
1401
|
-
renderContent(),
|
|
1402
|
-
message.widgets && message.widgets.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
1403
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("
|
|
1401
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: isUser ? "apteva-message-content-user" : "apteva-message-content-assistant", children: renderContent() }),
|
|
1402
|
+
message.widgets && message.widgets.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-widgets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Widgets, { widgets: message.widgets, onAction, layout: "stack" }) }),
|
|
1403
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("apteva-message-timestamp", isUser ? "apteva-message-timestamp-user" : "apteva-message-timestamp-assistant"), suppressHydrationWarning: true, children: message.timestamp.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) })
|
|
1404
1404
|
]
|
|
1405
1405
|
}
|
|
1406
1406
|
);
|
|
@@ -1567,7 +1567,7 @@ function MessageList({
|
|
|
1567
1567
|
listRef.current.scrollTop = listRef.current.scrollHeight;
|
|
1568
1568
|
}
|
|
1569
1569
|
}, [messages]);
|
|
1570
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: listRef, className: "
|
|
1570
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: listRef, className: "apteva-message-list apteva-scrollbar-hidden", children: messages.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1571
1571
|
WelcomeScreen,
|
|
1572
1572
|
{
|
|
1573
1573
|
title: welcomeTitle,
|
|
@@ -1578,7 +1578,7 @@ function MessageList({
|
|
|
1578
1578
|
onPromptClick: onPromptClick || (() => {
|
|
1579
1579
|
})
|
|
1580
1580
|
}
|
|
1581
|
-
) : messages.map((message) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
1581
|
+
) : messages.map((message) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: message.role === "user" ? "apteva-message-row-user" : "apteva-message-row-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Message, { message, onAction, enableWidgets, onWidgetRender }) }, message.id)) });
|
|
1582
1582
|
}
|
|
1583
1583
|
|
|
1584
1584
|
// src/components/Chat/Composer.tsx
|