Browse Source

fix(tui): copy oauth url when no device code (#7812)

King'ori Maina 1 month ago
parent
commit
c526e2d908
1 changed files with 1 additions and 2 deletions
  1. 1 2
      packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx

+ 1 - 2
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)