@vegintech/langchain-react-agent 0.0.22 → 0.0.23

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1409,12 +1409,15 @@ const AgentChat = forwardRef(({ apiUrl, assistantId, headers, threadId, onThread
1409
1409
  return next;
1410
1410
  });
1411
1411
  }, []);
1412
+ const frontendTools = useMemo(() => {
1413
+ return tools?.filter(isFrontendTool) || [];
1414
+ }, [tools]);
1412
1415
  const submitToStream = useCallback(async (submitMessages) => {
1413
1416
  await stream.submit({
1414
1417
  ...agentState,
1415
1418
  messages: submitMessages,
1416
1419
  agentkit: {
1417
- actions: tools,
1420
+ actions: frontendTools,
1418
1421
  context: contexts
1419
1422
  }
1420
1423
  }, {
@@ -1431,7 +1434,7 @@ const AgentChat = forwardRef(({ apiUrl, assistantId, headers, threadId, onThread
1431
1434
  });
1432
1435
  }, [
1433
1436
  stream,
1434
- tools,
1437
+ frontendTools,
1435
1438
  contexts,
1436
1439
  agentState
1437
1440
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vegintech/langchain-react-agent",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "LangChain Agent UI component library for React",
5
5
  "license": "MIT",
6
6
  "files": [