放开部分文件读/写限制
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -677,7 +677,6 @@ export type FileTreeNode =
|
||||
export interface FilePreviewContent {
|
||||
path: string
|
||||
content: string
|
||||
truncated: boolean
|
||||
}
|
||||
|
||||
export interface FileEditContent {
|
||||
@@ -686,7 +685,6 @@ export interface FileEditContent {
|
||||
etag: string
|
||||
mtime_ms: number | null
|
||||
readonly: boolean
|
||||
truncated: boolean
|
||||
line_ending: "lf" | "crlf" | "mixed" | "none"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user