-
Notifications
You must be signed in to change notification settings - Fork 0
Added support for XML-based tool calling #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e323569
1278d39
636a790
859fac3
fc4f2e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # TUI Visual & Functional Enhancements | ||
|
||
|
|
||
| I have implemented several key changes to the TUI to improve the visual experience and support the new XML-based tool calling mode. | ||
|
|
||
| ## 1. XML Tool Call Redaction | ||
| - **File**: `revibe/core/utils.py` | ||
| - **Change**: Added `redact_xml_tool_calls(text)` utility. | ||
| - **Purpose**: This function detects and removes raw `<tool_call>...</tool_call>` blocks from the assistant's output stream. It supports partially written tags, ensuring that raw XML never "flickers" on screen during streaming. | ||
|
|
||
| ## 2. Streaming UI Refresh | ||
| - **File**: `revibe/cli/textual_ui/widgets/messages.py` | ||
| - **Change**: Refactored `StreamingMessageBase` to track `_displayed_content`. | ||
| - **Purpose**: Allows the UI to smart-update only when visible content changes. If a tool call block starts in the stream, the UI detects the decrease in "visible" characters (due to redaction) and resets the stream to prevent showing fragments of XML. | ||
|
|
||
| ## 3. Premium Tool Summaries | ||
| I updated the display logic for all built-in tools to provide a cleaner, more premium aesthetic in the chat history: | ||
|
|
||
| - **Grep**: Now shows as `Grep (pattern)` instead of `grep: 'pattern'`. | ||
| - **Bash**: Now shows as `Bash (command)` instead of a raw command string. | ||
| - **Read File**: Now shows as `Read (filename)` with a cleaner summary. | ||
| - **Write File**: Now shows as `Write (filename)`. | ||
| - **Search & Replace**: Now shows as `Patch (filename)`. | ||
|
|
||
| ## 4. Reasoning Integration | ||
| - **File**: `revibe/cli/textual_ui/widgets/messages.py` | ||
| - **Change**: Applied the same redaction logic to `ReasoningMessage`. | ||
| - **Purpose**: Ensures that even if the model starts thinking about tool calls in its reasoning block, the raw tags remain hidden from the user. | ||
|
|
||
| --- | ||
| *Created on 2025-12-30 following TUI Aesthetic overhaul.* | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| [project] | ||||||
| name = "revibe" | ||||||
| version = "1.4.0" | ||||||
| version = "0.2.0" | ||||||
|
||||||
| version = "0.2.0" | |
| version = "1.5.0" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,6 @@ | |
|
|
||
| try: | ||
| import select | ||
| import termios | ||
|
|
||
| _UNIX_AVAILABLE = True | ||
| except ImportError: | ||
|
|
||
There was a problem hiding this comment.
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.