feat: 3 person review

This commit is contained in:
eric
2026-04-04 13:12:17 +02:00
parent d360a2b23c
commit 32147d4552
50 changed files with 2398 additions and 660 deletions

View File

@@ -28,6 +28,12 @@ use crate::model::{
use crate::ui::{self, scroll::VerticalScrollState, SessionRenderRow, SessionView, SidebarView};
pub(crate) const USAGE_REFRESH_INTERVAL: Duration = Duration::from_secs(120);
pub(crate) const CREATE_MODELS: [&str; 4] = [
"gpt-5.4",
"gpt-5.4-mini",
"gpt-5.3-codex",
"gpt-5.3-codex-spark",
];
#[derive(Debug, Clone)]
#[allow(clippy::large_enum_variant)]
@@ -86,6 +92,9 @@ pub struct App {
pub picker_items: Vec<crate::model::ControllerSummary>,
pub picker_selected: usize,
pub create_input: String,
pub create_model_index: usize,
pub create_fast_mode: bool,
pub create_allow_branching: bool,
pub create_error: Option<String>,
pub default_task_path: PathBuf,
pub(crate) frame_tick: u64,
@@ -100,6 +109,9 @@ impl App {
picker_items: Vec::new(),
picker_selected: 0,
create_input: String::new(),
create_model_index: 0,
create_fast_mode: false,
create_allow_branching: false,
create_error: None,
default_task_path: default_task_path.clone(),
frame_tick: 0,
@@ -144,7 +156,11 @@ impl App {
let workspace = self.workspace.as_ref()?;
Some(StatusSnapshot {
controller_id: workspace.task_config.controller_id(),
branch: workspace.task_config.branch.clone(),
branch: if workspace.state.allow_branching {
workspace.task_config.branch.clone()
} else {
"current".to_string()
},
started_at: workspace.state.started_at.clone(),
phase: workspace.state.phase.clone(),
iteration: workspace.state.iteration,
@@ -154,6 +170,25 @@ impl App {
})
}
pub(crate) fn create_model(&self) -> &'static str {
CREATE_MODELS
.get(self.create_model_index)
.copied()
.unwrap_or(CREATE_MODELS[0])
}
pub(crate) fn cycle_create_model(&mut self) {
self.create_model_index = (self.create_model_index + 1) % CREATE_MODELS.len();
}
pub(crate) fn reset_create_form(&mut self) {
self.create_input.clear();
self.create_model_index = 0;
self.create_fast_mode = false;
self.create_allow_branching = false;
self.create_error = None;
}
pub(crate) fn workspace(&self) -> Option<&WorkspaceRuntime> {
self.workspace.as_ref()
}