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
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
60
server/web/src/help/aiPersonas.ts
Normal file
60
server/web/src/help/aiPersonas.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user