@firstlovecenter/ai-chat 0.1.1 → 0.2.1
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/CHANGELOG.md +76 -0
- package/dist/server/index.cjs +26 -8
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +30 -0
- package/dist/server/index.d.ts +30 -0
- package/dist/server/index.js +26 -8
- package/dist/server/index.js.map +1 -1
- package/dist/ui/index.cjs +14 -17
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.js +14 -17
- package/dist/ui/index.js.map +1 -1
- package/package.json +14 -11
package/dist/ui/index.cjs
CHANGED
|
@@ -940,22 +940,16 @@ function AiChat({
|
|
|
940
940
|
] }) : heroVisible ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col items-center justify-center text-center", children: [
|
|
941
941
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-medium tracking-tight text-foreground sm:text-3xl", children: greeting }),
|
|
942
942
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-2xl font-light tracking-tight text-muted-foreground sm:text-3xl", children: "What's on your mind?" })
|
|
943
|
-
] }) : /* @__PURE__ */ jsxRuntime.
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
)),
|
|
954
|
-
pending && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
955
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-1 inline size-3.5 animate-spin" }),
|
|
956
|
-
"Thinking\u2026"
|
|
957
|
-
] })
|
|
958
|
-
] })
|
|
943
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto flex w-full max-w-3xl flex-col gap-6", children: answers.map((a, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
944
|
+
AnswerView,
|
|
945
|
+
{
|
|
946
|
+
answer: a,
|
|
947
|
+
onRetry: () => void submit(a.question),
|
|
948
|
+
forwardRef: idx === answers.length - 1 ? lastAnswerRef : void 0,
|
|
949
|
+
isLast: idx === answers.length - 1
|
|
950
|
+
},
|
|
951
|
+
idx
|
|
952
|
+
)) })
|
|
959
953
|
}
|
|
960
954
|
),
|
|
961
955
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 px-4 pb-4 pt-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1096,7 +1090,10 @@ function AnswerView({
|
|
|
1096
1090
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(UserChip, { text: answer.question }) }),
|
|
1097
1091
|
isThinking ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1098
1092
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "size-4" }) }),
|
|
1099
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1093
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center text-sm text-muted-foreground", children: [
|
|
1094
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-1 inline size-3.5 animate-spin" }),
|
|
1095
|
+
"Thinking\u2026"
|
|
1096
|
+
] })
|
|
1100
1097
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
1101
1098
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "size-4" }) }),
|
|
1102
1099
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [
|