Add Calibrate AI persona presets with per-mode system prompts
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 02:31:14 -07:00
parent f89ba94cb7
commit 4ce9826660
12 changed files with 725 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
/** 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;
}