Skip to content

Commit 131e48a

Browse files
committed
codex: fix rebased remote auth plumbing (#14853)
1 parent 472c507 commit 131e48a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

codex-rs/tui_app_server/src/app.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,7 @@ pub(crate) struct App {
958958
pub(crate) feedback: codex_feedback::CodexFeedback,
959959
feedback_audience: FeedbackAudience,
960960
remote_app_server_url: Option<String>,
961+
remote_app_server_auth_token: Option<String>,
961962
/// Set when the user confirms an update; propagated on exit.
962963
pub(crate) pending_update_action: Option<UpdateAction>,
963964

@@ -3115,6 +3116,7 @@ impl App {
31153116
is_first_run: bool,
31163117
should_prompt_windows_sandbox_nux_at_startup: bool,
31173118
remote_app_server_url: Option<String>,
3119+
remote_app_server_auth_token: Option<String>,
31183120
) -> Result<AppExitInfo> {
31193121
use tokio_stream::StreamExt;
31203122
let (app_event_tx, mut app_event_rx) = unbounded_channel();
@@ -3326,6 +3328,7 @@ impl App {
33263328
feedback: feedback.clone(),
33273329
feedback_audience,
33283330
remote_app_server_url,
3331+
remote_app_server_auth_token,
33293332
pending_update_action: None,
33303333
pending_shutdown_exit_thread_id: None,
33313334
windows_sandbox: WindowsSandboxState::default(),
@@ -3574,7 +3577,10 @@ impl App {
35743577
let picker_app_server = match crate::start_app_server_for_picker(
35753578
&self.config,
35763579
&match self.remote_app_server_url.clone() {
3577-
Some(websocket_url) => crate::AppServerTarget::Remote(websocket_url),
3580+
Some(websocket_url) => crate::AppServerTarget::Remote {
3581+
websocket_url,
3582+
auth_token: self.remote_app_server_auth_token.clone(),
3583+
},
35783584
None => crate::AppServerTarget::Embedded,
35793585
},
35803586
)
@@ -8082,6 +8088,7 @@ guardian_approval = true
80828088
feedback: codex_feedback::CodexFeedback::new(),
80838089
feedback_audience: FeedbackAudience::External,
80848090
remote_app_server_url: None,
8091+
remote_app_server_auth_token: None,
80858092
pending_update_action: None,
80868093
pending_shutdown_exit_thread_id: None,
80878094
windows_sandbox: WindowsSandboxState::default(),
@@ -8134,6 +8141,7 @@ guardian_approval = true
81348141
feedback: codex_feedback::CodexFeedback::new(),
81358142
feedback_audience: FeedbackAudience::External,
81368143
remote_app_server_url: None,
8144+
remote_app_server_auth_token: None,
81378145
pending_update_action: None,
81388146
pending_shutdown_exit_thread_id: None,
81398147
windows_sandbox: WindowsSandboxState::default(),

codex-rs/tui_app_server/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ pub async fn run_main(
940940
cloud_requirements,
941941
feedback,
942942
remote_url,
943+
remote_auth_token,
943944
)
944945
.await
945946
.map_err(|err| std::io::Error::other(err.to_string()))
@@ -957,8 +958,9 @@ async fn run_ratatui_app(
957958
mut cloud_requirements: CloudRequirementsLoader,
958959
feedback: codex_feedback::CodexFeedback,
959960
remote_url: Option<String>,
961+
remote_auth_token: Option<String>,
960962
) -> color_eyre::Result<AppExitInfo> {
961-
let remote_mode = matches!(&app_server_target, AppServerTarget::Remote(_));
963+
let remote_mode = matches!(&app_server_target, AppServerTarget::Remote { .. });
962964
color_eyre::install()?;
963965

964966
tooltips::announcement::prewarm();
@@ -1362,6 +1364,7 @@ async fn run_ratatui_app(
13621364
should_show_trust_screen, // Proxy to: is it a first run in this directory?
13631365
should_prompt_windows_sandbox_nux_at_startup,
13641366
remote_url,
1367+
remote_auth_token,
13651368
)
13661369
.await;
13671370

0 commit comments

Comments
 (0)