mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-05 10:44:35 +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
@@ -7,4 +7,30 @@ public sealed class WebContentState
|
||||
public bool Preselect { get; set; }
|
||||
public bool PreselectContentCleaner { get; set; }
|
||||
public bool CleanerIsRunning { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a copy which shares nothing with this state.
|
||||
/// </summary>
|
||||
/// <returns>The copy.</returns>
|
||||
public WebContentState Copy() => new()
|
||||
{
|
||||
Content = this.Content,
|
||||
URL = this.URL,
|
||||
Preselect = this.Preselect,
|
||||
PreselectContentCleaner = this.PreselectContentCleaner,
|
||||
CleanerIsRunning = this.CleanerIsRunning,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether another state holds the same inputs as this one.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Whether the content cleaner runs is not an input: it is work in progress, which ends with the component that started it.
|
||||
/// </remarks>
|
||||
/// <param name="other">The state to compare with.</param>
|
||||
/// <returns><c>true</c> when both states hold the same inputs; otherwise, <c>false</c>.</returns>
|
||||
public bool HasSameInputsAs(WebContentState other) => string.Equals(this.Content, other.Content, StringComparison.Ordinal)
|
||||
&& string.Equals(this.URL, other.URL, StringComparison.Ordinal)
|
||||
&& this.Preselect == other.Preselect
|
||||
&& this.PreselectContentCleaner == other.PreselectContentCleaner;
|
||||
}
|
||||
Reference in new issue
Block a user