Skip to content

Commit c526e2d

Browse files
authored
fix(tui): copy oauth url when no device code (anomalyco#7812)
1 parent bdbbcd8 commit c526e2d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ function AutoMethod(props: AutoMethodProps) {
112112

113113
useKeyboard((evt) => {
114114
if (evt.name === "c" && !evt.ctrl && !evt.meta) {
115-
const code =
116-
props.authorization.instructions.match(/[A-Z0-9]{4}-[A-Z0-9]{4}/)?.[0] ?? props.authorization.instructions
115+
const code = props.authorization.instructions.match(/[A-Z0-9]{4}-[A-Z0-9]{4}/)?.[0] ?? props.authorization.url
117116
Clipboard.copy(code)
118117
.then(() => toast.show({ message: "Copied to clipboard", variant: "info" }))
119118
.catch(toast.error)

0 commit comments

Comments
 (0)