File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -411,4 +411,23 @@ mod tests {
411411 assert ! ( ToolResolver :: is_allowed( & fixture, & ToolName :: new( "write" ) ) ) ;
412412 assert ! ( ToolResolver :: is_allowed( & fixture, & ToolName :: new( "Write" ) ) ) ;
413413 }
414+
415+ #[ test]
416+ fn test_capitalized_task_alias ( ) {
417+ // Test that capitalized "Task" resolves to "task"
418+ let all_tool_definitions = vec ! [ ToolDefinition :: new( "task" ) . description( "Task Tool" ) ] ;
419+
420+ let _tool_resolver = ToolResolver :: new ( all_tool_definitions) ;
421+
422+ let fixture = Agent :: new (
423+ AgentId :: new ( "test-agent" ) ,
424+ ProviderId :: ANTHROPIC ,
425+ ModelId :: new ( "claude-3-5-sonnet-20241022" ) ,
426+ )
427+ . tools ( vec ! [ ToolName :: new( "task" ) ] ) ;
428+
429+ // Both lowercase and capitalized should be allowed
430+ assert ! ( ToolResolver :: is_allowed( & fixture, & ToolName :: new( "task" ) ) ) ;
431+ assert ! ( ToolResolver :: is_allowed( & fixture, & ToolName :: new( "Task" ) ) ) ;
432+ }
414433}
You can’t perform that action at this time.
0 commit comments