55 type SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS ,
66 SEARCH_REPLACE_MULTI_EDIT_FILE_TOOL_NAME ,
77 type SEARCH_REPLACE_MULTI_EDIT_FILE_TOOL_PARAMETERS ,
8- TERMINAL_COMMAND_TOOL_NAME , TODO_WRITE_TOOL_NAME ,
8+ TERMINAL_COMMAND_TOOL_NAME , TERMINAL_COMMAND_TOOL_PARAMETERS , TODO_WRITE_TOOL_NAME ,
99 type TODO_WRITE_TOOL_PARAMETERS , TYPECHECK_TOOL_NAME ,
1010 WEB_SEARCH_TOOL_NAME ,
1111 type WEB_SEARCH_TOOL_PARAMETERS ,
@@ -42,7 +42,7 @@ export const ToolCallDisplay = ({
4242 const toolName = toolInvocation . type . split ( '-' ) [ 1 ] ;
4343
4444 if ( toolName === TERMINAL_COMMAND_TOOL_NAME ) {
45- const args = toolInvocation . input as { command : string } ;
45+ const args = toolInvocation . input as z . infer < typeof TERMINAL_COMMAND_TOOL_PARAMETERS > | null ;
4646 const result = toolInvocation . output as { output ?: string ; error ?: string } | null ;
4747 if ( ! args ?. command ) {
4848 return (
@@ -81,7 +81,7 @@ export const ToolCallDisplay = ({
8181 }
8282
8383 if ( toolName === WRITE_FILE_TOOL_NAME ) {
84- const args = toolInvocation . input as z . infer < typeof WRITE_FILE_TOOL_PARAMETERS >
84+ const args = toolInvocation . input as z . infer < typeof WRITE_FILE_TOOL_PARAMETERS > | null ;
8585 const filePath = args ?. file_path ;
8686 const codeContent = args ?. content ;
8787 if ( ! filePath || ! codeContent ) {
@@ -107,7 +107,7 @@ export const ToolCallDisplay = ({
107107 }
108108
109109 if ( toolName === FUZZY_EDIT_FILE_TOOL_NAME ) {
110- const args = toolInvocation . input as z . infer < typeof FUZZY_EDIT_FILE_TOOL_PARAMETERS > ;
110+ const args = toolInvocation . input as z . infer < typeof FUZZY_EDIT_FILE_TOOL_PARAMETERS > | null ;
111111 const filePath = args ?. file_path ;
112112 const codeContent = args ?. content ;
113113 if ( ! filePath || ! codeContent ) {
@@ -133,7 +133,7 @@ export const ToolCallDisplay = ({
133133 }
134134
135135 if ( toolName === SEARCH_REPLACE_EDIT_FILE_TOOL_NAME ) {
136- const args = toolInvocation . input as z . infer < typeof SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS > ;
136+ const args = toolInvocation . input as z . infer < typeof SEARCH_REPLACE_EDIT_FILE_TOOL_PARAMETERS > | null ;
137137 const filePath = args ?. file_path ;
138138 const codeContent = args ?. new_string ;
139139 if ( ! filePath || ! codeContent ) {
@@ -159,7 +159,7 @@ export const ToolCallDisplay = ({
159159 }
160160
161161 if ( toolName === SEARCH_REPLACE_MULTI_EDIT_FILE_TOOL_NAME ) {
162- const args = toolInvocation . input as z . infer < typeof SEARCH_REPLACE_MULTI_EDIT_FILE_TOOL_PARAMETERS > ;
162+ const args = toolInvocation . input as z . infer < typeof SEARCH_REPLACE_MULTI_EDIT_FILE_TOOL_PARAMETERS > | null ;
163163 const filePath = args ?. file_path ;
164164 const codeContent = args ?. edits ?. map ( ( edit ) => edit . new_string ) . join ( '\n...\n' ) ;
165165 if ( ! filePath || ! codeContent ) {
@@ -185,7 +185,7 @@ export const ToolCallDisplay = ({
185185 }
186186
187187 if ( toolName === TODO_WRITE_TOOL_NAME ) {
188- const args = toolInvocation . input as z . infer < typeof TODO_WRITE_TOOL_PARAMETERS > ;
188+ const args = toolInvocation . input as z . infer < typeof TODO_WRITE_TOOL_PARAMETERS > | null ;
189189 const todos = args ?. todos ;
190190 if ( ! todos || todos . length === 0 ) {
191191 return (
0 commit comments