Conversation
|
🚀 |
There was a problem hiding this comment.
Pull request overview
This PR adds interactive tool call and reasoning block functionality to the ECA Neovim plugin, including expandable/collapsible displays for tool arguments, outputs, and diffs, along with a configurable typewriter effect for streaming responses.
Key Changes:
- Expandable tool calls with interactive toggling via
<CR>in the chat buffer - Reasoning ("Thinking") blocks that display extended reasoning content with elapsed time
- Typewriter effect for streaming responses with configurable speed
- Enhanced MCP server status display showing active vs. registered counts
- Debug commands (
:EcaServerMessagesand:EcaServerTools) for inspecting server state - New highlight groups (
EcaToolCall,EcaHyperlink,EcaLabel) for better theming
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_utils.lua |
Tests for utility functions including token shortening and config merging |
tests/test_stream_queue.lua |
Comprehensive tests for the streaming queue with typing effects |
tests/test_sidebar_usage_and_tools.lua |
Integration tests for tool calls, reasoning blocks, and UI interactions |
tests/test_server_picker_commands.lua |
Tests for server messages and tools picker commands |
tests/test_picker.lua |
Tests for the snacks.nvim picker wrapper |
tests/test_highlights.lua |
Tests for ECA highlight group definitions |
lua/eca/ui/picker.lua |
New picker wrapper to handle snacks.nvim dependency gracefully |
lua/eca/stream_queue.lua |
New streaming queue implementation for typewriter effects |
lua/eca/utils.lua |
Added utilities for token shortening, config merging, and tool call configuration |
lua/eca/sidebar.lua |
Major refactoring adding tool call expansion, reasoning blocks, and streaming improvements |
lua/eca/highlights.lua |
Added new highlight groups for tool calls, labels, and hyperlinks |
lua/eca/config.lua |
Restructured config with new windows hierarchy and tool call/reasoning settings |
lua/eca/commands.lua |
Added :EcaServerMessages and :EcaServerTools commands with picker integration |
docs/usage.md |
Updated with tool call interaction, reasoning blocks, and typewriter effect documentation |
docs/troubleshooting.md |
Added debug commands and typewriter effect performance tips |
docs/installation.md |
Added snacks.nvim as optional dependency |
docs/development.md |
Updated test instructions and added highlight group documentation |
docs/configuration.md |
Comprehensive documentation of new configuration options and migration guide |
README.md |
Updated introduction and simplified feature list |
tests/test_eca.lua |
Added test for usage window defaults |
plugin-spec.lua |
Updated example configuration with new windows.usage.format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| -- Normalize all pieces to strings to avoid issues when configuration or | ||
| -- status fields accidentally contain non-string values (e.g. userdata). | ||
| if type(arrow) ~= "string" then | ||
| arrow = tostring(arrow) | ||
| end | ||
|
|
||
| local title = call.title or "Tool call" | ||
| local status = call.status or icons.running | ||
|
|
||
| if type(title) ~= "string" then | ||
| title = tostring(title) | ||
| end | ||
| if type(status) ~= "string" then | ||
| status = tostring(status) | ||
| end | ||
|
|
||
| local parts = { arrow, title, status } | ||
|
|
||
| return table.concat(parts, " ") |
There was a problem hiding this comment.
The function normalizes non-string values using tostring(), which could convert userdata or other types into unhelpful representations like "userdata: 0x...". Consider adding validation to ensure these fields are strings before building the header, or provide more helpful fallback values when they're not strings.
|
|
||
| table.insert(self._tool_calls, call) | ||
| end | ||
|
|
There was a problem hiding this comment.
Missing function documentation. This function should have a docstring describing its purpose, parameters (content), and return value.
| ---Finalize the currently active tool call, if any. | |
| ---Resets internal tracking state so subsequent messages are no longer | |
| ---associated with an in-progress tool call. | |
| ---@return nil |
|
Amazing!!! |
Uh oh!
There was an error while loading. Please reload this page.