Files
AetherForge/server/web/src/help/aiPersonas.ts
AetherForge 4ce9826660
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Add Calibrate AI persona presets with per-mode system prompts
2026-06-07 02:31:14 -07:00

61 lines
1.3 KiB
TypeScript

/** Calibrate AI Control persona presets — distinct LLM system prompt modes. */
export type AIPersonaId = 'aggressive' | 'silent' | 'passive' | 'persuasive' | 'balanced';
export const AI_PERSONA_IDS: AIPersonaId[] = [
'aggressive',
'silent',
'passive',
'persuasive',
'balanced',
];
export const DEFAULT_AI_PERSONA: AIPersonaId = 'balanced';
export interface AIPersonaChip {
id: AIPersonaId;
label: string;
helpField: string;
color: string;
}
export const AI_PERSONA_CHIPS: AIPersonaChip[] = [
{
id: 'aggressive',
label: 'Aggressive',
helpField: 'ai_persona_aggressive',
color: '#ff4466',
},
{
id: 'silent',
label: 'Silent',
helpField: 'ai_persona_silent',
color: '#6b8cff',
},
{
id: 'passive',
label: 'Passive',
helpField: 'ai_persona_passive',
color: '#88ccaa',
},
{
id: 'persuasive',
label: 'Persuasive',
helpField: 'ai_persona_persuasive',
color: '#e8a028',
},
{
id: 'balanced',
label: 'Balanced',
helpField: 'ai_persona_balanced',
color: '#00e8f5',
},
];
export function normalizeAIPersona(value: string | undefined | null): AIPersonaId {
const v = (value ?? '').trim().toLowerCase();
if (AI_PERSONA_IDS.includes(v as AIPersonaId)) {
return v as AIPersonaId;
}
return DEFAULT_AI_PERSONA;
}