diff --git a/src/shared/__tests__/support-prompts.test.ts b/src/shared/__tests__/support-prompts.test.ts index edee6c255d..3d286d0230 100644 --- a/src/shared/__tests__/support-prompts.test.ts +++ b/src/shared/__tests__/support-prompts.test.ts @@ -10,8 +10,7 @@ describe("Code Action Prompts", () => { filePath: testFilePath, selectedText: testCode, }) - - expect(prompt).toContain(`@/${testFilePath}`) + expect(prompt).toContain(testFilePath) expect(prompt).toContain(testCode) expect(prompt).toContain("purpose and functionality") expect(prompt).toContain("Key components") @@ -25,8 +24,7 @@ describe("Code Action Prompts", () => { filePath: testFilePath, selectedText: testCode, }) - - expect(prompt).toContain(`@/${testFilePath}`) + expect(prompt).toContain(testFilePath) expect(prompt).toContain(testCode) expect(prompt).toContain("Address all detected problems") expect(prompt).not.toContain("Current problems detected") @@ -64,8 +62,7 @@ describe("Code Action Prompts", () => { filePath: testFilePath, selectedText: testCode, }) - - expect(prompt).toContain(`@/${testFilePath}`) + expect(prompt).toContain(testFilePath) expect(prompt).toContain(testCode) expect(prompt).toContain("Code readability") expect(prompt).toContain("Performance optimization") diff --git a/src/shared/support-prompt.ts b/src/shared/support-prompt.ts index d6391ff380..ee8c4fa3e8 100644 --- a/src/shared/support-prompt.ts +++ b/src/shared/support-prompt.ts @@ -35,7 +35,7 @@ const supportPromptConfigs: Record = { \${userInput}`, }, EXPLAIN: { - template: `Explain the following code from file path @/\${filePath} \${startLine}:\${endLine} + template: `Explain the following code from file path \${filePath}:\${startLine}-\${endLine} \${userInput} \`\`\` @@ -48,7 +48,7 @@ Please provide a clear and concise explanation of what this code does, including 3. Important patterns or techniques used`, }, FIX: { - template: `Fix any issues in the following code from file path @/\${filePath} \${startLine}:\${endLine} + template: `Fix any issues in the following code from file path \${filePath}:\${startLine}-\${endLine} \${diagnosticText} \${userInput} @@ -63,7 +63,7 @@ Please: 4. Explain what was fixed and why`, }, IMPROVE: { - template: `Improve the following code from file path @/\${filePath} \${startLine}:\${endLine} + template: `Improve the following code from file path \${filePath}:\${startLine}-\${endLine} \${userInput} \`\`\` @@ -79,7 +79,7 @@ Please suggest improvements for: Provide the improved code along with explanations for each enhancement.`, }, ADD_TO_CONTEXT: { - template: `\${filePath}:\${startLine}:\${endLine} + template: `\${filePath}:\${startLine}-\${endLine} \`\`\` \${selectedText} \`\`\``,