File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/vs/workbench/contrib/inlineChat/browser Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ export class InlineChatWidget {
180
180
private _isLayouting : boolean = false ;
181
181
private _preferredExpansionState : ExpansionState | undefined ;
182
182
private _expansionState : ExpansionState = ExpansionState . NOT_CROPPED ;
183
+ private _slashCommandDetails : { command : string ; detail : string } [ ] = [ ] ;
183
184
184
185
private _slashCommandContentWidget : SlashCommandContentWidget ;
185
186
@@ -426,9 +427,12 @@ export class InlineChatWidget {
426
427
}
427
428
428
429
readPlaceholder ( ) : void {
430
+ const slashCommand = this . _slashCommandDetails . find ( c => `${ c . command } ` === this . _inputModel . getValue ( ) . substring ( 1 ) ) ;
429
431
const hasText = this . _inputModel . getValueLength ( ) > 0 ;
430
432
if ( ! hasText ) {
431
433
aria . status ( this . _elements . placeholder . innerText ) ;
434
+ } else if ( slashCommand ) {
435
+ aria . status ( slashCommand . detail ) ;
432
436
}
433
437
}
434
438
@@ -629,6 +633,7 @@ export class InlineChatWidget {
629
633
if ( commands . length === 0 ) {
630
634
return ;
631
635
}
636
+ this . _slashCommandDetails = commands . filter ( c => c . command && c . detail ) . map ( c => { return { command : c . command ! , detail : c . detail ! } ; } ) ;
632
637
633
638
const selector : LanguageSelector = { scheme : this . _inputModel . uri . scheme , pattern : this . _inputModel . uri . path , language : this . _inputModel . getLanguageId ( ) } ;
634
639
this . _slashCommands . add ( this . _languageFeaturesService . completionProvider . register ( selector , new class implements CompletionItemProvider {
You can’t perform that action at this time.
0 commit comments