mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 22:10:21 +00:00
UI: reuse effective-tools state reset helper
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
loadAgents,
|
||||
loadToolsCatalog,
|
||||
loadToolsEffective,
|
||||
resetToolsEffectiveState,
|
||||
refreshVisibleToolsEffectiveForCurrentSession,
|
||||
saveAgentsConfig,
|
||||
} from "./controllers/agents.ts";
|
||||
@@ -1377,11 +1378,7 @@ export function renderApp(state: AppViewState) {
|
||||
state.toolsCatalogResult = null;
|
||||
state.toolsCatalogError = null;
|
||||
state.toolsCatalogLoading = false;
|
||||
state.toolsEffectiveResult = null;
|
||||
state.toolsEffectiveResultKey = null;
|
||||
state.toolsEffectiveError = null;
|
||||
state.toolsEffectiveLoading = false;
|
||||
state.toolsEffectiveLoadingKey = null;
|
||||
resetToolsEffectiveState(state);
|
||||
void loadAgentIdentity(state, agentId);
|
||||
if (state.agentsPanel === "files") {
|
||||
void loadAgentFiles(state, agentId);
|
||||
@@ -1438,11 +1435,7 @@ export function renderApp(state: AppViewState) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
state.toolsEffectiveResult = null;
|
||||
state.toolsEffectiveResultKey = null;
|
||||
state.toolsEffectiveError = null;
|
||||
state.toolsEffectiveLoading = false;
|
||||
state.toolsEffectiveLoadingKey = null;
|
||||
resetToolsEffectiveState(state);
|
||||
}
|
||||
}
|
||||
if (panel === "channels") {
|
||||
|
||||
Reference in New Issue
Block a user