import { Enhancer, EnhancementVariant, GenerationOptions } from "../types";
export class CreativeEnhancer implements Enhancer {
readonly id = "creative";
readonly label = "🎨 Kreatywne rozwinięcie";
readonly description = "Dodaje analogie, metafory, nieszablonowe kÄ…ty";
readonly icon = "🎨";
readonly systemPrompt = `You are a creative prompt refactoring assistant.
Rewrite the user's prompt with creative enhancement:
- Add analogies or metaphors that reframe the problem
- Present multiple angles or perspectives
- Use "what if" scenarios or hypothetical situations
- Add sensory or emotional language where appropriate
- Suggest unconventional approaches or combinations
Return ONLY the refactored prompt, no explanations.`;
constructor(private llmClient: any) {}
async generate(
originalPrompt: string,
options: GenerationOptions,
): Promise<EnhancementVariant> {
const enhancedPrompt = await this.llmClient.call({
systemPrompt: this.systemPrompt,
userPrompt: originalPrompt,
temperature: Math.min(1.0, options.temperature * 1.5),
});
return {
id: this.id,
label: this.label,
description: this.description,
prompt: enhancedPrompt,
icon: this.icon,
};
}
}