Show session header before configuration (#9568)

We were skipping if we know the model. We shouldn't
This commit is contained in:
Ahmed Ibrahim
2026-01-21 02:13:54 +00:00
committed by GitHub
parent ac2090caf2
commit 3a0eeb8edf
7 changed files with 183 additions and 44 deletions
+6 -12
View File
@@ -1807,9 +1807,7 @@ impl ChatWidget {
let placeholder = PLACEHOLDERS[rng.random_range(0..PLACEHOLDERS.len())].to_string();
let codex_op_tx = spawn_agent(config.clone(), app_event_tx.clone(), thread_manager);
let model_for_header = model
.clone()
.unwrap_or_else(|| DEFAULT_MODEL_DISPLAY_NAME.to_string());
let model_for_header = model.unwrap_or_else(|| DEFAULT_MODEL_DISPLAY_NAME.to_string());
let stored_collaboration_mode = if config.features.enabled(Feature::CollaborationModes) {
collaboration_modes::default_mode(models_manager.as_ref()).unwrap_or_else(|| {
CollaborationMode::Custom(Settings {
@@ -1826,15 +1824,11 @@ impl ChatWidget {
})
};
let active_cell = if model.is_none() {
Some(Self::placeholder_session_header_cell(
&config,
config.features.enabled(Feature::CollaborationModes),
stored_collaboration_mode.clone(),
))
} else {
None
};
let active_cell = Some(Self::placeholder_session_header_cell(
&config,
config.features.enabled(Feature::CollaborationModes),
stored_collaboration_mode.clone(),
));
let mut widget = Self {
app_event_tx: app_event_tx.clone(),
+3 -1
View File
@@ -1123,7 +1123,9 @@ impl HistoryCell for SessionHeaderHistoryCell {
label_width = label_width
);
let mut spans = vec![Span::from(format!("{collab_label} ")).dim()];
if let Some(mode_label) = self.collaboration_mode_label() {
if self.model == "loading" {
spans.push(Span::styled(self.model.clone(), self.model_style));
} else if let Some(mode_label) = self.collaboration_mode_label() {
spans.push(Span::styled(mode_label.to_string(), self.model_style));
} else {
spans.push(Span::styled("Custom", self.model_style));