Skip to content

Conversation

@stdrc
Copy link
Collaborator

@stdrc stdrc commented Jan 1, 2026

Signed-off-by: Richard Chien [email protected]

Related Issue

Resolve #(issue_number)

Description

Copilot AI review requested due to automatic review settings January 1, 2026 10:44
Copy link
Contributor

Copilot AI left a 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 term command 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.

Comment on lines +72 to +73
result = subprocess.run(args)
if result.returncode != 0:
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +14
# 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",
Copy link

Copilot AI Jan 1, 2026

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.

Suggested change
# 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",

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +33
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.",
Copy link

Copilot AI Jan 1, 2026

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."

Suggested change
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.",

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +33
"Toad dependency is missing. Run `uv sync --python 3.14` or install kimi-cli with "
"Python 3.14.",
Copy link

Copilot AI Jan 1, 2026

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"

Suggested change
"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`.",

Copilot uses AI. Check for mistakes.
stdrc added 5 commits January 1, 2026 18:51
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]>
@stdrc stdrc merged commit 6e3c5f9 into main Jan 1, 2026
23 checks passed
@stdrc stdrc deleted the rc/toad branch January 1, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants