mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Show the server's model provider ID in TUI status (#43359)
## Why The TUI's local provider configuration can differ from the active thread's provider, causing `/status` to show misleading provider details. ## What changed - Use the server-provided model provider ID in `/status` and update it when attaching to a thread. - Omit the provider row until a thread is configured, and display IDs such as `openai` instead of provider names and base URLs. - Remove runtime provider URL resolution from TUI startup and the associated widget state. ## Testing Add regression coverage for provider display before session configuration, thread switching, and server settings updates. Update status snapshots to show server provider IDs while preserving usage-link behavior based on the server's authentication requirement. GitOrigin-RevId: 87214b4fd971f63835e382557969e4fc3b602745
This commit is contained in:
1 parent
0e9589ffae
commit
21bd5d3cdc
22 files changed
+87
-134
No files matched your search
@@ -5,8 +5,7 @@ use pretty_assertions::assert_eq;
|
||||
async fn external_writer_view_quits_with_escape_ctrl_c_or_q() -> Result<()> {
|
||||
let (mut app, mut events, _operations) = make_test_app_with_channels().await;
|
||||
app.chat_widget.show_external_writer_thread();
|
||||
let mut app_server =
|
||||
crate::start_embedded_app_server_for_picker(app.chat_widget.config_ref()).await?;
|
||||
let mut app_server = crate::start_embedded_app_server_for_picker(&app.config).await?;
|
||||
let mut tui = crate::tui::test_support::make_test_tui()?;
|
||||
while events.try_recv().is_ok() {}
|
||||
|
||||
@@ -59,8 +58,7 @@ async fn external_writer_view_preserves_draft_from_keys_and_paste() -> Result<()
|
||||
app.ensure_thread_channel(thread_id).mark_external_writer();
|
||||
app.chat_widget.insert_str("Retained draft");
|
||||
app.chat_widget.show_external_writer_thread();
|
||||
let mut app_server =
|
||||
crate::start_embedded_app_server_for_picker(app.chat_widget.config_ref()).await?;
|
||||
let mut app_server = crate::start_embedded_app_server_for_picker(&app.config).await?;
|
||||
let mut tui = crate::tui::test_support::make_test_tui()?;
|
||||
|
||||
for offline in [false, true] {
|
||||
@@ -208,8 +206,7 @@ async fn prepare_background_exit_test(
|
||||
) -> Result<(AppServerSession, tui::Tui)> {
|
||||
while app_event_rx.try_recv().is_ok() {}
|
||||
while op_rx.try_recv().is_ok() {}
|
||||
let app_server =
|
||||
crate::start_embedded_app_server_for_picker(app.chat_widget.config_ref()).await?;
|
||||
let app_server = crate::start_embedded_app_server_for_picker(&app.config).await?;
|
||||
Ok((app_server, crate::tui::test_support::make_test_tui()?))
|
||||
}
|
||||
|
||||
@@ -313,9 +310,7 @@ async fn exit_interrupts_before_requesting_shutdown() -> Result<()> {
|
||||
.set_feature_enabled(Feature::Goals, /*enabled*/ true);
|
||||
let (mut app_server, mut tui) =
|
||||
prepare_background_exit_test(&app, &mut app_event_rx, &mut op_rx).await?;
|
||||
let started = app_server
|
||||
.start_thread(app.chat_widget.config_ref())
|
||||
.await?;
|
||||
let started = app_server.start_thread(&app.config).await?;
|
||||
let thread_id = started.session.thread_id;
|
||||
app.active_thread_id = Some(thread_id);
|
||||
app.chat_widget
|
||||
@@ -413,9 +408,7 @@ async fn daemon_ctrl_c_closes_running_side_thread_and_returns_to_parent() -> Res
|
||||
let side_thread_id = prepare_running_local_daemon(&mut app)?;
|
||||
let (mut app_server, mut tui) =
|
||||
prepare_background_exit_test(&app, &mut app_event_rx, &mut op_rx).await?;
|
||||
let started = app_server
|
||||
.start_thread(app.chat_widget.config_ref())
|
||||
.await?;
|
||||
let started = app_server.start_thread(&app.config).await?;
|
||||
let parent_thread_id = started.session.thread_id;
|
||||
app.primary_thread_id = Some(parent_thread_id);
|
||||
app.side_threads
|
||||
|
||||
Reference in new issue
Block a user