feat: add file reading functionality and integrate system agents
- 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.
This commit is contained in:
Vendored
+3
@@ -56,6 +56,9 @@ declare global {
|
||||
copy: (fileId: string, destPath: string) => Promise<void>
|
||||
binaryFile: (fileId: string) => Promise<{ data: Buffer; mime: string }>
|
||||
}
|
||||
fs: {
|
||||
read: (path: string) => Promise<string>
|
||||
}
|
||||
export: {
|
||||
toWord: (markdown: string, fileName: string) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@ const api = {
|
||||
copy: (fileId: string, destPath: string) => ipcRenderer.invoke('file:copy', fileId, destPath),
|
||||
binaryFile: (fileId: string) => ipcRenderer.invoke('file:binaryFile', fileId)
|
||||
},
|
||||
fs: {
|
||||
read: (path: string) => ipcRenderer.invoke('fs:read', path)
|
||||
},
|
||||
export: {
|
||||
toWord: (markdown: string, fileName: string) => ipcRenderer.invoke('export:word', markdown, fileName)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user