@brainfish-ai/components 0.12.1-rc.3 → 0.12.2
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/esm/chunks/{ChatSearch.C-yI2ooj.js → ChatSearch.BsztdMaK.js} +6 -3
- package/dist/esm/chunks/ChatSearch.BsztdMaK.js.map +1 -0
- package/dist/esm/chunks/{FormattedMessage.gZ5DiZSo.js → FormattedMessage.D94rlhro.js} +3 -3
- package/dist/esm/chunks/{FormattedMessage.gZ5DiZSo.js.map → FormattedMessage.D94rlhro.js.map} +1 -1
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/markdown.js +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +0 -15
- package/dist/stats.html +1 -1
- package/package.json +1 -2
- package/dist/components/data-table.d.ts +0 -2
- package/dist/data-table.d.ts +0 -18
- package/dist/esm/chunks/ChatSearch.C-yI2ooj.js.map +0 -1
- package/dist/esm/chunks/data-table.BasZokjT.js +0 -60
- package/dist/esm/chunks/data-table.BasZokjT.js.map +0 -1
- package/dist/esm/components/data-table.js +0 -2
- package/dist/esm/components/data-table.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { motion, AnimatePresence } from 'framer-motion';
|
|
|
3
3
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../components/ui/tooltip.js';
|
|
4
4
|
import { Button } from '../components/ui/button.js';
|
|
5
5
|
import { XCircle, Check, Copy, CaretDown, ArrowSquareOut, CaretRight, ArrowsVertical, ArrowDown, MagnifyingGlass, X, CheckCircle, Circle, Image, ArrowRight, ArrowLeft, ArrowsInSimple, ArrowsOutSimple } from '@phosphor-icons/react';
|
|
6
|
-
import { g as getDefaultExportFromCjs, F as FormattedMessage, c as addPopupWidgetUtm } from './FormattedMessage.
|
|
6
|
+
import { g as getDefaultExportFromCjs, F as FormattedMessage, c as addPopupWidgetUtm } from './FormattedMessage.D94rlhro.js';
|
|
7
7
|
import { appendErrors, useForm, Controller } from 'react-hook-form';
|
|
8
8
|
import { validateFieldsNatively, toNestErrors } from '@hookform/resolvers';
|
|
9
9
|
import require$$0 from 'ajv';
|
|
@@ -4527,7 +4527,7 @@ function Answer({
|
|
|
4527
4527
|
},
|
|
4528
4528
|
/* @__PURE__ */ React__default.createElement("div", { className: "px-4 pt-4 pb-2" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex items-start justify-between gap-2 min-h-9" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React__default.createElement(GeneratingStar, { loading: !isIdle }), /* @__PURE__ */ React__default.createElement("h2", { className: "leading-normal font-semibold m-0 text-foreground self-center text-lg" }, question)), isCompleted && /* @__PURE__ */ React__default.createElement(TooltipProvider, null, /* @__PURE__ */ React__default.createElement(Tooltip, null, /* @__PURE__ */ React__default.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React__default.createElement(Button, { variant: "ghost", size: "icon", onClick: () => void handleCopy(), className: "-mt-1 flex-shrink-0" }, isCopied ? /* @__PURE__ */ React__default.createElement(Check, { className: "text-feedback-positive", weight: "bold" }) : /* @__PURE__ */ React__default.createElement(Copy, { className: "text-secondary-foreground", weight: "bold" }))), /* @__PURE__ */ React__default.createElement(TooltipContent, null, /* @__PURE__ */ React__default.createElement("p", null, isCopied ? "Copied!" : "Copy")))))),
|
|
4529
4529
|
isFetchingInitialAnswer && /* @__PURE__ */ React__default.createElement("div", { className: "space-y-4 mt-2 px-4" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React__default.createElement("div", { className: "size-5 rounded-full bg-primary/30" }), /* @__PURE__ */ React__default.createElement("div", { className: "flex items-center gap-2 text-sm text-foreground" }, isFetchingSearchResults ? textConfig.loadingSearchText : textConfig.loadingAnswerText))),
|
|
4530
|
-
/* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col" }, blocks?.map((block, i) => /* @__PURE__ */ React__default.createElement("div", { key: i, className: "
|
|
4530
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col" }, blocks?.map((block, i) => /* @__PURE__ */ React__default.createElement("div", { key: i, className: "p-4 border-b last:border-b-0 border-dashed" }, /* @__PURE__ */ React__default.createElement(AnswerBlock, { block, redirectRules, state })))),
|
|
4531
4531
|
isCompleted && /* @__PURE__ */ React__default.createElement(
|
|
4532
4532
|
AnswerActions,
|
|
4533
4533
|
{
|
|
@@ -5373,6 +5373,9 @@ const ChatSearchComponent = forwardRef(
|
|
|
5373
5373
|
const lines = new TextDecoder().decode(value).split(/\n\n/).filter((line) => line.startsWith("data: ")).map((line) => line.replace(/^data: /, "").trim());
|
|
5374
5374
|
for (const line of lines) {
|
|
5375
5375
|
try {
|
|
5376
|
+
if (line === "[DONE]") {
|
|
5377
|
+
continue;
|
|
5378
|
+
}
|
|
5376
5379
|
const event = JSON.parse(line);
|
|
5377
5380
|
if (event.type === "answer-text-chunk") {
|
|
5378
5381
|
accumulatedAnswer += event.content;
|
|
@@ -5961,4 +5964,4 @@ const ChatSearch = forwardRef(({ featureFlags, ...props }, ref) => /* @__PURE__
|
|
|
5961
5964
|
ChatSearch.displayName = "ChatSearch";
|
|
5962
5965
|
|
|
5963
5966
|
export { ChatSearch as C, ChatSearchProvider as a, useIsChatSearchDirty as b, useChatSearch as u };
|
|
5964
|
-
//# sourceMappingURL=ChatSearch.
|
|
5967
|
+
//# sourceMappingURL=ChatSearch.BsztdMaK.js.map
|