mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-13 06:01:37 +00:00
Replace fileAttachments with chatDocumentPaths for consistency and cleanup.
This commit is contained in:
parent
4fdad99652
commit
3f2dc26cab
@ -57,7 +57,6 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
private string currentWorkspaceName = string.Empty;
|
||||
private Guid currentWorkspaceId = Guid.Empty;
|
||||
private CancellationTokenSource? cancellationTokenSource;
|
||||
private List<string> fileAttachments = new();
|
||||
private HashSet<string> chatDocumentPaths = [];
|
||||
|
||||
// Unfortunately, we need the input field reference to blur the focus away. Without
|
||||
@ -464,7 +463,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
lastUserPrompt = new ContentText
|
||||
{
|
||||
Text = this.userInput,
|
||||
FileAttachments = this.fileAttachments.ToList(), // Create a copy
|
||||
FileAttachments = this.chatDocumentPaths.ToList(), // Create a copy
|
||||
};
|
||||
|
||||
//
|
||||
@ -510,7 +509,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
// Clear the input field:
|
||||
await this.inputField.FocusAsync();
|
||||
this.userInput = string.Empty;
|
||||
this.fileAttachments.Clear();
|
||||
this.chatDocumentPaths.Clear();
|
||||
await this.inputField.BlurAsync();
|
||||
|
||||
// Enable the stream state for the chat component:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user