fix(tui): report x64 emulation on Windows ARM64 (#54984)

This commit is contained in:
Luke Parker
2026-10-13 11:01:49 +10:00
committed by GitHub
Unverified
parent 3731aace4a
commit bd23808adf
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -51,6 +51,9 @@ const reportContentWithDiagnostics = Effect.fn("SkillPlugin.reportContentWithDia
app: Context["app"],
) {
const plugins = yield* configuredPlugins()
// Under emulation on Windows ARM64, os.arch() reads x64 but PROCESSOR_IDENTIFIER still names the ARM host.
const emulated =
process.platform === "win32" && os.arch() === "x64" && process.env.PROCESSOR_IDENTIFIER?.startsWith("ARM")
return [
ReportContent,
"",
@@ -60,7 +63,7 @@ const reportContentWithDiagnostics = Effect.fn("SkillPlugin.reportContentWithDia
"",
`- opencode version: ${app.version}`,
`- install/channel: ${app.channel}`,
`- OS: ${os.type()} ${os.release()} (${os.platform()} ${os.arch()})`,
`- OS: ${os.type()} ${os.release()} (${os.platform()} ${os.arch()}${emulated ? ", emulated on ARM64" : ""})`,
`- Terminal: ${terminal()}`,
`- Shell: ${shell()}`,
`- Active plugins: ${plugins.length === 0 ? "None found in config" : plugins.join(", ")}`,
+4 -1
View File
@@ -9,7 +9,10 @@ export function describeOS() {
: process.platform === "linux"
? "Linux"
: process.platform
return `${name} ${release()} (${process.arch})`
// Under emulation on Windows ARM64, process.arch reads x64 but PROCESSOR_IDENTIFIER still names the ARM host.
const emulated =
process.platform === "win32" && process.arch === "x64" && process.env.PROCESSOR_IDENTIFIER?.startsWith("ARM")
return `${name} ${release()} (${process.arch}${emulated ? ", emulated on ARM64" : ""})`
}
export function describeTerminal() {