@brainfish-ai/components 0.7.0-alpha.1 → 0.7.0
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/chat-search.d.ts +1 -1
- package/dist/esm/chunks/{ChatSearch.Xuwh8-_d.js → ChatSearch.BD2RqFhC.js} +7 -7
- package/dist/esm/chunks/{ChatSearch.Xuwh8-_d.js.map → ChatSearch.BD2RqFhC.js.map} +1 -1
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/stats.html +0 -4949
package/dist/chat-search.d.ts
CHANGED
|
@@ -220,7 +220,7 @@ export declare interface ChatSearchProps {
|
|
|
220
220
|
}) => void;
|
|
221
221
|
userData?: Record<string, unknown> | null;
|
|
222
222
|
redirectRules?: RedirectRule[];
|
|
223
|
-
|
|
223
|
+
secretAttributes?: string;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
export declare const ChatSearchProvider: default_2.FC<{
|
|
@@ -4230,7 +4230,7 @@ async function searchApi({
|
|
|
4230
4230
|
headers,
|
|
4231
4231
|
conversationId,
|
|
4232
4232
|
attributes,
|
|
4233
|
-
|
|
4233
|
+
secretAttributes
|
|
4234
4234
|
}) {
|
|
4235
4235
|
const payload = await makeRequest(endpoint, {
|
|
4236
4236
|
method: "POST",
|
|
@@ -4242,7 +4242,7 @@ async function searchApi({
|
|
|
4242
4242
|
...collectionId && collectionId !== "all" && { collectionId },
|
|
4243
4243
|
...conversationId && { conversationId },
|
|
4244
4244
|
...attributes && { attributes },
|
|
4245
|
-
...
|
|
4245
|
+
...secretAttributes && { secretAttributes }
|
|
4246
4246
|
}
|
|
4247
4247
|
});
|
|
4248
4248
|
return {
|
|
@@ -5246,7 +5246,7 @@ const ChatSearchComponent = forwardRef(
|
|
|
5246
5246
|
onNextBestActionClick,
|
|
5247
5247
|
userData,
|
|
5248
5248
|
redirectRules,
|
|
5249
|
-
|
|
5249
|
+
secretAttributes
|
|
5250
5250
|
}, ref) => {
|
|
5251
5251
|
const {
|
|
5252
5252
|
answers,
|
|
@@ -5460,7 +5460,7 @@ const ChatSearchComponent = forwardRef(
|
|
|
5460
5460
|
setIsSearching(false);
|
|
5461
5461
|
}
|
|
5462
5462
|
};
|
|
5463
|
-
const handleSearchApiCall = async (searchQuery, conversationId, attributes,
|
|
5463
|
+
const handleSearchApiCall = async (searchQuery, conversationId, attributes, secretAttributes2) => {
|
|
5464
5464
|
const searchResponse = await searchApi({
|
|
5465
5465
|
endpoint: searchEndpoint,
|
|
5466
5466
|
query: searchQuery,
|
|
@@ -5468,7 +5468,7 @@ const ChatSearchComponent = forwardRef(
|
|
|
5468
5468
|
headers,
|
|
5469
5469
|
conversationId,
|
|
5470
5470
|
attributes,
|
|
5471
|
-
|
|
5471
|
+
secretAttributes: secretAttributes2
|
|
5472
5472
|
});
|
|
5473
5473
|
if (searchResponse.results.length === 0) {
|
|
5474
5474
|
trackEvent?.("No Articles Found", { conversationId, searchQuery });
|
|
@@ -5498,7 +5498,7 @@ const ChatSearchComponent = forwardRef(
|
|
|
5498
5498
|
followUpSearchRef.current?.focus();
|
|
5499
5499
|
try {
|
|
5500
5500
|
const attributes = { ...userData };
|
|
5501
|
-
const searchQueryId = await handleSearchApiCall(searchQuery, conversationId, attributes,
|
|
5501
|
+
const searchQueryId = await handleSearchApiCall(searchQuery, conversationId, attributes, secretAttributes);
|
|
5502
5502
|
event && trackEvent?.(event.name, {
|
|
5503
5503
|
conversationId,
|
|
5504
5504
|
searchQuery,
|
|
@@ -5852,4 +5852,4 @@ const ChatSearch = forwardRef(({ featureFlags, ...props }, ref) => /* @__PURE__
|
|
|
5852
5852
|
ChatSearch.displayName = "ChatSearch";
|
|
5853
5853
|
|
|
5854
5854
|
export { ChatSearch as C, ChatSearchProvider as a, useIsChatSearchDirty as b, useChatSearch as u };
|
|
5855
|
-
//# sourceMappingURL=ChatSearch.
|
|
5855
|
+
//# sourceMappingURL=ChatSearch.BD2RqFhC.js.map
|