Migrate GitWarning to OnboardingScreen (#1915)

This paves the way to do per-directory approval settings
(https://github.com/openai/codex/pull/1912).

This also lets us pass in a Config/ChatWidgetArgs into onboarding which
can then mutate it and emit the ChatWidgetArgs it wants at the end which
may be modified by the said approval settings.

<img width="1180" height="428" alt="CleanShot 2025-08-06 at 19 30 55"
src="https://github.com/user-attachments/assets/4dcfda42-0f5e-4b6d-a16d-2597109cc31c"
/>
This commit is contained in:
Gabriel Peal
2025-08-06 19:39:07 -07:00
committed by GitHub
parent a5e17cda6b
commit 8a990b5401
13 changed files with 443 additions and 318 deletions

View File

@@ -3,6 +3,7 @@ use codex_file_search::FileMatch;
use crossterm::event::KeyEvent;
use ratatui::text::Line;
use crate::app::ChatWidgetArgs;
use crate::slash_command::SlashCommand;
#[allow(clippy::large_enum_variant)]
@@ -51,4 +52,5 @@ pub(crate) enum AppEvent {
/// Onboarding: result of login_with_chatgpt.
OnboardingAuthComplete(Result<(), String>),
OnboardingComplete(ChatWidgetArgs),
}