A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
use serde::{Deserialize, Serialize};
use wezterm_term::StableRowIndex;
#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)]
pub struct SearchResult {
pub start_y: StableRowIndex,
/// The cell index into the line of the start of the match
pub start_x: usize,
pub end_y: StableRowIndex,
/// The cell index into the line of the end of the match
pub end_x: usize,
/// An identifier that can be used to group results that have
/// the same textual content
pub match_id: usize,
}
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub enum Pattern {
CaseSensitiveString(String),
CaseInSensitiveString(String),
Regex(String),
}
impl Default for Pattern {
fn default() -> Self {
Self::CaseSensitiveString("".to_string())
}
}
impl std::ops::Deref for Pattern {
type Target = String;
fn deref(&self) -> &String {
match self {
Pattern::CaseSensitiveString(s) => s,
Pattern::CaseInSensitiveString(s) => s,
Pattern::Regex(s) => s,
}
}
}
impl std::ops::DerefMut for Pattern {
fn deref_mut(&mut self) -> &mut String {
match self {
Pattern::CaseSensitiveString(s) => s,
Pattern::CaseInSensitiveString(s) => s,
Pattern::Regex(s) => s,
}
}
}