Skip to content

Commit

Permalink
🐛 fix: allow builtin tools to trigger AI message (lobehub#3135)
Browse files Browse the repository at this point in the history
  • Loading branch information
phuctm97 authored Jul 3, 2024
1 parent 4dbf795 commit 6c4c8f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/chat/slices/plugin/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const chatPlugin: StateCreator<

if (!content) return;

await action(id, content);
return await action(id, content);
},

invokeDefaultTypePlugin: async (id, payload) => {
Expand Down Expand Up @@ -220,7 +220,7 @@ export const chatPlugin: StateCreator<
// trigger the plugin call
const data = await get().internal_invokeDifferentTypePlugin(id, payload);

if (payload.type === 'default' && data) {
if ((payload.type === 'default' || payload.type === 'builtin') && data) {
shouldCreateMessage = true;
latestToolId = id;
}
Expand Down

0 comments on commit 6c4c8f7

Please sign in to comment.