summaryrefslogtreecommitdiff
path: root/src/events.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-03-23 00:36:52 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-03-27 21:37:05 +0300
commita57b97285c3308fbdcc167ab3da9ae1dd78767b6 (patch)
tree25a0eb4df100ea9b09c7551fa7cc25f8d86027ef /src/events.rs
initial release
terminal workspace manager for AI coding agents. single rust binary, runs inside your existing terminal. workspaces, tiled panes, intelligent agent state detection. https://herdr.dev
Diffstat (limited to 'src/events.rs')
-rw-r--r--src/events.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/events.rs b/src/events.rs
new file mode 100644
index 00000000..e86850cb
--- /dev/null
+++ b/src/events.rs
@@ -0,0 +1,26 @@
+//! Internal app events delivered via channel.
+//!
+//! Background tasks (PTY child watchers, future hook listeners, etc.) send
+//! events to the main loop through this channel. No polling needed.
+
+use crate::detect::{Agent, AgentState};
+use crate::layout::PaneId;
+
+/// An event from a background task to the main loop.
+#[derive(Debug)]
+pub enum AppEvent {
+ /// A pane's child process exited.
+ PaneDied {
+ pane_id: PaneId,
+ },
+ /// Agent state changed in a pane (detected by the PTY reader).
+ StateChanged {
+ pane_id: PaneId,
+ agent: Option<Agent>,
+ state: AgentState,
+ },
+ /// A new version was downloaded and installed. Restart to use it.
+ UpdateReady {
+ version: String,
+ },
+}