feat(cli): add official wire file support and build-web command#1457
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf49592e94
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| p = Path('/mnt/data/kimi_enterprise_complete.py') | ||
| text = p.read_text(encoding='utf-8') |
There was a problem hiding this comment.
Parameterize the patch target file path
The script hardcodes '/mnt/data/kimi_enterprise_complete.py' and immediately calls read_text(), so in a normal checkout it fails with FileNotFoundError before applying any patch. This makes the committed tool unusable outside one specific machine path and prevents the feature from being applied in CI or by other developers.
Useful? React with 👍 / 👎.
| ' sub.add_parser("print-sdk-setup", help="Print Kimi Agent SDK / Wire setup instructions")\n', | ||
| ' sub.add_parser("print-sdk-setup", help="Print Kimi Agent SDK / Wire setup instructions")\n' | ||
| ' webbuild = sub.add_parser("build-web", help="Build and sync the web UI into src/kimi_cli/web/static")\n' | ||
| ' webbuild.add_argument("--root", default=".", help="Repository root containing web/ and pyproject.toml")\n' | ||
| ) |
There was a problem hiding this comment.
Guard build-web replacements to keep the patch idempotent
These parser replacements run unconditionally even when build_web_ui already exists, so re-running the patch script will append another build-web subparser registration and duplicate command handling. In argparse, duplicate subparser names raise ValueError: conflicting subparser, so a second run can leave the patched CLI script broken.
Useful? React with 👍 / 👎.
Related Issue
Resolve #(issue_number)
Description
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.