kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

Update JSON Tool Definitions to match XML & add `cwd` context where relevant

Open mcowger opened this issue 1 year ago • 6 comments

Context

The JSON tool definitions didn't match XML in most cases, and often lacked additional injected contextual information (especially cwd). This PR updates these definitions to match XML, and provide that cwd context where relevant.

Implementation

  • Adjust definitions for relevant tools to be functions rather than hardcoded objects, so they can accept and use the cwd.
  • Adjust tool descriptions to match XML definitions. In many cases this expands the description field notably.

Screenshots

NA

Get in Touch

mcowger

mcowger avatar Nov 20 '25 18:11 mcowger

🦋 Changeset detected

Latest commit: ff1e1d84c09a3bc8bdb9bbc553438db1ae228e20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Nov 20 '25 18:11 changeset-bot[bot]

Confirmed fixes it for me too

nkukard avatar Nov 20 '25 21:11 nkukard

Does this PR fix the JSON call issue for the codebase_search tool?

SilentFlower avatar Nov 21 '25 02:11 SilentFlower

Does this PR fix the JSON call issue for the codebase_search tool?

Yes, among other things.

mcowger avatar Nov 21 '25 02:11 mcowger

I have tested and verified as well that this does indeed fix the codebase_search issue I've been seeing for some time now. Here are the steps I took to download a manually build with this PR to test:

mkdir -p ~/src && \
cd ~/src && \
( [ -d kilocode ] || git clone https://github.com/Kilo-Org/kilocode.git ) && \
cd kilocode && \
git fetch origin pull/3933/head:pr-3933 && \
git switch pr-3933 && \
( command -v pnpm >/dev/null || (echo "Installing pnpm via corepack…" && corepack enable pnpm) ) && \
pnpm install && \
pnpm build && \
VSIX="$(ls -1 bin/kilo-code-*.vsix | tail -n1)" && \
echo "Built VSIX: $VSIX" && \
INSTALLER=$(command -v cursor || command -v code) && \
"$INSTALLER" --install-extension "$VSIX" --force && \
echo "Installed into Cursor/VS Code from PR #3933 (forced)" && \
"$INSTALLER" --list-extensions | grep -i kilo

frankea avatar Nov 24 '25 16:11 frankea

@chrarnoldus - updated this one based on the 4.125 changes.

mcowger avatar Nov 28 '25 03:11 mcowger