Skip to content

Commit 588b36f

Browse files
committed
make changes
1 parent ad39568 commit 588b36f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export class InlineChatWidget {
179179
private _isLayouting: boolean = false;
180180
private _preferredExpansionState: ExpansionState | undefined;
181181
private _expansionState: ExpansionState = ExpansionState.NOT_CROPPED;
182+
private _slashCommandDetails: { command: string; detail: string }[] = [];
182183

183184
constructor(
184185
private readonly parentEditor: ICodeEditor,
@@ -418,9 +419,12 @@ export class InlineChatWidget {
418419
}
419420

420421
readPlaceholder(): void {
422+
const slashCommand = this._slashCommandDetails.find(c => `${c.command} ` === this._inputModel.getValue().substring(1));
421423
const hasText = this._inputModel.getValueLength() > 0;
422424
if (!hasText) {
423425
aria.status(this._elements.placeholder.innerText);
426+
} else if (slashCommand) {
427+
aria.status(slashCommand.detail);
424428
}
425429
}
426430

@@ -621,6 +625,7 @@ export class InlineChatWidget {
621625
if (commands.length === 0) {
622626
return;
623627
}
628+
this._slashCommandDetails = commands.filter(c => c.command && c.detail).map(c => { return { command: c.command!, detail: c.detail! }; });
624629

625630
const selector: LanguageSelector = { scheme: this._inputModel.uri.scheme, pattern: this._inputModel.uri.path, language: this._inputModel.getLanguageId() };
626631
this._slashCommands.add(this._languageFeaturesService.completionProvider.register(selector, new class implements CompletionItemProvider {

0 commit comments

Comments
 (0)