When AI answer contains %, that caracter is silently ignored.
Lets take as exemple this Symfony services.yaml file:
# This is a services.yaml file in a Symfony project.
# In ../.env file, I set MIHAMINA_ID to 1234.
# I want to set the parameter mihamina_id to the value of MIHAMINA_ID.
# Modify the parameters section of this services.yaml file
# to set the mihamina_id parameter to the value of MIHAMINA_ID.
parameters:
services:
_defaults:
autowire: true
autoconfigure: true
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
If I prompt AI with the whole file, the displayed result is :
When AI answer contains
%
, that caracter is silently ignored.Lets take as exemple this Symfony
services.yaml
file:If I prompt AI with the whole file, the displayed result is :
We notice the
%
are missing.It should be:
We must escape the
%
in the AI response with a kind of :I made it quickly in https://github.com/natixgroup/ai.nvim/commit/0356e9a7ecb19937720d4cd5b8c6239870821fa6 but it very ugly as it needs to be factorized.