feat(ai): refactor device code login for copilot

This commit is contained in:
Vegard Stikbakke
2026-05-20 09:30:58 +02:00
parent ced73b396a
commit c554364c2a
11 changed files with 316 additions and 129 deletions

View File

@@ -4823,13 +4823,15 @@ export class InteractiveMode {
manualCodeReject = undefined;
}
});
} else if (providerId === "github-copilot") {
// GitHub Copilot polls after onAuth
dialog.showWaiting("Waiting for browser authentication...");
}
// For Anthropic: onPrompt is called immediately after
},
onDeviceCode: (info) => {
dialog.showDeviceCode(info);
dialog.showWaiting("Waiting for authentication...");
},
onPrompt: async (prompt: { message: string; placeholder?: string }) => {
return dialog.showPrompt(prompt.message, prompt.placeholder);
},