@@ -13,7 +13,7 @@ import { IMarkdownRenderer } from '../../../../../platform/markdown/browser/mark
1313import { IRenderedMarkdown } from '../../../../../base/browser/markdownRenderer.js' ;
1414import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js' ;
1515import { localize } from '../../../../../nls.js' ;
16- import { IChatProgressMessage , IChatTask , IChatTaskSerialized , ToolConfirmKind , type ConfirmedReason } from '../../common/chatService.js' ;
16+ import { IChatProgressMessage , IChatTask , IChatTaskSerialized , IChatToolInvocation , IChatToolInvocationSerialized , ToolConfirmKind , type ConfirmedReason } from '../../common/chatService.js' ;
1717import { IChatRendererContent , isResponseVM } from '../../common/chatViewModel.js' ;
1818import { ChatTreeItem } from '../chat.js' ;
1919import { renderFileWidgets } from '../chatInlineAnchorWidget.js' ;
@@ -38,6 +38,7 @@ export class ChatProgressContentPart extends Disposable implements IChatContentP
3838 forceShowMessage : boolean | undefined ,
3939 icon : ThemeIcon | undefined ,
4040 confirmedReason : boolean | ConfirmedReason | undefined ,
41+ private readonly toolInvocation : IChatToolInvocation | IChatToolInvocationSerialized | undefined ,
4142 @IInstantiationService private readonly instantiationService : IInstantiationService ,
4243 @IChatMarkdownAnchorService private readonly chatMarkdownAnchorService : IChatMarkdownAnchorService ,
4344 @IConfigurationService private readonly configurationService : IConfigurationService
@@ -117,8 +118,9 @@ export class ChatProgressContentPart extends Disposable implements IChatContentP
117118 : reason . scope === 'workspace'
118119 ? localize ( 'chat.autoapprove.lmServicePerTool.workspace' , 'Auto approved for this workspace' )
119120 : localize ( 'chat.autoapprove.lmServicePerTool.profile' , 'Auto approved for this profile' ) ;
120- // TODO: Pass in toolId
121- // md += ' (' + markdownCommandLink({ title: localize('edit', 'Edit'), id: 'workbench.action.chat.editToolApproval', arguments: [this.toolInvocation.toolId] }) + ')';
121+ if ( this . toolInvocation ?. toolId ) {
122+ md += ' (' + markdownCommandLink ( { title : localize ( 'edit' , 'Edit' ) , id : 'workbench.action.chat.editToolApproval' , arguments : [ this . toolInvocation . toolId ] } ) + ')' ;
123+ }
122124 break ;
123125 case ToolConfirmKind . UserAction :
124126 case ToolConfirmKind . Denied :
@@ -183,7 +185,7 @@ export class ChatWorkingProgressContentPart extends ChatProgressContentPart impl
183185 kind : 'progressMessage' ,
184186 content : new MarkdownString ( ) . appendText ( localize ( 'workingMessage' , "Working..." ) )
185187 } ;
186- super ( progressMessage , chatContentMarkdownRenderer , context , undefined , undefined , undefined , undefined , instantiationService , chatMarkdownAnchorService , configurationService ) ;
188+ super ( progressMessage , chatContentMarkdownRenderer , context , undefined , undefined , undefined , undefined , undefined , instantiationService , chatMarkdownAnchorService , configurationService ) ;
187189 }
188190
189191 override hasSameContent ( other : IChatRendererContent , followingContent : IChatRendererContent [ ] , element : ChatTreeItem ) : boolean {
0 commit comments