@@ -350,25 +350,22 @@ func (d *OAuth) copyCode() tea.Cmd {
350350 if d.State != OAuthStateDisplay {
351351 return nil
352352 }
353− return tea.Sequence(
354− tea.SetClipboard(d.userCode),
355− util.ReportInfo("Code copied to clipboard"),
356− )
353+ return common.CopyToClipboard(d.userCode, "Code copied to clipboard")
357354}
358355
359356func (d *OAuth) copyCodeAndOpenURL() tea.Cmd {
360357 if d.State != OAuthStateDisplay {
361358 return nil
362359 }
363− return tea.Sequence(
364− tea.SetClipboard(d.userCode),
360+ return common.CopyToClipboardWithCallback(
361+ d.userCode,
362+ "Code copied and URL opened",
365363 func() tea.Msg {
366364 if err := browser.OpenURL(d.verificationURL); err != nil {
367365 return ActionOAuthErrored{fmt.Errorf("failed to open browser: %w", err)}
368366 }
369367 return nil
370368 },
371− util.ReportInfo("Code copied and URL opened"),
372369 )
373370}
374371