@@ -988,13 +988,29 @@ Do not use escape characters \\ in the string like \\n or \\" and others. Do not
988988 language : z . string ( ) . optional ( ) . describe ( 'Limit search to files of a specific programming language' ) ,
989989 } ) ,
990990 execute : async ( input , { toolCallId } ) => {
991- const { query : searchQuery , path : inputPath , allowTests, exact, maxTokens : paramMaxTokens , language } = input ;
992- task . addToolMessage ( toolCallId , TOOL_GROUP_NAME , TOOL_SEMANTIC_SEARCH , { searchQuery, path : inputPath } , undefined , undefined , promptContext ) ;
991+ const { query : searchQuery , path : inputPath , allowTests, exact, maxResults : paramMaxResults , maxTokens : paramMaxTokens , language } = input ;
992+ task . addToolMessage (
993+ toolCallId ,
994+ TOOL_GROUP_NAME ,
995+ TOOL_SEMANTIC_SEARCH ,
996+ {
997+ query : searchQuery ,
998+ path : inputPath ,
999+ allowTests,
1000+ exact,
1001+ maxResults : paramMaxResults ,
1002+ maxTokens : paramMaxTokens ,
1003+ language,
1004+ } ,
1005+ undefined ,
1006+ undefined ,
1007+ promptContext ,
1008+ ) ;
9931009
9941010 const toolName = `${ TOOL_GROUP_NAME } ${ TOOL_GROUP_NAME_SEPARATOR } ${ TOOL_SEMANTIC_SEARCH } ` ;
9951011 const questionKey = toolName ;
9961012 const questionText = 'Approve running codebase search?' ;
997- const questionSubject = `Query: ${ searchQuery } \nPath: ${ inputPath || '.' } \nAllow Tests: ${ allowTests } \nExact: ${ exact } \nLanguage: ${ language } ` ;
1013+ const questionSubject = `Query: ${ searchQuery } \nPath: ${ inputPath || '.' } \nAllow Tests: ${ allowTests } \nExact: ${ exact } \nMax Results: ${ paramMaxResults ?? 'default' } \nMax Tokens: ${ paramMaxTokens } \ nLanguage: ${ language || 'all' } ` ;
9981014
9991015 const [ isApproved , userInput ] = await approvalManager . handleToolApproval ( toolName , input , questionKey , questionText , questionSubject ) ;
10001016
@@ -1040,6 +1056,13 @@ Do not use escape characters \\ in the string like \\n or \\" and others. Do not
10401056 'rb' ,
10411057 'php' ,
10421058 'swift' ,
1059+ 'solidity' ,
1060+ 'sol' ,
1061+ 'crystal' ,
1062+ 'cr' ,
1063+ 'haskell' ,
1064+ 'hs' ,
1065+ 'lhs' ,
10431066 'csharp' ,
10441067 'cs' ,
10451068 'yaml' ,
@@ -1058,6 +1081,7 @@ Do not use escape characters \\ in the string like \\n or \\" and others. Do not
10581081 timeout : 5 * 60 , // 5 minutes
10591082 json : false ,
10601083 maxTokens : effectiveMaxTokens ,
1084+ maxResults : paramMaxResults ,
10611085 language : effectiveLanguage ,
10621086 } ) ;
10631087
0 commit comments