diff --git a/core/src/browser/fs.ts b/core/src/browser/fs.ts index 92525c260..164e3b647 100644 --- a/core/src/browser/fs.ts +++ b/core/src/browser/fs.ts @@ -37,8 +37,6 @@ const readdirSync = (...args: any[]) => globalThis.core.api?.readdirSync(...args */ const mkdir = (...args: any[]) => globalThis.core.api?.mkdir(...args) -const mkdir = (...args: any[]) => global.core.api?.mkdir(...args) - /** * Removes a directory at the specified path. * @returns {Promise} A Promise that resolves when the directory is removed successfully. diff --git a/core/src/node/api/processors/fsExt.ts b/core/src/node/api/processors/fsExt.ts index 9b88cfef9..4787da65b 100644 --- a/core/src/node/api/processors/fsExt.ts +++ b/core/src/node/api/processors/fsExt.ts @@ -88,28 +88,4 @@ export class FSExt implements Processor { }) }) } - - mkdir(path: string): Promise { - return new Promise((resolve, reject) => { - fs.mkdir(path, { recursive: true }, (err) => { - if (err) { - reject(err) - } else { - resolve() - } - }) - }) - } - - rmdir(path: string): Promise { - return new Promise((resolve, reject) => { - fs.rm(path, { recursive: true }, (err) => { - if (err) { - reject(err) - } else { - resolve() - } - }) - }) - } } diff --git a/core/src/types/api/index.ts b/core/src/types/api/index.ts index 58bd860b7..91d6ae755 100644 --- a/core/src/types/api/index.ts +++ b/core/src/types/api/index.ts @@ -95,8 +95,6 @@ export enum FileManagerRoute { getUserHomePath = 'getUserHomePath', fileStat = 'fileStat', writeBlob = 'writeBlob', - mkdir = 'mkdir', - rm = 'rm', } export type ApiFunction = (...args: any[]) => any diff --git a/extensions/tensorrt-llm-extension/src/node/index.ts b/extensions/tensorrt-llm-extension/src/node/index.ts index 269250d19..4dad464da 100644 --- a/extensions/tensorrt-llm-extension/src/node/index.ts +++ b/extensions/tensorrt-llm-extension/src/node/index.ts @@ -9,8 +9,6 @@ import { PromptTemplate, } from '@janhq/core/node' import decompress from 'decompress' -import { SystemInformation } from '@janhq/core' -import { PromptTemplate } from '@janhq/core' // Polyfill fetch with retry const fetchRetry = fetchRT(fetch)