mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
Merge pull request #349 from Cursivez/fix/clickable-oauth-login-link
fix: Make OAuth login URL clickable in terminal
This commit is contained in:
commit
8ced1131c0
1 changed files with 3 additions and 2 deletions
|
|
@ -1587,8 +1587,9 @@ export class InteractiveMode {
|
|||
await this.session.modelRegistry.authStorage.login(providerId as OAuthProvider, {
|
||||
onAuth: (info: { url: string; instructions?: string }) => {
|
||||
this.chatContainer.addChild(new Spacer(1));
|
||||
this.chatContainer.addChild(new Text(theme.fg("accent", "Opening browser to:"), 1, 0));
|
||||
this.chatContainer.addChild(new Text(theme.fg("accent", info.url), 1, 0));
|
||||
// Use OSC 8 hyperlink escape sequence for clickable link
|
||||
const hyperlink = `\x1b]8;;${info.url}\x07Click here to login\x1b]8;;\x07`;
|
||||
this.chatContainer.addChild(new Text(theme.fg("accent", hyperlink), 1, 0));
|
||||
if (info.instructions) {
|
||||
this.chatContainer.addChild(new Spacer(1));
|
||||
this.chatContainer.addChild(new Text(theme.fg("warning", info.instructions), 1, 0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue