Add Ask Mento, customer mood, and Pipecat speech-to-text.

Ship assistant answers, contact moods, voice dictation, and the related CRM UI so these can be deployed to production.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-03 14:20:55 +03:30
co-authored by Cursor
parent 0dd2966f3c
commit 7757c0837d
43 changed files with 5156 additions and 1741 deletions
+10
View File
@@ -0,0 +1,10 @@
import type { PersonMood } from '@mento/shared';
export const PERSON_MOODS: PersonMood[] = ['newcomer', 'happy', 'unhappy', 'special'];
export const PERSON_MOOD_LABELS: Record<PersonMood, string> = {
newcomer: 'مشتری تازه وارد',
happy: 'مشتری خوشحال',
unhappy: 'مشتری ناراضی',
special: 'مشتری خاص',
};
+8
View File
@@ -0,0 +1,8 @@
export function appendSpokenText(current: string, spoken: string): string {
const next = spoken.replace(/\s+/g, ' ').trim();
if (!next) return current;
const prev = current.replace(/\s+$/g, '');
if (!prev) return next;
const glue = /[\s\n]$/.test(current) ? '' : ' ';
return `${prev}${glue}${next}`;
}