Ensure consistent line endings when reading files by converting CRLF
(`\r\n`) to LF (`\n`). This fixes incorrect line number detection
when modifying CRLF-formatted files.
Addresses yetone/avante.nvim#1621.
If one is using avante.nvim with a non streaming LLM API the API
response will only have a single chunk. So that if we don't update the
displayed_response in the sidebar component, the output of the LLM will
be removed from the sidebar when we complete the interaction with the
LLM.
This commit makes sure that the displayed_response is updated for the
first chunk as well as subsequent ones.
This commit fixes an issue where buttons in the confirmation dialog
would not render properly when displaying multi-line messages.
Changes:
- Add dynamic positioning for buttons based on message length
- Calculate button row position based on the number of lines in the message
- Update focus_button function to accept custom row parameter
- Ensure highlights are applied at correct positions for varied message lengths
Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>
1. Split message into multiple lines using vim.split()
2. Apply indent to each line of the message using vim.tbl_map()
3. Improve code readability by using vim.iter() and chained methods
4. Simplify button line generation with string.rep()
Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>
* feat: Add claude tools to vertex claude provider
* fix: export transform_tool from claude.lua
* Include type for transfor_tool
---------
Co-authored-by: Miguelo Sana <miguelo@incubeta.com>
* feat: add ollama as supported provider
*This implementation is only working with `stream = true`*
- Uses the actual ollama api and allows for passing additional options
- Properly passes the system prompt to api
Use ollama as provider in opts like this:
opts = {
debug = true,
provider = "ollama",
ollama = {
api_key_name = "",
endpoint = "http://127.0.0.1:11434",
model = "qwen2.5-coder:latest",
options = {
num_ctx = 32768,
temperature = 0,
},
stream = true,
},
* fix: ollama types
---------
Co-authored-by: jtabke <25010496+jtabke@users.noreply.github.com>