mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 14:49:06 +00:00
Added a tooltip to the confidence card button (#143)
This commit is contained in:
parent
5608b48a2d
commit
5fa2f3c822
@ -1,56 +1,58 @@
|
|||||||
@using AIStudio.Provider
|
@using AIStudio.Provider
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
@if (this.Mode is ConfidenceInfoMode.ICON)
|
<MudTooltip Text="Shows and hides the confidence card with information about the selected LLM provider.">
|
||||||
{
|
@if (this.Mode is ConfidenceInfoMode.ICON)
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Security" Class="confidence-icon" Style="@this.Provider.GetConfidence(this.SettingsManager).SetColorStyle()" OnClick="@(() => this.ToggleConfidence())"/>
|
{
|
||||||
}
|
<MudIconButton Icon="@Icons.Material.Filled.Security" Class="confidence-icon" Style="@this.Provider.GetConfidence(this.SettingsManager).SetColorStyle()" OnClick="@(() => this.ToggleConfidence())"/>
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Security" IconClass="confidence-icon" Style="@this.Provider.GetConfidence(this.SettingsManager).SetColorStyle()" OnClick="@(() => this.ToggleConfidence())">
|
{
|
||||||
Confidence
|
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Security" IconClass="confidence-icon" Style="@this.Provider.GetConfidence(this.SettingsManager).SetColorStyle()" OnClick="@(() => this.ToggleConfidence())">
|
||||||
</MudButton>
|
Confidence
|
||||||
}
|
|
||||||
|
|
||||||
<MudPopover Open="@this.showConfidence" AnchorOrigin="Origin.TopLeft" TransformOrigin="Origin.BottomLeft" Style="@this.GetPopoverStyle()" DropShadow="@true" Class="border-solid border-4 rounded-lg">
|
|
||||||
<MudCard>
|
|
||||||
<MudCardHeader>
|
|
||||||
<CardHeaderContent>
|
|
||||||
<MudText Typo="Typo.h5">Confidence Card</MudText>
|
|
||||||
</CardHeaderContent>
|
|
||||||
</MudCardHeader>
|
|
||||||
<MudCardContent>
|
|
||||||
<MudText Typo="Typo.h6">Description</MudText>
|
|
||||||
<MudMarkdown Value="@this.currentConfidence.Description"/>
|
|
||||||
|
|
||||||
@if (this.currentConfidence.Sources.Count > 0)
|
|
||||||
{
|
|
||||||
<MudText Typo="Typo.h6">Sources</MudText>
|
|
||||||
<MudList T="@string">
|
|
||||||
@foreach (var sourceTuple in this.GetConfidenceSources())
|
|
||||||
{
|
|
||||||
<MudListItem Icon="@Icons.Material.Filled.Link" Href="@sourceTuple.Source" Target="_blank" Text="@sourceTuple.Index"/>
|
|
||||||
}
|
|
||||||
</MudList>
|
|
||||||
}
|
|
||||||
|
|
||||||
@if (!string.IsNullOrWhiteSpace(this.currentConfidence.Region))
|
|
||||||
{
|
|
||||||
<MudText Typo="Typo.h6">Region</MudText>
|
|
||||||
<MudText Typo="Typo.body1" Class="mb-3">
|
|
||||||
<b>@this.currentConfidence.Region</b>
|
|
||||||
</MudText>
|
|
||||||
}
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h6">Confidence Level</MudText>
|
|
||||||
<MudText Typo="Typo.body1" Style="@this.GetCurrentConfidenceColor()">
|
|
||||||
<b>@this.currentConfidence.Level.GetName()</b>
|
|
||||||
</MudText>
|
|
||||||
</MudCardContent>
|
|
||||||
<MudCardActions>
|
|
||||||
<MudButton Variant="Variant.Filled" OnClick="@(() => this.HideConfidence())">
|
|
||||||
Close
|
|
||||||
</MudButton>
|
</MudButton>
|
||||||
</MudCardActions>
|
}
|
||||||
</MudCard>
|
</MudTooltip>
|
||||||
</MudPopover>
|
|
||||||
|
<MudPopover Open="@this.showConfidence" AnchorOrigin="Origin.TopLeft" TransformOrigin="Origin.BottomLeft" Style="@this.GetPopoverStyle()" DropShadow="@true" Class="border-solid border-4 rounded-lg">
|
||||||
|
<MudCard>
|
||||||
|
<MudCardHeader>
|
||||||
|
<CardHeaderContent>
|
||||||
|
<MudText Typo="Typo.h5">Confidence Card</MudText>
|
||||||
|
</CardHeaderContent>
|
||||||
|
</MudCardHeader>
|
||||||
|
<MudCardContent>
|
||||||
|
<MudText Typo="Typo.h6">Description</MudText>
|
||||||
|
<MudMarkdown Value="@this.currentConfidence.Description"/>
|
||||||
|
|
||||||
|
@if (this.currentConfidence.Sources.Count > 0)
|
||||||
|
{
|
||||||
|
<MudText Typo="Typo.h6">Sources</MudText>
|
||||||
|
<MudList T="@string">
|
||||||
|
@foreach (var sourceTuple in this.GetConfidenceSources())
|
||||||
|
{
|
||||||
|
<MudListItem Icon="@Icons.Material.Filled.Link" Href="@sourceTuple.Source" Target="_blank" Text="@sourceTuple.Index"/>
|
||||||
|
}
|
||||||
|
</MudList>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (!string.IsNullOrWhiteSpace(this.currentConfidence.Region))
|
||||||
|
{
|
||||||
|
<MudText Typo="Typo.h6">Region</MudText>
|
||||||
|
<MudText Typo="Typo.body1" Class="mb-3">
|
||||||
|
<b>@this.currentConfidence.Region</b>
|
||||||
|
</MudText>
|
||||||
|
}
|
||||||
|
|
||||||
|
<MudText Typo="Typo.h6">Confidence Level</MudText>
|
||||||
|
<MudText Typo="Typo.body1" Style="@this.GetCurrentConfidenceColor()">
|
||||||
|
<b>@this.currentConfidence.Level.GetName()</b>
|
||||||
|
</MudText>
|
||||||
|
</MudCardContent>
|
||||||
|
<MudCardActions>
|
||||||
|
<MudButton Variant="Variant.Filled" OnClick="@(() => this.HideConfidence())">
|
||||||
|
Close
|
||||||
|
</MudButton>
|
||||||
|
</MudCardActions>
|
||||||
|
</MudCard>
|
||||||
|
</MudPopover>
|
||||||
</div>
|
</div>
|
@ -178,6 +178,6 @@
|
|||||||
"contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA=="
|
"contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA=="
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"net8.0/osx-x64": {}
|
"net8.0/osx-arm64": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
2
app/MindWork AI Studio/wwwroot/changelog/v0.9.11.md
Normal file
2
app/MindWork AI Studio/wwwroot/changelog/v0.9.11.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# v0.9.11, build 186
|
||||||
|
- Added a tooltip to the confidence card button.
|
Loading…
Reference in New Issue
Block a user