Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 80970da:
|
c8999ed to
8438de3
Compare
b6ada7f to
de0a99b
Compare
There was a problem hiding this comment.
you can update the bundlesize for InstantSearch.js development to give it more margin.
Just wondering why the patch happens both in the connector and the InstantSearch.js widget (but not react), isn't one of those redundant?
I think it also could be interesting to add a test to the common test suite (tests/common/widgets/chat)
| if (!widgetTool && key.startsWith(`${SearchIndexToolType}_`)) { | ||
| widgetTool = tools[SearchIndexToolType]; | ||
| } |
There was a problem hiding this comment.
we did the shim in the InstantSearch.js widget, but not the React InstantSearch widget, is that on purpose?
There was a problem hiding this comment.
It should be handled for the react flavour too.
The tools config is passed down through a few layers of component and is finally handled in packages/instantsearch-ui-components/src/components/chat/ChatMessage.tsx which I updated 👍
There was a problem hiding this comment.
I think this would remain the same since you still need to map a tool into one with a layoutComponent in the js chat widget (and not in react) for it to be consumable in ui-components.
I'll try to see if this can be avoided in my PR tho.
shaejaz
left a comment
There was a problem hiding this comment.
lgtm! we do most of the chat unit testing in the common test suite, but this is good for now; can be added there later.
| if (!widgetTool && key.startsWith(`${SearchIndexToolType}_`)) { | ||
| widgetTool = tools[SearchIndexToolType]; | ||
| } |
There was a problem hiding this comment.
I think this would remain the same since you still need to map a tool into one with a layoutComponent in the js chat widget (and not in react) for it to be consumable in ui-components.
I'll try to see if this can be avoided in my PR tho.
Summary
Fixes DASH-2294
Adds compatibility with the Algolia MCP Server search tool.
The MCP Server names search tools with a suffix (e.g.,
algolia_search_index_indexName) instead of justalgolia_search_index. This PR adds a shim that falls back to thealgolia_search_indextool implementation when encountering these suffixed tool names.Result
By default, the chat widget now works with both:
algolia_search_indextool callsalgolia_search_index_*tool callsTesting