mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-18 16:22:55 +00:00
Fixed resetting bug in assistants (#535)
Some checks are pending
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Some checks are pending
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
parent
28b470f40b
commit
9ca2860079
@ -50,12 +50,14 @@ public partial class DebouncedTextField : MudComponentBase
|
|||||||
|
|
||||||
private readonly Timer debounceTimer = new();
|
private readonly Timer debounceTimer = new();
|
||||||
private string text = string.Empty;
|
private string text = string.Empty;
|
||||||
|
private string lastParameterText = string.Empty;
|
||||||
|
|
||||||
#region Overrides of ComponentBase
|
#region Overrides of ComponentBase
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
this.text = this.Text;
|
this.text = this.Text;
|
||||||
|
this.lastParameterText = this.Text;
|
||||||
this.debounceTimer.AutoReset = false;
|
this.debounceTimer.AutoReset = false;
|
||||||
this.debounceTimer.Interval = this.DebounceTime.TotalMilliseconds;
|
this.debounceTimer.Interval = this.DebounceTime.TotalMilliseconds;
|
||||||
this.debounceTimer.Elapsed += (_, _) =>
|
this.debounceTimer.Elapsed += (_, _) =>
|
||||||
@ -68,6 +70,19 @@ public partial class DebouncedTextField : MudComponentBase
|
|||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnParametersSet()
|
||||||
|
{
|
||||||
|
// Only sync when the parent's parameter actually changed since the last change:
|
||||||
|
if (this.Text != this.lastParameterText)
|
||||||
|
{
|
||||||
|
this.text = this.Text;
|
||||||
|
this.lastParameterText = this.Text;
|
||||||
|
|
||||||
|
this.debounceTimer.Stop();
|
||||||
|
this.debounceTimer.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
# v0.9.51, build 226 (2025-08-xx xx:xx UTC)
|
# v0.9.51, build 226 (2025-08-xx xx:xx UTC)
|
||||||
|
- Fixed a bug in various assistants where some text fields were not reset when resetting.
|
Loading…
Reference in New Issue
Block a user