-
Notifications
You must be signed in to change notification settings - Fork 382
feat(tui): introduce toad as terminal ui (kimi term)
#561
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
Conversation
Signed-off-by: Richard Chien <[email protected]>
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.
Pull request overview
This PR introduces Toad as a terminal UI for Kimi CLI accessible via the kimi term command. The implementation requires Python 3.14+ due to Toad's dependency requirements. The PR also updates the entire project's Python version baseline from 3.13 to 3.14 across tooling, CI/CD workflows, and documentation.
Key changes:
- Added new
kimi termcommand that launches Toad TUI backed by Kimi's ACP server - Updated minimum Python version requirement from 3.13 to 3.14 across the project
- Relaxed loguru dependency constraint to accommodate compatibility requirements with batrachian-toad
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Added batrachian-toad and its extensive dependency tree (tree-sitter parsers, textual, notify-py, etc.); updated resolution markers for Python 3.14+ |
src/kimi_cli/toad.py |
New module implementing the kimi term command with logic to detect/validate Toad availability and construct appropriate subprocess command |
src/kimi_cli/cli.py |
Added term command registration that delegates to toad module |
pyproject.toml |
Added batrachian-toad dependency with Python 3.14+ marker; relaxed loguru constraint; updated ty environment to 3.14 |
tests/test_pyinstaller_utils.py |
Updated test to dynamically compute site-packages path based on Python version instead of hardcoding 3.13 |
scripts/install.sh, scripts/install.ps1 |
Updated installation scripts to use Python 3.14 |
.python-version |
Updated from 3.13 to 3.14 |
pyrightconfig.json, packages/*/pyrightconfig.json |
Updated pythonVersion configuration to 3.14 |
packages/kosong/pyproject.toml |
Relaxed loguru constraint to match main package |
.github/workflows/*.yml |
Updated CI/CD workflows to use Python 3.14 and test against 3.12, 3.13, and 3.14 |
README.md, docs/**/*.md, AGENTS.md |
Updated documentation to reference Python 3.14 requirement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| result = subprocess.run(args) | ||
| if result.returncode != 0: |
Copilot
AI
Jan 1, 2026
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.
The subprocess.run call does not capture stdout/stderr or provide any error handling beyond exit code propagation. If the toad command fails or produces error output, users won't see helpful debugging information. Consider adding check=False explicitly for clarity, or capturing and displaying stderr to help users diagnose issues.
| result = subprocess.run(args) | |
| if result.returncode != 0: | |
| result = subprocess.run(args, check=False, capture_output=True, text=True) | |
| if result.returncode != 0: | |
| if result.stderr: | |
| typer.echo(result.stderr, err=True) |
| # loguru stays >=0.6.0 because notify-py (via batrachian-toad) caps it at <=0.6.0 on 3.14+. | ||
| "loguru>=0.6.0,<0.8", |
Copilot
AI
Jan 1, 2026
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.
The loguru dependency version constraint has been relaxed from "==0.7.3" to ">=0.6.0,<0.8". The comment mentions this is due to batrachian-toad capping it at <=0.6.0 on Python 3.14+, but the actual constraint allows up to 0.8. Additionally, the lockfile shows notify-py (a dependency of batrachian-toad) requires loguru 0.6.0, but the constraint here allows 0.7.x versions. This mismatch could lead to dependency resolution issues where loguru 0.7.x is installed when toad is being used.
| # loguru stays >=0.6.0 because notify-py (via batrachian-toad) caps it at <=0.6.0 on 3.14+. | |
| "loguru>=0.6.0,<0.8", | |
| # loguru stays pinned to 0.6.0 because notify-py (via batrachian-toad) caps it at <=0.6.0 on 3.14+. | |
| "loguru==0.6.0", |
| typer.echo("`kimi term` requires Python 3.14+ because Toad requires it.", err=True) | ||
| raise typer.Exit(code=1) | ||
| if importlib.util.find_spec("toad") is None: | ||
| typer.echo( | ||
| "Toad dependency is missing. Run `uv sync --python 3.14` or install kimi-cli with " | ||
| "Python 3.14.", |
Copilot
AI
Jan 1, 2026
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.
The error message states "kimi term requires Python 3.14+ because Toad requires it." However, this message may be confusing because the actual package name shown in the dependency and error messages is "batrachian-toad" not just "Toad". Consider updating the message to be more specific about which package is being referred to, for example: "kimi term requires Python 3.14+ because batrachian-toad requires it."
| typer.echo("`kimi term` requires Python 3.14+ because Toad requires it.", err=True) | |
| raise typer.Exit(code=1) | |
| if importlib.util.find_spec("toad") is None: | |
| typer.echo( | |
| "Toad dependency is missing. Run `uv sync --python 3.14` or install kimi-cli with " | |
| "Python 3.14.", | |
| typer.echo( | |
| "`kimi term` requires Python 3.14+ because the batrachian-toad package requires it.", | |
| err=True, | |
| ) | |
| raise typer.Exit(code=1) | |
| if importlib.util.find_spec("toad") is None: | |
| typer.echo( | |
| "batrachian-toad dependency is missing. Run `uv sync --python 3.14` or install " | |
| "kimi-cli with Python 3.14.", |
| "Toad dependency is missing. Run `uv sync --python 3.14` or install kimi-cli with " | ||
| "Python 3.14.", |
Copilot
AI
Jan 1, 2026
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.
The error message suggests running "uv sync --python 3.14" or installing with Python 3.14, but this command may not work as expected in all contexts. If the user installed kimi-cli as a tool (via uv tool install), running uv sync in their current directory won't help. Consider making the error message more context-aware or providing clearer instructions like "Install kimi-cli with Python 3.14: uv tool install --python 3.14 kimi-cli"
| "Toad dependency is missing. Run `uv sync --python 3.14` or install kimi-cli with " | |
| "Python 3.14.", | |
| "Toad dependency is missing.\n" | |
| "- If you're running kimi-cli from a cloned project managed by uv, run: `uv sync --python 3.14`.\n" | |
| "- If you installed kimi-cli as a uv tool, reinstall it with Python 3.14, e.g.: `uv tool install --python 3.14 kimi-cli`.", |
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien [email protected]
Related Issue
Resolve #(issue_number)
Description