Clear composer on fork (#3445)
Fixes this <img width="344" height="51" alt="image" src="https://github.com/user-attachments/assets/f227d338-b044-4f8d-bf07-87499b4230d8" />
This commit is contained in:
@@ -243,6 +243,10 @@ impl ChatComposer {
|
||||
|
||||
/// Replace the entire composer content with `text` and reset cursor.
|
||||
pub(crate) fn set_text_content(&mut self, text: String) {
|
||||
// Clear any existing content, placeholders, and attachments first.
|
||||
self.textarea.set_text("");
|
||||
self.pending_pastes.clear();
|
||||
self.attached_images.clear();
|
||||
self.textarea.set_text(&text);
|
||||
self.textarea.set_cursor(0);
|
||||
self.sync_command_popup();
|
||||
|
||||
Reference in New Issue
Block a user