mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Remove TUI legacy core test_support dependencies (#27484)
## Why The TUI now sits on the app-server layer, but `app-server-client::legacy_core` still exposed core test helpers solely for TUI tests. We've been whittling away the remaining dependencies. This is the next step on that journey. There is no functional change — just a refactor, and this affects only test code, so it should be low risk. ## What changed - remove the `legacy_core::test_support` re-export and call model-manager test helpers directly - keep the bundled model-preset cache local to TUI test support - import constraint types directly from `codex-config`
This commit is contained in:
1 parent
1a9efd473b
commit
36fc79c6f4
13 files changed
+73
-51
No files matched your search
@@ -6,12 +6,14 @@
|
||||
|
||||
use super::*;
|
||||
use crate::chatwidget::tests::make_chatwidget_manual_with_sender;
|
||||
use codex_models_manager::test_support::construct_model_info_offline_for_tests;
|
||||
use codex_models_manager::test_support::get_model_offline_for_tests;
|
||||
|
||||
pub(super) async fn make_test_app() -> App {
|
||||
let (chat_widget, app_event_tx, _rx, _op_rx) = make_chatwidget_manual_with_sender().await;
|
||||
let config = chat_widget.config_ref().clone();
|
||||
let file_search = FileSearchManager::new(config.cwd.to_path_buf(), app_event_tx.clone());
|
||||
let model = crate::legacy_core::test_support::get_model_offline(config.model.as_deref());
|
||||
let model = get_model_offline_for_tests(config.model.as_deref());
|
||||
let session_telemetry = test_session_telemetry(&config, model.as_str());
|
||||
|
||||
App {
|
||||
@@ -68,7 +70,8 @@ pub(super) async fn make_test_app() -> App {
|
||||
}
|
||||
|
||||
fn test_session_telemetry(config: &Config, model: &str) -> SessionTelemetry {
|
||||
let model_info = crate::legacy_core::test_support::construct_model_info_offline(model, config);
|
||||
let model_info =
|
||||
construct_model_info_offline_for_tests(model, &config.to_models_manager_config());
|
||||
SessionTelemetry::new(
|
||||
ThreadId::new(),
|
||||
model,
|
||||
|
||||
Reference in new issue
Block a user