Skip to content

Commit

Permalink
address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
legomushroom committed Dec 16, 2024
1 parent d28b027 commit 783c3eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/vs/workbench/contrib/chat/browser/chatInputPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
id: variable.id,
name: basename(childUri.path),
value: childUri,
kind: 'implicit',
isSelection: false,
enabled: true,
isFile: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ export class ChatDynamicVariableModel extends Disposable implements IChatWidgetC
s = [];
}

this.disposeVariables();
this._variables = [];

for (const variable of s) {
if (!isDynamicVariable(variable)) {
continue;
Expand All @@ -141,7 +143,9 @@ export class ChatDynamicVariableModel extends Disposable implements IChatWidgetC
// start resolving nested file references immediatelly and subscribe to updates
if (variable instanceof ChatFileReference && variable.isPromptSnippetFile) {
// subscribe to variable changes
variable.onUpdate(this.updateDecorations);
variable.onUpdate(() => {
this.updateDecorations();
});
// start resolving the file references
variable.resolve();
}
Expand Down

0 comments on commit 783c3eb

Please sign in to comment.