fix(plugins): carry plugin file handle ids as uuid strings
This commit is contained in:
1 parent
9bd9b93267
commit
4f0f69131b
5 files changed
+104
-66
No files matched your search
@@ -5181,15 +5181,15 @@ export async function openPluginLocalFile(_pluginId: string, _path: string, _wri
|
||||
throw new Error("Plugin local file access is not available in the web backend");
|
||||
}
|
||||
|
||||
export async function readPluginLocalFileChunk(_pluginId: string, _handleId: number, _offset: number, _length?: number): Promise<PluginLocalFileChunk> {
|
||||
export async function readPluginLocalFileChunk(_pluginId: string, _handleId: string, _offset: number, _length?: number): Promise<PluginLocalFileChunk> {
|
||||
throw new Error("Plugin local file access is not available in the web backend");
|
||||
}
|
||||
|
||||
export async function writePluginLocalFileChunk(_pluginId: string, _handleId: number, _offset: number, _dataBase64: string): Promise<PluginLocalFileWriteResult> {
|
||||
export async function writePluginLocalFileChunk(_pluginId: string, _handleId: string, _offset: number, _dataBase64: string): Promise<PluginLocalFileWriteResult> {
|
||||
throw new Error("Plugin local file access is not available in the web backend");
|
||||
}
|
||||
|
||||
export async function closePluginLocalFile(_pluginId: string, _handleId: number): Promise<void> {
|
||||
export async function closePluginLocalFile(_pluginId: string, _handleId: string): Promise<void> {
|
||||
throw new Error("Plugin local file access is not available in the web backend");
|
||||
}
|
||||
|
||||
|
||||
@@ -2462,7 +2462,8 @@ export async function sendPluginBinary(pluginId: string, channel: string, dataBa
|
||||
}
|
||||
|
||||
export interface PluginLocalFileHandle {
|
||||
handleId: number;
|
||||
/** Opaque uuid string from the Rust registry — never a number (JS doubles lose precision above 2^53). */
|
||||
handleId: string;
|
||||
name: string;
|
||||
size: number;
|
||||
contentType: string;
|
||||
@@ -2484,15 +2485,15 @@ export async function openPluginLocalFile(pluginId: string, path: string, write:
|
||||
return invoke("plugin_file_open", { pluginId, path, write });
|
||||
}
|
||||
|
||||
export async function readPluginLocalFileChunk(pluginId: string, handleId: number, offset: number, length?: number): Promise<PluginLocalFileChunk> {
|
||||
export async function readPluginLocalFileChunk(pluginId: string, handleId: string, offset: number, length?: number): Promise<PluginLocalFileChunk> {
|
||||
return invoke("plugin_file_read", { pluginId, handleId, offset, length });
|
||||
}
|
||||
|
||||
export async function writePluginLocalFileChunk(pluginId: string, handleId: number, offset: number, dataBase64: string): Promise<PluginLocalFileWriteResult> {
|
||||
export async function writePluginLocalFileChunk(pluginId: string, handleId: string, offset: number, dataBase64: string): Promise<PluginLocalFileWriteResult> {
|
||||
return invoke("plugin_file_write", { pluginId, handleId, offset, dataBase64 });
|
||||
}
|
||||
|
||||
export async function closePluginLocalFile(pluginId: string, handleId: number): Promise<void> {
|
||||
export async function closePluginLocalFile(pluginId: string, handleId: string): Promise<void> {
|
||||
return invoke("plugin_file_close", { pluginId, handleId });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user