feat: add /web command and improve Web UI experience#855
Merged
Conversation
… scrolling behavior
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a /web command to switch from shell to the Web UI and includes several Web UI experience improvements.
Changes:
- Add
/webslash command for switching from shell to Web UI - Enable KaTeX math formula rendering in markdown
- Fix overscroll-contain behavior to only apply when content actually overflows
- Initialize theme on app startup and hide session-specific actions when no session is selected
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/kimi_cli/ui/shell/slash.py | Implements new /web command that raises SwitchToWeb exception |
| src/kimi_cli/ui/shell/init.py | Updates exception handling to catch and propagate SwitchToWeb |
| src/kimi_cli/cli/init.py | Adds SwitchToWeb exception class and reload loop logic to switch to web server |
| src/kimi_cli/app.py | Updates welcome tip to guide users about the /web command |
| web/src/features/chat/components/chat-workspace-header.tsx | Wraps session-specific header actions in conditional to hide when no session selected |
| web/src/components/ai-elements/streamdown.tsx | Enables KaTeX rehype plugin for math formula rendering |
| web/src/components/ai-elements/code-block.tsx | Adds overflow detection logic to conditionally apply overscroll-contain |
| web/src/App.tsx | Initializes theme hook on app startup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
Shell → Web UI Switch
/webslash command to open Web UI from shell session/webcommandWeb UI Improvements
overscroll-containonly applied when content overflowsChecklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.