import { harnessContext } from './harness-context.js'; export function isDesktopMode(env: NodeJS.ProcessEnv = process.env): boolean { const mode = harnessContext(env)?.auth; if (mode) return mode === 'managed'; return env.CLAWCLAW_IS_DESKTOP === 'true'; } export const DESKTOP_LOGIN_MESSAGE = '请在客户端登录游戏账号。CCL 的登录账号由客户端管理。'; export function accountRequiredMessage(standaloneMessage: string): string { return isDesktopMode() ? DESKTOP_LOGIN_MESSAGE : standaloneMessage; }