feat(frontend): manage projects and their context in the desktop client

A conversation that only lives in memory is lost when the window closes, and
long answers used to be cut off at the window edge because a scroll area
inherits the layout of the parent it is added to. Projects give each exchange a
durable context, the reload and verification actions make that context
observable instead of a black box, and laying the text out before drawing the
bubble keeps every answer inside the column.
This commit is contained in:
BlackAngelTV committed 2026-10-05 21:39:55 +02:00
1 parent 6ebf550eb0
commit b9e23cf975
9 files changed
+2284 -212

No files matched your search

+7 -2
View File
@@ -63,6 +63,8 @@ fn is_file(path: &Path) -> bool {
#[derive(Debug, Clone)]
pub enum VoiceEvent {
Transcribed(String),
/// Playback of a synthesized answer finished.
Spoken,
TranscriptionError(String),
SpeechError(String),
}
@@ -173,8 +175,11 @@ where
}
match tts.as_mut().expect("tts initialised above").synthesize(&text) {
Ok((samples, sample_rate)) => {
if let Err(error) = audio::play_blocking(&samples, sample_rate) {
on_event(VoiceEvent::SpeechError(error.to_string()));
match audio::play_blocking(&samples, sample_rate) {
Ok(()) => on_event(VoiceEvent::Spoken),
Err(error) => {
on_event(VoiceEvent::SpeechError(error.to_string()))
}
}
}
Err(error) => on_event(VoiceEvent::SpeechError(error.to_string())),