-
Notifications
You must be signed in to change notification settings - Fork 980
feat(vis): show LAN URLs when binding to 0.0.0.0 for remote control #2103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| "@moonshot-ai/kimi-server": patch | ||
| --- | ||
|
|
||
| feat(vis): show LAN URLs when binding to 0.0.0.0 for remote control | ||
|
|
||
| Display accessible LAN URLs in the terminal when the server binds to 0.0.0.0, | ||
| enabling remote control from other devices on the local network. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,12 +5,19 @@ export interface StartupBannerOptions { | |
| readonly host: string; | ||
| readonly kimiCodeHome: string; | ||
| readonly port: number; | ||
| readonly lanUrls?: string[]; | ||
| } | ||
|
|
||
| export function formatStartupBanner(options: StartupBannerOptions): string { | ||
| const authStatus = options.authToken === undefined ? 'auth=disabled' : 'auth=required'; | ||
| return ( | ||
| let banner = | ||
| `[vis-server] listening on http://${hostForUrl(options.host)}:${String(options.port)} ` + | ||
| `(${authStatus}, KIMI_CODE_HOME=${options.kimiCodeHome})\n` | ||
| ); | ||
| `(${authStatus}, KIMI_CODE_HOME=${options.kimiCodeHome})\n`; | ||
| if (options.lanUrls !== undefined && options.lanUrls.length > 0) { | ||
| banner += | ||
| `[vis-server] LAN access:\n` + | ||
| options.lanUrls.map((url) => ` - ${url}`).join('\n') + | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When vis is bound to Useful? React with 👍 / 👎. |
||
| '\n'; | ||
| } | ||
| return banner; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changeset names
@moonshot-ai/kimi-server, but there is no workspace package with that name in the repo; the changed CLI package is@moonshot-ai/kimi-code, while@moonshot-ai/vis-serveris private and ignored by changesets. As written, the release workflow cannot apply the user-visiblekimi vischangelog/bump to the published CLI package and may fail when processing the unknown package name.Useful? React with 👍 / 👎.