mirror of
https://github.com/openai/codex.git
synced 2026-12-05 01:00:54 +00:00
## What changed - Render a rotating Codex logo in unused space above the composer on fresh conversations, without moving content or the cursor. - Fade and pause the logo while drafting or unfocused, hide it on alternate views, and dismiss it after submission or conversation activity. Respect disabled animations and stop after three rotations with a fade out. - Replace the onboarding ASCII frame variants with the shared logo renderer, retaining a faded logo after the animation ends and allowing the existing shortcut to replay it. ## Testing Add rendering and integration tests for logo placement, visibility, pause/resume timing, completion, and preservation of the draft, cursor, header, and footer. Add snapshots for fresh conversations and the onboarding welcome layout. GitOrigin-RevId: b98c7dd10acea3ef25d6c1495ed22c24202d6280
38 lines
1.3 KiB
Rust
38 lines
1.3 KiB
Rust
//! Gate decoration on startup-only live content and an ordinary, locally editable composer.
|
|
//! Content eligibility is latched off independently of temporary view ownership.
|
|
|
|
use super::*;
|
|
use crate::empty_state_animation::ComposerState;
|
|
use crate::empty_state_animation::is_startup_cell;
|
|
|
|
impl ChatWidget {
|
|
pub(crate) fn empty_state_composer(&self) -> Option<ComposerState> {
|
|
let startup_only = self
|
|
.transcript
|
|
.active_cell
|
|
.as_deref()
|
|
.into_iter()
|
|
.chain(
|
|
self.realtime_conversation
|
|
.pending_history_cells
|
|
.iter()
|
|
.chain(self.realtime_conversation.live_transcript_cells())
|
|
.map(AsRef::as_ref),
|
|
)
|
|
.all(is_startup_cell);
|
|
if !startup_only
|
|
|| self.is_user_turn_pending_or_running()
|
|
|| self.initial_user_message.is_some()
|
|
{
|
|
self.empty_state_animation.borrow_mut().dismiss();
|
|
}
|
|
match self.external_editor_state {
|
|
ExternalEditorState::Requested | ExternalEditorState::Active => None,
|
|
ExternalEditorState::Closed if !self.external_writer_view => {
|
|
self.bottom_pane.empty_state_composer()
|
|
}
|
|
ExternalEditorState::Closed => None,
|
|
}
|
|
}
|
|
}
|