fix(App): remove outdated workflow list update calls
Removed the outdated calls to update the workflow list in both the App.tsx and ConfigStore.ts files. This change streamlines the code and prevents the execution of redundant Local Service commands that are no longer required, potentially improving performance and reducing unnecessary network activity.
This commit is contained in:
parent
87c6c104db
commit
56e30328be
@ -54,14 +54,17 @@ export default function App() {
|
||||
const checkConfigs = () => {
|
||||
if (configCount === 3) {
|
||||
compare_func(configs);
|
||||
setReady(true); // 假设setReady是一个函数,用于设置应用状态为准备就绪
|
||||
// 假设setReady是一个函数,用于设置应用状态为准备就绪
|
||||
setReady(true);
|
||||
// 调用 Local Service 更新工作流,更新、重载命令列表
|
||||
MessageUtil.sendMessage({ command: "updateWorkflowList"});
|
||||
}
|
||||
};
|
||||
|
||||
// 注册处理函数
|
||||
MessageUtil.registerHandler("readConfig", (data: { value: any }) => {
|
||||
config.setConfig(data.value);
|
||||
APIUtil.config(config.getAPIBase(), config.getUserKey())
|
||||
APIUtil.config(config.getAPIBase(), config.getUserKey());
|
||||
setReady(true);
|
||||
config.fetchServerConfig();
|
||||
handleConfig("user_config", data);
|
||||
|
@ -290,9 +290,6 @@ export const ConfigStore = types
|
||||
console.log("fetchLLMs error: Failed to fetch server config");
|
||||
MessageUtil.handleMessage({ command: "readServerConfig", value: undefined });
|
||||
}
|
||||
// 调用 Local Service 更新工作流,更新、重载命令列表
|
||||
MessageUtil.sendMessage({ command: "updateWorkflowList"});
|
||||
|
||||
} catch (e) {
|
||||
console.log("fetchLLMs error:", e);
|
||||
MessageUtil.handleMessage({ command: "readServerConfig", value: undefined });
|
||||
|
Loading…
x
Reference in New Issue
Block a user