style: fix biome formatting after audit fixes

This commit is contained in:
asepharyana
2026-08-26 18:12:02 +07:00
parent 9f02edd646
commit 709074935f
4 changed files with 20 additions and 9 deletions
@@ -166,12 +166,14 @@ export function startPendingAIAnalysisWorker(
// Only revert stuck processing messages if there's active processing.
// Avoids a DB query every recovery interval when the pipeline is idle.
if (conversationProcessing.size > 0) {
messageStore.revertStuckProcessingMessages(300000).catch((err: unknown) => {
logger.error(
{ error: String(err) },
"Failed to run stuck processing recovery",
);
});
messageStore
.revertStuckProcessingMessages(300000)
.catch((err: unknown) => {
logger.error(
{ error: String(err) },
"Failed to run stuck processing recovery",
);
});
}
Promise.all([
@@ -146,7 +146,11 @@ function isAlreadyDeletedError(error: unknown): boolean {
return true;
// Fallback: check the message text for the Discord "Unknown Message" string
const msg =
error instanceof Error ? error.message : typeof error === "string" ? error : "";
error instanceof Error
? error.message
: typeof error === "string"
? error
: "";
return msg.includes("Unknown Message") || msg.includes("Unknown Channel");
}
@@ -80,7 +80,8 @@ export async function callModerationLLM(
];
const completion = await llmChat({
messages,
max_tokens: maxTokens ?? config.AI_LLM_MAX_COMPLETION_TOKENS ?? 16384,
max_tokens:
maxTokens ?? config.AI_LLM_MAX_COMPLETION_TOKENS ?? 16384,
jsonResponse: { type: "json_object" },
retries: 0,
signal,
@@ -197,7 +197,11 @@ export const configSchema = z
.positive()
.default(1024),
AI_LLM_TEXT_BATCH_SIZE: z.coerce.number().int().positive().default(60),
AI_LLM_MAX_COMPLETION_TOKENS: z.coerce.number().int().positive().default(16384),
AI_LLM_MAX_COMPLETION_TOKENS: z.coerce
.number()
.int()
.positive()
.default(16384),
AI_LLM_MEDIA_ANALYSIS_TIMEOUT_MS: z.coerce
.number()
.int()