@alquimia-ai/ui 1.3.1 → 1.3.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/index.mjs CHANGED
@@ -32,6 +32,9 @@ function getCookies(name) {
32
32
  const parts = value.split(`; ${name}=`);
33
33
  if (parts.length === 2) return parts.pop()?.split(";").shift();
34
34
  }
35
+ function hasToolResult(data) {
36
+ return data?.tool_output?.result && Object.keys(data.tool_output.result).length > 0;
37
+ }
35
38
 
36
39
  // src/components/atoms/ui/button.tsx
37
40
  import { jsx } from "react/jsx-runtime";
@@ -2901,7 +2904,7 @@ var AssistantMessageArea = React34.forwardRef(
2901
2904
  children: "We have an internal error, please try again later."
2902
2905
  }
2903
2906
  ),
2904
- message.tooler && message.tooler?.tool_output && !message.error_code && toolFactory?.createTool(message.tooler?.tool_summary?.name, message.tooler?.tool_output?.result),
2907
+ message.tooler && !message.error_code && hasToolResult(message.tooler) && toolFactory?.createTool(message.tooler?.tool_summary?.name, message.tooler?.tool_output?.result),
2905
2908
  message.content && /* @__PURE__ */ jsx48(
2906
2909
  CallOutResponse,
2907
2910
  {
@@ -3253,6 +3256,7 @@ export {
3253
3256
  buttonVariants,
3254
3257
  cn,
3255
3258
  getCookies,
3259
+ hasToolResult,
3256
3260
  navigationMenuTriggerStyle,
3257
3261
  parseTextToSpeech,
3258
3262
  reducer,