42 Commits

Author SHA1 Message Date
Epheien
7a9fbbd4dd fix(history): correct title type check in History.from_file() (#2898)
Co-authored-by: eph <eph@MacBook-Pro.local>
2025-12-31 01:03:37 +08:00
Dmitry Torokhov
d0f0580d64 fix: sanitize loaded chat history
Ensure that chat history loaded from a file has resemblance of correct
data. Namely title and timestamp are present and are strings, and
entires, messages, and todos are lists. In case of inconsistencies
replace with empty/default data.

This should help with #2584.

More changes are needed to sanitize individual entries.
2025-10-11 16:41:45 -07:00
brook hong
604fdcc4b1 feat: add project root option in commands Ask/Chat/ChatNew (#2659) 2025-08-31 22:10:29 +08:00
doodleEsc
1455ed6005 refactor(templates): Prioritize copying system templates to ensure latest version
- Refactor template copying order
2025-07-16 17:33:17 +08:00
Dmitry Torokhov
34907fc1cd refactor(history): start moving history-related code into avante/history
The utils module has grown too big and contains unrelated functionality.
Start moving code related to managing history messages comprising chat
history into lua/avante/history module to keep the code more manageable.
2025-07-16 12:49:15 +08:00
yetone
8942e12798 feat: beast mode for gpt4.1 (#2431) 2025-07-10 12:30:06 +08:00
doodleEsc
4329ed79f4 feat: enable override prompt templates directory (#2387) 2025-07-02 14:43:17 +08:00
guanghechen
30604304ba improve: support to customize the avanterules directories for project/global (#2392) 2025-07-02 12:17:13 +08:00
yetone
f23550bd94 fix: lua style (#2202) 2025-06-10 12:23:24 +08:00
Jiyeol Lee
de8fb58bfa feat: remove history command (#2063)
* feat: remove history command

* Address code review

Co-authored-by: Michael Bøcker-Larsen <247048+mblarsen@users.noreply.github.com>

---------

Co-authored-by: Michael Bøcker-Larsen <247048+mblarsen@users.noreply.github.com>
2025-06-09 19:59:43 +08:00
yetone
58d08bf0cc fix: history storage path and delete clear memory (#2153) 2025-06-05 00:26:02 +08:00
kyrisu
4495ee6bcf feat: load templates from cache and project directories (#2126) 2025-06-04 03:24:53 +08:00
yetone
f10b8383e3 refactor: history messages (#1934) 2025-04-30 03:07:18 +08:00
yetone
1c8cac1958 feat: history manager (#1644) 2025-03-19 17:28:05 +08:00
yetone
25dee44de9 fix: bedrock (#1511) 2025-03-07 00:30:30 +08:00
yetone
8620ea3e12 refactor: summarize memory (#1508) 2025-03-07 00:12:57 +08:00
yetone
0d592f440c Revert "refactor: message content (#1424)" (#1442)
This reverts commit ae8497faf1.
2025-03-01 13:25:51 +08:00
yetone
ae8497faf1 refactor: message content (#1424) 2025-02-28 14:43:39 +08:00
yetone
984fe877bf chores: remove debug logs (#1396) 2025-02-26 03:39:09 +08:00
yetone
2b3a41e811 feat: implement a more flexible custom prompts solution (#1390) 2025-02-25 16:08:16 +08:00
Peter Cardenas
afa674c6fd chore: prefer not to use function assignment (#1381) 2025-02-25 12:08:03 +08:00
yetone
b04bffa441 fix: types (#1344) 2025-02-22 23:24:20 +08:00
yetone
fa89b147db fix: custom prompts (#1328) 2025-02-21 00:45:41 +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
yetone
9e0b5bf8f1 fix(ci): lua style (#948) 2024-12-13 23:24:29 +08:00
Alexander Muratov
eb1bc657a1 refactor & fix: improve libraries initialization (#921)
* refactor(libs): extract libraries initialization

Extract initialization logic into separate functions
for better error handling and reusability.

* fix(libs): improve core libraries init

This change helps prevent runtime errors from uninitialized libraries.
2024-12-13 23:00:43 +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
yetone
3b390040f5 refactor: chat history based on project (#867) 2024-11-18 18:07:33 +08:00
yetone
9fbe0256f2 feat: keep the history content in the resp buffer (#807) 2024-11-05 21:02:38 +08:00
Maddison Hellstrom
b6f7c193b0 fix: don't try to read non-files (#797)
fixes #796
2024-11-04 13:28:29 -08:00
Leiser Fernández Gallo
ec31f348b2 fix(save): schedule save within a loop (#560) 2024-10-10 20:04:37 +08:00
Dennis Dillert
c3848d086c fix: ensure paths are recreated after calling :AvanteClear to avoid errors (#678) 2024-10-05 17:49:15 +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
GNITOAHC
a4a037cec1 feat(cmd): AvanteClear (#518)
Remove all cache/history path.

Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
2024-09-04 07:38:59 -04:00
Hanchin Hsieh
e55f9f753f fix(avante/path): incorrect handle of windows path (#522)
Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>
2024-09-04 06:34:53 -04:00
Aaron Pham
2b89f0d529 perf(anthropic): prompt-caching (#517)
bring back prompt caching support on Anthropic

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-04 03:19:33 -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
Aaron Pham
0557deeab7 feat: tokenizers (#429)
* feat: tokenizers

This reverts commit d5a4db8321.

* 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
d5a4db8321 Revert tokenizers (#423)
* Revert "fix: add missing "with" in README"

This reverts commit bf1e7f1f17.

* Revert "feat: tokenizers (#407)"

This reverts commit d2095ba267.
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