Fixed an issue that caused live translation to stop working (#463)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-05-17 19:17:29 +02:00
1 parent 2ae292009d
commit 4b2da61a90
2 files changed
+11 -1

No files matched your search

@@ -242,6 +242,9 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
protected async Task<string> AddAIResponseAsync(DateTimeOffset time, bool hideContentFromUser = false)
{
var manageCancellationLocally = this.cancellationTokenSource is null;
this.cancellationTokenSource ??= new CancellationTokenSource();
var aiText = new ContentText
{
// We have to wait for the remote
@@ -275,6 +278,12 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
this.isProcessing = false;
this.StateHasChanged();
if(manageCancellationLocally)
{
this.cancellationTokenSource.Dispose();
this.cancellationTokenSource = null;
}
// Return the AI response:
return aiText.Text;
}
@@ -1,3 +1,4 @@
# v0.9.44, build 219 (2025-05-xx xx:xx UTC)
- Improved localization code & German translation.
- Fixed a bug with text fields when their content was read live. This issue caused the user interface to refresh too frequently, resulting in increased energy consumption.
- Fixed a bug with text fields when their content was read live. This issue caused the user interface to refresh too frequently, resulting in increased energy consumption.
- Fixed an issue that caused live translation to stop working.