Skip to content

Commit b74e4ab

Browse files
authored
do not show prompt files in edits (microsoft#256608)
1 parent f109cd2 commit b74e4ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import './media/chatAgentHover.css';
6666
import './media/chatViewWelcome.css';
6767
import { ChatViewWelcomePart, IChatSuggestedPrompts, IChatViewWelcomeContent } from './viewsWelcome/chatViewWelcomeController.js';
6868
import { MicrotaskDelay } from '../../../../base/common/symbols.js';
69-
import { IChatRequestVariableEntry, ChatRequestVariableSet as ChatRequestVariableSet, isPromptFileVariableEntry, toPromptFileVariableEntry, PromptFileVariableKind } from '../common/chatVariableEntries.js';
69+
import { IChatRequestVariableEntry, ChatRequestVariableSet as ChatRequestVariableSet, isPromptFileVariableEntry, toPromptFileVariableEntry, PromptFileVariableKind, isPromptTextVariableEntry } from '../common/chatVariableEntries.js';
7070
import { PromptsConfig } from '../common/promptSyntax/config/config.js';
7171
import { CancellationToken } from '../../../../base/common/cancellation.js';
7272
import { ComputeAutomaticInstructions } from '../common/promptSyntax/computeAutomaticInstructions.js';
@@ -1071,7 +1071,8 @@ export class ChatWidget extends Disposable implements IChatWidget {
10711071
if (request.id === currentElement.id) {
10721072
request.shouldBeBlocked = false; // unblocking just this request.
10731073
if (request.attachedContext) {
1074-
currentContext.push(...request.attachedContext);
1074+
const context = request.attachedContext.filter(entry => !(isPromptFileVariableEntry(entry) || isPromptTextVariableEntry(entry)) || !entry.automaticallyAdded);
1075+
currentContext.push(...context);
10751076
}
10761077
}
10771078
}

0 commit comments

Comments
 (0)