chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -30,8 +30,7 @@ export function createAudioAsVoiceBuffer(params: {
}
},
shouldBuffer: (payload) => params.isAudioPayload(payload),
finalize: (payload) =>
seenAudioAsVoice ? { ...payload, audioAsVoice: true } : payload,
finalize: (payload) => (seenAudioAsVoice ? { ...payload, audioAsVoice: true } : payload),
};
}
@@ -97,9 +96,7 @@ export function createBlockReplyPipeline(params: {
if (sentKeys.has(payloadKey) || pendingKeys.has(payloadKey)) return;
pendingKeys.add(payloadKey);
const timeoutError = new Error(
`block reply delivery timed out after ${timeoutMs}ms`,
);
const timeoutError = new Error(`block reply delivery timed out after ${timeoutMs}ms`);
const abortController = new AbortController();
sendChain = sendChain
.then(async () => {
@@ -180,8 +177,7 @@ export function createBlockReplyPipeline(params: {
const enqueue = (payload: ReplyPayload) => {
if (aborted) return;
if (bufferPayload(payload)) return;
const hasMedia =
Boolean(payload.mediaUrl) || (payload.mediaUrls?.length ?? 0) > 0;
const hasMedia = Boolean(payload.mediaUrl) || (payload.mediaUrls?.length ?? 0) > 0;
if (hasMedia) {
void coalescer?.flush({ force: true });
sendPayload(payload);
@@ -189,11 +185,7 @@ export function createBlockReplyPipeline(params: {
}
if (coalescer) {
const payloadKey = createBlockReplyPayloadKey(payload);
if (
seenKeys.has(payloadKey) ||
pendingKeys.has(payloadKey) ||
bufferedKeys.has(payloadKey)
) {
if (seenKeys.has(payloadKey) || pendingKeys.has(payloadKey) || bufferedKeys.has(payloadKey)) {
return;
}
bufferedKeys.add(payloadKey);
@@ -217,8 +209,7 @@ export function createBlockReplyPipeline(params: {
enqueue,
flush,
stop,
hasBuffered: () =>
Boolean(coalescer?.hasBuffered() || bufferedPayloads.length > 0),
hasBuffered: () => Boolean(coalescer?.hasBuffered() || bufferedPayloads.length > 0),
didStream: () => didStream,
isAborted: () => aborted,
hasSentPayload: (payload) => {