lint using oxlint (#106)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user