clean up prompts and improve quality

This commit is contained in:
jpremill committed 2026-03-06 08:46:03 -05:00
1 parent 9290cc18fd
commit 5b2da87f05
44 files changed
+6711 -414

No files matched your search

+27 -26
View File
@@ -1,9 +1,12 @@
import React from 'react';
import { UserSettings } from '../types';
import { X, Volume2, Check, Info, Mic2, Settings2 } from 'lucide-react';
import Tooltip from './Tooltip';
import AudioDeviceSelector from './AudioDeviceSelector';
import { Button } from './ui/button';
import { Card } from './ui/card';
import { Badge } from './ui/badge';
import { ScrollArea } from './ui/scroll-area';
interface SettingsModalProps {
settings: UserSettings;
@@ -41,13 +44,13 @@ const SettingsModal: React.FC<SettingsModalProps> = ({ settings, onUpdate, onClo
<p className="text-[10px] text-slate-400 font-bold uppercase tracking-widest">Configure your AI clinical partner</p>
</div>
</div>
<button onClick={onClose} className="p-2 hover:bg-slate-200 rounded-xl transition-colors text-slate-400">
<Button variant="ghost" size="icon" onClick={onClose} className="text-slate-400 hover:bg-slate-200 rounded-xl">
<X size={20} />
</button>
</Button>
</div>
<div className="p-8 space-y-8 overflow-y-auto">
<section className="space-y-4">
<ScrollArea className="p-8 space-y-8 flex-grow">
<section className="space-y-4 pb-6">
<div className="flex items-center justify-between">
<h3 className="text-xs font-black text-slate-400 uppercase tracking-widest flex items-center gap-2">
<Mic2 size={14} className="text-teal-600" />
@@ -60,56 +63,54 @@ const SettingsModal: React.FC<SettingsModalProps> = ({ settings, onUpdate, onClo
<div className="grid grid-cols-1 gap-3">
{VOICE_OPTIONS.map((voice) => (
<button
<Card
key={voice.id}
onClick={() => onUpdate({ ...settings, voiceName: voice.id, genderPreference: voice.gender, vocalStyle: voice.style })}
className={`flex items-center justify-between p-4 rounded-2xl border-2 transition-all text-left ${
settings.voiceName === voice.id
className={`flex flex-row items-center justify-between p-4 cursor-pointer transition-all ${settings.voiceName === voice.id
? 'bg-teal-50 border-teal-500 shadow-md shadow-teal-100'
: 'bg-white border-slate-100 hover:border-slate-200'
}`}
: 'bg-white border-slate-200 hover:border-teal-200'
}`}
>
<div className="flex items-center gap-4">
<div className={`w-10 h-10 rounded-full flex items-center justify-center ${
settings.voiceName === voice.id ? 'bg-teal-600 text-white' : 'bg-slate-100 text-slate-400'
}`}>
<div className={`w-10 h-10 rounded-full flex items-center shrink-0 justify-center ${settings.voiceName === voice.id ? 'bg-teal-600 text-white' : 'bg-slate-100 text-slate-400'
}`}>
<Volume2 size={18} />
</div>
<div>
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 mb-1">
<span className="font-bold text-slate-800">{voice.label}</span>
<span className="text-[9px] font-black uppercase text-slate-400 bg-slate-100 px-1.5 py-0.5 rounded">
<Badge variant="secondary" className="text-[9px] font-black uppercase text-slate-500 rounded">
{voice.gender} • {voice.style}
</span>
</Badge>
</div>
<p className="text-xs text-slate-500 font-light mt-0.5">{voice.description}</p>
</div>
</div>
{settings.voiceName === voice.id && (
<div className="bg-teal-600 text-white p-1 rounded-full">
<div className="bg-teal-600 text-white p-1 rounded-full shrink-0 ml-2">
<Check size={14} />
</div>
)}
</button>
</Card>
))}
</div>
</section>
<section className="space-y-4">
<section className="space-y-4 pb-6">
<div className="flex items-center justify-between">
<h3 className="text-xs font-black text-slate-400 uppercase tracking-widest flex items-center gap-2">
<Settings2 size={14} className="text-teal-600" />
Hardware Configuration
</h3>
</div>
<AudioDeviceSelector
<AudioDeviceSelector
selectedDeviceId={settings.preferredAudioDeviceId}
onSelect={(deviceId) => onUpdate({ ...settings, preferredAudioDeviceId: deviceId })}
/>
</section>
<div className="bg-amber-50 border border-amber-100 rounded-2xl p-4 flex gap-3">
<div className="bg-amber-50 border border-amber-100 rounded-2xl p-4 flex gap-3 mb-6">
<div className="text-amber-600 mt-0.5">
<Info size={18} />
</div>
@@ -117,15 +118,15 @@ const SettingsModal: React.FC<SettingsModalProps> = ({ settings, onUpdate, onClo
These settings apply to <strong>Voice Mode</strong> interactions only. Text-based roleplay personas are dynamically generated based on each specific scenario.
</p>
</div>
</div>
</ScrollArea>
<div className="p-6 bg-slate-50 border-t border-slate-200 flex justify-end flex-shrink-0">
<button
<Button
onClick={onClose}
className="bg-slate-800 text-white px-8 py-3 rounded-2xl font-bold hover:bg-slate-900 shadow-lg shadow-slate-200 transition-all uppercase tracking-widest text-[10px]"
className="bg-slate-800 text-white px-8 h-12 rounded-2xl font-bold hover:bg-slate-900 shadow-lg shadow-slate-200 transition-all uppercase tracking-widest text-[10px]"
>
Save Preferences
</button>
</Button>
</div>
</div>
</div>