mirror of
https://github.com/openai/codex.git
synced 2026-05-04 05:11:37 +03:00
TUI: enforce core boundary (#17399)
Problem: The TUI still depended on `codex-core` directly in a number of places, and we had no enforcement from keeping this problem from getting worse. Solution: Route TUI core access through `codex-app-server-client::legacy_core`, add CI enforcement for that boundary, and re-export this legacy bridge inside the TUI as `crate::legacy_core` so the remaining call sites stay readable. There is no functional change in this PR — just changes to import targets. Over time, we can whittle away at the remaining symbols in this legacy namespace with the eventual goal of removing them all. In the meantime, this linter rule will prevent us from inadvertently importing new symbols from core.
This commit is contained in:
@@ -7,6 +7,15 @@ use std::sync::Arc;
|
||||
use crate::app_server_session::AppServerSession;
|
||||
use crate::diff_render::display_path_for;
|
||||
use crate::key_hint;
|
||||
use crate::legacy_core::Cursor;
|
||||
use crate::legacy_core::INTERACTIVE_SESSION_SOURCES;
|
||||
use crate::legacy_core::RolloutRecorder;
|
||||
use crate::legacy_core::ThreadItem;
|
||||
use crate::legacy_core::ThreadSortKey;
|
||||
use crate::legacy_core::ThreadsPage;
|
||||
use crate::legacy_core::config::Config;
|
||||
use crate::legacy_core::find_thread_names_by_ids;
|
||||
use crate::legacy_core::path_utils;
|
||||
use crate::text_formatting::truncate_text;
|
||||
use crate::tui::FrameRequester;
|
||||
use crate::tui::Tui;
|
||||
@@ -17,15 +26,6 @@ use codex_app_server_protocol::Thread;
|
||||
use codex_app_server_protocol::ThreadListParams;
|
||||
use codex_app_server_protocol::ThreadSortKey as AppServerThreadSortKey;
|
||||
use codex_app_server_protocol::ThreadSourceKind;
|
||||
use codex_core::Cursor;
|
||||
use codex_core::INTERACTIVE_SESSION_SOURCES;
|
||||
use codex_core::RolloutRecorder;
|
||||
use codex_core::ThreadItem;
|
||||
use codex_core::ThreadSortKey;
|
||||
use codex_core::ThreadsPage;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::find_thread_names_by_ids;
|
||||
use codex_core::path_utils;
|
||||
use codex_protocol::ThreadId;
|
||||
use color_eyre::eyre::Result;
|
||||
use crossterm::event::KeyCode;
|
||||
|
||||
Reference in New Issue
Block a user