-
Notifications
You must be signed in to change notification settings - Fork 758
feat: PWA with light/dark manifests and kimi web --pwa /web pwa #1929
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,5 @@ | ||
| --- | ||
| "@moonshot-ai/kimi-code": minor | ||
| --- | ||
|
|
||
| web: Ship the web UI as an installable PWA with light/dark manifests, icons, and service worker. Add `kimi web --pwa` and `/web pwa` to open the PWA-enabled web UI. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,10 @@ const HEALTH_TIMEOUT_MS = 1500; | |
| * directly. Either way the TUI shuts down once the session deep link is | ||
| * opened. | ||
| */ | ||
| export async function handleWebCommand(host: SlashCommandHost): Promise<void> { | ||
| export async function handleWebCommand( | ||
| host: SlashCommandHost, | ||
| args = '', | ||
|
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.
Useful? React with 👍 / 👎. |
||
| ): Promise<void> { | ||
| const session = host.session; | ||
| if (session === undefined) { | ||
| host.showError(NO_ACTIVE_SESSION_MESSAGE); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "name": "Kimi Code", | ||
| "short_name": "Kimi", | ||
| "description": "Kimi Code Web — AI coding agent in your browser.", | ||
| "start_url": "/", | ||
| "display": "standalone", | ||
| "display_override": ["standalone", "minimal-ui", "browser"], | ||
| "scope": "/", | ||
| "background_color": "#0d1117", | ||
| "theme_color": "#0d1117", | ||
| "orientation": "any", | ||
| "icons": [ | ||
| { | ||
| "src": "/pwa-192x192.png", | ||
| "sizes": "192x192", | ||
| "type": "image/png", | ||
| "purpose": "any" | ||
| }, | ||
| { | ||
| "src": "/pwa-512x512.png", | ||
| "sizes": "512x512", | ||
| "type": "image/png", | ||
| "purpose": "any" | ||
| }, | ||
| { | ||
| "src": "/maskable-icon.png", | ||
| "sizes": "512x512", | ||
| "type": "image/png", | ||
| "purpose": "maskable" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "name": "Kimi Code", | ||
| "short_name": "Kimi", | ||
| "description": "Kimi Code Web — AI coding agent in your browser.", | ||
| "start_url": "/", | ||
| "display": "standalone", | ||
| "display_override": ["standalone", "minimal-ui", "browser"], | ||
| "scope": "/", | ||
| "background_color": "#ffffff", | ||
| "theme_color": "#ffffff", | ||
| "orientation": "any", | ||
| "icons": [ | ||
| { | ||
| "src": "/pwa-192x192.png", | ||
| "sizes": "192x192", | ||
| "type": "image/png", | ||
| "purpose": "any" | ||
| }, | ||
| { | ||
| "src": "/pwa-512x512.png", | ||
| "sizes": "512x512", | ||
| "type": "image/png", | ||
| "purpose": "any" | ||
| }, | ||
| { | ||
| "src": "/maskable-icon.png", | ||
| "sizes": "512x512", | ||
| "type": "image/png", | ||
| "purpose": "maskable" | ||
| } | ||
| ] | ||
| } |
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.
--pwabefore documenting itWhen
kimi web --pwais passed, Commander recordsopts.pwa, buthandleWebCommandnever reads it and still callsdeps.openUrl(...)with the same URL as the default path. In the advertised Chromium/app-window scenario, the flag is therefore a no-op and users get an ordinary browser tab despite the new help text promising otherwise.Useful? React with 👍 / 👎.
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.
My first iteration did that; actually, I was doing
--appinstead of--pwa, but the PR was bigger, and I am not really interested in an "app for desktop", only making the web app more comfortable for phones.