mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-03 03:54:24 +00:00
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
19 lines
768 B
C#
19 lines
768 B
C#
namespace AIStudio.Assistants;
|
|
|
|
/// <summary>
|
|
/// The text of the last run of an assistant and its result, which the assistant shows as a diff.
|
|
/// </summary>
|
|
/// <param name="Original">The text the assistant worked on.</param>
|
|
/// <param name="Changed">The result of the run.</param>
|
|
public readonly record struct AssistantTextDiff(string Original, string Changed)
|
|
{
|
|
/// <summary>
|
|
/// No diff, e.g., before the first run.
|
|
/// </summary>
|
|
public static readonly AssistantTextDiff NONE = new(string.Empty, string.Empty);
|
|
|
|
/// <summary>
|
|
/// Whether there is a diff to show: both texts hold more than white space.
|
|
/// </summary>
|
|
public bool IsShown => !string.IsNullOrWhiteSpace(this.Original) && !string.IsNullOrWhiteSpace(this.Changed);
|
|
} |