@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/dist/ui/index.js CHANGED
@@ -919,22 +919,16 @@ function AiChat({
919
919
  ] }) : heroVisible ? /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col items-center justify-center text-center", children: [
920
920
  /* @__PURE__ */ jsx("h1", { className: "text-2xl font-medium tracking-tight text-foreground sm:text-3xl", children: greeting }),
921
921
  /* @__PURE__ */ jsx("p", { className: "mt-2 text-2xl font-light tracking-tight text-muted-foreground sm:text-3xl", children: "What's on your mind?" })
922
- ] }) : /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-3xl flex-col gap-6", children: [
923
- answers.map((a, idx) => /* @__PURE__ */ jsx(
924
- AnswerView,
925
- {
926
- answer: a,
927
- onRetry: () => void submit(a.question),
928
- forwardRef: idx === answers.length - 1 ? lastAnswerRef : void 0,
929
- isLast: idx === answers.length - 1
930
- },
931
- idx
932
- )),
933
- pending && /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
934
- /* @__PURE__ */ jsx(Loader2, { className: "mr-1 inline size-3.5 animate-spin" }),
935
- "Thinking\u2026"
936
- ] })
937
- ] })
922
+ ] }) : /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full max-w-3xl flex-col gap-6", children: answers.map((a, idx) => /* @__PURE__ */ jsx(
923
+ AnswerView,
924
+ {
925
+ answer: a,
926
+ onRetry: () => void submit(a.question),
927
+ forwardRef: idx === answers.length - 1 ? lastAnswerRef : void 0,
928
+ isLast: idx === answers.length - 1
929
+ },
930
+ idx
931
+ )) })
938
932
  }
939
933
  ),
940
934
  /* @__PURE__ */ jsx("div", { className: "shrink-0 px-4 pb-4 pt-2", children: /* @__PURE__ */ jsxs(
@@ -1075,7 +1069,10 @@ function AnswerView({
1075
1069
  /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(UserChip, { text: answer.question }) }),
1076
1070
  isThinking ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
1077
1071
  /* @__PURE__ */ jsx("div", { className: "flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsx(Sparkles, { className: "size-4" }) }),
1078
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Thinking\u2026" })
1072
+ /* @__PURE__ */ jsxs("p", { className: "flex items-center text-sm text-muted-foreground", children: [
1073
+ /* @__PURE__ */ jsx(Loader2, { className: "mr-1 inline size-3.5 animate-spin" }),
1074
+ "Thinking\u2026"
1075
+ ] })
1079
1076
  ] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
1080
1077
  /* @__PURE__ */ jsx("div", { className: "mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsx(Sparkles, { className: "size-4" }) }),
1081
1078
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [