MoonshotAI / MoonshotAI/kimi-code
[web] Feature request: Files panel (file tree + in-panel preview) for the web portal
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Problem
The web portal (kimi web / /web) is great for long sessions, but it has no view of the session's working directory. To confirm a file's content after the agent writes it, I have to leave the browser and switch to a terminal, editor, or Finder, then switch back. This happens dozens of times a day and constantly breaks flow.
Related: #1405 (web users can't see file operation state) — a Files panel would also make file changes visible.
Proposed feature
A Files panel in the right-hand detail panel layer of the chat page:
- File tree of the session working directory, lazily loaded on directory expand
- Find box to filter by filename; entries with git changes get a marker dot
- In-panel file preview, reusing the existing
FilePreviewcomponent (markdown rendering, code highlighting, images, PDF, CSV, download / open in editor / reveal in Finder) - Follows portal conventions: right detail-panel layer, Esc to close, auto-reset on session switch, zh/en i18n
Working reference implementation
I have already built and open-sourced this as a patch: https://github.com/baigong-ai/kimi-web-file-explorer
Key points:
- The whole feature is a clean diff of 2 new files + 8 small wiring touches (~665 lines) against
apps/kimi-web, built with the same Vite toolchain as upstream - It only consumes the existing session-scoped server APIs (
fs:list/fs:read, with git status) and the existingFilePreviewcomponent — no new server routes, no permission changes - Tested on Kimi Code server 0.31.x and 0.32.0; screenshots are in the repo's
docs/
The implementation has been my daily driver for a while and works well.
Questions for maintainers
- Would you accept this feature upstream?
apps/kimi-webno longer exists onmain(removed in 0.32.0) but is still onfeat/web, and I seekimi-web2under development. If accepted, which branch should a PR target? I'm happy to port the implementation tokimi-web2if that's the way forward.
Happy to open the PR once aligned. Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the existing implementation against apps/kimi-web and the kimi-web2 work, noting that apps/kimi-web was removed from main but remains on feat/web. Read the existing FilePreview component and the session-scoped fs:list and fs:read APIs first. Done means an upstream-compatible Files panel with the described tree, preview, git markers, panel behavior, and zh/en i18n.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100