feat(oauth): support interactive login selection (#4190)

This commit is contained in:
Armin Ronacher
2026-05-05 13:16:56 +02:00
committed by GitHub
parent bb25a3944c
commit b5755fd27d
4 changed files with 47 additions and 1 deletions

View File

@@ -87,7 +87,8 @@ export class LoginDialogComponent extends Container implements Focusable {
showAuth(url: string, instructions?: string): void {
this.contentContainer.clear();
this.contentContainer.addChild(new Spacer(1));
this.contentContainer.addChild(new Text(theme.fg("accent", url), 1, 0));
const linkedUrl = `\x1b]8;;${url}\x07${url}\x1b]8;;\x07`;
this.contentContainer.addChild(new Text(theme.fg("accent", linkedUrl), 1, 0));
const clickHint = process.platform === "darwin" ? "Cmd+click to open" : "Ctrl+click to open";
const hyperlink = `\x1b]8;;${url}\x07${clickHint}\x1b]8;;\x07`;