放开部分文件读/写限制

This commit is contained in:
xintaofei
2026-03-19 21:33:07 +08:00
parent 0209de17eb
commit f6fd3da401
6 changed files with 55 additions and 71 deletions

View File

@@ -900,26 +900,16 @@ export async function readFileBase64(
export async function readFilePreview(
rootPath: string,
path: string,
maxBytes?: number
path: string
): Promise<FilePreviewContent> {
return invoke("read_file_preview", {
rootPath,
path,
maxBytes: maxBytes ?? null,
})
return invoke("read_file_preview", { rootPath, path })
}
export async function readFileForEdit(
rootPath: string,
path: string,
maxBytes?: number
path: string
): Promise<FileEditContent> {
return invoke("read_file_for_edit", {
rootPath,
path,
maxBytes: maxBytes ?? null,
})
return invoke("read_file_for_edit", { rootPath, path })
}
export async function saveFileContent(