feat: 文件对话框全部改用 Electron 原生对话框
- input-area.ts: 图片/文件上传改用 dialog.showOpenDialog(通过 IPC) - settings-modal.ts: 导入改用原生打开对话框,导出改用原生保存对话框 - kb-modal.ts: 知识库文档上传改用原生打开对话框 - ipc.ts/preload.ts/types.d.ts: writeFile 增加 encoding 参数支持二进制写入 - index.html: 移除 4 个无用的 <input type="file"> 元素 - 清理死代码: fileToBase64, fileToText, isMetonaFile
This commit is contained in:
Vendored
+1
-1
@@ -198,7 +198,7 @@ export interface MetonaDesktopAPI {
|
||||
};
|
||||
fs: {
|
||||
readFile: (filePath: string) => Promise<{ success: boolean; content?: string; name?: string; error?: string }>;
|
||||
writeFile: (filePath: string, content: string) => Promise<{ success: boolean; error?: string }>;
|
||||
writeFile: (filePath: string, content: string, encoding?: string) => Promise<{ success: boolean; error?: string }>;
|
||||
};
|
||||
tool: {
|
||||
execute: (toolName: string, args: Record<string, unknown>) => Promise<ToolResult>;
|
||||
|
||||
Reference in New Issue
Block a user