import { Enhancer, EnhancementVariant, GenerationOptions } from "../types";
export class ConciseEnhancer implements Enhancer {
readonly id = "concise";
readonly label = "✂️ Kompresja";
readonly description =
"Skraca prompt do minimum słów bez utraty istotnych informacji";
readonly icon = "✂️";
readonly systemPrompt = `You are a conciseness-focused prompt refactoring assistant.
Rewrite the user's prompt as compact as possible:
- Remove filler words, greetings, small talk
- Eliminate redundancy and rephrasing of the same point
- Use imperative mood (command-style, not requests)
- Merge related requirements into single statements
- Keep ALL substantive information — no loss of meaning
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.3,
});
return {
id: this.id,
label: this.label,
description: this.description,
prompt: enhancedPrompt,
icon: this.icon,
};
}
}