mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
codex: address PR review feedback (#15181)
This commit is contained in:
@@ -6370,7 +6370,21 @@ pub(crate) async fn built_tools(
|
||||
accessible_connectors.as_slice(),
|
||||
)
|
||||
.await
|
||||
{
|
||||
.map(|discoverable_tools| {
|
||||
if turn_context.app_server_client_name.as_deref() != Some("codex-tui") {
|
||||
return discoverable_tools;
|
||||
}
|
||||
|
||||
discoverable_tools
|
||||
.into_iter()
|
||||
.filter(|tool| {
|
||||
!matches!(
|
||||
tool,
|
||||
crate::tools::discoverable::DiscoverableTool::Plugin(_)
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
}) {
|
||||
Ok(discoverable_tools) if discoverable_tools.is_empty() => None,
|
||||
Ok(discoverable_tools) => Some(discoverable_tools),
|
||||
Err(err) => {
|
||||
|
||||
@@ -115,6 +115,16 @@ impl ToolHandler for ToolSuggestHandler {
|
||||
&accessible_connectors,
|
||||
)
|
||||
.await
|
||||
.map(|discoverable_tools| {
|
||||
if turn.app_server_client_name.as_deref() != Some("codex-tui") {
|
||||
return discoverable_tools;
|
||||
}
|
||||
|
||||
discoverable_tools
|
||||
.into_iter()
|
||||
.filter(|tool| !matches!(tool, DiscoverableTool::Plugin(_)))
|
||||
.collect()
|
||||
})
|
||||
.map_err(|err| {
|
||||
FunctionCallError::RespondToModel(format!(
|
||||
"tool suggestions are unavailable right now: {err}"
|
||||
|
||||
Reference in New Issue
Block a user