4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
6
import { $ , Dimension , getActiveElement , getTotalHeight , h , reset , trackFocus } from '../../../../base/browser/dom.js' ;
7
- import { renderFormattedText } from '../../../../base/browser/formattedTextRenderer.js' ;
8
7
import { IActionViewItemOptions } from '../../../../base/browser/ui/actionbar/actionViewItems.js' ;
9
8
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js' ;
10
9
import { renderLabelWithIcons } from '../../../../base/browser/ui/iconLabel/iconLabels.js' ;
@@ -49,8 +48,7 @@ import { ChatWidget, IChatViewState, IChatWidgetLocationOptions } from '../../ch
49
48
import { chatRequestBackground } from '../../chat/common/chatColors.js' ;
50
49
import { ChatContextKeys } from '../../chat/common/chatContextKeys.js' ;
51
50
import { IChatModel } from '../../chat/common/chatModel.js' ;
52
- import { chatSubcommandLeader } from '../../chat/common/chatParserTypes.js' ;
53
- import { ChatAgentVoteDirection , IChatSendRequestOptions , IChatService } from '../../chat/common/chatService.js' ;
51
+ import { ChatAgentVoteDirection , IChatService } from '../../chat/common/chatService.js' ;
54
52
import { isResponseVM } from '../../chat/common/chatViewModel.js' ;
55
53
import { CTX_INLINE_CHAT_FOCUSED , CTX_INLINE_CHAT_RESPONSE_FOCUSED , inlineChatBackground , inlineChatForeground } from '../common/inlineChat.js' ;
56
54
import { HunkInformation , Session } from './inlineChatSession.js' ;
@@ -90,7 +88,6 @@ export class InlineChatWidget {
90
88
h ( 'div.status@status' , [
91
89
h ( 'div.label.info.hidden@infoLabel' ) ,
92
90
h ( 'div.actions.hidden@toolbar1' ) ,
93
- h ( 'div.rerun@rerun' ) ,
94
91
h ( 'div.label.status.hidden@statusLabel' ) ,
95
92
h ( 'div.actions.secondary.hidden@toolbar2' ) ,
96
93
] ) ,
@@ -201,8 +198,6 @@ export class InlineChatWidget {
201
198
ctxResponseSupportIssues . reset ( ) ;
202
199
} ) ) ;
203
200
204
- const detectedAgentCmdStore = viewModelStore . add ( new DisposableStore ( ) ) ;
205
-
206
201
viewModelStore . add ( viewModel . onDidChange ( ( ) => {
207
202
208
203
this . _requestInProgress . set ( viewModel . requestInProgress , undefined ) ;
@@ -216,37 +211,6 @@ export class InlineChatWidget {
216
211
ctxResponseErrorFiltered . set ( ( ! ! ( isResponseVM ( last ) && last . errorDetails ?. responseIsFiltered ) ) ) ;
217
212
ctxResponseSupportIssues . set ( isResponseVM ( last ) && ( last . agent ?. metadata . supportIssueReporting ?? false ) ) ;
218
213
219
- if ( isResponseVM ( last ) && last . agentOrSlashCommandDetected && last . slashCommand ) {
220
- this . _elements . rerun . innerText = last . slashCommand . name ;
221
- this . _elements . rerun . title = last . slashCommand . description ;
222
-
223
- const msg = localize ( 'usedAgentSlashCommand' , "``{0}`` [[(rerun without)]]" , `${ chatSubcommandLeader } ${ last . slashCommand . name } ` ) ;
224
-
225
- reset ( this . _elements . rerun , renderFormattedText ( msg , {
226
- className : 'agentOrSlashCommandDetected' ,
227
- inline : true ,
228
- renderCodeSegments : true ,
229
- actionHandler : {
230
- disposables : detectedAgentCmdStore ,
231
- callback : ( content ) => {
232
- const request = this . _chatService . getSession ( last . sessionId ) ?. getRequests ( ) . find ( candidate => candidate . id === last . requestId ) ;
233
- if ( request ) {
234
- const options : IChatSendRequestOptions = {
235
- noCommandDetection : true ,
236
- attempt : request . attempt + 1 ,
237
- location : location . location ,
238
- userSelectedModelId : this . chatWidget . input . currentLanguageModel
239
- } ;
240
- this . _chatService . resendRequest ( request , options ) ;
241
- }
242
- } ,
243
- }
244
- } ) ) ;
245
-
246
- } else {
247
- reset ( this . _elements . rerun ) ;
248
- }
249
-
250
214
this . _onDidChangeHeight . fire ( ) ;
251
215
} ) ) ;
252
216
this . _onDidChangeHeight . fire ( ) ;
@@ -515,7 +479,6 @@ export class InlineChatWidget {
515
479
this . _chatWidget . saveState ( ) ;
516
480
517
481
reset ( this . _elements . statusLabel ) ;
518
- reset ( this . _elements . rerun ) ;
519
482
this . _elements . statusLabel . classList . toggle ( 'hidden' , true ) ;
520
483
this . _elements . toolbar1 . classList . add ( 'hidden' ) ;
521
484
this . _elements . toolbar2 . classList . add ( 'hidden' ) ;
0 commit comments