137 Commits

Author SHA1 Message Date
yetone
a0d3845bf3
fix: failed to rename buffer (#730) 2024-10-16 23:57:40 +08:00
yetone
595ea56fc1
fix: compatible with backquoted returns (#728) 2024-10-16 16:23:02 +08:00
yetone
7c83558b37
feat: smart position (#725) 2024-10-15 17:12:10 +08:00
yetone
8c28e285ea
perf(sidebar): update the buffer more efficiently (#724) 2024-10-15 12:30:20 +08:00
Maddison Hellstrom
964715be64
feat: floating input (#721)
* feat: add floating input to ask method

Open a floating input similar to the "edit" input for the "ask" input.
Enabled in config via `Config.windows.ask.floating` or by passing
`{ floating = true }` to the `api.ask` method.

Includes logic to ensure the sidebar uses the correct buffer and selection
if an existing sidebar is open for another code buffer.

Also refactored the `selection` module to extract the floating input
logic into a new `PromptInput` class.

* docs: update config options

* feat: more accurate annotations to prevent user misunderstandings

---------

Co-authored-by: yetone <yetoneful@gmail.com>
2024-10-15 11:22:34 +08:00
yetone
b19573cb2a
feat: write to multiple files (#720) 2024-10-14 20:15:11 +08:00
Maddison Hellstrom
347d9be730
feat: allow pressing apply_all mapping anywhere in sidebar (#528) (#712)
- make apply and apply_all mappings configurable
- fixed bug where apply mapping was not unbound in unbind_apply_key
- allow apply_all mapping to be pressed anywhere in the sidebar

fixes #528
2024-10-12 18:41:08 +08:00
yetone
faaa7f223b
fix: keep correct indentation (#710) 2024-10-11 21:07:55 +08:00
yetone
4132485487
fix: stream display replacement content (#699) 2024-10-10 05:05:29 +08:00
yetone
0705234991
refactor: planning mode user prompt use aider prompt (#671) 2024-09-30 19:38:31 +08:00
doodleEsc
e5dc837715
fix: unregister completion source where BufLeave (#656)
- Add an autocommand to unregister completion sources when leaving the buffer
- Include a description for the new autocommand for better clarity

Co-authored-by: fanlizhou <fanlizhou@yunqilaohe.com>
2024-09-27 20:27:24 +08:00
yetone
0d90c047ef
feat: avante repo map rust crate (#628) 2024-09-26 03:45:49 +08:00
yetone
a016663cda
fix(sidebar): cmp appears only once (#629) 2024-09-25 17:01:10 +08:00
yetone
8e1018fef7
feat: repo map (#496)
* feat: repo map

* chore: remove breakline

* chore: remove spaces

* fix: golang public method

* feat: mentions for editing input
2024-09-23 18:52:26 +08:00
Evgeny Naumov
8dbfe85dd4
fix(hl): use correct highlighting for inline hints (#613) 2024-09-21 14:49:07 +08:00
yetone
8fa2757e1b
feat(planning): supports insert code after line (#605) 2024-09-19 10:17:35 +08:00
Dennis Dillert
f9520c4fdf
fix(sidebar): escape square brackets (#591) 2024-09-15 11:06:50 -04:00
Dennis Dillert
6604d03237
feat(sidebar): enhance pattern matching for local LLM (closes #588) (#589)
- Extend pattern matching beyond "Replace lines: {{start_line}}-{{end_line}}" to support variations such as:
  - Extra whitespace
  - Numbered changes
  - Optional colons
  - Case insensitivity (upper- and lowercase)
  - Singular line references

- Add support for indented code snippets, allowing whitespace before code
blocks beginning with three backticks (```)
2024-09-15 10:59:57 -04:00
Dennis Dillert
ff5d27a4cf
fix(sidebar): allow /clear to be run multiple times (#579) 2024-09-15 10:56:28 -04:00
Evgeny Naumov
de9f36fc2f
fix(hl): use global namespace (closes #563) (#590)
* add AvantePopupHint and AvanteInlineHint hl groups

* Update lua/avante/sidebar.lua

* chore: update styling

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

---------

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-15 10:53:33 -04:00
Valentin Berlin
cea3dfb85b
Add user option for sidebar window focus mapping (#585)
* add mappings for window navigation in sidebar

* add new mapping option to readme

* rollback formatitng changes in Readme file
2024-09-15 02:42:55 +08:00
Maddison Hellstrom
932535aa99
fix: use vim.o.lines/vim.o.columns when calculating sidebar height/width (#570) 2024-09-13 10:53:06 -04:00
Aaron Pham
29e109e447
feat(api): support native chat mode (#541)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-05 02:43:31 -04:00
Will Lynas
8c021f3691
fix(input): move hints to bottom right (#533)
Uses vim.fn.winline() to determine correct hint buffer position
2024-09-04 16:27:08 -04:00
Josef Moudrik
bf8a943f45
fix(windows): check nil (#529)
* small fixes: sidebar: opts.win ~= nil case && bash

- and bash in Makefile (should correspond to she-bang in build.sh)

* fix lua style
2024-09-04 10:34:33 -04:00
Aaron Pham
d10cca4265
feat(api): support for ask customization (#527)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-04 09:15:32 -04:00
Aaron Pham
835e718883
chore(sidebar): decrease defer for jump (#524)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-04 06:34:21 -04:00
Aaron Pham
d7d476ddf5
chore(secrets): support table of string (#500)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-03 21:47:01 -04:00
Aaron Pham
0d8098e4eb
fix(style): add parentheses (#471)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-03 05:12:07 -04:00
Aaron Pham
e8c71d931e
chore: run stylua [generated] (#460)
* chore: add stylua

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* chore: running stylua

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

---------

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-03 04:19:54 -04:00
Aaron Pham
4ad913435c
feat(templates): avanterules filetype support (closes #254) (#466)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-03 04:09:13 -04:00
yetone
054695cc63
chore(sidebar): remove emoji (#467) 2024-09-03 15:27:20 +08:00
yetone
65e1e178f5
feat: automatic suggestion (smart tab) (#455) 2024-09-03 14:03:59 +08:00
Aaron Pham
7266661413
feat(api): enable customizable calls functions (#457)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-02 12:22:48 -04:00
Aaron Pham
c33ab80d88
revert: remove invalid configuration (#447)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-01 18:51:03 -04:00
Aaron Pham
7912070c6f
fix(gemini): check if json can be decoded (#446)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-01 18:47:35 -04:00
yetone
3ccb71d7ef
fix(sidebar): apply current cursor (#440) 2024-09-01 17:26:27 +08:00
yetone
55c85692bf
feat(ci): add lua static analyzer (#438) 2024-09-01 17:04:33 +08:00
yetone
d9aa7c78af
feat: support windows position (#436) 2024-09-01 15:52:16 +08:00
yetone
2e2c1ba486
perf(sidebar): do not replace all content in the code buffer (#433) 2024-09-01 02:45:32 +08:00
Aaron Pham
0557deeab7
feat: tokenizers (#429)
* feat: tokenizers

This reverts commit d5a4db8321d232a1b9c0d86fc38e8dd516d15776.

* fix(inputs): #422

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

---------

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-08-31 13:39:50 -04:00
yetone
faa46975cf fix(sidebar): the sidebar height is incorrect when selecting code 2024-08-31 23:36:28 +08:00
tang-hi
ff887af901 feat: add horizontal layout 2024-08-31 23:36:28 +08:00
yetone
d5a4db8321
Revert tokenizers (#423)
* Revert "fix: add missing "with" in README"

This reverts commit bf1e7f1f17c8b82687b15c41e5a8104ea03f70cf.

* Revert "feat: tokenizers (#407)"

This reverts commit d2095ba267abbfe169582708a4449e609aa9709b.
2024-08-31 22:45:31 +08:00
Aaron Pham
d2095ba267
feat: tokenizers (#407)
* feat: autobuild tiktoken lib and schenanigans

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* chore: revert readme changes

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* fix(build): windows

Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>

* chore(plugin): early load commands and base setup

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* fix(build): make sync

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* feat: rust go vroom vroom

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* feat: scuffed afaf implementation binding go brrrr

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* chore: remove dups

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* fix(tokens): calculate whether we should do prompt_caching (fixes #416)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* chore: ignore lockfiles

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* Update README.md

* Update crates/avante-tokenizers/README.md

* chore: remove unused

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* chore: remove auto build

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

---------

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>
Co-authored-by: yuchanns <me@yuchanns.xyz>
2024-08-31 07:19:59 -04:00
yetone
104484f17c
fix: use the original prompts (#397) 2024-08-30 22:21:50 +08:00
yetone
5cf85d59bd
fix: ensure there is no overlap between code snippets (#396) 2024-08-30 20:43:26 +08:00
yetone
2997d4669a
refactor: refactor planning prompts to resolve line number issues and indentation issues (#382) 2024-08-30 18:53:49 +08:00
yetone
07c1d707da
fix: indentation issue in copilot model and openai model (#393) 2024-08-30 15:40:40 +08:00
yetone
8c71e1f624
feat: support apply current code snippet (#391) 2024-08-30 15:01:23 +08:00