mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 01:09:40 +00:00
Implemented removal of chat messages (#246)
This commit is contained in:
1 parent
6f5aecd92b
commit
5e445f09fa
6 files changed
+57
-2
No files matched your search
@@ -97,4 +97,17 @@ public sealed record ChatThread
|
||||
logger.LogInformation(logMessage);
|
||||
return systemPromptText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a content block from this chat thread.
|
||||
/// </summary>
|
||||
/// <param name="content">The content block to remove.</param>
|
||||
public void Remove(IContent content)
|
||||
{
|
||||
var block = this.Blocks.FirstOrDefault(x => x.Content == content);
|
||||
if(block is null)
|
||||
return;
|
||||
|
||||
this.Blocks.Remove(block);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user