@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.
@@ -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 chunkB277MAUK_cjs = require('./chunk-B277MAUK.cjs');
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
- chunkB277MAUK_cjs.Conversation,
1102
+ chunk7LJMBYHC_cjs.Conversation,
1103
1103
  {
1104
1104
  className: "flex-1",
1105
- targetScrollTop: anchorLatestTurn ? chunkB277MAUK_cjs.anchorToLatestTurn : void 0,
1105
+ targetScrollTop: anchorLatestTurn ? chunk7LJMBYHC_cjs.anchorToLatestTurn : void 0,
1106
1106
  ...anchorLatestTurn ? { initial: "instant", resize: "instant" } : {},
1107
1107
  children: [
1108
- anchorLatestTurn && /* @__PURE__ */ jsxRuntime.jsx(chunkB277MAUK_cjs.FollowLatestTurn, { turnKey: latestUserId }),
1109
- /* @__PURE__ */ jsxRuntime.jsxs(chunkB277MAUK_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", {}, chunkB277MAUK_cjs.ConversationEmptyState, slots),
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 ? { [chunkB277MAUK_cjs.LATEST_TURN_ATTR]: "" } : {},
1120
+ ...message.id === latestUserId ? { [chunk7LJMBYHC_cjs.LATEST_TURN_ATTR]: "" } : {},
1121
1121
  children: [
1122
1122
  /* @__PURE__ */ jsxRuntime.jsx(
1123
- chunkB277MAUK_cjs.MessageAttachments,
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
- chunkB277MAUK_cjs.MessageAttachment,
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(chunkB277MAUK_cjs.Sources, { children: [
1194
- /* @__PURE__ */ jsxRuntime.jsx(chunkB277MAUK_cjs.SourcesTrigger, { count: kbSources.length }),
1195
- /* @__PURE__ */ jsxRuntime.jsx(chunkB277MAUK_cjs.SourcesContent, { children: kbSources.map((s, idx) => /* @__PURE__ */ jsxRuntime.jsx(
1196
- chunkB277MAUK_cjs.Source,
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
- }, chunkB277MAUK_cjs.MessageFeedback, slots)
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(chunkB277MAUK_cjs.Loader, { text: t("thinking") }),
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-LVH5ZIYA.cjs.map
1953
- //# sourceMappingURL=chunk-LVH5ZIYA.cjs.map
1952
+ //# sourceMappingURL=chunk-CPWM6NNE.cjs.map
1953
+ //# sourceMappingURL=chunk-CPWM6NNE.cjs.map