From c526e2d908f47c59f1667902ba3750c6fc05ed4f Mon Sep 17 00:00:00 2001 From: King'ori Maina Date: Sun, 11 Jan 2026 18:27:17 +0200 Subject: [PATCH] fix(tui): copy oauth url when no device code (#7812) --- .../opencode/src/cli/cmd/tui/component/dialog-provider.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx index 8b586fce3..35951c995 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx @@ -112,8 +112,7 @@ function AutoMethod(props: AutoMethodProps) { useKeyboard((evt) => { if (evt.name === "c" && !evt.ctrl && !evt.meta) { - const code = - props.authorization.instructions.match(/[A-Z0-9]{4}-[A-Z0-9]{4}/)?.[0] ?? props.authorization.instructions + const code = props.authorization.instructions.match(/[A-Z0-9]{4}-[A-Z0-9]{4}/)?.[0] ?? props.authorization.url Clipboard.copy(code) .then(() => toast.show({ message: "Copied to clipboard", variant: "info" })) .catch(toast.error)