Skip to content

Added support for XML-based tool calling#1

Merged
OEvortex merged 5 commits intomainfrom
xlm/tools
Dec 30, 2025
Merged

Added support for XML-based tool calling#1
OEvortex merged 5 commits intomainfrom
xlm/tools

Conversation

@OEvortex
Copy link
Copy Markdown
Owner

This pull request introduces a major version change (from 1.x.x to 0.2.0) and brings significant new functionality and enhancements, especially around XML-based tool calling and TUI (Textual User Interface) improvements. The most important changes include support for XML tool calls, a new redaction utility for hiding raw XML in the UI, dynamic tool prompt resolution, and several bug fixes. The CLI and configuration have been updated to allow users to select the tool calling format, and the changelog and versioning have been comprehensively updated.

Major new features and enhancements:

  • Added support for XML-based tool calling via the --tool-format xml CLI flag, including XML-specific prompts for all built-in tools and a robust XMLToolFormatHandler for parsing and result generation. [1] [2] [3] [4] [5] [6] [7]
  • Introduced a new utility function redact_xml_tool_calls(text) in revibe/core/utils.py to remove raw <tool_call>...</tool_call> blocks from assistant output, ensuring a clean UI experience. [1] [2] [3]
  • Refactored the TUI streaming message system (StreamingMessageBase in revibe/cli/textual_ui/widgets/messages.py) to track displayed content and smartly update the UI, preventing XML "flicker" and supporting dynamic content changes. [1] [2] [3] [4] [5] [6]
  • Enhanced premium tool summaries in chat history for a cleaner, more user-friendly display of tool calls (e.g., Grep (pattern), Bash (command), etc.). [1] [2]

Configuration and CLI improvements:

  • Added tool_format field to VibeConfig and CLI argument parsing, allowing users to select between native and XML-based tool calling. [1] [2] [3] [4] [5]
  • Updated version and changelog to reflect new features and the public release, renumbering all previous releases to the new 0.x.x scheme. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Bug fixes and internal improvements:

  • Fixed case-sensitivity issue with the tool format CLI argument and type errors in backend implementations related to the supported_formats field.
  • Fixed a typo in the XMLToolFormatHandler name property and made minor cleanups in UI and backend code. [1] [2] [3] [4] [5] [6] [7]

These changes collectively make the tool more robust, user-friendly, and ready for broader public use, especially with the new XML-based tool calling mode.

Copilot AI review requested due to automatic review settings December 30, 2025 10:59
@OEvortex OEvortex merged commit b78d127 into main Dec 30, 2025
5 of 12 checks passed
Copy link
Copy Markdown

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 pull request introduces XML-based tool calling as an alternative to native API function calling, representing a major feature addition to support models without native tool calling capabilities. The PR includes extensive refactoring of the TUI to provide a cleaner visual experience with XML redaction and enhanced tool summaries.

Key Changes

  • Added XML tool calling format support with --tool-format xml CLI flag and comprehensive XML prompt files for all built-in tools
  • Implemented XMLToolFormatHandler for parsing XML tool calls and generating XML-formatted results
  • Enhanced TUI with smart streaming updates, XML redaction utilities, and premium tool call summaries
  • Updated all backend implementations and model configs with supported_formats field

Reviewed changes

Copilot reviewed 39 out of 43 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Version changed from 1.4.0 to 0.2.0
CHANGELOG.md Added entries for versions 0.2.0, 0.1.5.1, 0.1.5.0 with XML feature documentation
revibe/core/config.py Added ToolFormat enum with NATIVE and XML options
revibe/core/llm/format.py Implemented XMLToolFormatHandler with XML parsing and result generation
revibe/core/tools/base.py Added get_xml_tool_prompt() method with fallback logic
revibe/core/utils.py Added redact_xml_tool_calls() utility for removing XML blocks from display
revibe/cli/textual_ui/widgets/messages.py Refactored StreamingMessageBase with smart content tracking and XML redaction
revibe/core/tools/builtins/*.py Updated tool display methods for cleaner summaries (Grep, Bash, Read, Write, Patch)
revibe/core/system_prompt.py Added dynamic XML/native prompt selection based on tool_format
revibe/core/agent.py Added format handler selection logic based on config
revibe/cli/entrypoint.py Added --tool-format CLI argument
tests/* Added type ignore comments and supported_formats to test stubs
image.png Added binary PNG image file
chnageimade.md Added documentation file (with typo in filename)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,30 @@
# TUI Visual & Functional Enhancements
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filename contains a typo: "chnageimade.md" should be "changeimade.md" or preferably "changes_i_made.md" for better readability.

Copilot uses AI. Check for mistakes.
[project]
name = "revibe"
version = "1.4.0"
version = "0.2.0"
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version downgrade from 1.4.0 to 0.2.0 is semantically incorrect. According to semantic versioning, this represents a major version decrease which typically indicates removing features or introducing breaking changes for a pre-1.0 release. If this is meant to be the first public release, consider using version 1.0.0 instead, or if continuing from 1.4.0, use 1.5.0 or 2.0.0 depending on the nature of changes.

Suggested change
version = "0.2.0"
version = "1.5.0"

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +68
## [0.1.5.1] - 2025-12-30

### Added

- Support for XML-based tool calling via `--tool-format xml` flag.
- XML-specific prompts for all built-in tools (`bash`, `grep`, `read_file`, `write_file`, `search_replace`, `todo`).
- `XMLToolFormatHandler` for robust parsing of XML tool calls and generation of XML tool results.
- `supported_formats` field in `ModelConfig` and backend implementations to manage compatibility.
- Dynamic tool prompt resolution in `BaseTool` allowing automatic fallback to standard prompts if XML version is missing.

### Fixed

- Case-sensitivity issue when specifying tool format via CLI.
- Type errors in backends when implementing `BackendLike` protocol (added missing `supported_formats`).
- Typo in `XMLToolFormatHandler` name property.

## [0.1.5.0] - 2025-12-30

### Added

- Support for XML-based tool calling via `--tool-format xml` flag.
- XML-specific prompts for all built-in tools (`bash`, `grep`, `read_file`, `write_file`, `search_replace`, `todo`).
- `XMLToolFormatHandler` for robust parsing of XML tool calls and generation of XML tool results.
- `supported_formats` field in `ModelConfig` and backend implementations to manage compatibility.
- Dynamic tool prompt resolution in `BaseTool` allowing automatic fallback to standard prompts if XML version is missing.

### Fixed

- Case-sensitivity issue when specifying tool format via CLI.
- Type errors in backends when implementing `BackendLike` protocol (added missing `supported_formats`).
- Typo in `XMLToolFormatHandler` name property.
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CHANGELOG shows duplicate entries for versions 0.1.5.1 and 0.1.5.0 with nearly identical content, which creates confusion about the version history. The changelog should have unique entries per version with distinct changes documented.

Copilot uses AI. Check for mistakes.
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