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 {
180180 private _isLayouting : boolean = false ;
181181 private _preferredExpansionState : ExpansionState | undefined ;
182182 private _expansionState : ExpansionState = ExpansionState . NOT_CROPPED ;
183+ private _slashCommandDetails : { command : string ; detail : string } [ ] = [ ] ;
183184
184185 private _slashCommandContentWidget : SlashCommandContentWidget ;
185186
@@ -426,9 +427,12 @@ export class InlineChatWidget {
426427 }
427428
428429 readPlaceholder ( ) : void {
430+ const slashCommand = this . _slashCommandDetails . find ( c => `${ c . command } ` === this . _inputModel . getValue ( ) . substring ( 1 ) ) ;
429431 const hasText = this . _inputModel . getValueLength ( ) > 0 ;
430432 if ( ! hasText ) {
431433 aria . status ( this . _elements . placeholder . innerText ) ;
434+ } else if ( slashCommand ) {
435+ aria . status ( slashCommand . detail ) ;
432436 }
433437 }
434438
@@ -629,6 +633,7 @@ export class InlineChatWidget {
629633 if ( commands . length === 0 ) {
630634 return ;
631635 }
636+ this . _slashCommandDetails = commands . filter ( c => c . command && c . detail ) . map ( c => { return { command : c . command ! , detail : c . detail ! } ; } ) ;
632637
633638 const selector : LanguageSelector = { scheme : this . _inputModel . uri . scheme , pattern : this . _inputModel . uri . path , language : this . _inputModel . getLanguageId ( ) } ;
634639 this . _slashCommands . add ( this . _languageFeaturesService . completionProvider . register ( selector , new class implements CompletionItemProvider {
You can’t perform that action at this time.
0 commit comments