mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-22 13:21:07 -05:00
refactor: generalize prompt enhancement into single completion handler
- Rename enhance-prompt.ts to single-completion-handler.ts for better clarity - Refactor enhancement logic to be more generic and reusable - Update prompt template handling to use template literals - Adjust tests and imports accordingly
This commit is contained in:
@@ -77,12 +77,11 @@ describe("Code Action Prompts", () => {
|
||||
describe("ENHANCE action", () => {
|
||||
it("should format enhance prompt correctly", () => {
|
||||
const prompt = supportPrompt.create("ENHANCE", {
|
||||
filePath: testFilePath,
|
||||
selectedText: testCode,
|
||||
userInput: "test",
|
||||
})
|
||||
|
||||
expect(prompt).toBe(
|
||||
"Generate an enhanced version of this prompt (reply with only the enhanced prompt - no conversation, explanations, lead-in, bullet points, placeholders, or surrounding quotes):",
|
||||
"Generate an enhanced version of this prompt (reply with only the enhanced prompt - no conversation, explanations, lead-in, bullet points, placeholders, or surrounding quotes):\n\ntest",
|
||||
)
|
||||
// Verify it ignores parameters since ENHANCE template doesn't use any
|
||||
expect(prompt).not.toContain(testFilePath)
|
||||
|
||||
Reference in New Issue
Block a user