mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 22:33:48 +00:00
Fixed attached files silently reaching the AI as empty documents (#904)
This commit is contained in:
1 parent
b9ec13edcf
commit
8f8f788896
31 files changed
+1730
-285
No files matched your search
@@ -324,8 +324,13 @@ public partial class ReadFileContent : MSGComponentBase
|
||||
|
||||
try
|
||||
{
|
||||
var fileContent = await UserFile.LoadFileData(filePath, this.RustService, this.DialogService);
|
||||
await this.ApplyFileContentAsync(fileContent, filePath);
|
||||
var extraction = await UserFile.LoadFileData(filePath, this.RustService, this.DialogService);
|
||||
|
||||
// The failure was already reported by UserFile.LoadFileData, so we only stop here:
|
||||
if (!extraction.HasUsableContent)
|
||||
return false;
|
||||
|
||||
await this.ApplyFileContentAsync(extraction.Content, filePath);
|
||||
this.Logger.LogInformation("Successfully loaded file content: {FilePath}", filePath);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user