mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Refactor exec to use the shared app-server client (#61706)
## What changed - Use `AppServerClient` throughout exec and extract turn completion into `finish_turn`, including handling for server and thread-stream disconnections. - Move remote address parsing and auth-token resolution into `codex-app-server-client`, with re-exports from the TUI. - Allow human-readable exec output to be initialized without a local `Config`. ## Testing Move remote address and auth-token tests into `codex-app-server-client`, retaining coverage for WebSocket and Unix socket addresses, invalid addresses, and missing, empty, or whitespace-padded tokens. GitOrigin-RevId: 465b17a1c03392a7d4e7700d83ce67c2cf5ef021
This commit is contained in:
@@ -44,7 +44,7 @@ pub(crate) struct EventProcessorWithHumanOutput {
|
||||
impl EventProcessorWithHumanOutput {
|
||||
pub(crate) fn create_with_ansi(
|
||||
with_ansi: bool,
|
||||
config: &Config,
|
||||
config: Option<&Config>,
|
||||
last_message_path: Option<PathBuf>,
|
||||
) -> Self {
|
||||
let style = |styled: Style, plain: Style| if with_ansi { styled } else { plain };
|
||||
@@ -57,8 +57,8 @@ impl EventProcessorWithHumanOutput {
|
||||
magenta: style(Style::new().magenta(), Style::new()),
|
||||
red: style(Style::new().red(), Style::new()),
|
||||
yellow: style(Style::new().yellow(), Style::new()),
|
||||
show_agent_reasoning: !config.hide_agent_reasoning,
|
||||
show_raw_agent_reasoning: config.show_raw_agent_reasoning,
|
||||
show_agent_reasoning: config.is_none_or(|config| !config.hide_agent_reasoning),
|
||||
show_raw_agent_reasoning: config.is_some_and(|config| config.show_raw_agent_reasoning),
|
||||
last_message_path,
|
||||
final_message: None,
|
||||
final_message_rendered: false,
|
||||
|
||||
Reference in New Issue
Block a user