fix(doctor): point fix messages to actual cache directory

The doctor's fix messages for outdated/mismatched plugin versions were
directing users to ~/.config/opencode with `bun update`, but OpenCode
loads plugins from its cache directory (~/.cache/opencode on Linux,
~/Library/Caches/opencode on macOS). Additionally, pinned versions in
the cache package.json make `bun update` a no-op — `bun add ...@latest`
is required.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
IYODA Atsushi
2026-02-20 03:37:01 +09:00
parent d8da89fd5b
commit b94b193c21

View File

@@ -93,7 +93,7 @@ export async function checkSystem(): Promise<CheckResult> {
issues.push({
title: "Loaded plugin version mismatch",
description: `Cache expects ${loadedInfo.expectedVersion} but loaded ${loadedInfo.loadedVersion}.`,
fix: "Reinstall plugin dependencies in OpenCode cache",
fix: `Reinstall: cd ${loadedInfo.cacheDir} && bun install`,
severity: "warning",
affects: ["plugin loading"],
})
@@ -107,7 +107,7 @@ export async function checkSystem(): Promise<CheckResult> {
issues.push({
title: "Loaded plugin is outdated",
description: `Loaded ${systemInfo.loadedVersion}, latest ${latestVersion}.`,
fix: "Update: cd ~/.config/opencode && bun update oh-my-opencode",
fix: `Update: cd ${loadedInfo.cacheDir} && bun add oh-my-opencode@latest`,
severity: "warning",
affects: ["plugin features"],
})