Skip to content

Commit daeffb2

Browse files
authored
Merge pull request #5383 from SukkaW/fix-5378
fix(#5378): default plugin ids to empty array
2 parents 2ff292c + db58ca6 commit daeffb2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/client/platforms/anthropic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export class ClaudeApi implements LLMApi {
203203
const [tools, funcs] = usePluginStore
204204
.getState()
205205
.getAsTools(
206-
useChatStore.getState().currentSession().mask?.plugin as string[],
206+
useChatStore.getState().currentSession().mask?.plugin || [],
207207
);
208208
return stream(
209209
path,

app/client/platforms/moonshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class MoonshotApi implements LLMApi {
125125
const [tools, funcs] = usePluginStore
126126
.getState()
127127
.getAsTools(
128-
useChatStore.getState().currentSession().mask?.plugin as string[],
128+
useChatStore.getState().currentSession().mask?.plugin || [],
129129
);
130130
return stream(
131131
chatPath,

app/client/platforms/openai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class ChatGPTApi implements LLMApi {
244244
const [tools, funcs] = usePluginStore
245245
.getState()
246246
.getAsTools(
247-
useChatStore.getState().currentSession().mask?.plugin as string[],
247+
useChatStore.getState().currentSession().mask?.plugin || [],
248248
);
249249
// console.log("getAsTools", tools, funcs);
250250
stream(

0 commit comments

Comments
 (0)