feat(ai): add Codex device code login (#4911)

This commit is contained in:
Vegard Stikbakke
2026-05-28 11:09:33 +02:00
committed by GitHub
parent edd26444af
commit 9d5fb70b7e
10 changed files with 723 additions and 152 deletions

View File

@@ -86,7 +86,7 @@ export class LoginDialogComponent extends Container implements Focusable {
/**
* Called by onAuth callback - show URL and optional instructions
*/
showAuth(url: string, instructions?: string, options: { autoOpenBrowser?: boolean } = {}): void {
showAuth(url: string, instructions?: string): void {
this.contentContainer.clear();
this.contentContainer.addChild(new Spacer(1));
const linkedUrl = `\x1b]8;;${url}\x07${url}\x1b]8;;\x07`;
@@ -101,9 +101,7 @@ export class LoginDialogComponent extends Container implements Focusable {
this.contentContainer.addChild(new Text(theme.fg("warning", instructions), 1, 0));
}
if (options.autoOpenBrowser ?? true) {
this.openUrl(url);
}
this.openUrl(url);
this.tui.requestRender();
}