Replies: 1 comment
-
Yep please raise a PR for this. The code_runner tool will be getting a fix up in the next few weeks but for now please do add |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
AFAIK this plugin use XML for structured response. When using the
@editor
tool, the LLM will response with a XML code block which is then parsed by this plugin to modify the contents of the current buffer. The XML code block must always incode the CDATA section, as mentioned in the prompt here:codecompanion.nvim/lua/codecompanion/helpers/tools/editor.lua
Line 186 in 77e04c5
For the
@code_runner
tool, there is no instruction about the CDATA section:codecompanion.nvim/lua/codecompanion/helpers/tools/code_runner.lua
Line 41 in 77e04c5
So at first I thought that the CDATA section is unneeded for this tool. However when trying it I get an error that the XML file is invalid:
Only after adding the CDATA sections the XML parser can correctly parse the XML:
So I wonder if we can fix this by adding the missing CDATA instruction in the
@code_runner
tool.Adding "Remember to use CDATA in your XML response." works for me with Claude 3.5 Sonnet as backend:
After adding this instruction:
I can open a PR to fix it and provide more detailed information if you wish.
Beta Was this translation helpful? Give feedback.
All reactions