mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[mcp] Add dummy tools for previously called but currently missing tools. (#17853)
- [x] Add dummy tools for previously called but currently missing tools. Currently supporting MCP tools only.
This commit is contained in:
@@ -146,6 +146,8 @@ pub enum Feature {
|
||||
Apps,
|
||||
/// Enable the tool_search tool for apps.
|
||||
ToolSearch,
|
||||
/// Expose placeholder tools for unavailable historical tool calls.
|
||||
UnavailableDummyTools,
|
||||
/// Enable discoverable tool suggestions for apps.
|
||||
ToolSuggest,
|
||||
/// Enable plugins.
|
||||
@@ -789,6 +791,12 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
stage: Stage::UnderDevelopment,
|
||||
default_enabled: false,
|
||||
},
|
||||
FeatureSpec {
|
||||
id: Feature::UnavailableDummyTools,
|
||||
key: "unavailable_dummy_tools",
|
||||
stage: Stage::UnderDevelopment,
|
||||
default_enabled: false,
|
||||
},
|
||||
FeatureSpec {
|
||||
id: Feature::ToolSuggest,
|
||||
key: "tool_suggest",
|
||||
|
||||
@@ -133,6 +133,15 @@ fn tool_search_is_under_development_and_disabled_by_default() {
|
||||
assert_eq!(Feature::ToolSearch.default_enabled(), false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unavailable_dummy_tools_is_under_development_and_disabled_by_default() {
|
||||
assert_eq!(
|
||||
Feature::UnavailableDummyTools.stage(),
|
||||
Stage::UnderDevelopment
|
||||
);
|
||||
assert_eq!(Feature::UnavailableDummyTools.default_enabled(), false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn general_analytics_is_stable_and_enabled_by_default() {
|
||||
assert_eq!(Feature::GeneralAnalytics.stage(), Stage::Stable);
|
||||
|
||||
Reference in New Issue
Block a user