fix(webui): cache tool catalogs across settings navigation (#6552)

* fix(webui): cache tool catalogs across settings navigation

* refactor(webui): remove unreachable catalog invalidation condition
This commit is contained in:
chengyongru authored and GitHub committed 2026-11-04 00:30:33 +08:00
1 parent 62c2ed4e7e
commit 8632940a99
15 files changed
+424 -31

No files matched your search

@@ -414,6 +414,7 @@ export function createSystemSettingsActions({
return;
}
state.toolsCatalog.invalidate();
if (flow.status === "authorized" && flow.hot_reload) {
if (flow.hot_reload.requires_restart) {
setPendingRestartSections((prev) => ({ ...prev, runtime: true }));
@@ -487,7 +488,8 @@ export function createSystemSettingsActions({
setMcpOAuthCompleting(false);
setMcpOAuthCallbackError(null);
try {
const flow = await startMcpOAuth(client, name, reset, values);
const flow = await startMcpOAuth(client, name, reset, values)
.finally(() => state.toolsCatalog.invalidate());
mcpOAuthFlowRef.current = flow;
setMcpOAuthFlow(flow);
navigateMcpOAuthPopup(flow);