mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:39:46 +00:00
Improved the configured provider table: long model names are now truncated
This commit is contained in:
parent
f6f207cffb
commit
fd38a71d5d
@ -29,11 +29,11 @@
|
||||
<MudTd>
|
||||
@if (context.UsedProvider is not Providers.SELF_HOSTED)
|
||||
{
|
||||
@context.Model
|
||||
@this.GetProviderModelName(context)
|
||||
}
|
||||
else if (context.UsedProvider is Providers.SELF_HOSTED && context.Host is not Host.LLAMACPP)
|
||||
{
|
||||
@context.Model
|
||||
@this.GetProviderModelName(context)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -111,5 +111,12 @@ public partial class Settings : ComponentBase
|
||||
_ => string.Empty,
|
||||
};
|
||||
|
||||
private string GetProviderModelName(AIStudio.Settings.Provider provider)
|
||||
{
|
||||
const int MAX_LENGTH = 36;
|
||||
var modelName = provider.Model.ToString();
|
||||
return modelName.Length > MAX_LENGTH ? "[...] " + modelName[^Math.Min(MAX_LENGTH, modelName.Length)..] : modelName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
5
app/MindWork AI Studio/wwwroot/changelog/v0.8.3.md
Normal file
5
app/MindWork AI Studio/wwwroot/changelog/v0.8.3.md
Normal file
@ -0,0 +1,5 @@
|
||||
# v0.8.3 (WIP)
|
||||
- Migrated UI framework from MudBlazor v6.x.x to v7.x.x
|
||||
- Added an option to configure the behavior of the navigation bar in the settings
|
||||
- Improved the handling of self-hosted provider hostnames
|
||||
- Improved the configured provider table: long model names are now truncated
|
Loading…
Reference in New Issue
Block a user