Documentation
¶
Index ¶
- Constants
- func WriteInfo(path string, info Info) error
- type Action
- type Checker
- func (c Checker) CachedUpgradeVersion() (Result, bool)
- func (c Checker) Dismiss(version string) error
- func (c Checker) FetchLatestVersion(ctx context.Context) (string, error)
- func (c Checker) RecordCheckAttempt() error
- func (c Checker) Refresh(ctx context.Context) error
- func (c Checker) RefreshIfStaleAsync() <-chan struct{}
- func (c Checker) UpgradeVersion(ctx context.Context) (Result, bool)
- type Info
- type Result
Constants ¶
View Source
const ( CacheFilename = "version.json" LatestReleaseURL = "https://api.github.com/repos/usewhale/DeepSeek-Code-Whale/releases/latest" ReleaseNotesURL = "https://github.com/usewhale/DeepSeek-Code-Whale/releases/latest" CheckInterval = 20 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
func DetectAction ¶
type Checker ¶
type Checker struct {
DataDir string
CurrentVersion string
Enabled bool
Now func() time.Time
Client *http.Client
Goos string
ExecutablePath string
}
func (Checker) CachedUpgradeVersion ¶
CachedUpgradeVersion returns an upgrade prompt from the on-disk cache only, never contacting the network. Callers should pair this with RefreshIfStaleAsync so the cache is refreshed in the background for the next startup, keeping the UI startup path fail-open and non-blocking.
func (Checker) FetchLatestVersion ¶
func (Checker) RecordCheckAttempt ¶
func (Checker) RefreshIfStaleAsync ¶
func (c Checker) RefreshIfStaleAsync() <-chan struct{}
RefreshIfStaleAsync kicks off a background refresh when the cache is stale. Returns immediately; the caller should not wait on the returned channel except in tests that need deterministic completion.
Click to show internal directories.
Click to hide internal directories.