Switch to double quotes and reformat codebase with Biome

This commit is contained in:
Mohamed Boudra
2026-03-21 20:22:15 +07:00
parent ab40786882
commit f6579dbeb4
805 changed files with 38132 additions and 40175 deletions
@@ -21,7 +21,10 @@ class FakeDaemonClient {
this.chunks.push({ dictationId, seq, audio, format });
}
async finishDictationStream(dictationId: string, finalSeq: number): Promise<{ dictationId: string; text: string }> {
async finishDictationStream(
dictationId: string,
finalSeq: number,
): Promise<{ dictationId: string; text: string }> {
this.finishes.push({ dictationId, finalSeq });
return { dictationId, text: "ok" };
}
@@ -123,4 +126,3 @@ describe("DictationStreamSender", () => {
expect(client.chunks.map((c) => c.seq)).toEqual([0, 1]);
});
});
@@ -139,18 +139,20 @@ export class DictationStreamSender {
}
this.streamReady = true;
this.flush();
})().catch((error) => {
// If starting failed, keep the segments for retry but clear the stream so finish can error cleanly.
if (this.startGeneration === generation && this.dictationId === dictationId) {
this.dictationId = null;
this.streamReady = false;
}
throw error;
}).finally(() => {
if (this.startPromise === start) {
this.startPromise = null;
}
});
})()
.catch((error) => {
// If starting failed, keep the segments for retry but clear the stream so finish can error cleanly.
if (this.startGeneration === generation && this.dictationId === dictationId) {
this.dictationId = null;
this.streamReady = false;
}
throw error;
})
.finally(() => {
if (this.startPromise === start) {
this.startPromise = null;
}
});
this.startPromise = start;
await start;