浏览文件
terminal-login-link.mjs
8 行 · 469 B历史下载| 1 | // Match printed links in xterm's wrapped buffer. OSC 8 links also use this |
| 2 | // exact destination check before opening the guest's private login tab. |
| 3 | export const claudeLoginLink = /https:\/\/(?:claude\.ai|claude\.com|console\.anthropic\.com|platform\.claude\.com|platform\.anthropic\.com)\/oauth\/authorize\/?\?[^\s"'<>\\\x1b]+/i; |
| 4 | |
| 5 | export function isClaudeLoginLink(uri) { |
| 6 | const match = claudeLoginLink.exec(uri); |
| 7 | return uri.length <= 8192 && match?.[0] === uri; |
| 8 | } |

