()
| 14 | const DEFAULT_SERVER_URL_KEY = "opencode.settings.dat:defaultServerUrl" |
| 15 | |
| 16 | const getLocale = () => { |
| 17 | if (typeof navigator !== "object") return "en" as const |
| 18 | const languages = navigator.languages?.length ? navigator.languages : [navigator.language] |
| 19 | for (const language of languages) { |
| 20 | if (!language) continue |
| 21 | if (language.toLowerCase().startsWith("zh")) return "zh" as const |
| 22 | } |
| 23 | return "en" as const |
| 24 | } |
| 25 | |
| 26 | const getRootNotFoundError = () => { |
| 27 | const key = "error.dev.rootNotFound" as const |
no outgoing calls
no test coverage detected