mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-04 06:22:57 +00:00
Fixed an issue that caused live translation to stop working (#463)
This commit is contained in:
parent
2ae292009d
commit
4b2da61a90
@ -242,6 +242,9 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
protected async Task<string> AddAIResponseAsync(DateTimeOffset time, bool hideContentFromUser = false)
|
protected async Task<string> AddAIResponseAsync(DateTimeOffset time, bool hideContentFromUser = false)
|
||||||
{
|
{
|
||||||
|
var manageCancellationLocally = this.cancellationTokenSource is null;
|
||||||
|
this.cancellationTokenSource ??= new CancellationTokenSource();
|
||||||
|
|
||||||
var aiText = new ContentText
|
var aiText = new ContentText
|
||||||
{
|
{
|
||||||
// We have to wait for the remote
|
// We have to wait for the remote
|
||||||
@ -275,6 +278,12 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
this.isProcessing = false;
|
this.isProcessing = false;
|
||||||
this.StateHasChanged();
|
this.StateHasChanged();
|
||||||
|
|
||||||
|
if(manageCancellationLocally)
|
||||||
|
{
|
||||||
|
this.cancellationTokenSource.Dispose();
|
||||||
|
this.cancellationTokenSource = null;
|
||||||
|
}
|
||||||
|
|
||||||
// Return the AI response:
|
// Return the AI response:
|
||||||
return aiText.Text;
|
return aiText.Text;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
# v0.9.44, build 219 (2025-05-xx xx:xx UTC)
|
# v0.9.44, build 219 (2025-05-xx xx:xx UTC)
|
||||||
- Improved localization code & German translation.
|
- 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.
|
Loading…
Reference in New Issue
Block a user