feat: Replay session output when a user re-enters a session so all output can be seen again
This commit is contained in:
@@ -133,6 +133,13 @@ impl MessageContent {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_text(&self) -> Option<&str> {
|
||||
match self {
|
||||
MessageContent::Text(text) => Some(text),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn merge_prompt(&mut self, replace_fn: impl Fn(&str) -> String) {
|
||||
match self {
|
||||
MessageContent::Text(text) => *text = replace_fn(text),
|
||||
|
||||
Reference in New Issue
Block a user