mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
Added the icons for the capabilities to the provider dropdown menu
This commit is contained in:
parent
fc53278c60
commit
7dc927bf3b
@ -2413,6 +2413,18 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T3654011106"] = "Open P
|
|||||||
-- You can switch between your profiles here
|
-- You can switch between your profiles here
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T918741365"] = "You can switch between your profiles here"
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T918741365"] = "You can switch between your profiles here"
|
||||||
|
|
||||||
|
-- Audio input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T1742581112"] = "Audio input possible"
|
||||||
|
|
||||||
|
-- Reasoning
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T2385384423"] = "Reasoning"
|
||||||
|
|
||||||
|
-- Image input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T2685487365"] = "Image input possible"
|
||||||
|
|
||||||
|
-- Speech input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T3005724142"] = "Speech input possible"
|
||||||
|
|
||||||
-- Provider
|
-- Provider
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T900237532"] = "Provider"
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T900237532"] = "Provider"
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,24 @@
|
|||||||
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="@T("Provider")" Class="mb-3 rounded-lg" OuterClass="flex-grow-0" Variant="Variant.Outlined">
|
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="@T("Provider")" Class="mb-3 rounded-lg" OuterClass="flex-grow-0" Variant="Variant.Outlined">
|
||||||
@foreach (var provider in this.GetAvailableProviders())
|
@foreach (var provider in this.GetAvailableProviders())
|
||||||
{
|
{
|
||||||
<MudSelectItem Value="@provider"/>
|
<MudSelectItem Value="@provider">
|
||||||
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="w-100" Wrap="Wrap.NoWrap">
|
||||||
|
<MudText Class="me-2">@provider</MudText>
|
||||||
|
@{
|
||||||
|
var capabilityIcons = this.GetCapabilityIcons(provider);
|
||||||
|
}
|
||||||
|
@if (capabilityIcons.Count > 0)
|
||||||
|
{
|
||||||
|
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1" Wrap="Wrap.NoWrap" Class="flex-grow-0">
|
||||||
|
@foreach (var capabilityIcon in capabilityIcons)
|
||||||
|
{
|
||||||
|
<MudTooltip Text="@capabilityIcon.Tooltip">
|
||||||
|
<MudIcon Icon="@capabilityIcon.Icon" Size="Size.Small" Color="Color.Default" />
|
||||||
|
</MudTooltip>
|
||||||
|
}
|
||||||
|
</MudStack>
|
||||||
|
}
|
||||||
|
</MudStack>
|
||||||
|
</MudSelectItem>
|
||||||
}
|
}
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
using AIStudio.Provider;
|
using AIStudio.Provider;
|
||||||
|
using AIStudio.Settings;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
@ -41,6 +42,26 @@ public partial class ProviderSelection : MSGComponentBase
|
|||||||
this.ProviderSettings = provider;
|
this.ProviderSettings = provider;
|
||||||
await this.ProviderSettingsChanged.InvokeAsync(provider);
|
await this.ProviderSettingsChanged.InvokeAsync(provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IReadOnlyList<CapabilityIcon> GetCapabilityIcons(AIStudio.Settings.Provider provider)
|
||||||
|
{
|
||||||
|
var capabilities = provider.GetModelCapabilities();
|
||||||
|
List<CapabilityIcon> capabilityIcons = [];
|
||||||
|
|
||||||
|
if (capabilities.Contains(Capability.AUDIO_INPUT))
|
||||||
|
capabilityIcons.Add(new(Icons.Material.Filled.GraphicEq, this.T("Audio input possible")));
|
||||||
|
|
||||||
|
if (capabilities.Contains(Capability.SINGLE_IMAGE_INPUT) || capabilities.Contains(Capability.MULTIPLE_IMAGE_INPUT))
|
||||||
|
capabilityIcons.Add(new(Icons.Material.Filled.Image, this.T("Image input possible")));
|
||||||
|
|
||||||
|
if (capabilities.Contains(Capability.SPEECH_INPUT))
|
||||||
|
capabilityIcons.Add(new(Icons.Material.Filled.Mic, this.T("Speech input possible")));
|
||||||
|
|
||||||
|
if (capabilities.Contains(Capability.ALWAYS_REASONING))
|
||||||
|
capabilityIcons.Add(new(Icons.Material.Filled.Psychology, this.T("Reasoning")));
|
||||||
|
|
||||||
|
return capabilityIcons;
|
||||||
|
}
|
||||||
|
|
||||||
[SuppressMessage("Usage", "MWAIS0001:Direct access to `Providers` is not allowed")]
|
[SuppressMessage("Usage", "MWAIS0001:Direct access to `Providers` is not allowed")]
|
||||||
private IEnumerable<AIStudio.Settings.Provider> GetAvailableProviders()
|
private IEnumerable<AIStudio.Settings.Provider> GetAvailableProviders()
|
||||||
@ -84,4 +105,6 @@ public partial class ProviderSelection : MSGComponentBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
|
||||||
|
private readonly record struct CapabilityIcon(string Icon, string Tooltip);
|
||||||
|
}
|
||||||
|
|||||||
@ -2415,6 +2415,18 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T3654011106"] = "Profil
|
|||||||
-- You can switch between your profiles here
|
-- You can switch between your profiles here
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T918741365"] = "Hier können Sie zwischen ihren Profilen wechseln."
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T918741365"] = "Hier können Sie zwischen ihren Profilen wechseln."
|
||||||
|
|
||||||
|
-- Audio input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T1742581112"] = "Audioeingabe möglich"
|
||||||
|
|
||||||
|
-- Reasoning
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T2385384423"] = "Nachdenkend"
|
||||||
|
|
||||||
|
-- Image input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T2685487365"] = "Bildeingabe möglich"
|
||||||
|
|
||||||
|
-- Speech input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T3005724142"] = "Spracheingabe möglich"
|
||||||
|
|
||||||
-- Provider
|
-- Provider
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T900237532"] = "Anbieter"
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T900237532"] = "Anbieter"
|
||||||
|
|
||||||
|
|||||||
@ -2415,6 +2415,18 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T3654011106"] = "Open P
|
|||||||
-- You can switch between your profiles here
|
-- You can switch between your profiles here
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T918741365"] = "You can switch between your profiles here"
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROFILESELECTION::T918741365"] = "You can switch between your profiles here"
|
||||||
|
|
||||||
|
-- Audio input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T1742581112"] = "Audio input possible"
|
||||||
|
|
||||||
|
-- Reasoning
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T2385384423"] = "Reasoning"
|
||||||
|
|
||||||
|
-- Image input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T2685487365"] = "Image input possible"
|
||||||
|
|
||||||
|
-- Speech input possible
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T3005724142"] = "Speech input possible"
|
||||||
|
|
||||||
-- Provider
|
-- Provider
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T900237532"] = "Provider"
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::PROVIDERSELECTION::T900237532"] = "Provider"
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ public static partial class ProviderExtensions
|
|||||||
Capability.TEXT_INPUT, Capability.MULTIPLE_IMAGE_INPUT,
|
Capability.TEXT_INPUT, Capability.MULTIPLE_IMAGE_INPUT,
|
||||||
Capability.TEXT_OUTPUT,
|
Capability.TEXT_OUTPUT,
|
||||||
|
|
||||||
Capability.ALWAYS_REASONING, Capability.FUNCTION_CALLING,
|
Capability.OPTIONAL_REASONING, Capability.FUNCTION_CALLING,
|
||||||
Capability.CHAT_COMPLETION_API,
|
Capability.CHAT_COMPLETION_API,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ public static partial class ProviderExtensions
|
|||||||
Capability.MULTIPLE_IMAGE_INPUT,
|
Capability.MULTIPLE_IMAGE_INPUT,
|
||||||
Capability.TEXT_OUTPUT,
|
Capability.TEXT_OUTPUT,
|
||||||
|
|
||||||
Capability.ALWAYS_REASONING, Capability.FUNCTION_CALLING,
|
Capability.OPTIONAL_REASONING, Capability.FUNCTION_CALLING,
|
||||||
Capability.CHAT_COMPLETION_API,
|
Capability.CHAT_COMPLETION_API,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -158,6 +158,22 @@ public static partial class ProviderExtensions
|
|||||||
Capability.CHAT_COMPLETION_API,
|
Capability.CHAT_COMPLETION_API,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
// Mistral medium 3.5:
|
||||||
|
if (modelName.IndexOf("mistral-medium-3.5") is not -1)
|
||||||
|
return
|
||||||
|
[
|
||||||
|
Capability.TEXT_INPUT,
|
||||||
|
Capability.MULTIPLE_IMAGE_INPUT,
|
||||||
|
Capability.TEXT_OUTPUT,
|
||||||
|
|
||||||
|
Capability.OPTIONAL_REASONING,
|
||||||
|
|
||||||
|
Capability.FUNCTION_CALLING,
|
||||||
|
Capability.CHAT_COMPLETION_API,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
if (modelName.IndexOf("mistral-3") is not -1 ||
|
if (modelName.IndexOf("mistral-3") is not -1 ||
|
||||||
modelName.IndexOf("mistral-large-3") is not -1)
|
modelName.IndexOf("mistral-large-3") is not -1)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
# v26.6.3, build 243 (2026-06-xx xx:xx UTC)
|
# v26.6.3, build 243 (2026-06-xx xx:xx UTC)
|
||||||
- Improved the chat experience by automatically focusing the message composer again when it becomes available. Thanks, Dominic Neuburg (`donework`), for the contribution.
|
- Improved the chat experience by automatically focusing the message composer again when it becomes available. Thanks, Dominic Neuburg (`donework`), for the contribution.
|
||||||
|
- Improved the provider selection by showing small capability icons for supported audio, image, speech, and always_reasoning features of the selected model.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user