44 Commits

Author SHA1 Message Date
yetone
1437f319d2
feat: tools (#1180)
* feat: tools

* feat: claude use tools

* feat: openai use tools
2025-02-05 22:39:54 +08:00
yetone
078e9312dc
fix: filter out redundant backticks in editing mode (#1039) 2025-01-05 21:15:21 +08:00
Michael Gendy
e98fa46bec
feat(tokens): add token count display to sidebar (#956)
* feat (tokens) add token count display to sidebar

* refactor: calculate the real tokens and reuse input hints to avoid occlusion

---------

Co-authored-by: yetone <yetoneful@gmail.com>
2024-12-17 20:43:25 +08:00
Christopher Brewin
78dd9b0a6d
feat(context): add a ui for selecting and adding files to the sidebar as context (#912)
* feat(sidebar): supports select files

chore (context) update add type annotations to context functions

chore (sidebar) remove unused notify function call

refactor (sidebar) remove setting search file to file path

chore (sidebar) remove nvim_notify debugging api call

* feat (files) allow selecting a file by string via cmp suggestion menu

* chore (context) refactor to allow context using @file with a context view

* refactor (context) refactor seletected file types as an array of path and content

* refactor (config) remove unused configuration options

* refactor (sidebar) remove unused unbild key

* refactor (context) remove unused imports

* refactor (mentions) update mentions to support items with callback functions and removal of the underlying selection.

* fix (sidebar) add file context as a window that is visitable via the tab key

* refactor (file_content) remove file content as an input to llm

* feat (sidebar) support suggesting and applying code in all languages that are in the context

* feat (sidebar) configurable mapping for removing a file from the context.

* feat (context_view) configure hints for the context view for adding and deleting a file.

* feat (context) add hints for the context view.

* fix (sidebar) type when scrolling the results buffer.

* refactor (selected files) refactor llm stream to accept an array of selected file metadata

* refactor: context => selected_files

---------

Co-authored-by: yetone <yetoneful@gmail.com>
2024-12-12 01:29:10 +08:00
Jay Zhang
7413d5a508
fix: avoid ignorable error in ubuntu 22.04+ (#903) 2024-11-25 20:26:23 +08:00
yetone
67e946ef13
fix: diagnostics lnum starts with 1 (#892) 2024-11-23 23:08:10 +08:00
yetone
9042f5f202
feat: enable diagnostics (#891) 2024-11-23 21:49:33 +08:00
yetone
9d0e1cd4af
fix: align lua oop (#889) 2024-11-23 20:23:05 +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
895b0f4143
fix: get selection range from previous visual mode (#689) 2024-10-08 16:29:18 +08:00
yetone
0705234991
refactor: planning mode user prompt use aider prompt (#671) 2024-09-30 19:38:31 +08:00
yetone
0d90c047ef
feat: avante repo map rust crate (#628) 2024-09-26 03:45:49 +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
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
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
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
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
yetone
6b11ac7fd5
perf(selection): reduce the number of times indentation is calculated (#412) 2024-08-31 13:29:28 +08:00
yetone
2a0a8684cf
fix(selection): cursor out of range when restoring (#411) 2024-08-31 12:30:22 +08:00
yetone
104484f17c
fix: use the original prompts (#397) 2024-08-30 22:21:50 +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
Brent Yi
2c450b1da3
fix: AvanteEdit highlight for visual line mode (#326) 2024-08-28 11:46:26 -04:00
yetone
9dc00ecc10
fix: gemini (#323) 2024-08-28 22:17:00 +08:00
yetone
c54d2639f4
fix: spinner (#320) 2024-08-28 21:27:55 +08:00
yetone
b661269b5b
fix: editing lines indentation (#317) 2024-08-28 20:18:32 +08:00
yetone
385522606c
fix: indentation in first line (#311) 2024-08-28 16:26:08 +08:00
yetone
06f1d710bd
fix: end_col out of range (#310) 2024-08-28 16:13:04 +08:00
Aaron Pham
2feaa28ced
chore: cleanup typo and win options (#288)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-08-27 13:13:38 -04:00
yetone
37f0cf1d33
feat: highlight selected code (#285) 2024-08-27 23:47:15 +08:00
yetone
fe6518f6de
feat: editing mode (#281) 2024-08-27 22:44:40 +08:00
Aaron Pham
305d972849
chore(keymaps): add toggle options (#204)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-08-25 00:16:25 -04:00
yetone
964c4621f6
fix: close the hints popup when switching to another buffer (#180) 2024-08-24 00:21:00 +08:00
yetone
7bea73eb80
fix: check if is sidebar buf (#179) 2024-08-24 00:14:20 +08:00
Aaron Pham
2fc266edd2
fix(refresh): correct refresh in code buffer (#166)
only render inlay in codebuf

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-08-23 02:23:45 -04:00
yetone
8c8d864637
fix: floating window highlights (#149) 2024-08-22 14:46:08 +08:00
Aaron Pham
7e6705c0b1
fix(hint): correct variable and setup on init (#82)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-08-19 05:11:38 -04:00
Yuexun
29dabc4768
feat(ui): add config to turn off hints popup (#75) 2024-08-19 10:40:33 +08:00
Aaron Pham
d885bd9680
fix(ui): set selection per buffer and remove spinner (closes #32) (#62)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-08-18 17:36:30 +08:00
Aaron Pham
1aaf6a8227
feat(diff): autojump (#48)
centralized configuration

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-08-18 02:14:02 +08:00
yetone
3dca5f4764
feat: ask selected code block (#39) 2024-08-17 22:29:05 +08:00