فهرست منبع

Merge pull request #5383 from SukkaW/fix-5378

fix(#5378): default plugin ids to empty array
Lloyd Zhou 1 سال پیش
والد
کامیت
daeffb2dc6
3فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      app/client/platforms/anthropic.ts
  2. 1 1
      app/client/platforms/moonshot.ts
  3. 1 1
      app/client/platforms/openai.ts

+ 1 - 1
app/client/platforms/anthropic.ts

@@ -203,7 +203,7 @@ export class ClaudeApi implements LLMApi {
       const [tools, funcs] = usePluginStore
         .getState()
         .getAsTools(
-          useChatStore.getState().currentSession().mask?.plugin as string[],
+          useChatStore.getState().currentSession().mask?.plugin || [],
         );
       return stream(
         path,

+ 1 - 1
app/client/platforms/moonshot.ts

@@ -125,7 +125,7 @@ export class MoonshotApi implements LLMApi {
         const [tools, funcs] = usePluginStore
           .getState()
           .getAsTools(
-            useChatStore.getState().currentSession().mask?.plugin as string[],
+            useChatStore.getState().currentSession().mask?.plugin || [],
           );
         return stream(
           chatPath,

+ 1 - 1
app/client/platforms/openai.ts

@@ -244,7 +244,7 @@ export class ChatGPTApi implements LLMApi {
         const [tools, funcs] = usePluginStore
           .getState()
           .getAsTools(
-            useChatStore.getState().currentSession().mask?.plugin as string[],
+            useChatStore.getState().currentSession().mask?.plugin || [],
           );
         // console.log("getAsTools", tools, funcs);
         stream(