mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
Merge commit 'b122ecfc6b6dd9784300ebde39fe0b9edc22dd7f' into dev/friel/collab-stack
# Conflicts: # codex-rs/core/src/tools/handlers/multi_agents/spawn.rs # codex-rs/core/src/tools/spec.rs # codex-rs/core/src/tools/spec_tests.rs # codex-rs/core/subagent_watchdog_prompt.md # codex-rs/core/watchdog_agent_prompt.md # codex-rs/tui/src/chatwidget/tests.rs
This commit is contained in:
@@ -9,6 +9,7 @@ use crate::JsonSchema;
|
||||
use crate::ResponsesApiNamespace;
|
||||
use crate::ResponsesApiTool;
|
||||
use crate::create_tools_json_for_responses_api;
|
||||
use crate::create_watchdog_self_close_tool;
|
||||
use codex_protocol::config_types::WebSearchContextSize;
|
||||
use codex_protocol::config_types::WebSearchFilters as ConfigWebSearchFilters;
|
||||
use codex_protocol::config_types::WebSearchUserLocation as ConfigWebSearchUserLocation;
|
||||
@@ -123,6 +124,32 @@ fn configured_tool_spec_name_delegates_to_tool_spec() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn watchdog_self_close_tool_spec_is_deferred_and_parameterless() {
|
||||
let ToolSpec::Function(ResponsesApiTool {
|
||||
name,
|
||||
defer_loading,
|
||||
parameters,
|
||||
output_schema,
|
||||
..
|
||||
}) = create_watchdog_self_close_tool()
|
||||
else {
|
||||
panic!("watchdog_self_close should be a function tool");
|
||||
};
|
||||
|
||||
assert_eq!(name, "watchdog_self_close");
|
||||
assert_eq!(defer_loading, Some(true));
|
||||
assert_eq!(
|
||||
parameters,
|
||||
JsonSchema::Object {
|
||||
properties: BTreeMap::new(),
|
||||
required: None,
|
||||
additional_properties: Some(AdditionalProperties::Boolean(false)),
|
||||
}
|
||||
);
|
||||
assert!(output_schema.is_some());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn web_search_config_converts_to_responses_api_types() {
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user