This commit is contained in:
GH Action - Upstream Sync 2024-09-08 01:05:49 +00:00
commit 09d7f98466
5 changed files with 5 additions and 5 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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(

View File

@ -199,7 +199,7 @@ export const usePluginStore = createPersistStore(
getAsTools(ids: string[]) {
const plugins = get().plugins;
const selected = ids
const selected = (ids || [])
.map((id) => plugins[id])
.filter((i) => i)
.map((p) => FunctionToolService.add(p));

View File

@ -9,7 +9,7 @@
},
"package": {
"productName": "NextChat",
"version": "2.15.0"
"version": "2.15.1"
},
"tauri": {
"allowlist": {