Skip to content
Merged
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
1 change: 1 addition & 0 deletions apps/desktop/src-tauri/permissions/main-window.toml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ commands.allow = [
"notify_set_labels",
"open_detached_window",
"open_session_window",
"open_state_last_closure",
"optimization_get_file_cache",
"optimization_get_status",
"optimization_refresh_context",
Expand Down
12 changes: 11 additions & 1 deletion apps/desktop/src-tauri/src/commands/agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ use crate::commands::session::{SessionManager, SessionSummary};
pub struct AgentsMeta {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub lead_id: Option<String>,
/// Stable identity (`role|title`) of the chosen lead. A sub-agent's id
/// changes on every respawn (restart, wake from standby): without this the
/// lead preference was lost and fell back to the first pane.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub lead_key: Option<String>,
#[serde(default)]
pub order: Vec<String>,
#[serde(default)]
Expand Down Expand Up @@ -177,8 +182,13 @@ pub fn agents_set_lead(
manager: tauri::State<'_, Arc<SessionManager>>,
session_id: String,
lead_id: Option<String>,
lead_key: Option<String>,
) -> AgentsMeta {
let meta = update(&manager, &session_id, |m| m.lead_id = lead_id);
let meta = update(&manager, &session_id, |m| {
// With no chosen lead, no identity is left dangling.
m.lead_key = lead_id.as_ref().and(lead_key);
m.lead_id = lead_id;
});
emit_changed(&app, &session_id, &meta);
meta
}
Expand Down
5 changes: 3 additions & 2 deletions apps/desktop/src-tauri/src/commands/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2741,8 +2741,9 @@ fn resolve_pricing(provider: &str, model_hint: Option<&str>) -> ModelPricing {
// Claude 5 family before legacy: matching is by substring, in order.
// opus-5 first = default_model.
("opus-5", "Claude Opus 5", 5.0, 25.0, 0.5, 6.25),
("opus-5-5", "Claude Opus 5.5", 5.0, 25.0, 0.5, 6.25),
// fable-5-1 before fable-5: matching is by substring, in order.
("opus-5-5", "Claude Opus 5.5", 4.0, 20.0, 0.2, 5.0),
// The match picks the longest key contained in the id (fable-5-2 beats fable-5).
("fable-5-2", "Claude Fable 5.2", 8.0, 40.0, 0.2, 10.0),
("fable-5-1", "Claude Fable 5.1", 10.0, 50.0, 1.0, 12.5),
("fable-5", "Claude Fable 5", 10.0, 50.0, 1.0, 12.5),
("mythos-5", "Claude Mythos 5", 10.0, 50.0, 1.0, 12.5),
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src-tauri/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub mod metrics;
pub mod notify;
#[cfg(target_os = "macos")]
pub mod notify_macos;
pub mod open_state;
pub mod output_watchers;
pub mod ports;
pub mod profile;
Expand Down
Loading
Loading