mirror of
https://github.com/openai/codex.git
synced 2026-04-30 19:32:04 +03:00
feat: tui beta for collab (#9690)
https://github.com/user-attachments/assets/1ca07e7a-3d82-40da-a5b0-8ab2eef0bb69
This commit is contained in:
@@ -381,6 +381,19 @@ where
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Clear terminal scrollback (if supported) and force a full redraw.
|
||||
pub fn clear_scrollback(&mut self) -> io::Result<()> {
|
||||
if self.viewport_area.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
self.backend
|
||||
.set_cursor_position(self.viewport_area.as_position())?;
|
||||
queue!(self.backend, Clear(crossterm::terminal::ClearType::Purge))?;
|
||||
std::io::Write::flush(&mut self.backend)?;
|
||||
self.previous_buffer_mut().reset();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Clears the inactive buffer and swaps it with the current buffer
|
||||
pub fn swap_buffers(&mut self) {
|
||||
self.previous_buffer_mut().reset();
|
||||
|
||||
Reference in New Issue
Block a user