Table of Contents

Class UpdateChecker

Namespace
JD.AI
Assembly
JD.AI.dll

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

ct CancellationToken

Returns

Task<(bool Success, string Output, bool LaunchedDetached)>

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

forceCheck bool
ct CancellationToken

Returns

Task<UpdateInfo>

GetCurrentVersion()

Gets the running assembly's informational version.

public static string GetCurrentVersion()

Returns

string

IsNewer(string, string)

Compares two semver-ish version strings. Returns true if latest > current.

public static bool IsNewer(string latest, string current)

Parameters

latest string
current string

Returns

bool