mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-11-23 09:10:20 +00:00
Refactor to use HashSet for document path management
This commit is contained in:
parent
a7ebc117c5
commit
a88382dc95
@ -137,7 +137,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<SettingsDialo
|
||||
private string policyAnalysisRules = string.Empty;
|
||||
private string policyOutputRules = string.Empty;
|
||||
private string deferredContent = string.Empty;
|
||||
private List<string> loadedDocumentPaths = [];
|
||||
private HashSet<string> loadedDocumentPaths = [];
|
||||
|
||||
private bool IsNoPolicySelectedOrProtected => this.selectedPolicy is null || this.selectedPolicy.IsProtected;
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ namespace AIStudio.Components;
|
||||
public partial class AttachDocuments : MSGComponentBase
|
||||
{
|
||||
[Parameter]
|
||||
public List<string> DocumentPaths { get; set; } = [];
|
||||
public HashSet<string> DocumentPaths { get; set; } = [];
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<List<string>> DocumentPathsChanged { get; set; }
|
||||
public EventCallback<HashSet<string>> DocumentPathsChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public Func<List<string>, Task> OnChange { get; set; } = _ => Task.CompletedTask;
|
||||
public Func<HashSet<string>, Task> OnChange { get; set; } = _ => Task.CompletedTask;
|
||||
|
||||
[Inject]
|
||||
private RustService RustService { get; init; } = null!;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user