Q140: a message can carry several files, or files alone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
46f7561f77
commit
a6ab09d6b5
11 files changed
+129
-35
No files matched your search
@@ -340,9 +340,9 @@ export function registerIpcHandlers(deps: IpcDeps): void {
|
||||
|
||||
handle("importFile", async (input) => {
|
||||
try {
|
||||
const fileId = await files.importFile(input);
|
||||
if (fileId) notifyDataChanged();
|
||||
return ok(fileId);
|
||||
const imported = await files.importFile(input);
|
||||
if (imported.fileIds.length > 0) notifyDataChanged();
|
||||
return ok(imported);
|
||||
} catch (error) {
|
||||
return fail("file_import_failed", error instanceof Error ? error.message : String(error));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user