@@ -41,9 +41,9 @@ export async function type_textLogic(
4141) : Promise < ToolResponse > {
4242 const toolName = 'type_text' ;
4343 const simUuidValidation = validateRequiredParam ( 'simulatorUuid' , params . simulatorUuid ) ;
44- if ( ! simUuidValidation . isValid ) return simUuidValidation . errorResponse ;
44+ if ( ! simUuidValidation . isValid ) return simUuidValidation . errorResponse ! ;
4545 const textValidation = validateRequiredParam ( 'text' , params . text ) ;
46- if ( ! textValidation . isValid ) return textValidation . errorResponse ;
46+ if ( ! textValidation . isValid ) return textValidation . errorResponse ! ;
4747
4848 const { simulatorUuid, text } = params ;
4949 const commandArgs = [ 'type' , text ] ;
@@ -54,7 +54,13 @@ export async function type_textLogic(
5454 ) ;
5555
5656 try {
57- await executeAxeCommand ( commandArgs , simulatorUuid as string , 'type' , executor , axeHelpers ) ;
57+ await executeAxeCommand (
58+ commandArgs as string [ ] ,
59+ simulatorUuid as string ,
60+ 'type' ,
61+ executor ,
62+ axeHelpers ,
63+ ) ;
5864 log ( 'info' , `${ LOG_PREFIX } /${ toolName } : Success for ${ simulatorUuid } ` ) ;
5965 return createTextResponse ( 'Text typing simulated successfully.' ) ;
6066 } catch ( error ) {
@@ -91,7 +97,7 @@ export default {
9197 text : z . string ( ) . min ( 1 , 'Text cannot be empty' ) ,
9298 } ,
9399 async handler ( args : Record < string , unknown > ) : Promise < ToolResponse > {
94- return type_textLogic ( args , getDefaultCommandExecutor ( ) ) ;
100+ return type_textLogic ( args as unknown as TypeTextParams , getDefaultCommandExecutor ( ) ) ;
95101 } ,
96102} ;
97103
@@ -141,7 +147,7 @@ async function executeAxeCommand(
141147 ) ;
142148 }
143149
144- return result . output . trim ( ) ;
150+ return createTextResponse ( result . output . trim ( ) ) ;
145151 } catch ( error ) {
146152 if ( error instanceof Error ) {
147153 if ( error instanceof AxeError ) {
0 commit comments