From 245f00125e6cbab210a0b2d424e892aca899d5dc Mon Sep 17 00:00:00 2001 From: sudoeren Date: Thu, 27 Aug 2026 21:31:20 +0300 Subject: [PATCH] Report the effective speech language on the finished run --- dikte/worker.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dikte/worker.py b/dikte/worker.py index 8182cd8..48fb82b 100644 --- a/dikte/worker.py +++ b/dikte/worker.py @@ -146,6 +146,10 @@ class Pipeline(QObject): text = raw warning = "" + # The language the run actually spoke, reported to the window, the + # clipboard path and the history alike: the detected code, or the + # configured one when nothing was detected to replace it. + speech_language = detected or conf["language"] # Remembered rather than re-derived at the history write below: the # ask path runs cleanup under a different setting, and the record # should say what happened, not what one of the two gates implies. @@ -195,9 +199,7 @@ class Pipeline(QObject): "question": question, "assistant": assistant.provider(conf) if ask else "", "assistant_model": assistant.model(conf) if ask else "", - # The language the run actually spoke: the detected code, or the - # configured one when nothing was detected to replace it. - "speech_language": detected or conf["language"], + "speech_language": speech_language, "raw": raw, "text": text, } @@ -236,7 +238,7 @@ class Pipeline(QObject): time.sleep(0.35) paste.copy_bytes(previous) - self.finished.emit(raw, text, warning, detected) + self.finished.emit(raw, text, warning, speech_language) except assistant.Cancelled: self.cancelled.emit()