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:
@@ -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: 'مشتری خاص',
|
||||
};
|
||||
@@ -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}`;
|
||||
}
|
||||
Reference in New Issue
Block a user