Skip to content

Commit

Permalink
fix: don't check for deprecated setting when enabling variables for t…
Browse files Browse the repository at this point in the history
…erminal chat (microsoft#231965)
  • Loading branch information
joyceerhl authored Oct 22, 2024
1 parent 2f0b38f commit 4224d78
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,18 +606,8 @@ class VariableCompletions extends Disposable {
_debugDisplayName: 'chatVariables',
triggerCharacters: [chatVariableLeader],
provideCompletionItems: async (model: ITextModel, position: Position, _context: CompletionContext, _token: CancellationToken) => {
const locations = new Set<ChatAgentLocation>();
locations.add(ChatAgentLocation.Panel);
locations.add(ChatAgentLocation.EditingSession);

for (const value of Object.values(ChatAgentLocation)) {
if (typeof value === 'string' && configService.getValue<boolean>(`chat.experimental.variables.${value}`)) {
locations.add(value);
}
}

const widget = this.chatWidgetService.getWidgetByInputUri(model.uri);
if (!widget || !locations.has(widget.location)) {
if (!widget) {
return null;
}

Expand Down

0 comments on commit 4224d78

Please sign in to comment.