mirror of
https://github.com/openai/codex.git
synced 2026-11-17 14:58:36 +00:00
fix(core): fix sanitize name to use '_' everywhere (#14833)
This commit is contained in:
1 parent
a0e41f4ff9
commit
663dd3f935
2 files changed
+7
-5
No files matched your search
@@ -1231,12 +1231,11 @@ fn normalize_codex_apps_tool_name(
|
||||
return tool_name.to_string();
|
||||
}
|
||||
|
||||
let tool_name = sanitize_name(tool_name).replace('-', "_");
|
||||
let tool_name = sanitize_name(tool_name);
|
||||
|
||||
if let Some(connector_name) = connector_name
|
||||
.map(str::trim)
|
||||
.map(sanitize_name)
|
||||
.map(|name| name.replace('-', "_"))
|
||||
.filter(|name| !name.is_empty())
|
||||
&& let Some(stripped) = tool_name.strip_prefix(&connector_name)
|
||||
&& !stripped.is_empty()
|
||||
@@ -1247,7 +1246,6 @@ fn normalize_codex_apps_tool_name(
|
||||
if let Some(connector_id) = connector_id
|
||||
.map(str::trim)
|
||||
.map(sanitize_name)
|
||||
.map(|name| name.replace('-', "_"))
|
||||
.filter(|name| !name.is_empty())
|
||||
&& let Some(stripped) = tool_name.strip_prefix(&connector_id)
|
||||
&& !stripped.is_empty()
|
||||
|
||||
Reference in new issue
Block a user