Show code snippet in fix problems (#745)

This commit is contained in:
Will Chen
2025-07-30 16:03:17 -07:00
committed by GitHub
parent 3fe80d441a
commit 510d288d78
15 changed files with 283 additions and 3 deletions

View File

@@ -16,6 +16,10 @@ export function createProblemFixPrompt(problemReport: ProblemReport): string {
problems.forEach((problem, index) => {
prompt += `${index + 1}. ${problem.file}:${problem.line}:${problem.column} - ${problem.message} (TS${problem.code})\n`;
if (problem.snippet) {
prompt += `\`\`\`\n${problem.snippet}\n\`\`\`\n`;
}
prompt += "\n";
});
prompt += "\nPlease fix all errors in a concise way.";