summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-01-27 16:29:01 -0500
committerAiden Cline <[email protected]>2026-01-27 16:29:01 -0500
commitb8e726521dbf8dd3af7fb58d3aea3f0c4ec056d7 (patch)
tree516e96eac8ba7d6e2b92b5ef0cb3f4fcbefee20c
parent95632d893b226f26836c577c533631f914cdc3ee (diff)
downloadopencode-b8e726521dbf8dd3af7fb58d3aea3f0c4ec056d7.tar.gz
opencode-b8e726521dbf8dd3af7fb58d3aea3f0c4ec056d7.zip
fix(tui): handle 4-5 codes too in c to copy logic
-rw-r--r--packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx2
1 files changed, 1 insertions, 1 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 4e1171a42..dc3f33737 100644
--- a/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx
@@ -127,7 +127,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.url
+ const code = props.authorization.instructions.match(/[A-Z0-9]{4}-[A-Z0-9]{4,5}/)?.[0] ?? props.authorization.url
Clipboard.copy(code)
.then(() => toast.show({ message: "Copied to clipboard", variant: "info" }))
.catch(toast.error)