mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex] remove responses command (#19640)
This removes the hidden `codex responses` CLI subcommand after confirming no downstream callers rely on it, deleting the raw Responses passthrough implementation, unregistering the subcommand, and dropping the now-unused CLI dependencies on `codex-api` and `codex-model-provider`.
This commit is contained in:
committed by
GitHub
Unverified
parent
355c40ad7e
commit
87bc72408c
@@ -43,14 +43,11 @@ mod app_cmd;
|
||||
mod desktop_app;
|
||||
mod marketplace_cmd;
|
||||
mod mcp_cmd;
|
||||
mod responses_cmd;
|
||||
#[cfg(not(windows))]
|
||||
mod wsl_paths;
|
||||
|
||||
use crate::marketplace_cmd::MarketplaceCli;
|
||||
use crate::mcp_cmd::McpCli;
|
||||
use crate::responses_cmd::ResponsesCommand;
|
||||
use crate::responses_cmd::run_responses_command;
|
||||
|
||||
use codex_core::build_models_manager;
|
||||
use codex_core::clear_memory_roots_contents;
|
||||
@@ -163,10 +160,6 @@ enum Subcommand {
|
||||
#[clap(hide = true)]
|
||||
ResponsesApiProxy(ResponsesApiProxyArgs),
|
||||
|
||||
/// Internal: send one raw Responses API payload through Codex auth.
|
||||
#[clap(hide = true)]
|
||||
Responses(ResponsesCommand),
|
||||
|
||||
/// Internal: relay stdio to a Unix domain socket.
|
||||
#[clap(hide = true, name = "stdio-to-uds")]
|
||||
StdioToUds(StdioToUdsCommand),
|
||||
@@ -1130,14 +1123,6 @@ async fn cli_main(arg0_paths: Arg0DispatchPaths) -> anyhow::Result<()> {
|
||||
tokio::task::spawn_blocking(move || codex_responses_api_proxy::run_main(args))
|
||||
.await??;
|
||||
}
|
||||
Some(Subcommand::Responses(ResponsesCommand {})) => {
|
||||
reject_remote_mode_for_subcommand(
|
||||
root_remote.as_deref(),
|
||||
root_remote_auth_token_env.as_deref(),
|
||||
"responses",
|
||||
)?;
|
||||
run_responses_command(root_config_overrides).await?;
|
||||
}
|
||||
Some(Subcommand::StdioToUds(cmd)) => {
|
||||
reject_remote_mode_for_subcommand(
|
||||
root_remote.as_deref(),
|
||||
@@ -1837,12 +1822,13 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn responses_subcommand_is_hidden_from_help_but_parses() {
|
||||
let help = MultitoolCli::command().render_help().to_string();
|
||||
assert!(!help.contains("responses"));
|
||||
|
||||
let cli = MultitoolCli::try_parse_from(["codex", "responses"]).expect("parse");
|
||||
assert!(matches!(cli.subcommand, Some(Subcommand::Responses(_))));
|
||||
fn responses_subcommand_is_not_registered() {
|
||||
let command = MultitoolCli::command();
|
||||
assert!(
|
||||
command
|
||||
.get_subcommands()
|
||||
.all(|subcommand| subcommand.get_name() != "responses")
|
||||
);
|
||||
}
|
||||
|
||||
fn help_from_args(args: &[&str]) -> String {
|
||||
|
||||
Reference in New Issue
Block a user