- Introduced FileService to handle file reading operations via IPC. - Implemented a new IPC handler for reading files, enhancing the application's ability to access and manage data. - Integrated system agents from a JSON file, allowing dynamic loading of agent data into the application. - Updated the AgentsPage and AddAssistantPopup components to utilize the new system agents, improving user experience and functionality. - Enhanced application state management by adding resourcesPath to the runtime state, ensuring proper resource handling across components.
8 lines
187 B
TypeScript
8 lines
187 B
TypeScript
import fs from 'node:fs'
|
|
|
|
export default class FileService {
|
|
public static async readFile(_: Electron.IpcMainInvokeEvent, path: string) {
|
|
return fs.readFileSync(path, 'utf8')
|
|
}
|
|
}
|