Fixed bug when API could not be loaded

This commit is contained in:
Thorsten Sommer 2026-01-11 14:44:36 +01:00
parent 9eed4d950e
commit 7868e430ec
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
6 changed files with 21 additions and 3 deletions

View File

@ -25,7 +25,7 @@
@if (this.DataLLMProvider.IsAPIKeyNeeded(this.DataHost))
{
<SecretInputField @bind-Secret="@this.dataAPIKey" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
<SecretInputField Secret="@this.dataAPIKey" SecretChanged="@this.OnAPIKeyChanged" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
}
@if (this.DataLLMProvider.IsHostnameNeeded())

View File

@ -240,6 +240,12 @@ public partial class EmbeddingProviderDialog : MSGComponentBase, ISecretId
}
private void Cancel() => this.MudDialog.Cancel();
private void OnAPIKeyChanged(string apiKey)
{
this.dataAPIKey = apiKey;
this.dataAPIKeyStorageIssue = string.Empty;
}
private async Task ReloadModels()
{

View File

@ -22,7 +22,7 @@
@if (this.DataLLMProvider.IsAPIKeyNeeded(this.DataHost))
{
<SecretInputField @bind-Secret="@this.dataAPIKey" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
<SecretInputField Secret="@this.dataAPIKey" SecretChanged="@this.OnAPIKeyChanged" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
}
@if (this.DataLLMProvider.IsHostnameNeeded())

View File

@ -254,6 +254,12 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
}
private void Cancel() => this.MudDialog.Cancel();
private void OnAPIKeyChanged(string apiKey)
{
this.dataAPIKey = apiKey;
this.dataAPIKeyStorageIssue = string.Empty;
}
private async Task ReloadModels()
{

View File

@ -25,7 +25,7 @@
@if (this.DataLLMProvider.IsAPIKeyNeeded(this.DataHost))
{
<SecretInputField @bind-Secret="@this.dataAPIKey" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
<SecretInputField Secret="@this.dataAPIKey" SecretChanged="@this.OnAPIKeyChanged" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
}
@if (this.DataLLMProvider.IsHostnameNeeded())

View File

@ -248,6 +248,12 @@ public partial class TranscriptionProviderDialog : MSGComponentBase, ISecretId
}
private void Cancel() => this.MudDialog.Cancel();
private void OnAPIKeyChanged(string apiKey)
{
this.dataAPIKey = apiKey;
this.dataAPIKeyStorageIssue = string.Empty;
}
private async Task ReloadModels()
{