- {/* Context Tabs */}
-
-
- {coach.contexts.map(ctx => (
-
- ))}
-
-
-
-
- {/* New Context Form */}
- {showNewContext && (
-
-
setNewTitle(e.target.value)}
- onKeyDown={e => e.key === 'Enter' && handleCreateContext()}
- autoFocus
- />
-
setNewDescription(e.target.value)}
- />
-
-
-
-
-
-
- )}
-
- {/* No Context Selected */}
- {!coach.selectedContextId && !showNewContext && (
-
-
Willkommen beim Kommunikations-Coach
-
Wähle ein bestehendes Thema oder erstelle ein neues, um zu beginnen.
-
-
- )}
-
- {/* Chat Area */}
- {coach.selectedContextId && (
-
- {/* Session controls */}
- {!coach.session && (
-
-
{coach.selectedContext?.title}
-
{coach.selectedContext?.description || 'Starte eine neue Coaching-Session zu diesem Thema.'}
-
- {personas.length > 0 && (
-
-
-
- {personas.map(p => (
-
- ))}
-
-
- )}
-
-
-
- )}
-
- {/* Messages */}
- {coach.session && (
- <>
-
-
- Session aktiv - {coach.selectedContext?.title}
-
-
- {isTtsPlaying && (
-
- )}
- {coach.wasInterrupted && !isTtsPlaying && (
-
- )}
-
-
-
-
-
-
-
-
- {coach.messages.map(msg => (
-
-
-
- {msg.content}
-
-
-
- {msg.createdAt ? new Date(msg.createdAt).toLocaleTimeString('de-CH', { hour: '2-digit', minute: '2-digit' }) : ''}
-
-
- ))}
- {liveTranscript && (
-
- )}
- {coach.isStreaming && (
-
-
- {coach.streamingMessage ? (
-
- {coach.streamingMessage}
-
- ) : (
-
- {coach.streamingStatus || 'Coach denkt nach'}
- ...
-
- )}
-
-
- )}
-
-
-
- {/* Input: Chat und Voice parallel (CONCEPT: Voice first, always with text fallback) */}
-
-
-
- {coach.isMuted
- ? 'Stumm – Mikrofon aus'
- : coach.isStreaming
- ? (coach.streamingStatus || 'Coach antwortet...')
- : isUserSpeaking
- ? 'Spricht...'
- : isListening
- ? 'Mikrofon an – bitte sprechen'
- : 'Mikrofon wird gestartet...'}
-
-
-
-
-
- >
- )}
-
- {/* Error */}
- {coach.error && (
-
{coach.error}
- )}
-
- )}
-
- );
-};
-
-function _categoryIcon(category: string): string {
- const icons: Record