Class UpdateChecker
Checks for newer versions of jdai and applies updates using the detected installation strategy (dotnet tool, GitHub release, or package manager). Caches results for 24 hours to avoid spamming upstream APIs on every startup.
public static class UpdateChecker
- Inheritance
-
UpdateChecker
- Inherited Members
Methods
ApplyUpdateAsync(CancellationToken)
Applies an update using the detected installation strategy.
public static Task<(bool Success, string Output, bool LaunchedDetached)> ApplyUpdateAsync(CancellationToken ct = default)
Parameters
Returns
CheckAsync(bool, CancellationToken)
Checks for an available update, respecting the 24-hour cache. Returns null if no update is available or on any error (best-effort).
public static Task<UpdateInfo?> CheckAsync(bool forceCheck = false, CancellationToken ct = default)
Parameters
forceCheckboolctCancellationToken
Returns
GetCurrentVersion()
Gets the running assembly's informational version.
public static string GetCurrentVersion()
Returns
IsNewer(string, string)
Compares two semver-ish version strings. Returns true if latest > current.
public static bool IsNewer(string latest, string current)