Skip to content

Commit

Permalink
Merge pull request #5383 from SukkaW/fix-5378
Browse files Browse the repository at this point in the history
fix(#5378): default plugin ids to empty array
  • Loading branch information
lloydzhou authored Sep 7, 2024
2 parents 2ff292c + db58ca6 commit daeffb2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/client/platforms/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/client/platforms/moonshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit daeffb2

Please sign in to comment.