mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 17:19:47 +00:00
68 lines
3.7 KiB
Plaintext
68 lines
3.7 KiB
Plaintext
|
@page "/assistant/icons"
|
||
|
@using AIStudio.Chat
|
||
|
@using AIStudio.Settings
|
||
|
|
||
|
<MudText Typo="Typo.h3" Class="mb-2 mr-3">
|
||
|
Icon Finder
|
||
|
</MudText>
|
||
|
|
||
|
<InnerScrolling HeaderHeight="12.3em">
|
||
|
<ChildContent>
|
||
|
<MudForm @ref="@this.form" @bind-IsValid="@this.inputIsValid" @bind-Errors="@this.inputIssues" Class="pr-2">
|
||
|
<MudText Typo="Typo.body1" Align="Align.Justify" Class="mb-6">
|
||
|
Finding the right icon for a context, such as for a piece of text, is not easy. The first challenge:
|
||
|
You need to extract a concept from your context, such as from a text. Let's take an example where
|
||
|
your text contains statements about multiple departments. The sought-after concept could be "departments."
|
||
|
The next challenge is that we need to anticipate the bias of the icon designers: under the search term
|
||
|
"departments," there may be no relevant icons or only unsuitable ones. Depending on the icon source,
|
||
|
it might be more effective to search for "buildings," for instance. LLMs assist you with both steps.
|
||
|
</MudText>
|
||
|
|
||
|
<MudTextField T="string" @bind-Text="@this.inputContext" Validation="@this.ValidatingContext" AdornmentIcon="@Icons.Material.Filled.TextFields" Adornment="Adornment.Start" Label="Yout context" Variant="Variant.Outlined" Lines="3" AutoGrow="@true" MaxLines="12" Class="mb-3"/>
|
||
|
|
||
|
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
|
||
|
<MudSelect T="IconSources" @bind-Value="@this.selectedIconSource" AdornmentIcon="@Icons.Material.Filled.Source" Adornment="Adornment.Start" Label="Your icon source" Variant="Variant.Outlined" Margin="Margin.Dense">
|
||
|
@foreach (var source in Enum.GetValues<IconSources>())
|
||
|
{
|
||
|
<MudSelectItem Value="@source">@source.Name()</MudSelectItem>
|
||
|
}
|
||
|
</MudSelect>
|
||
|
@if (this.selectedIconSource is not IconSources.GENERIC)
|
||
|
{
|
||
|
<MudButton Href="@this.selectedIconSource.URL()" Target="_blank" Variant="Variant.Filled" Size="Size.Medium">Open website</MudButton>
|
||
|
}
|
||
|
</MudStack>
|
||
|
|
||
|
<MudSelect T="Provider" @bind-Value="@this.selectedProvider" Validation="@this.ValidatingProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="Provider" Class="mb-3 rounded-lg" Variant="Variant.Outlined">
|
||
|
@foreach (var provider in this.SettingsManager.ConfigurationData.Providers)
|
||
|
{
|
||
|
<MudSelectItem Value="@provider"/>
|
||
|
}
|
||
|
</MudSelect>
|
||
|
|
||
|
<MudButton Variant="Variant.Filled" Class="mb-3" OnClick="() => this.FindIcon()">
|
||
|
Find icons
|
||
|
</MudButton>
|
||
|
</MudForm>
|
||
|
|
||
|
@if (this.inputIssues.Any())
|
||
|
{
|
||
|
<MudPaper Class="pr-2 mt-3" Outlined="@true">
|
||
|
<MudText Typo="Typo.h6">Issues</MudText>
|
||
|
<MudList Clickable="@true">
|
||
|
@foreach (var issue in this.inputIssues)
|
||
|
{
|
||
|
<MudListItem Icon="@Icons.Material.Filled.Error" IconColor="Color.Error">
|
||
|
@issue
|
||
|
</MudListItem>
|
||
|
}
|
||
|
</MudList>
|
||
|
</MudPaper>
|
||
|
}
|
||
|
|
||
|
@if (this.resultingContentBlock is not null)
|
||
|
{
|
||
|
<ContentBlockComponent Role="@this.resultingContentBlock.Role" Type="@this.resultingContentBlock.ContentType" Time="@this.resultingContentBlock.Time" Content="@this.resultingContentBlock.Content" Class="mr-2"/>
|
||
|
}
|
||
|
</ChildContent>
|
||
|
</InnerScrolling>
|