mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-15 01:28:27 +00:00
Improved how AI Studio saves its files (#1201)
This commit is contained in:
1 parent
b7255694cd
commit
dc97db256e
24 files changed
+626
-258
No files matched your search
@@ -1,10 +1,18 @@
|
||||
@inherits MSGComponentBase
|
||||
|
||||
@*
|
||||
The confidence belongs to the provider chosen right next to it, so both share one row. It uses the icon trigger,
|
||||
like the chat does, so the row ends in a field followed by one compact icon button.
|
||||
Do not add a margin to that button to "correct" its height: a dense outlined select with a label carries
|
||||
margin-top 8px and margin-bottom 4px of its own, so centring the boxes already lands within a few pixels of the
|
||||
visible frame, and any added margin makes it worse. Baseline alignment does not work here either, because the
|
||||
wrapper below takes its baseline from its last line box, which sits under the input.
|
||||
*@
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Wrap="Wrap.NoWrap">
|
||||
@* ProviderSelection marks its select as flex-grow-0, and that utility is declared !important, so StretchItems
|
||||
cannot widen it. The width has to come from here. *@
|
||||
<div class="flex-grow-1">
|
||||
<ProviderSelection ProviderSettings="@this.ProviderSettings" ProviderSettingsChanged="@this.ProviderSettingsChanged" ValidateProvider="@this.ValidateProvider"/>
|
||||
<ProviderSelection ProviderSettings="@this.ProviderSettings" ProviderSettingsChanged="@this.ProviderSettingsChanged" ValidateProvider="@this.ValidateProvider" ExplicitMinimumConfidence="@this.ExplicitMinimumConfidence" Disabled="@this.Disabled"/>
|
||||
</div>
|
||||
@if (this.SettingsManager.ConfigurationData.Confidence.ShowProviderConfidence)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using AIStudio.Provider;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Components;
|
||||
@@ -29,4 +31,17 @@ public partial class ProviderSelectionWithConfidence : MSGComponentBase
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Func<AIStudio.Settings.Provider, string?> ValidateProvider { get; set; } = _ => null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confidence a provider needs at least to be offered, when it is higher than the minimum of the
|
||||
/// component, see ProviderSelection.ExplicitMinimumConfidence.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public ConfidenceLevel ExplicitMinimumConfidence { get; set; } = ConfidenceLevel.UNKNOWN;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the selection is disabled, see ProviderSelection.Disabled.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Disabled { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user