@brainfish-ai/components 0.14.1 → 0.14.3

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.
@@ -4254,6 +4254,8 @@ async function searchApi({
4254
4254
  secretAttributes,
4255
4255
  allowedRegions
4256
4256
  }) {
4257
+ const isAgentAssist = !!headers?.["X-Brainfish-Agent-Assist"] && headers?.["X-Brainfish-Agent-Assist"] !== "false";
4258
+ const userId = String(attributes?.userId || attributes?.user_id || attributes?.id || "").trim() || void 0;
4257
4259
  const payload = await makeRequest(endpoint, {
4258
4260
  method: "POST",
4259
4261
  headers,
@@ -4265,7 +4267,9 @@ async function searchApi({
4265
4267
  ...conversationId && { conversationId },
4266
4268
  ...attributes && { attributes },
4267
4269
  ...secretAttributes && { secretAttributes },
4268
- ...allowedRegions && { allowedRegions }
4270
+ ...allowedRegions && { allowedRegions },
4271
+ ...isAgentAssist && { source: "agent_assist" },
4272
+ ...userId && { userId }
4269
4273
  }
4270
4274
  });
4271
4275
  return {
@@ -6129,4 +6133,4 @@ const ChatSearch = forwardRef(({ featureFlags, ...props }, ref) => /* @__PURE__
6129
6133
  ChatSearch.displayName = "ChatSearch";
6130
6134
 
6131
6135
  export { ChatSearch as C, ChatSearchProvider as a, useIsChatSearchDirty as b, useChatSearch as u };
6132
- //# sourceMappingURL=ChatSearch.DdKSJqhX.js.map
6136
+ //# sourceMappingURL=ChatSearch.B-0s3a8W.js.map