fix: lint cleanups

This commit is contained in:
Peter Steinberger
2026-01-31 07:59:01 +00:00
parent a42e1c82d9
commit ee26b68fe1
3 changed files with 7 additions and 3 deletions

View File

@@ -152,7 +152,7 @@ async function callBrowserProxy(params: {
if (!parsed || typeof parsed !== "object" || !("result" in parsed)) {
throw new Error("browser proxy failed");
}
return parsed as BrowserProxyResult;
return parsed;
}
async function persistProxyFiles(files: BrowserProxyFile[] | undefined) {

View File

@@ -384,7 +384,9 @@ export const handleSubagentsCommand: CommandHandler = async (params, allowTextCo
timeoutMs: 10_000,
});
const responseRunId = typeof response?.runId === "string" ? response.runId : undefined;
if (responseRunId) runId = responseRunId;
if (responseRunId) {
runId = responseRunId;
}
} catch (err) {
const messageText =
err instanceof Error ? err.message : typeof err === "string" ? err : "error";

View File

@@ -116,7 +116,9 @@ async function fetchChannel(
channelId: string,
): Promise<DiscordChannelSummary | null> {
const raw = await fetchDiscord<DiscordChannelPayload>(`/channels/${channelId}`, token, fetcher);
if (!raw || typeof raw.guild_id !== "string" || typeof raw.id !== "string") return null;
if (!raw || typeof raw.guild_id !== "string" || typeof raw.id !== "string") {
return null;
}
return {
id: raw.id,
name: typeof raw.name === "string" ? raw.name : "",