chore: enable consistent-return

This commit is contained in:
Peter Steinberger
2026-04-10 20:56:08 +01:00
parent bc27278d6d
commit 0ebeee8b0d
68 changed files with 223 additions and 107 deletions

View File

@@ -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();

View File

@@ -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;
}
}

View File

@@ -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,

View File

@@ -160,6 +160,7 @@ const cjkAutoLinkExtension = {
],
};
}
return undefined;
},
};

View File

@@ -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 {