@aigentyc/chat-sdk 0.5.3 → 0.5.4
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/ai-elements.cjs +29 -29
- package/dist/ai-elements.js +1 -1
- package/dist/{chunk-B277MAUK.cjs → chunk-7LJMBYHC.cjs} +5 -11
- package/dist/chunk-7LJMBYHC.cjs.map +1 -0
- package/dist/{chunk-MQJ6MGTC.js → chunk-BKIYPLMT.js} +3 -3
- package/dist/{chunk-MQJ6MGTC.js.map → chunk-BKIYPLMT.js.map} +1 -1
- package/dist/{chunk-LVH5ZIYA.cjs → chunk-CPWM6NNE.cjs} +17 -17
- package/dist/{chunk-LVH5ZIYA.cjs.map → chunk-CPWM6NNE.cjs.map} +1 -1
- package/dist/{chunk-O5TPHZRP.js → chunk-TXX2W7ZR.js} +5 -11
- package/dist/chunk-TXX2W7ZR.js.map +1 -0
- package/dist/components.cjs +14 -14
- package/dist/components.js +3 -3
- package/dist/index.cjs +13 -13
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-B277MAUK.cjs.map +0 -1
- package/dist/chunk-O5TPHZRP.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkDVWX2UGY_cjs = require('./chunk-DVWX2UGY.cjs');
|
|
5
5
|
var chunkBYX6IOGX_cjs = require('./chunk-BYX6IOGX.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunk7LJMBYHC_cjs = require('./chunk-7LJMBYHC.cjs');
|
|
7
7
|
var chunk72QJ2ORD_cjs = require('./chunk-72QJ2ORD.cjs');
|
|
8
8
|
var chunkJEK2V5I3_cjs = require('./chunk-JEK2V5I3.cjs');
|
|
9
9
|
var chunkUXVOUC2A_cjs = require('./chunk-UXVOUC2A.cjs');
|
|
@@ -1099,15 +1099,15 @@ function ChatInterface(props) {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
),
|
|
1101
1101
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1102
|
-
|
|
1102
|
+
chunk7LJMBYHC_cjs.Conversation,
|
|
1103
1103
|
{
|
|
1104
1104
|
className: "flex-1",
|
|
1105
|
-
targetScrollTop: anchorLatestTurn ?
|
|
1105
|
+
targetScrollTop: anchorLatestTurn ? chunk7LJMBYHC_cjs.anchorToLatestTurn : void 0,
|
|
1106
1106
|
...anchorLatestTurn ? { initial: "instant", resize: "instant" } : {},
|
|
1107
1107
|
children: [
|
|
1108
|
-
anchorLatestTurn && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1109
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1110
|
-
messages.length === 0 && chunkUXVOUC2A_cjs.renderSlot("emptyState", {},
|
|
1108
|
+
anchorLatestTurn && /* @__PURE__ */ jsxRuntime.jsx(chunk7LJMBYHC_cjs.FollowLatestTurn, { turnKey: latestUserId }),
|
|
1109
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunk7LJMBYHC_cjs.ConversationContent, { className: "px-[15px] md:px-[40px] py-6 sm:py-8 w-full space-y-6", children: [
|
|
1110
|
+
messages.length === 0 && chunkUXVOUC2A_cjs.renderSlot("emptyState", {}, chunk7LJMBYHC_cjs.ConversationEmptyState, slots),
|
|
1111
1111
|
messages.map((message, messageIndex) => {
|
|
1112
1112
|
if (hideFirstUserMessage && messageIndex === 0 && message.role === "user") return null;
|
|
1113
1113
|
if (message.role === "system") {
|
|
@@ -1117,14 +1117,14 @@ function ChatInterface(props) {
|
|
|
1117
1117
|
"div",
|
|
1118
1118
|
{
|
|
1119
1119
|
className: `group ${message.role === "assistant" ? "is-assistant" : "is-user"}`,
|
|
1120
|
-
...message.id === latestUserId ? { [
|
|
1120
|
+
...message.id === latestUserId ? { [chunk7LJMBYHC_cjs.LATEST_TURN_ATTR]: "" } : {},
|
|
1121
1121
|
children: [
|
|
1122
1122
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1123
|
-
|
|
1123
|
+
chunk7LJMBYHC_cjs.MessageAttachments,
|
|
1124
1124
|
{
|
|
1125
1125
|
className: message.role === "user" ? "mb-2" : "mr-auto ml-0 mb-2",
|
|
1126
1126
|
children: (message.parts || []).filter((p) => p.type === "file" && p.url).map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1127
|
-
|
|
1127
|
+
chunk7LJMBYHC_cjs.MessageAttachment,
|
|
1128
1128
|
{
|
|
1129
1129
|
className: "size-32",
|
|
1130
1130
|
data: {
|
|
@@ -1190,10 +1190,10 @@ function ChatInterface(props) {
|
|
|
1190
1190
|
showSources && message.role === "assistant" && (() => {
|
|
1191
1191
|
const kbSources = extractKbSources(message.parts);
|
|
1192
1192
|
if (kbSources.length === 0) return null;
|
|
1193
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1194
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1196
|
-
|
|
1193
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunk7LJMBYHC_cjs.Sources, { children: [
|
|
1194
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk7LJMBYHC_cjs.SourcesTrigger, { count: kbSources.length }),
|
|
1195
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk7LJMBYHC_cjs.SourcesContent, { children: kbSources.map((s, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1196
|
+
chunk7LJMBYHC_cjs.Source,
|
|
1197
1197
|
{
|
|
1198
1198
|
href: s.sourceUrl ?? "#",
|
|
1199
1199
|
title: s.documentName || s.pageTitle || `Source ${idx + 1}`
|
|
@@ -1209,7 +1209,7 @@ function ChatInterface(props) {
|
|
|
1209
1209
|
apiKey: config.apiKey,
|
|
1210
1210
|
apiEndpoint: config.apiEndpoint,
|
|
1211
1211
|
textContent: (message.parts || []).filter((p) => p.type === "text").map((p) => p.text || "").join("\n") || (typeof message.content === "string" ? message.content : "")
|
|
1212
|
-
},
|
|
1212
|
+
}, chunk7LJMBYHC_cjs.MessageFeedback, slots)
|
|
1213
1213
|
]
|
|
1214
1214
|
},
|
|
1215
1215
|
message.id
|
|
@@ -1223,7 +1223,7 @@ function ChatInterface(props) {
|
|
|
1223
1223
|
);
|
|
1224
1224
|
const allToolsComplete = (lastMessage.parts || []).filter((p) => p.type.startsWith("tool-")).every((p) => p.state === "output-available");
|
|
1225
1225
|
return allToolsComplete && !hasText;
|
|
1226
|
-
})() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1226
|
+
})() && /* @__PURE__ */ jsxRuntime.jsx(chunk7LJMBYHC_cjs.Loader, { text: t("thinking") }),
|
|
1227
1227
|
status === "error" && chunkUXVOUC2A_cjs.renderSlot(
|
|
1228
1228
|
"error",
|
|
1229
1229
|
{
|
|
@@ -1949,5 +1949,5 @@ exports.QuickQuestions = QuickQuestions;
|
|
|
1949
1949
|
exports.SystemMessage = SystemMessage;
|
|
1950
1950
|
exports.WelcomePage = WelcomePage;
|
|
1951
1951
|
exports.panelMaxWidth = panelMaxWidth;
|
|
1952
|
-
//# sourceMappingURL=chunk-
|
|
1953
|
-
//# sourceMappingURL=chunk-
|
|
1952
|
+
//# sourceMappingURL=chunk-CPWM6NNE.cjs.map
|
|
1953
|
+
//# sourceMappingURL=chunk-CPWM6NNE.cjs.map
|