feat(cli): make kimi web and rotate-token access URLs clickable#2132
Open
bowenliang123 wants to merge 1 commit into
Open
feat(cli): make kimi web and rotate-token access URLs clickable#2132bowenliang123 wants to merge 1 commit into
bowenliang123 wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: ed0ce07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
No linked issue.
Problem
When running
kimi weborkimi web rotate-token, the printed Local/Network access URLs contain the bearer-token fragment but are plain text. Users have to manually select and copy the URL into a browser; in supported terminals there is no click-to-open affordance.What changed
Wrap the access URLs in OSC 8 terminal hyperlinks using the existing
toTerminalHyperlinkutility, so terminals that support the sequence (iTerm2, VS Code terminal, Windows Terminal, etc.) render the URL as clickable. The hyperlink target is the full URL including the#token=fragment, so clicking opens the authenticated Web UI directly.apps/kimi-code/src/cli/sub/web/run.ts: ready banner and one-line ready output now emit hyperlinks.apps/kimi-code/src/cli/sub/web/rotate-token.ts: re-printed access links after rotation also emit hyperlinks.apps/kimi-code/test/cli/web/web.test.ts: updated thestripAnsihelper to strip OSC 8 escape sequences so plain-text assertions keep passing.Before
The URL is plain text; the user must select and copy it into a browser.
After
In supported terminals the same line is now an OSC 8 hyperlinks (clickable to open links in browser) :
⌘/Ctrl-clicking the link opens the authenticated Web UI directly. The visible text and token handling are unchanged; only the underlying escape sequence is added.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.