mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 02:13:47 +00:00
Added provider icons (#934)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
afdcc0455d
commit
e78a0e61b9
74 files changed
+1018
-74
No files matched your search
@@ -0,0 +1,46 @@
|
||||
using AIStudio.Provider;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a provider icon next to its name.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Providers appear in select items, in table cells, and in group headers. All of them need the
|
||||
/// same icon and text pairing, so this component owns that layout once instead of repeating it at
|
||||
/// every call site.
|
||||
/// </remarks>
|
||||
public partial class ProviderLabel : ComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The configured provider whose icon should be shown. Takes precedence over ProviderType.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public AIStudio.Settings.Provider? ProviderSettings { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The LLM provider whose icon should be shown when no ProviderSettings was given.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public LLMProviders ProviderType { get; set; } = LLMProviders.NONE;
|
||||
|
||||
/// <summary>
|
||||
/// The validated custom icon supplied by a configuration plugin.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string CustomIconDataUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The text shown next to the icon.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string Text { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Additional CSS class for the text.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string TextClass { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in new issue
Block a user