aboutsummaryrefslogtreecommitdiff
path: root/src/terminal/runtime.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-14 02:43:45 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-14 03:47:07 +0300
commitfbd20ad6e488fb3b9efc1612fdffee6e672976c1 (patch)
treed21daf93241786f8aa6fde23b41cdb9e15182b79 /src/terminal/runtime.rs
parentd35c642ef36ee5ac2afe7c1b18ad5a717bc807d8 (diff)
feat: add plugin v1 system
Add manifest-driven plugin actions, event hooks, pane entrypoints, link handlers, and host APIs. Support plugin link, GitHub install, build commands, installed plugin registry, pane movement, runtime context, and plugin docs.
Diffstat (limited to 'src/terminal/runtime.rs')
-rw-r--r--src/terminal/runtime.rs22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs
index c4bf91e1..5e4f778e 100644
--- a/src/terminal/runtime.rs
+++ b/src/terminal/runtime.rs
@@ -85,10 +85,10 @@ impl TerminalRuntime {
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
shell_config: crate::pane::PaneShellConfig<'_>,
+ launch_env: &crate::pane::PaneLaunchEnv,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
render_dirty: Arc<AtomicBool>,
- public_pane_id: Option<&str>,
) -> std::io::Result<Self> {
crate::pane::PaneRuntime::spawn(
pane_id,
@@ -98,10 +98,10 @@ impl TerminalRuntime {
scrollback_limit_bytes,
host_terminal_theme,
shell_config,
+ launch_env,
events,
render_notify,
render_dirty,
- public_pane_id,
)
.map(Self)
}
@@ -116,11 +116,11 @@ impl TerminalRuntime {
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
shell_config: crate::pane::PaneShellConfig<'_>,
+ launch_env: &crate::pane::PaneLaunchEnv,
initial_history_ansi: Option<&str>,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
render_dirty: Arc<AtomicBool>,
- public_pane_id: Option<&str>,
) -> std::io::Result<Self> {
crate::pane::PaneRuntime::spawn_with_initial_history(
pane_id,
@@ -130,11 +130,11 @@ impl TerminalRuntime {
scrollback_limit_bytes,
host_terminal_theme,
shell_config,
+ launch_env,
initial_history_ansi,
events,
render_notify,
render_dirty,
- public_pane_id,
)
.map(Self)
}
@@ -147,13 +147,12 @@ impl TerminalRuntime {
cols: u16,
cwd: std::path::PathBuf,
command: &str,
- extra_env: &[(String, String)],
+ launch_env: &crate::pane::PaneLaunchEnv,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
render_dirty: Arc<AtomicBool>,
- public_pane_id: Option<&str>,
) -> std::io::Result<Self> {
crate::pane::PaneRuntime::spawn_shell_command(
pane_id,
@@ -161,13 +160,12 @@ impl TerminalRuntime {
cols,
cwd,
command,
- extra_env,
+ launch_env,
scrollback_limit_bytes,
host_terminal_theme,
events,
render_notify,
render_dirty,
- public_pane_id,
)
.map(Self)
}
@@ -178,12 +176,12 @@ impl TerminalRuntime {
cols: u16,
cwd: std::path::PathBuf,
argv: &[String],
+ launch_env: &crate::pane::PaneLaunchEnv,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
render_dirty: Arc<AtomicBool>,
- public_pane_id: Option<&str>,
) -> std::io::Result<Self> {
crate::pane::PaneRuntime::spawn_argv_command(
pane_id,
@@ -191,12 +189,12 @@ impl TerminalRuntime {
cols,
cwd,
argv,
+ launch_env,
scrollback_limit_bytes,
host_terminal_theme,
events,
render_notify,
render_dirty,
- public_pane_id,
)
.map(Self)
}
@@ -412,6 +410,10 @@ impl TerminalRuntime {
self.0.foreground_cwd()
}
+ pub fn child_pid(&self) -> Option<u32> {
+ self.0.child_pid()
+ }
+
pub(crate) fn current_size(&self) -> (u16, u16) {
self.0.current_size()
}