From 6c4c8f7dc14772531f47d59a5c5b1618ff91d530 Mon Sep 17 00:00:00 2001 From: Minh-Phuc Tran Date: Thu, 4 Jul 2024 01:48:56 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20allow=20builtin=20tools?= =?UTF-8?q?=20to=20trigger=20AI=20message=20(#3135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/chat/slices/plugin/action.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/chat/slices/plugin/action.ts b/src/store/chat/slices/plugin/action.ts index 7c0af2984b5c..abc48162e788 100644 --- a/src/store/chat/slices/plugin/action.ts +++ b/src/store/chat/slices/plugin/action.ts @@ -117,7 +117,7 @@ export const chatPlugin: StateCreator< if (!content) return; - await action(id, content); + return await action(id, content); }, invokeDefaultTypePlugin: async (id, payload) => { @@ -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; }