Files
oh-my-openagent/src/cli/doctor/format-status.ts
YeonGyu-Kim a7b56a0391 fix(doctor): oMoMoMoMo branding, remove providers check, fix comment-checker detection
Rename header to oMoMoMoMo Doctor to match installation guide branding.
Remove providers check entirely — no longer meaningful for diagnostics.
Fix comment-checker detection by resolving @code-yeongyu/comment-checker package path
in addition to PATH lookup.
2026-02-13 17:35:36 +09:00

36 lines
1.5 KiB
TypeScript

import color from "picocolors"
import type { DoctorResult } from "./types"
import { formatHeader, formatStatusMark } from "./format-shared"
export function formatStatus(result: DoctorResult): string {
const lines: string[] = []
lines.push(formatHeader())
const { systemInfo, tools } = result
const padding = " "
const opencodeVer = systemInfo.opencodeVersion ?? "unknown"
const pluginVer = systemInfo.pluginVersion ?? "unknown"
const bunVer = systemInfo.bunVersion ?? "unknown"
lines.push(` ${padding}System ${opencodeVer} · ${pluginVer} · Bun ${bunVer}`)
const configPath = systemInfo.configPath ?? "unknown"
const configStatus = systemInfo.configValid ? color.green("(valid)") : color.red("(invalid)")
lines.push(` ${padding}Config ${configPath} ${configStatus}`)
const lspText = `LSP ${tools.lspInstalled}/${tools.lspTotal}`
const astGrepMark = formatStatusMark(tools.astGrepCli)
const ghMark = formatStatusMark(tools.ghCli.installed && tools.ghCli.authenticated)
const ghUser = tools.ghCli.username ?? ""
lines.push(` ${padding}Tools ${lspText} · AST-Grep ${astGrepMark} · gh ${ghMark}${ghUser ? ` (${ghUser})` : ""}`)
const builtinCount = tools.mcpBuiltin.length
const userCount = tools.mcpUser.length
const builtinText = builtinCount > 0 ? tools.mcpBuiltin.join(" · ") : "none"
const userText = userCount > 0 ? `+ ${userCount} user` : ""
lines.push(` ${padding}MCPs ${builtinText} ${userText}`)
return lines.join("\n")
}