@@ -2,8 +2,10 @@ import type { ComposioMetaToolName } from '@codebuff/common/constants/composio'
22import type { CodebuffToolOutput } from '@codebuff/common/tools/list'
33import type { CodebuffToolHandlerFunction } from '../handler-function-type'
44
5- function makeComposioHandler < T extends ComposioMetaToolName > ( ) {
6- return ( async ( { toolCall, requestClientToolCall } ) => {
5+ function makeComposioHandler <
6+ T extends ComposioMetaToolName ,
7+ > ( ) : CodebuffToolHandlerFunction < T > {
8+ return async ( { toolCall, requestClientToolCall } ) => {
79 if ( ! requestClientToolCall ) {
810 return {
911 output : [
@@ -22,14 +24,14 @@ function makeComposioHandler<T extends ComposioMetaToolName>() {
2224 toolCall ,
2325 ) ) as CodebuffToolOutput < T > ,
2426 }
25- } ) satisfies CodebuffToolHandlerFunction < T >
27+ }
2628}
2729
28- export const handleComposioManageConnections =
30+ export const handleComposioManageConnections : CodebuffToolHandlerFunction < 'COMPOSIO_MANAGE_CONNECTIONS' > =
2931 makeComposioHandler < 'COMPOSIO_MANAGE_CONNECTIONS' > ( )
30- export const handleComposioMultiExecute =
32+ export const handleComposioMultiExecute : CodebuffToolHandlerFunction < 'COMPOSIO_MULTI_EXECUTE_TOOL' > =
3133 makeComposioHandler < 'COMPOSIO_MULTI_EXECUTE_TOOL' > ( )
32- export const handleComposioSearchTools =
34+ export const handleComposioSearchTools : CodebuffToolHandlerFunction < 'COMPOSIO_SEARCH_TOOLS' > =
3335 makeComposioHandler < 'COMPOSIO_SEARCH_TOOLS' > ( )
34- export const handleComposioGetToolSchemas =
36+ export const handleComposioGetToolSchemas : CodebuffToolHandlerFunction < 'COMPOSIO_GET_TOOL_SCHEMAS' > =
3537 makeComposioHandler < 'COMPOSIO_GET_TOOL_SCHEMAS' > ( )
0 commit comments