lint using oxlint (#106)

This commit is contained in:
Will Chen
2025-05-08 17:21:35 -07:00
committed by GitHub
parent 0e8cc26fb5
commit 2537fbb342
63 changed files with 251 additions and 292 deletions

View File

@@ -26,7 +26,7 @@ import * as fs from "fs";
import * as path from "path";
import * as os from "os";
import * as crypto from "crypto";
import { stat, readFile, writeFile, mkdir, unlink } from "fs/promises";
import { readFile, writeFile, unlink } from "fs/promises";
const logger = log.scope("chat_stream_handlers");
@@ -61,19 +61,6 @@ if (!fs.existsSync(TEMP_DIR)) {
fs.mkdirSync(TEMP_DIR, { recursive: true });
}
// First, define the proper content types to match ai SDK
type TextContent = {
type: "text";
text: string;
};
type ImageContent = {
type: "image";
image: Buffer;
};
type MessageContent = TextContent | ImageContent;
export function registerChatStreamHandlers() {
ipcMain.handle("chat:stream", async (event, req: ChatStreamParams) => {
try {