mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-11-23 10:50:21 +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 policyAnalysisRules = string.Empty;
|
||||||
private string policyOutputRules = string.Empty;
|
private string policyOutputRules = string.Empty;
|
||||||
private string deferredContent = 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;
|
private bool IsNoPolicySelectedOrProtected => this.selectedPolicy is null || this.selectedPolicy.IsProtected;
|
||||||
|
|
||||||
|
|||||||
@ -8,13 +8,13 @@ namespace AIStudio.Components;
|
|||||||
public partial class AttachDocuments : MSGComponentBase
|
public partial class AttachDocuments : MSGComponentBase
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public List<string> DocumentPaths { get; set; } = [];
|
public HashSet<string> DocumentPaths { get; set; } = [];
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<List<string>> DocumentPathsChanged { get; set; }
|
public EventCallback<HashSet<string>> DocumentPathsChanged { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public Func<List<string>, Task> OnChange { get; set; } = _ => Task.CompletedTask;
|
public Func<HashSet<string>, Task> OnChange { get; set; } = _ => Task.CompletedTask;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
private RustService RustService { get; init; } = null!;
|
private RustService RustService { get; init; } = null!;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user