mirror of
https://github.com/openai/codex.git
synced 2026-04-28 16:45:54 +00:00
fix(windows) shell_command on windows, minor parsing (#6811)
## Summary Enables shell_command for windows users, and starts adding some basic command parsing here, to at least remove powershell prefixes. We'll follow this up with command parsing but I wanted to land this change separately with some basic UX. **NOTE**: This implementation parses bash and powershell on both platforms. In theory this is possible, since you can use git bash on windows or powershell on linux. In practice, this may not be worth the complexity of supporting, so I don't feel strongly about the current approach vs. platform-specific branching. ## Testing - [x] Added a bunch of tests - [x] Ran on both windows and os x
This commit is contained in:
@@ -119,7 +119,12 @@ async fn model_selects_expected_tools() {
|
||||
assert_eq!(
|
||||
gpt5_codex_tools,
|
||||
vec![
|
||||
"shell".to_string(),
|
||||
if cfg!(windows) {
|
||||
"shell_command"
|
||||
} else {
|
||||
"shell"
|
||||
}
|
||||
.to_string(),
|
||||
"list_mcp_resources".to_string(),
|
||||
"list_mcp_resource_templates".to_string(),
|
||||
"read_mcp_resource".to_string(),
|
||||
@@ -133,7 +138,12 @@ async fn model_selects_expected_tools() {
|
||||
assert_eq!(
|
||||
gpt51_codex_tools,
|
||||
vec![
|
||||
"shell".to_string(),
|
||||
if cfg!(windows) {
|
||||
"shell_command"
|
||||
} else {
|
||||
"shell"
|
||||
}
|
||||
.to_string(),
|
||||
"list_mcp_resources".to_string(),
|
||||
"list_mcp_resource_templates".to_string(),
|
||||
"read_mcp_resource".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user