mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-28 06:42:57 +00:00
Refactor HideFromUser
to use init
and enhance DeepClone
with optional hide state adjustment
This commit is contained in:
parent
32757989e8
commit
93650c9d7c
@ -28,14 +28,14 @@ public class ContentBlock
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should the content block be hidden from the user?
|
/// Should the content block be hidden from the user?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HideFromUser { get; set; }
|
public bool HideFromUser { get; init; }
|
||||||
|
|
||||||
public ContentBlock DeepClone() => new()
|
public ContentBlock DeepClone(bool changeHideState = false, bool hideFromUser = true) => new()
|
||||||
{
|
{
|
||||||
Time = this.Time,
|
Time = this.Time,
|
||||||
ContentType = this.ContentType,
|
ContentType = this.ContentType,
|
||||||
Content = this.Content?.DeepClone(),
|
Content = this.Content?.DeepClone(),
|
||||||
Role = this.Role,
|
Role = this.Role,
|
||||||
HideFromUser = this.HideFromUser,
|
HideFromUser = changeHideState ? hideFromUser : this.HideFromUser,
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user