From 48da1b156366b6fe9e7d047a19d4e882dda91d4d Mon Sep 17 00:00:00 2001 From: PaulKoudelka Date: Fri, 27 Feb 2026 10:40:18 +0100 Subject: [PATCH] Clean up of the code --- .../Components/UserPromptComponent.cs | 10 +++------- runtime/Cargo.toml | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/MindWork AI Studio/Components/UserPromptComponent.cs b/app/MindWork AI Studio/Components/UserPromptComponent.cs index cd1fad9f..03139a52 100644 --- a/app/MindWork AI Studio/Components/UserPromptComponent.cs +++ b/app/MindWork AI Studio/Components/UserPromptComponent.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Components; using Timer = System.Timers.Timer; -using MudBlazor; namespace AIStudio.Components; @@ -14,9 +13,6 @@ public class UserPromptComponent : MudTextField [Parameter] public TimeSpan DebounceTime { get; set; } = TimeSpan.FromMilliseconds(800); - // Use base Text / TextChanged from MudTextField; do not redeclare to avoid duplicate parameters. - // Text binding is handled through those base members; we only add debouncing behavior. - [Parameter] public Func WhenTextChangedAsync { get; set; } = _ => Task.CompletedTask; @@ -29,8 +25,8 @@ public class UserPromptComponent : MudTextField protected override async Task OnInitializedAsync() { this.text = this.Text ?? string.Empty; - this.lastParameterText = this.Text ?? string.Empty; - this.lastNotifiedText = this.Text ?? string.Empty; + this.lastParameterText = this.text; + this.lastNotifiedText = this.text; this.debounceTimer.AutoReset = false; this.debounceTimer.Interval = this.DebounceTime.TotalMilliseconds; this.debounceTimer.Elapsed += (_, _) => @@ -61,7 +57,7 @@ public class UserPromptComponent : MudTextField if (this.Text != this.lastParameterText) { this.text = this.Text ?? string.Empty; - this.lastParameterText = this.Text ?? string.Empty; + this.lastParameterText = this.text; } this.debounceTimer.Stop(); diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 8b7c04d0..0e7acd53 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -42,9 +42,7 @@ pptx-to-md = "0.4.0" tempfile = "3.8" strum_macros = "0.27" sysinfo = "0.38.0" -tiktoken-rs = "0.9.1" tokenizers = "0.22.2" -hf-hub = "0.4.3" # Fixes security vulnerability downstream, where the upstream is not fixed yet: time = "0.3.47" # -> Rocket