import { PluginConfig } from "./types.js";
export const DEFAULT_CONFIG: PluginConfig = {
enabledEnhancers: [
"clarity",
"specificity",
"context",
"chain-of-thought",
"persona",
"format",
"concise",
"creative",
"technical",
"constraints",
],
temperature: 0.7,
maxVariants: 5,
};
export class ConfigService {
private config: PluginConfig;
constructor(initialConfig?: Partial<PluginConfig>) {
this.config = { ...DEFAULT_CONFIG, ...initialConfig };
}
getConfig(): PluginConfig {
return { ...this.config };
}
getEnabledEnhancerIds(): string[] {
return this.config.enabledEnhancers;
}
getTemperature(enhancerId: string): number {
return this.config.temperature;
}
}
export const configSchematics = {
enabledEnhancers: {
type: "checkbox",
label: "Włączone ulepszenia",
options: [
{ value: "clarity", label: "✨ Klarowność" },
{ value: "specificity", label: "🎯 Konkretyzacja" },
{ value: "context", label: "đź“– Kontekst" },
{ value: "chain-of-thought", label: "đź§ Chain of Thought" },
{ value: "persona", label: "👤 Perspektywa eksperta" },
{ value: "format", label: "📊 Format" },
{ value: "concise", label: "✂️ Kompresja" },
{ value: "creative", label: "🎨 Kreatywność" },
{ value: "technical", label: "⚙️ Precyzja techniczna" },
{ value: "constraints", label: "đźš§ Ograniczenia" },
],
default: DEFAULT_CONFIG.enabledEnhancers,
},
temperature: {
type: "slider",
label: "Kreatywność",
min: 0.1,
max: 1.0,
step: 0.1,
default: 0.7,
},
};
export const globalConfigSchematics = configSchematics;