Skip to content

tui: follow kai-engine's kai_* tool namespace - #54

Merged
jschatz1 merged 1 commit into
mainfrom
feat/kai-tool-namespace
Aug 30, 2026
Merged

tui: follow kai-engine's kai_* tool namespace#54
jschatz1 merged 1 commit into
mainfrom
feat/kai-tool-namespace

Conversation

@jschatz1

Copy link
Copy Markdown
Member

Downstream of kaicontext/kai-engine#42, which renames the four generic tools:

bash -> kai_bash    view  -> kai_view
write -> kai_write  edit  -> kai_edit

Why this repo needs a change at all

The REPL's tool renderers match those names as string literals off the event stream. Without this they go blind: summarizeToolCall falls through to the bare-name branch, so every file read renders as → kai_view with no path and every shell call with no command. Nothing errors — the output just quietly gets less useful, which is the worst failure mode for a rename.

Changed in internal/tui/views/planner_dispatch.go:

  • the view/write/edit and bash cases in the summarizer
  • the bashLineCount reset, which keys off the tool name
  • tests that pin the rendered output

Deliberately unchanged

The event Kind strings ("bash" for streamed stdout lines) are not tool names — they're the activity-feed channel — and stay as they are. Same for exec.Command("bash", ...) and the shell-completion ValidArgs.

Ordering

Merge after kai-engine#42 ships in a release and this repo's go.mod is bumped to it. Merging earlier is harmless but inert — the renderers would match names the pinned engine doesn't emit yet.

🤖 Generated with Claude Code

@kaicontext

kaicontext Bot commented Aug 29, 2026

Copy link
Copy Markdown

Kai review

⚠️ Review before merging — 1 flag raised.

Check Result
Intent Partial
Coverage No gaps
Risky claims 1 risk
Risky claims — 1 statement to verify
  • internal/tui/views/repl.go:1974 — `HasPrefix(summary, "→ bash: ")` no longer matches the renamed `→ kai_bash: ` summary, so the two-tone bash rendering is dead and all bash calls…

+20 −20 · 3 files · reaches 39

View finding → · Awaiting your verdict — Kai never approves its own finding.

kai-engine renamed its four generic tools (bash/view/write/edit) to
kai_bash/kai_view/kai_write/kai_edit. The REPL's tool renderers match
those names as string literals off the event stream, so they go blind
without this — summarizeToolCall would fall through to the bare-name
branch and every file read would render as "→ kai_view" with no path,
every shell call with no command.

Renamed in planner_dispatch.go's summarizer (the view/write/edit and
bash cases, plus the bashLineCount reset that keys off the tool name)
and in the tests that pin their output.

Note the event Kind strings ("bash" for streamed stdout lines) are NOT
tool names and stay as they are.

Requires kai-engine >= the release carrying the rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jschatz1
jschatz1 force-pushed the feat/kai-tool-namespace branch from 7646434 to d900399 Compare August 30, 2026 04:43
@jschatz1
jschatz1 merged commit 1b52e8c into main Aug 30, 2026
5 checks passed
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.

1 participant