mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-06 04:11:36 +00:00
Kept the inputs of assistants when you leave them (#1209)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
1fbc1f4796
commit
7e2f83b19b
83 files changed
+1924
-347
No files matched your search
@@ -5,4 +5,17 @@ namespace AIStudio.Assistants.Dynamic;
|
||||
public sealed class FileAttachmentState
|
||||
{
|
||||
public HashSet<FileAttachment> DocumentPaths { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Creates a copy which shares nothing with this state.
|
||||
/// </summary>
|
||||
/// <returns>The copy.</returns>
|
||||
public FileAttachmentState Copy() => new() { DocumentPaths = new HashSet<FileAttachment>(this.DocumentPaths, this.DocumentPaths.Comparer) };
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether another state holds the same files as this one.
|
||||
/// </summary>
|
||||
/// <param name="other">The state to compare with.</param>
|
||||
/// <returns><c>true</c> when both states hold the same files; otherwise, <c>false</c>.</returns>
|
||||
public bool HasSameInputsAs(FileAttachmentState other) => this.DocumentPaths.SetEquals(other.DocumentPaths);
|
||||
}
|
||||
Reference in new issue
Block a user