Adopted further C# 14 and .NET 10 features (#1158)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-04 14:04:10 +01:00
1 parent f649febf88
commit f0fa1411c8
40 files changed
+545 -56

No files matched your search

+12
View File
@@ -1,3 +1,5 @@
using System.Globalization;
using AIStudio.Tools.PluginSystem;
namespace AIStudio.Provider;
@@ -20,6 +22,16 @@ public readonly record struct Model(string Id, string? DisplayName)
/// </summary>
public static readonly Model SYSTEM_MODEL = new(SYSTEM_MODEL_ID, null);
/// <summary>
/// Orders model IDs by the numbers in them, as people read them.
/// </summary>
/// <remarks>
/// Compared digit by digit, "gpt-4.10" comes before "gpt-4.9", "o10" before "o3", and a list with the
/// newest models first puts an older one on top. The order does not depend on the language of the
/// operating system either.
/// </remarks>
public static readonly StringComparer ID_ORDER = StringComparer.Create(CultureInfo.InvariantCulture, CompareOptions.NumericOrdering);
/// <summary>
/// Checks if this model is the system-configured placeholder.
/// </summary>