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:
1 parent
62c2ed4e7e
commit
8632940a99
15 files changed
+424
-31
No files matched your search
@@ -20,6 +20,7 @@ import { LazyRemoteConnectionsPage } from "@/components/remote/LazyRemoteConnect
|
||||
import { LanguageSwitcher } from "@/components/LanguageSwitcher";
|
||||
import { SidebarResizeHandle, SIDEBAR_MIN_WIDTH, SIDEBAR_MAX_WIDTH } from "@/components/SidebarResizeHandle";
|
||||
import { matchSidebarShortcut } from "@/lib/sidebar-shortcuts";
|
||||
import { invalidateToolsCatalog } from "@/lib/tools-catalog-cache";
|
||||
import type { SidebarDeleteDecision, SidebarDeleteItem } from "@/components/ChatList";
|
||||
import type { SettingsSectionKey } from "@/components/settings/SettingsView";
|
||||
import { StartupShell } from "@/components/StartupShell";
|
||||
@@ -1519,6 +1520,8 @@ function Shell({
|
||||
return request;
|
||||
}, [getToken]);
|
||||
|
||||
useEffect(() => client.onReady(() => invalidateToolsCatalog(client)), [client]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!pageVisible) return undefined;
|
||||
|
||||
|
||||
Reference in new issue
Block a user