File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,34 @@ export function parseToolCallDetails(
237237 } : undefined
238238 } ;
239239 }
240+ } else if ( name === 'str_replace' ) {
241+ const filePath = args . path ;
242+ const fileLabel = filePath && toFileLabel ( filePath ) ;
243+
244+ return {
245+ toolName : 'Edit' ,
246+ invocationMessage : fileLabel ? `Edit [](${ fileLabel } )` : `Edit ${ filePath } ` ,
247+ pastTenseMessage : fileLabel ? `Edit [](${ fileLabel } )` : `Edit ${ filePath } ` ,
248+ toolSpecificData : fileLabel ? {
249+ command : 'str_replace' ,
250+ filePath : filePath ,
251+ fileLabel : fileLabel ,
252+ } : undefined
253+ }
254+ } else if ( name === 'create' ) {
255+ const filePath = args . path ;
256+ const fileLabel = filePath && toFileLabel ( filePath ) ;
257+
258+ return {
259+ toolName : 'Create' ,
260+ invocationMessage : fileLabel ? `Create [](${ fileLabel } )` : `Create File ${ filePath } ` ,
261+ pastTenseMessage : fileLabel ? `Create [](${ fileLabel } )` : `Create File ${ filePath } ` ,
262+ toolSpecificData : fileLabel ? {
263+ command : 'create' ,
264+ filePath : filePath ,
265+ fileLabel : fileLabel ,
266+ } : undefined
267+ }
240268 } else if ( name === 'view' ) {
241269 const filePath = args . path ;
242270 const fileLabel = filePath && toFileLabel ( filePath ) ;
Original file line number Diff line number Diff line change @@ -1082,8 +1082,8 @@ export class CopilotRemoteAgentManager extends Disposable {
10821082 const delta = choice . delta ;
10831083
10841084 if ( delta . role === 'assistant' ) {
1085- // Handle special case for run_custom_setup_step
1086- if ( choice . finish_reason === 'tool_calls' && delta . tool_calls ?. length && delta . tool_calls [ 0 ] . function . name === 'run_custom_setup_step' ) {
1085+ // Handle special case for run_custom_setup_step/run_setup
1086+ if ( choice . finish_reason === 'tool_calls' && delta . tool_calls ?. length && ( delta . tool_calls [ 0 ] . function . name === 'run_custom_setup_step' || delta . tool_calls [ 0 ] . function . name === 'run_setup' ) ) {
10871087 const toolCall = delta . tool_calls [ 0 ] ;
10881088 let args : any = { } ;
10891089 try {
You can’t perform that action at this time.
0 commit comments