From 9d7b71907c41f7e1dbbfb1508ab4c33f48fc76a0 Mon Sep 17 00:00:00 2001 From: aniasse Date: Fri, 27 Feb 2026 03:36:21 +0000 Subject: [PATCH 1/5] fix(auth): display $schema and provider config in auth list Display $schema field if present in auth.json Display configured providers from provider section Show whether each provider has credentials configured Fixes #4533 --- packages/opencode/src/cli/cmd/auth.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/opencode/src/cli/cmd/auth.ts b/packages/opencode/src/cli/cmd/auth.ts index 95635916413..a17ad70e07d 100644 --- a/packages/opencode/src/cli/cmd/auth.ts +++ b/packages/opencode/src/cli/cmd/auth.ts @@ -13,6 +13,7 @@ import { Instance } from "../../project/instance" import type { Hooks } from "@opencode-ai/plugin" import { Process } from "../../util/process" import { text } from "node:stream/consumers" +import { Filesystem } from "../../util/filesystem" type PluginAuth = NonNullable @@ -214,6 +215,20 @@ export const AuthListCommand = cmd({ const results = Object.entries(await Auth.all()) const database = await ModelsDev.get() + const rawAuth = await Filesystem.readJson>(authPath).catch(() => ({})) + if (rawAuth.$schema) { + prompts.log.info(`Schema ${UI.Style.TEXT_DIM}${rawAuth.$schema}`) + } + + if (rawAuth.provider) { + const providerSection = rawAuth.provider as Record + for (const [providerID, config] of Object.entries(providerSection)) { + const name = (config as any)?.name || providerID + const hasCredentials = results.some(([id]) => id === providerID) + prompts.log.info(`${name} ${UI.Style.TEXT_DIM}${hasCredentials ? "(configured)" : "(not configured)"}`) + } + } + for (const [providerID, result] of results) { const name = database[providerID]?.name || providerID prompts.log.info(`${name} ${UI.Style.TEXT_DIM}${result.type}`) From 2162e68e5b3ed7976685d109698882e60afffb64 Mon Sep 17 00:00:00 2001 From: aniasse Date: Fri, 27 Feb 2026 03:44:42 +0000 Subject: [PATCH 2/5] fix: standardize date format to ISO 8601 Use en-CA locale to ensure consistent YYYY-MM-DD output This resolves ambiguity between MM/DD/YYYY and DD/MM/YYYY formats Fixes #12398 --- packages/opencode/src/util/locale.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/util/locale.ts b/packages/opencode/src/util/locale.ts index 653da09a0b7..835ed1f9ddc 100644 --- a/packages/opencode/src/util/locale.ts +++ b/packages/opencode/src/util/locale.ts @@ -11,7 +11,7 @@ export namespace Locale { export function datetime(input: number): string { const date = new Date(input) const localTime = time(input) - const localDate = date.toLocaleDateString() + const localDate = date.toLocaleDateString("en-CA") return `${localTime} · ${localDate}` } From 27fecccf4c541e6997b71ed578ad429f359a42de Mon Sep 17 00:00:00 2001 From: aniasse Date: Fri, 27 Feb 2026 03:53:49 +0000 Subject: [PATCH 3/5] fix(opencode): standardize date format to ISO 8601 Use en-CA locale to ensure consistent YYYY-MM-DD output This resolves ambiguity between MM/DD/YYYY and DD/MM/YYYY formats Fixes #12398 --- packages/opencode/src/util/locale.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/util/locale.ts b/packages/opencode/src/util/locale.ts index 653da09a0b7..835ed1f9ddc 100644 --- a/packages/opencode/src/util/locale.ts +++ b/packages/opencode/src/util/locale.ts @@ -11,7 +11,7 @@ export namespace Locale { export function datetime(input: number): string { const date = new Date(input) const localTime = time(input) - const localDate = date.toLocaleDateString() + const localDate = date.toLocaleDateString("en-CA") return `${localTime} · ${localDate}` } From 4a8262e7ec1c9202b4526ee64b424b1abcc1d188 Mon Sep 17 00:00:00 2001 From: aniasse Date: Fri, 27 Feb 2026 04:29:29 +0000 Subject: [PATCH 4/5] fix(opencode): handle context overflow error by triggering compaction When a ContextOverflowError is caught, automatically trigger compaction instead of ignoring the error. This ensures the session can recover from context overflow errors without manual intervention. Fixes related to issue #9902 - session auto-naming failures --- packages/opencode/src/session/processor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/session/processor.ts b/packages/opencode/src/session/processor.ts index e7532d20073..7f97254595f 100644 --- a/packages/opencode/src/session/processor.ts +++ b/packages/opencode/src/session/processor.ts @@ -354,7 +354,7 @@ export namespace SessionProcessor { }) const error = MessageV2.fromError(e, { providerID: input.model.providerID }) if (MessageV2.ContextOverflowError.isInstance(error)) { - // TODO: Handle context overflow error + needsCompaction = true } const retry = SessionRetry.retryable(error) if (retry !== undefined) { From d355ddbb118ccd7c7d705da686006c77d0529fa8 Mon Sep 17 00:00:00 2001 From: aniasse Date: Fri, 27 Feb 2026 04:33:40 +0000 Subject: [PATCH 5/5] fix(opencode): fix type error in auth list command Cast rawAuth to Record to fix TypeScript error --- packages/opencode/src/cli/cmd/auth.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/cmd/auth.ts b/packages/opencode/src/cli/cmd/auth.ts index a17ad70e07d..6dce28092bd 100644 --- a/packages/opencode/src/cli/cmd/auth.ts +++ b/packages/opencode/src/cli/cmd/auth.ts @@ -215,7 +215,10 @@ export const AuthListCommand = cmd({ const results = Object.entries(await Auth.all()) const database = await ModelsDev.get() - const rawAuth = await Filesystem.readJson>(authPath).catch(() => ({})) + const rawAuth = (await Filesystem.readJson>(authPath).catch(() => ({}))) as Record< + string, + unknown + > if (rawAuth.$schema) { prompts.log.info(`Schema ${UI.Style.TEXT_DIM}${rawAuth.$schema}`) }