import { Enhancer, EnhancementVariant, GenerationOptions } from "../types";
export class FormatEnhancer implements Enhancer {
readonly id = "format";
readonly label = "📊 Format wyjścia";
readonly description = "Wymusza konkretnÄ… strukturÄ™ odpowiedzi";
readonly icon = "📊";
readonly systemPrompt = `You are a format-focused prompt refactoring assistant.
Rewrite the user's prompt to request a specific output structure:
- Choose the best format for the data: table, list, JSON, markdown
- Define exact columns, fields, or sections expected
- Specify sorting order, grouping, or categories
- Add a summary or recommendations section
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: options.temperature * 0.6,
});
return {
id: this.id,
label: this.label,
description: this.description,
prompt: enhancedPrompt,
icon: this.icon,
};
}
}