diff --git a/src/core/Cline.ts b/src/core/Cline.ts index 5a2a9de..7e06c22 100644 --- a/src/core/Cline.ts +++ b/src/core/Cline.ts @@ -127,22 +127,6 @@ export class Cline { } } - async enhancePrompt(promptText: string): Promise { - if (!promptText) { - throw new Error("No prompt text provided") - } - - const prompt = `Generate an enhanced version of this prompt (reply with only the enhanced prompt, no bullet points): ${promptText}` - - // Check if the API handler supports completePrompt - if (this.api instanceof OpenRouterHandler) { - return this.api.completePrompt(prompt) - } - - // Otherwise just return the prompt as is - return prompt; - } - // Storing task to disk for history private async ensureTaskDirectoryExists(): Promise { diff --git a/src/utils/__tests__/enhance-prompt.test.ts b/src/utils/__tests__/enhance-prompt.test.ts index ab8f253..588e3f4 100644 --- a/src/utils/__tests__/enhance-prompt.test.ts +++ b/src/utils/__tests__/enhance-prompt.test.ts @@ -74,7 +74,7 @@ describe('enhancePrompt', () => { await enhancePrompt(mockApiConfig, inputPrompt) expect(mockHandler.completePrompt).toHaveBeenCalledWith( - 'Generate an enhanced version of this prompt (reply with only the enhanced prompt, no other text or bullet points): Test prompt' + '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 prompt' ) }) }) \ No newline at end of file diff --git a/src/utils/enhance-prompt.ts b/src/utils/enhance-prompt.ts index 5b1ad21..d543e53 100644 --- a/src/utils/enhance-prompt.ts +++ b/src/utils/enhance-prompt.ts @@ -21,6 +21,6 @@ export async function enhancePrompt(apiConfiguration: ApiConfiguration, promptTe throw new Error("Expected OpenRouter handler") } - const prompt = `Generate an enhanced version of this prompt (reply with only the enhanced prompt, no other text or bullet points): ${promptText}` + const prompt = `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\n${promptText}` return handler.completePrompt(prompt) } \ No newline at end of file