summaryrefslogtreecommitdiff
path: root/src/terminal/runtime.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 21:27:26 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 21:37:05 +0300
commitdb67e9d74ffafc9c63bdf78fcf712419359f634b (patch)
tree9d181b55e65aaf6a2fad2d6cf785bb09a8d9748f /src/terminal/runtime.rs
parent1bab1d2ce21507747ea1f506fb891fe7cd5a13c9 (diff)
feat: restore agent sessions
refs #233
Diffstat (limited to 'src/terminal/runtime.rs')
-rw-r--r--src/terminal/runtime.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs
index 43c2467d..be69b713 100644
--- a/src/terminal/runtime.rs
+++ b/src/terminal/runtime.rs
@@ -102,6 +102,35 @@ impl TerminalRuntime {
.map(Self)
}
+ pub fn spawn_agent_restore(
+ pane_id: PaneId,
+ rows: u16,
+ cols: u16,
+ cwd: std::path::PathBuf,
+ restore_plan: &crate::agent_resume::AgentResumePlan,
+ scrollback_limit_bytes: usize,
+ host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ default_shell: &str,
+ events: mpsc::Sender<AppEvent>,
+ render_notify: Arc<Notify>,
+ render_dirty: Arc<AtomicBool>,
+ ) -> std::io::Result<Self> {
+ crate::pane::PaneRuntime::spawn_agent_restore(
+ pane_id,
+ rows,
+ cols,
+ cwd,
+ restore_plan,
+ scrollback_limit_bytes,
+ host_terminal_theme,
+ default_shell,
+ events,
+ render_notify,
+ render_dirty,
+ )
+ .map(Self)
+ }
+
pub fn apply_host_terminal_theme(&self, theme: crate::terminal_theme::TerminalTheme) {
self.0.apply_host_terminal_theme(theme);
}