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 @@ -179,6 +179,7 @@ export class InlineChatWidget {
179
179
private _isLayouting : boolean = false ;
180
180
private _preferredExpansionState : ExpansionState | undefined ;
181
181
private _expansionState : ExpansionState = ExpansionState . NOT_CROPPED ;
182
+ private _slashCommandDetails : { command : string ; detail : string } [ ] = [ ] ;
182
183
183
184
constructor (
184
185
private readonly parentEditor : ICodeEditor ,
@@ -418,9 +419,12 @@ export class InlineChatWidget {
418
419
}
419
420
420
421
readPlaceholder ( ) : void {
422
+ const slashCommand = this . _slashCommandDetails . find ( c => `${ c . command } ` === this . _inputModel . getValue ( ) . substring ( 1 ) ) ;
421
423
const hasText = this . _inputModel . getValueLength ( ) > 0 ;
422
424
if ( ! hasText ) {
423
425
aria . status ( this . _elements . placeholder . innerText ) ;
426
+ } else if ( slashCommand ) {
427
+ aria . status ( slashCommand . detail ) ;
424
428
}
425
429
}
426
430
@@ -621,6 +625,7 @@ export class InlineChatWidget {
621
625
if ( commands . length === 0 ) {
622
626
return ;
623
627
}
628
+ this . _slashCommandDetails = commands . filter ( c => c . command && c . detail ) . map ( c => { return { command : c . command ! , detail : c . detail ! } ; } ) ;
624
629
625
630
const selector : LanguageSelector = { scheme : this . _inputModel . uri . scheme , pattern : this . _inputModel . uri . path , language : this . _inputModel . getLanguageId ( ) } ;
626
631
this . _slashCommands . add ( this . _languageFeaturesService . completionProvider . register ( selector , new class implements CompletionItemProvider {
You can’t perform that action at this time.
0 commit comments