Skip to content

Commit

Permalink
chore: print user login URL & user code to the console
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
  • Loading branch information
jfcherng committed Nov 18, 2024
1 parent ed7cd38 commit a0c75e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
preprocess_chat_message,
preprocess_message_for_html,
)
from .log import log_info
from .types import (
CopilotConversationDebugTemplates,
CopilotPayloadConversationCreate,
Expand Down Expand Up @@ -779,9 +780,12 @@ def _on_result_sign_in_initiate(
return
sublime.set_clipboard(user_code)
sublime.run_command("open_url", {"url": verification_uri})
log_info(f"Sign-in URL: {verification_uri} (User code = {user_code})")
if not ok_cancel_dialog(
"The device activation code has been copied."
+ " Please paste it in the popup GitHub page. Press OK when completed."
+ " If you don't see a popup GitHub page, please check Sublime Text's console,"
+ " open the given URL and paste the user code manually.",
):
return
session.send_request(
Expand Down

0 comments on commit a0c75e0

Please sign in to comment.