merge: feat/aep-b1-chatbot — checkpoint AEP (intégration du 22/10)

This commit is contained in:
Jules Neny
2026-10-22 23:10:26 +02:00
22 changed files with 980 additions and 366 deletions
+27
View File
@@ -0,0 +1,27 @@
/**
* Mode de profondeur des chatbots (M3) — contrat partagé front/serveur.
* Champ de body : `profondeur` = 'rapide' | 'approfondi' (défaut 'rapide').
* Les libellés affichés vivent ICI, à un seul endroit : les changer ne touche ni
* le composant ni le serveur.
*/
export type ChatProfondeur = 'rapide' | 'approfondi'
export const CHAT_PROFONDEUR_DEFAUT: ChatProfondeur = 'rapide'
export const CHAT_PROFONDEUR_LIBELLES: Record<ChatProfondeur, string> = {
rapide: 'Question',
approfondi: 'Réflexion plus profonde',
}
/** Sous-texte (title/aria) de chaque option. */
export const CHAT_PROFONDEUR_AIDES: Record<ChatProfondeur, string> = {
rapide: 'Réponse directe et concise',
approfondi: 'Une réponse plus longue, qui questionne ton besoin avant de répondre',
}
export const CHAT_PROFONDEURS = Object.keys(CHAT_PROFONDEUR_LIBELLES) as ChatProfondeur[]
/** Normalise une valeur inconnue (body, stockage) vers un mode valide. */
export function normaliserProfondeur(v: unknown): ChatProfondeur {
return v === 'approfondi' ? 'approfondi' : 'rapide'
}