fix(cli): integrate channel-based updates in doctor and get-local-version

Update CLI commands to use channel-aware version fetching:
- doctor check now reports channel in error messages
- get-local-version uses channel from pinned version

Depends on channel detection from previous commit.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
sisyphus-dev-ai 2026-01-11 09:56:23 +00:00
parent 612e9b3e03
commit 8320c7cf2d
2 changed files with 6 additions and 2 deletions

View File

@ -50,7 +50,9 @@ export async function getVersionInfo(): Promise<VersionCheckInfo> {
}
const currentVersion = getCachedVersion()
const latestVersion = await getLatestVersion()
const { extractChannel } = await import("../../../hooks/auto-update-checker/index")
const channel = extractChannel(pluginInfo?.pinnedVersion ?? currentVersion)
const latestVersion = await getLatestVersion(channel)
const isUpToDate =
!currentVersion ||

View File

@ -54,7 +54,9 @@ export async function getLocalVersion(options: GetLocalVersionOptions = {}): Pro
return 1
}
const latestVersion = await getLatestVersion()
const { extractChannel } = await import("../../hooks/auto-update-checker/index")
const channel = extractChannel(pluginInfo?.pinnedVersion ?? currentVersion)
const latestVersion = await getLatestVersion(channel)
if (!latestVersion) {
const info: VersionInfo = {