Skip to content

Commit c2b76e0

Browse files
authored
ComputeAutomaticInstructions: improve prompt (microsoft#251925)
1 parent 071e031 commit c2b76e0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,19 +227,22 @@ export class ComputeAutomaticInstructions {
227227
continue;
228228
}
229229
const applyTo = metadata?.applyTo;
230-
231-
230+
const description = metadata?.description ?? '';
232231
if (applyTo && applyTo !== '**' && applyTo !== '**/*' && applyTo !== '*') {
233-
entries.push(`Instruction file '${getFilePath(uri)}' contains important rules for all files matching ${metadata.applyTo}.`);
232+
entries.push(`| ${metadata.applyTo} | '${getFilePath(uri)}' | ${description} |`);
234233
}
235234
}
236235
if (entries.length === 0) {
237236
return entries;
238237
}
239238
return [
240-
'The user has provided a list of custopm instruction files that contain rules that need to be followed when modifying or creating new code.',
241-
'Each file comes with a glob pattern that specifies which files the instructions apply to.',
242-
'It is important to follow these instructions when working with the codebase. If the file is not already available as attachment, use the `read_file` tool to acquire it.',
239+
'Here is a list of instruction files that contain rules for modifying or creating new code.',
240+
'These files are important for ensuring that the code is modified or created correctly.',
241+
'Please make sure to follow the rules specified in these files when working with the codebase.',
242+
'If the file is not already available as attachment, use the `read_file` tool to acquire it.',
243+
'Make sure to acquire the instructions before making any changes to the code.',
244+
'| Pattern | File Path | Description |',
245+
'| ------- | --------- | ----------- |',
243246
].concat(entries);
244247
}
245248

0 commit comments

Comments
 (0)