mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-27 21:42:56 +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>
|
||||
/// Should the content block be hidden from the user?
|
||||
/// </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,
|
||||
ContentType = this.ContentType,
|
||||
Content = this.Content?.DeepClone(),
|
||||
Role = this.Role,
|
||||
HideFromUser = this.HideFromUser,
|
||||
HideFromUser = changeHideState ? hideFromUser : this.HideFromUser,
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user