Skip to content

Commit 2fa8a2f

Browse files
authored
instruction list should include all instructions (#260585)
1 parent cbfcac6 commit 2fa8a2f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,9 @@ export class ComputeAutomaticInstructions {
220220
if (metadata?.promptType !== PromptsType.instructions) {
221221
continue;
222222
}
223-
const applyTo = metadata?.applyTo;
223+
const applyTo = metadata?.applyTo ?? '**/*';
224224
const description = metadata?.description ?? '';
225-
if (applyTo && applyTo !== '**' && applyTo !== '**/*' && applyTo !== '*') {
226-
entries.push(`| ${metadata.applyTo} | '${getFilePath(uri)}' | ${description} |`);
227-
}
225+
entries.push(`| '${getFilePath(uri)}' | ${applyTo} | ${description} |`);
228226
}
229227
if (entries.length === 0) {
230228
return entries;
@@ -237,7 +235,7 @@ export class ComputeAutomaticInstructions {
237235
'Please make sure to follow the rules specified in these files when working with the codebase.',
238236
`If the file is not already available as attachment, use the \`${toolName}\` tool to acquire it.`,
239237
'Make sure to acquire the instructions before making any changes to the code.',
240-
'| Pattern | File Path | Description |',
238+
'| File | Applies To | Description |',
241239
'| ------- | --------- | ----------- |',
242240
].concat(entries);
243241
}

0 commit comments

Comments
 (0)