feat: allow custom tools to send stop flag in metadata#581
feat: allow custom tools to send stop flag in metadata#581pschiel wants to merge 2 commits intoKilo-Org:devfrom
Conversation
Allow custom tools to send stop tag metadata.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge NotesThis PR introduces two well-integrated features:
The implementation is clean: backward-compatible for existing string-returning plugins, properly validated for the new object return path, and the stop signal integrates naturally with the existing Files Reviewed (3 files)
|
|
Hi! Thank you for taking the time to contribute to this project—we really appreciate it. 🙏 We are currently working on re-platforming the core of our VS Code and JetBrains extensions to be based on our new Kilo CLI, with a complete rebuild based on OpenCode as our new foundation, and the moment has come to promote this repository to become the main repository. To do that, we moved the code from this repository to the kilocode repository. This unfortunately means we cannot merge this branch here anymore. Please add https://github.com/Kilo-Org/kilocode.git as a remote, and push your branch there and create a new PR in https://github.com/Kilo-Org/kilocode . We unfortunately cannot do this for you as then the PR would not be in your name anymore. If you need any help, feel free to ask on our Discord in #kilo-dev-contributors Sorry for the inconvenience and thank you for contributing to Kilo! |
Fixes Kilo-Org/kilocode#6289
Context
Allow tools to stop the agent loop via metadata.
Example tool that needs this feature: https://github.com/pschiel/kilo-config/blob/master/tool/speak.ts
(TTS speaker summary as final assistant action, must stop the agent loop)
Implementation
{ title?, output, metadata? }in addition to a plain string.metadata.stop = true, the session processor halts after that tool completes instead of triggering another LLM turn.