feat(config): add button to sync configs and reload workflows
A new button has been introduced on the Config page to allow users to synchronise cloud configs and reload workflows effortlessly. This addition streamlines the configuration and workflow management process within the application.
This commit is contained in:
parent
7c361f6039
commit
82873a0b8a
@ -160,6 +160,11 @@ const Config = observer(() => {
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
const handleSync = () => {
|
||||
// 调用 Local Service 更新工作流,更新、重载命令列表
|
||||
MessageUtil.handleMessage({ command: "reloadConfig" });
|
||||
};
|
||||
|
||||
const changeModelDetail = (key: string, value: number | string) => {
|
||||
const newModel = { ...form.values.models[current], [key]: value };
|
||||
form.setFieldValue("models", {
|
||||
@ -451,6 +456,10 @@ const Config = observer(() => {
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Button onClick={handleSync} >
|
||||
{t("Sync Cloud Configs && Reload Workflows")}
|
||||
</Button>
|
||||
</Stack>
|
||||
<Group
|
||||
grow
|
||||
|
@ -290,6 +290,9 @@ 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