diff --git a/package.json b/package.json index bf8ec77..2e181f8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gerbil", "productName": "Gerbil", - "version": "1.10.1", + "version": "1.11.0", "description": "Run Large Language Models locally", "main": "out/main/index.js", "homepage": "./", @@ -39,12 +39,13 @@ "license": "AGPL-3.0-or-later", "devDependencies": { "@eslint/js": "^9.39.1", + "@types/mime-types": "^3.0.1", "@types/node": "^24.10.1", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@types/yauzl": "^2.10.3", - "@typescript-eslint/eslint-plugin": "^8.47.0", - "@typescript-eslint/parser": "^8.47.0", + "@typescript-eslint/eslint-plugin": "^8.48.0", + "@typescript-eslint/parser": "^8.48.0", "@vitejs/plugin-react": "^5.1.1", "cross-env": "^10.1.0", "electron": "^38.7.1", @@ -76,6 +77,7 @@ "electron-updater": "^6.6.2", "execa": "^9.6.0", "lucide-react": "^0.554.0", + "mime-types": "^3.0.2", "react": "^19.2.0", "react-dom": "^19.2.0", "react-error-boundary": "^6.0.0", diff --git a/src/constants/imageModelPresets.ts b/src/constants/imageModelPresets.ts index 53c5417..911333a 100644 --- a/src/constants/imageModelPresets.ts +++ b/src/constants/imageModelPresets.ts @@ -9,7 +9,7 @@ export interface ImageModelPreset { readonly sdvae: string; } -export const IMAGE_MODEL_PRESETS = [ +export const IMAGE_MODEL_PRESETS: readonly ImageModelPreset[] = [ { name: 'FLUX.1', description: 'FLUX.1 development model with default encoders', diff --git a/src/constants/index.ts b/src/constants/index.ts index 28dd9d1..999d3f6 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -20,20 +20,22 @@ export const DEFAULT_MODEL_URL = export const DEFAULT_AUTO_GPU_LAYERS = true; export const SILLYTAVERN = { + HOST: 'localhost', PORT: 3000, PROXY_PORT: 3001, get URL() { - return `http://127.0.0.1:${this.PORT}`; + return `http://${this.HOST}:${this.PORT}` as const; }, get PROXY_URL() { - return `http://127.0.0.1:${this.PROXY_PORT}`; + return `http://${this.HOST}:${this.PROXY_PORT}` as const; }, } as const; export const OPENWEBUI = { + HOST: 'localhost', PORT: 8080, get URL() { - return `http://127.0.0.1:${this.PORT}`; + return `http://${this.HOST}:${this.PORT}` as const; }, } as const; diff --git a/src/constants/proxy.ts b/src/constants/proxy.ts index 18bfffd..ca73e20 100644 --- a/src/constants/proxy.ts +++ b/src/constants/proxy.ts @@ -1,7 +1,8 @@ export const PROXY = { - HOST: '127.0.0.1', + HOST: 'localhost', + LISTEN_HOST: '0.0.0.0', PORT: 5002, get URL() { - return `http://${this.HOST}:${this.PORT}`; + return `http://${this.HOST}:${this.PORT}` as const; }, } as const; diff --git a/src/main/gui.ts b/src/main/gui.ts index b274a67..a3e4d74 100644 --- a/src/main/gui.ts +++ b/src/main/gui.ts @@ -16,6 +16,7 @@ import { safeExecute } from '@/utils/node/logging'; import { stopKoboldCpp } from '@/main/modules/koboldcpp/launcher'; import { stopFrontend as stopSillyTavern } from '@/main/modules/sillytavern'; import { stopFrontend as stopOpenWebUI } from '@/main/modules/openwebui'; +import { stopStaticServer } from '@/main/modules/static-server'; import { setupIPCHandlers } from '@/main/ipc'; import { ensureDir } from '@/utils/node/fs'; import { PRODUCT_NAME } from '@/constants'; @@ -52,7 +53,7 @@ export async function initializeApp(options?: { startMinimized?: boolean }) { const startMinimized = options?.startMinimized ?? false; const trayEnabled = getEnableSystemTray(); - createMainWindow({ startHidden: startMinimized && trayEnabled }); + await createMainWindow({ startHidden: startMinimized && trayEnabled }); createTray(); setupIPCHandlers(); @@ -74,6 +75,7 @@ export async function initializeApp(options?: { startMinimized?: boolean }) { stopKoboldCpp(), stopSillyTavern(), stopOpenWebUI(), + stopStaticServer(), ]; const timeoutPromise = new Promise((resolve) => { diff --git a/src/main/modules/koboldcpp/proxy.ts b/src/main/modules/koboldcpp/proxy.ts index 00ae8a5..3240088 100644 --- a/src/main/modules/koboldcpp/proxy.ts +++ b/src/main/modules/koboldcpp/proxy.ts @@ -85,7 +85,7 @@ export const startProxy = (targetHost: string, targetPort: number) => reject(error); }); - proxyServer.listen(PROXY.PORT, PROXY.HOST, () => { + proxyServer.listen(PROXY.PORT, PROXY.LISTEN_HOST, () => { sendKoboldOutput(`Proxy server started on port ${PROXY.PORT}`); resolve(); }); diff --git a/src/main/modules/sillytavern.ts b/src/main/modules/sillytavern.ts index 03723c8..b1c3190 100644 --- a/src/main/modules/sillytavern.ts +++ b/src/main/modules/sillytavern.ts @@ -159,6 +159,7 @@ async function setupSillyTavernConfig(isImageMode: boolean) { try { const existingSettings = await readJsonFile>(configPath); + if (existingSettings) { settings = existingSettings; sendKoboldOutput(`Loaded existing SillyTavern settings`); @@ -215,7 +216,7 @@ async function setupSillyTavernConfig(isImageMode: boolean) { } } -async function waitForSillyTavernToStart(_port: number) { +async function waitForSillyTavernToStart() { sendKoboldOutput('Waiting for SillyTavern to start...'); return new Promise((resolve, reject) => { @@ -331,7 +332,7 @@ export async function startFrontend(args: string[]) { sillyTavernProcess = null; }); - await waitForSillyTavernToStart(config.port); + await waitForSillyTavernToStart(); createProxyServer(config.port, config.proxyPort); } catch (error) { logError( diff --git a/src/main/modules/static-server.ts b/src/main/modules/static-server.ts new file mode 100644 index 0000000..c74bcf2 --- /dev/null +++ b/src/main/modules/static-server.ts @@ -0,0 +1,55 @@ +import { createServer, Server } from 'http'; +import { readFile } from 'fs/promises'; +import { join } from 'path'; +import { lookup } from 'mime-types'; +import { pathExists } from '@/utils/node/fs'; + +let server: Server | null = null; +let serverPort = 0; + +export const startStaticServer = (distPath: string) => + new Promise((resolve, reject) => { + server = createServer(async (req, res) => { + let filePath = join(distPath, req.url === '/' ? 'index.html' : req.url!); + + if (!(await pathExists(filePath))) { + filePath = join(distPath, 'index.html'); + } + + try { + const content = await readFile(filePath); + const contentType = lookup(filePath) || 'application/octet-stream'; + + res.writeHead(200, { 'Content-Type': contentType }); + res.end(content); + } catch { + res.writeHead(404); + res.end('Not found'); + } + }); + + server.listen(0, 'localhost', () => { + const address = server!.address(); + if (address && typeof address !== 'string') { + serverPort = address.port; + resolve(`http://localhost:${serverPort}`); + } else { + reject(new Error('Failed to start static server')); + } + }); + + server.on('error', reject); + }); + +export const stopStaticServer = () => + new Promise((resolve) => { + if (server) { + server.close(() => { + server = null; + serverPort = 0; + resolve(); + }); + } else { + resolve(); + } + }); diff --git a/src/main/modules/window.ts b/src/main/modules/window.ts index 43c034e..2a8e820 100644 --- a/src/main/modules/window.ts +++ b/src/main/modules/window.ts @@ -3,6 +3,7 @@ import { join } from 'path'; import { stripVTControlCharacters } from 'util'; import { PRODUCT_NAME } from '@/constants'; import { isDevelopment } from '@/utils/node/environment'; +import { startStaticServer } from './static-server'; import { getBackgroundColor, getWindowBounds, @@ -16,7 +17,7 @@ import type { BrowserWindowConstructorOptions } from 'electron'; let mainWindow: BrowserWindow | null = null; -export function createMainWindow(options?: { startHidden?: boolean }) { +export async function createMainWindow(options?: { startHidden?: boolean }) { const { size } = screen.getPrimaryDisplay(); const savedBounds = getWindowBounds(); @@ -116,7 +117,9 @@ export function createMainWindow(options?: { startHidden?: boolean }) { if (isDevelopment) { mainWindow.loadURL('http://localhost:5173'); } else { - mainWindow.loadFile(join(__dirname, '../../dist/index.html')); + const distPath = join(__dirname, '../../dist'); + const url = await startStaticServer(distPath); + mainWindow.loadURL(url); Menu.setApplicationMenu(null); } diff --git a/src/stores/launchConfig.ts b/src/stores/launchConfig.ts index 255994f..5f29c74 100644 --- a/src/stores/launchConfig.ts +++ b/src/stores/launchConfig.ts @@ -512,6 +512,7 @@ export const useLaunchConfigStore = create((set, get) => ({ sdclipl: preset.sdclipl, sdclipg: preset.sdclipg || '', sdvae: preset.sdvae, + model: '', }); }, })); diff --git a/yarn.lock b/yarn.lock index 661bf85..211b0ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1015,33 +1015,6 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 - languageName: node - linkType: hard - "@npmcli/agent@npm:^3.0.0": version: 3.0.0 resolution: "@npmcli/agent@npm:3.0.0" @@ -1387,6 +1360,13 @@ __metadata: languageName: node linkType: hard +"@types/mime-types@npm:^3.0.1": + version: 3.0.1 + resolution: "@types/mime-types@npm:3.0.1" + checksum: 10c0/61c2056529dc5bc73c25b2a053e21f063fd547c21e12a2be94ca78b89b0f83c9a75afed9a8bda3c78592ee880acc82778302651527f7882cf5ba8e58ab320e29 + languageName: node + linkType: hard + "@types/ms@npm:*": version: 2.1.0 resolution: "@types/ms@npm:2.1.0" @@ -1472,140 +1452,139 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.47.0" +"@typescript-eslint/eslint-plugin@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.48.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.47.0" - "@typescript-eslint/type-utils": "npm:8.47.0" - "@typescript-eslint/utils": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" + "@typescript-eslint/scope-manager": "npm:8.48.0" + "@typescript-eslint/type-utils": "npm:8.48.0" + "@typescript-eslint/utils": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" graphemer: "npm:^1.4.0" ignore: "npm:^7.0.0" natural-compare: "npm:^1.4.0" ts-api-utils: "npm:^2.1.0" peerDependencies: - "@typescript-eslint/parser": ^8.47.0 + "@typescript-eslint/parser": ^8.48.0 eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/abd35affd21bc199e5e274b8e91e4225a127edf9cbe5047c465f859d7e393d07556ea42b40004e769ed59b18cfe25ab30942c854e23026d4f78d350eb71de03e + checksum: 10c0/5f4f9ac3ace3f615bac428859026b70fb7fa236666cfe8856fed3add7e4ba73c7113264c2df7a9d68247b679dfcc21b0414488bda7b9b3de1c209b1807ed7842 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/parser@npm:8.47.0" +"@typescript-eslint/parser@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/parser@npm:8.48.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.47.0" - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/typescript-estree": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" + "@typescript-eslint/scope-manager": "npm:8.48.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/typescript-estree": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/8f8c9514ffe8c2fca9e2d1d3e9f9f8dd4cb55c14f0ef2f4f265a9180615ec98dc455d373893f76f86760f37e449fd0f4afda46c1211291b9736a05ba010912f2 + checksum: 10c0/180753e1dc55cd5174a236b738d3b0dd6dd6c131797cd417b3b3b8fac344168f3d21bd49eae6c0a075be29ed69b7bc74d97cadd917f1f4d4c113c29e76c1f9cd languageName: node linkType: hard -"@typescript-eslint/project-service@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/project-service@npm:8.47.0" +"@typescript-eslint/project-service@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/project-service@npm:8.48.0" dependencies: - "@typescript-eslint/tsconfig-utils": "npm:^8.47.0" - "@typescript-eslint/types": "npm:^8.47.0" + "@typescript-eslint/tsconfig-utils": "npm:^8.48.0" + "@typescript-eslint/types": "npm:^8.48.0" debug: "npm:^4.3.4" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/6d7ec78c63d672178727b2d79856b470bd99e90d387335decec026931caa94c6907afc4690b884ce1eaca65f2d8b8f070a5c6e70e47971dfeec34dfd022933b8 + checksum: 10c0/6e1d08312fe55a91ba37eb19131af91ad7834bafd15d1cddb83a1e35e5134382e10dc0b14531036ba1c075ce4cba627123625ed6f2e209fb3355f3dda25da0a1 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/scope-manager@npm:8.47.0" +"@typescript-eslint/scope-manager@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/scope-manager@npm:8.48.0" dependencies: - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" - checksum: 10c0/2faa11e30724ca3a0648cdf83e0fc0fbdfcd89168fa0598d235a89604ee20c1f51ca2b70716f2bc0f1ea843de85976c0852de4549ba4649406d6b4acaf63f9c7 + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" + checksum: 10c0/0766e365901a8af9d9e41fa70464254aacf8b4d167734d88b6cdaa0235e86bfdffc57a3e39a20e105929b8df499d252090f64f81f86770f74626ca809afe54b6 languageName: node linkType: hard -"@typescript-eslint/tsconfig-utils@npm:8.47.0, @typescript-eslint/tsconfig-utils@npm:^8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/tsconfig-utils@npm:8.47.0" +"@typescript-eslint/tsconfig-utils@npm:8.48.0, @typescript-eslint/tsconfig-utils@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.48.0" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/d62b1840344912f916e590dad0cc5aa8816ce281ea9cac7485a28c4427ecbb88c52fa64b3d8cc520c7cab401ede8631e1b3176306cd3d496f756046e5d0c345f + checksum: 10c0/52e9ce8ffbaf32f3c6f4b8fa8af6e3901c430411e137a0baf650fcefdd8edf3dcc4569eba726a28424471d4d1d96b815aa4cf7b63aa7b67380efd6a8dd354222 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/type-utils@npm:8.47.0" +"@typescript-eslint/type-utils@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/type-utils@npm:8.48.0" dependencies: - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/typescript-estree": "npm:8.47.0" - "@typescript-eslint/utils": "npm:8.47.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/typescript-estree": "npm:8.48.0" + "@typescript-eslint/utils": "npm:8.48.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^2.1.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/68311ad455ed7e6c86e5a561b1a54383b35bc6fec37a642afca1d72ddd74a944f3f5bea5aa493e161c0422f8042da442596455e451ef9204b1fce13a84b256e6 + checksum: 10c0/72ab5c7d183b844e4870bfa5dfeb68e2e7ce5f3e1b33c06d5a8e70f0d0a012c9152ad15071d41ba3788266109804a9f4cdb85d664b11df8948bc930e29e0c244 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.47.0, @typescript-eslint/types@npm:^8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/types@npm:8.47.0" - checksum: 10c0/0d7f139b29f2581e905463c904b9aef37d8bc62f7b647cd3950d8b139a9fa6821faa5370f4975ccbbd2b2046a50629bd78729be390fb2663e6d103ecda22d794 +"@typescript-eslint/types@npm:8.48.0, @typescript-eslint/types@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/types@npm:8.48.0" + checksum: 10c0/865a8f4ae4a50aa8976f3d7e0f874f1a1c80227ec53ded68644d41011c729a489bb59f70683b29237ab945716ea0258e1d47387163379eab3edaaf5e5cc3b757 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.47.0" +"@typescript-eslint/typescript-estree@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.48.0" dependencies: - "@typescript-eslint/project-service": "npm:8.47.0" - "@typescript-eslint/tsconfig-utils": "npm:8.47.0" - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" + "@typescript-eslint/project-service": "npm:8.48.0" + "@typescript-eslint/tsconfig-utils": "npm:8.48.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" minimatch: "npm:^9.0.4" semver: "npm:^7.6.0" + tinyglobby: "npm:^0.2.15" ts-api-utils: "npm:^2.1.0" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/b63e72f85382f9022a52c606738400d599a3d27318ec48bad21039758aa6d74050fb2462aa61bac1de8bd5951bc24f775d1dde74140433c60e2943e045c21649 + checksum: 10c0/f17dd35f7b82654fae9fe83c2eb650572464dbce0170d55b3ef94b99e9aae010f2cbadd436089c8e59eef97d41719ace3a2deb4ac3cdfac26d43b36f34df5590 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/utils@npm:8.47.0" +"@typescript-eslint/utils@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/utils@npm:8.48.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.7.0" - "@typescript-eslint/scope-manager": "npm:8.47.0" - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/typescript-estree": "npm:8.47.0" + "@typescript-eslint/scope-manager": "npm:8.48.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/typescript-estree": "npm:8.48.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/8774f4e5748bdcefad32b4d06aee589208f4e78500c6c39bd6819b9602fc4212ed69fd774ccd2ad847f87a6bc0092d4db51e440668e7512d366969ab038a74f5 + checksum: 10c0/56334312d1dc114a5c8b05dac4da191c40a416a5705fa76797ebdc9f6a96d35727fd0993cf8776f5c4411837e5fc2151bfa61d3eecc98b24f5a821a63a4d56f3 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.47.0" +"@typescript-eslint/visitor-keys@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.48.0" dependencies: - "@typescript-eslint/types": "npm:8.47.0" + "@typescript-eslint/types": "npm:8.48.0" eslint-visitor-keys: "npm:^4.2.1" - checksum: 10c0/14aedfdb5bf9b4c310b4a64cb62af94f35515af44911bae266205138165b3a8dc2cd57db3255ec27531dfa3552ba79a700ec8d745b0d18bca220a7f9f437ad06 + checksum: 10c0/20ae9ec255a786de40cdba281b63f634a642dcc34d2a79c5ffc160109f7f6227c28ae2c64be32cbc53dc68dc398c3da715bfcce90422b5024f15f7124a3c1704 languageName: node linkType: hard @@ -2051,15 +2030,6 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.3": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - "browserslist@npm:^4.24.0": version: 4.26.3 resolution: "browserslist@npm:4.26.3" @@ -3446,19 +3416,6 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.3.2": - version: 3.3.3 - resolution: "fast-glob@npm:3.3.3" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.8" - checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe - languageName: node - linkType: hard - "fast-json-stable-stringify@npm:^2.0.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -3473,15 +3430,6 @@ __metadata: languageName: node linkType: hard -"fastq@npm:^1.6.0": - version: 1.19.1 - resolution: "fastq@npm:1.19.1" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10c0/ebc6e50ac7048daaeb8e64522a1ea7a26e92b3cee5cd1c7f2316cdca81ba543aa40a136b53891446ea5c3a67ec215fbaca87ad405f102dd97012f62916905630 - languageName: node - linkType: hard - "fd-slicer@npm:~1.1.0": version: 1.1.0 resolution: "fd-slicer@npm:1.1.0" @@ -3546,15 +3494,6 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - "find-up@npm:^5.0.0": version: 5.0.0 resolution: "find-up@npm:5.0.0" @@ -3771,12 +3710,13 @@ __metadata: "@huggingface/gguf": "npm:^0.3.2" "@mantine/core": "npm:^8.3.9" "@mantine/hooks": "npm:^8.3.9" + "@types/mime-types": "npm:^3.0.1" "@types/node": "npm:^24.10.1" "@types/react": "npm:^19.2.7" "@types/react-dom": "npm:^19.2.3" "@types/yauzl": "npm:^2.10.3" - "@typescript-eslint/eslint-plugin": "npm:^8.47.0" - "@typescript-eslint/parser": "npm:^8.47.0" + "@typescript-eslint/eslint-plugin": "npm:^8.48.0" + "@typescript-eslint/parser": "npm:^8.48.0" "@uiw/react-codemirror": "npm:^4.25.3" "@vitejs/plugin-react": "npm:^5.1.1" cross-env: "npm:^10.1.0" @@ -3795,6 +3735,7 @@ __metadata: globals: "npm:^16.5.0" jiti: "npm:^2.6.1" lucide-react: "npm:^0.554.0" + mime-types: "npm:^3.0.2" prettier: "npm:^3.6.2" react: "npm:^19.2.0" react-dom: "npm:^19.2.0" @@ -3885,15 +3826,6 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - "glob-parent@npm:^6.0.2": version: 6.0.2 resolution: "glob-parent@npm:6.0.2" @@ -4354,7 +4286,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.3": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -4394,13 +4326,6 @@ __metadata: languageName: node linkType: hard -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - "is-plain-obj@npm:^4.1.0": version: 4.1.0 resolution: "is-plain-obj@npm:4.1.0" @@ -4922,23 +4847,6 @@ __metadata: languageName: node linkType: hard -"merge2@npm:^1.3.0": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb - languageName: node - linkType: hard - -"micromatch@npm:^4.0.8": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - "mime-db@npm:1.52.0": version: 1.52.0 resolution: "mime-db@npm:1.52.0" @@ -4946,6 +4854,13 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:^1.54.0": + version: 1.54.0 + resolution: "mime-db@npm:1.54.0" + checksum: 10c0/8d907917bc2a90fa2df842cdf5dfeaf509adc15fe0531e07bb2f6ab15992416479015828d6a74200041c492e42cce3ebf78e5ce714388a0a538ea9c53eece284 + languageName: node + linkType: hard + "mime-types@npm:^2.1.12": version: 2.1.35 resolution: "mime-types@npm:2.1.35" @@ -4955,6 +4870,15 @@ __metadata: languageName: node linkType: hard +"mime-types@npm:^3.0.2": + version: 3.0.2 + resolution: "mime-types@npm:3.0.2" + dependencies: + mime-db: "npm:^1.54.0" + checksum: 10c0/35a0dd1035d14d185664f346efcdb72e93ef7a9b6e9ae808bd1f6358227010267fab52657b37562c80fc888ff76becb2b2938deb5e730818b7983bf8bd359767 + languageName: node + linkType: hard + "mime@npm:^2.5.2": version: 2.6.0 resolution: "mime@npm:2.6.0" @@ -5539,13 +5463,6 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - "picomatch@npm:^4.0.2, picomatch@npm:^4.0.3": version: 4.0.3 resolution: "picomatch@npm:4.0.3" @@ -5659,13 +5576,6 @@ __metadata: languageName: node linkType: hard -"queue-microtask@npm:^1.2.2": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 - languageName: node - linkType: hard - "quick-lru@npm:^5.1.1": version: 5.1.1 resolution: "quick-lru@npm:5.1.1" @@ -5969,13 +5879,6 @@ __metadata: languageName: node linkType: hard -"reusify@npm:^1.0.4": - version: 1.1.0 - resolution: "reusify@npm:1.1.0" - checksum: 10c0/4eff0d4a5f9383566c7d7ec437b671cc51b25963bd61bf127c3f3d3f68e44a026d99b8d2f1ad344afff8d278a8fe70a8ea092650a716d22287e8bef7126bb2fa - languageName: node - linkType: hard - "roarr@npm:^2.15.3": version: 2.15.4 resolution: "roarr@npm:2.15.4" @@ -6093,15 +5996,6 @@ __metadata: languageName: node linkType: hard -"run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" - dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 - languageName: node - linkType: hard - "safe-array-concat@npm:^1.1.3": version: 1.1.3 resolution: "safe-array-concat@npm:1.1.3" @@ -6751,15 +6645,6 @@ __metadata: languageName: node linkType: hard -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - "triple-beam@npm:^1.3.0, triple-beam@npm:^1.4.1": version: 1.4.1 resolution: "triple-beam@npm:1.4.1"