From 2850c2524d952a1389f628e86301a0aba5079dd9 Mon Sep 17 00:00:00 2001 From: Ryan Ward Date: Tue, 18 Aug 2026 11:14:15 -0500 Subject: [PATCH] v3.0.0 - Rig migration complete --- Cargo.lock | 2 +- app/Cargo.toml | 2 +- app/src/ai/blocklist/controller.rs | 35 +++++++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 202d006d..e274209b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5650,7 +5650,7 @@ dependencies = [ [[package]] name = "galaxy" -version = "2.1.0" +version = "3.0.0" dependencies = [ "addr", "aha-reqwest-eventsource", diff --git a/app/Cargo.toml b/app/Cargo.toml index 1cfed747..cf0d5b4d 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -5,7 +5,7 @@ description = "Galaxy - AI-powered terminal" edition = "2021" autobins = false name = "galaxy" -version = "2.1.0" +version = "3.0.0" publish.workspace = true license.workspace = true diff --git a/app/src/ai/blocklist/controller.rs b/app/src/ai/blocklist/controller.rs index 21a77439..88d5d094 100644 --- a/app/src/ai/blocklist/controller.rs +++ b/app/src/ai/blocklist/controller.rs @@ -577,7 +577,7 @@ struct RestoredProviderCommandEvidence { exit_code: i32, } -#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub(super) struct PendingProviderCommandCompletion { block_id: BlockId, initial_requested_command_action_id: Option, @@ -718,6 +718,36 @@ struct QueuedProviderRunsOnlySnapshot { queued_follow_ups: Vec, } +fn validate_queued_provider_run_snapshots( + active_run_id: Option<&ProviderRunId>, + active_projection_target: Option<&ProviderProjectionTarget>, + snapshots: &[QueuedProviderRunSnapshot], +) -> Result<(), String> { + let mut run_ids = HashSet::with_capacity(snapshots.len()); + let mut projection_targets = Vec::with_capacity(snapshots.len()); + for snapshot in snapshots { + if snapshot.run_id.as_str().is_empty() { + return Err("queued provider run ID must not be empty".to_string()); + } + if active_run_id.is_some_and(|run_id| run_id == &snapshot.run_id) { + return Err("queued provider run reuses active generation run ID".to_string()); + } + if !run_ids.insert(snapshot.run_id.clone()) { + return Err("duplicate queued provider run ID".to_string()); + } + if active_projection_target.is_some_and(|target| target == &snapshot.projection_target) { + return Err( + "queued provider run reuses active generation projection target".to_string(), + ); + } + if projection_targets.contains(&snapshot.projection_target) { + return Err("duplicate queued provider projection target".to_string()); + } + projection_targets.push(snapshot.projection_target.clone()); + } + Ok(()) +} + #[derive(Clone)] struct ActiveProviderRunCheckpoint { run: ProviderRun, @@ -1703,6 +1733,8 @@ pub struct BlocklistAIController { active_provider_runs: HashMap, queued_provider_runs: HashMap>, restoring_provider_runs: HashSet, + restoring_provider_command_completions: + HashMap, /// The ID of the terminal surface this controller is associated with. terminal_surface_id: EntityId, @@ -2193,6 +2225,7 @@ impl BlocklistAIController { active_provider_runs: HashMap::new(), queued_provider_runs: HashMap::new(), restoring_provider_runs: HashSet::new(), + restoring_provider_command_completions: HashMap::new(), terminal_surface_id, should_refresh_available_llms_on_stream_finish: false, shared_session_state: shared_session::SharedSessionState::default(),