Fix marketplace config test and argument lint

This commit is contained in:
Joe Gershenson
2026-04-15 13:21:39 -07:00
parent d61d3136a6
commit 6a3962f749
2 changed files with 15 additions and 3 deletions
@@ -10,7 +10,13 @@ pub fn create_shell_command_sse_response(
) -> anyhow::Result<String> {
// The `arguments` for the `shell_command` tool is a serialized JSON object.
let command_str = shlex::try_join(command.iter().map(String::as_str))?;
create_shell_command_sse_response_from_command(&command_str, workdir, timeout_ms, call_id, None)
create_shell_command_sse_response_from_command(
&command_str,
workdir,
timeout_ms,
call_id,
/*login*/ None,
)
}
pub fn create_shell_command_sse_response_from_command(
+8 -2
View File
@@ -276,12 +276,18 @@ mod tests {
let config = fs::read_to_string(codex_home.path().join(codex_config::CONFIG_TOML_FILE))?;
let config: toml::Value = toml::from_str(&config)?;
let marketplace = config
.get("marketplaces")
.and_then(toml::Value::as_table)
.and_then(|marketplaces| marketplaces.get("debug"))
.and_then(toml::Value::as_table)
.expect("debug marketplace should be present in config");
assert_eq!(
config["marketplaces"]["debug"]["source_type"].as_str(),
marketplace.get("source_type").and_then(toml::Value::as_str),
Some("local")
);
assert_eq!(
config["marketplaces"]["debug"]["source"].as_str(),
marketplace.get("source").and_then(toml::Value::as_str),
Some(expected_source.as_str())
);
Ok(())