fix: lint cleanups
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 : "",
|
||||
|
||||
Reference in New Issue
Block a user