mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-17 04:01:05 +00:00
chore: enable consistent-return
This commit is contained in:
@@ -729,17 +729,21 @@ export function renderApp(state: AppViewState) {
|
||||
}
|
||||
switch (state.agentsPanel) {
|
||||
case "files":
|
||||
return void loadAgentFiles(state, agentId);
|
||||
void loadAgentFiles(state, agentId);
|
||||
return;
|
||||
case "skills":
|
||||
return void loadAgentSkills(state, agentId);
|
||||
void loadAgentSkills(state, agentId);
|
||||
return;
|
||||
case "tools":
|
||||
void loadToolsCatalog(state, agentId);
|
||||
return void refreshVisibleToolsEffectiveForCurrentSession(state);
|
||||
void refreshVisibleToolsEffectiveForCurrentSession(state);
|
||||
return;
|
||||
}
|
||||
};
|
||||
const refreshAgentsPanelSupplementalData = (panel: AppViewState["agentsPanel"]) => {
|
||||
if (panel === "channels") {
|
||||
return void loadChannels(state, false);
|
||||
void loadChannels(state, false);
|
||||
return;
|
||||
}
|
||||
if (panel === "cron") {
|
||||
void state.loadCron();
|
||||
|
||||
@@ -272,13 +272,17 @@ async function refreshAgentsTab(host: SettingsHost, app: SettingsAppHost) {
|
||||
void loadAgentIdentity(app, agentId);
|
||||
switch (host.agentsPanel) {
|
||||
case "files":
|
||||
return void loadAgentFiles(app, agentId);
|
||||
void loadAgentFiles(app, agentId);
|
||||
return;
|
||||
case "skills":
|
||||
return void loadAgentSkills(app, agentId);
|
||||
void loadAgentSkills(app, agentId);
|
||||
return;
|
||||
case "channels":
|
||||
return void loadChannels(app, false);
|
||||
void loadChannels(app, false);
|
||||
return;
|
||||
case "cron":
|
||||
return void loadCron(host);
|
||||
void loadCron(host);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -196,11 +196,11 @@ export function refreshVisibleToolsEffectiveForCurrentSession(
|
||||
): Promise<void> | undefined {
|
||||
const resolvedSessionKey = state.sessionKey?.trim();
|
||||
if (!resolvedSessionKey || state.agentsPanel !== "tools" || !state.agentsSelectedId) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
const sessionAgentId = resolveAgentIdFromSessionKey(resolvedSessionKey);
|
||||
if (!sessionAgentId || state.agentsSelectedId !== sessionAgentId) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
return loadToolsEffective(state, {
|
||||
agentId: sessionAgentId,
|
||||
|
||||
@@ -160,6 +160,7 @@ const cjkAutoLinkExtension = {
|
||||
],
|
||||
};
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ function skillMatchesStatus(skill: SkillStatusEntry, status: SkillsStatusFilter)
|
||||
case "disabled":
|
||||
return skill.disabled;
|
||||
}
|
||||
throw new Error("Unsupported skills status filter");
|
||||
}
|
||||
|
||||
function skillStatusClass(skill: SkillStatusEntry): string {
|
||||
|
||||
Reference in New Issue
Block a user