fix(sql-file): open and save custom-filtered text files

This commit is contained in:
zipg authored and GitHub committed 2026-09-02 11:55:00 +08:00
1 parent d3a6a69796
commit 9b6f3c48e4
8 files changed
+113 -58

No files matched your search

+1 -1
View File
@@ -2246,7 +2246,7 @@ export async function writeExternalSqlFile(_path: string, _content: string, _opt
throw new Error("Saving external SQL file paths is only available in the desktop app");
}
export async function saveExternalSqlFile(_defaultFileName: string, _content: string): Promise<{ path: string; version: import("@/types/database").ExternalSqlFileVersion } | null> {
export async function saveExternalSqlFile(_defaultFileName: string, _content: string, _filterExtension?: string): Promise<{ path: string; version: import("@/types/database").ExternalSqlFileVersion } | null> {
throw new Error("Saving SQL files locally is only available in the desktop app");
}
+2 -2
View File
@@ -937,8 +937,8 @@ export async function writeExternalSqlFile(path: string, content: string, option
});
}
export async function saveExternalSqlFile(defaultFileName: string, content: string): Promise<{ path: string; version: ExternalSqlFileVersion } | null> {
return invoke("save_external_sql_file", { defaultFileName, content });
export async function saveExternalSqlFile(defaultFileName: string, content: string, filterExtension?: string): Promise<{ path: string; version: ExternalSqlFileVersion } | null> {
return invoke("save_external_sql_file", { defaultFileName, content, filterExtension });
}
export interface SqlFileEntry {