Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ wmi = "0.18"
windows-core = "=0.61.2"
windows-sys = { version = "0.61", features = [
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_Security",
"Win32_System_JobObjects",
"Win32_System_Threading",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_WindowsAndMessaging",
] }
# Already in the lock transitively via tauri; declared directly so the
# ICoreWebView2Settings3 call has a supported path. Must stay on the same
Expand Down
10 changes: 10 additions & 0 deletions src-tauri/src/agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ pub struct AgentInfo {

/// Recognised out of the box; always probed, whatever the caller asks for.
/// Mirrors `BUILTIN_AGENTS` in src/lib/agent-catalog.ts.
#[cfg(any(target_os = "windows", target_os = "macos"))]
pub(crate) const BUILTIN_AGENTS: [&str; 6] =
["claude", "codex", "opencode", "agy", "gemini", "alacritty"];
#[cfg(not(any(target_os = "windows", target_os = "macos")))]
pub(crate) const BUILTIN_AGENTS: [&str; 5] = ["claude", "codex", "opencode", "agy", "gemini"];

/// Upper bound on a probed name; mirrors `PROBE_NAME_MAX` in agent-catalog.ts.
Expand Down Expand Up @@ -43,6 +47,12 @@ pub(crate) fn probe_names(requested: Vec<String>) -> Vec<String> {
.map(|name| (*name).to_string())
.collect();
for name in requested {
// Alacritty is a native pane renderer, not an agent command. Keep it
// out of platforms where the native embedding backend is a deliberate
// unsupported stub.
if cfg!(not(any(target_os = "windows", target_os = "macos"))) && name == "alacritty" {
continue;
}
if is_probe_safe(&name) && !names.iter().any(|existing| *existing == name) {
names.push(name);
}
Expand Down
16 changes: 15 additions & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ mod links;
mod menu;
mod menu_registry;
mod migrate;
mod native_terminal;
mod platform;
mod prompt_assets;
mod pty;
Expand All @@ -20,8 +21,13 @@ struct QuitState {
}

#[tauri::command]
fn confirm_quit(app: tauri::AppHandle, state: tauri::State<'_, QuitState>) {
fn confirm_quit(
app: tauri::AppHandle,
state: tauri::State<'_, QuitState>,
native: tauri::State<'_, native_terminal::NativeTerminalState>,
) {
state.confirmed.store(true, Ordering::SeqCst);
native.terminate_all();
app.exit(0);
}

Expand All @@ -46,6 +52,7 @@ pub fn run() {
builder
.manage(pty::PtyState::default())
.manage(coordinator::WindowCoordinator::default())
.manage(native_terminal::NativeTerminalState::default())
.manage(QuitState::default())
.setup(|app| {
// Before anything reads the store: the frontend loads settings
Expand Down Expand Up @@ -78,6 +85,13 @@ pub fn run() {
images::scan_workspace_favicon,
links::resolve_paths,
links::open_editor,
native_terminal::spawn_alacritty,
native_terminal::apply_alacritty_appearance,
native_terminal::perform_alacritty_action,
native_terminal::update_alacritty,
native_terminal::focus_alacritty,
native_terminal::set_alacritty_occluded,
native_terminal::kill_alacritty,
confirm_quit
])
.build(tauri::generate_context!())
Expand Down
Loading
Loading