Revert tokenizers (#423)

* Revert "fix: add missing "with" in README"

This reverts commit bf1e7f1f17.

* Revert "feat: tokenizers (#407)"

This reverts commit d2095ba267.
This commit is contained in:
yetone
2024-08-31 22:45:31 +08:00
committed by GitHub
parent bf1e7f1f17
commit d5a4db8321
27 changed files with 27 additions and 3554 deletions

View File

@@ -4,7 +4,7 @@ local fn = vim.fn
local Split = require("nui.split")
local event = require("nui.utils.autocmd").event
local Path = require("avante.path")
local History = require("avante.history")
local Config = require("avante.config")
local Diff = require("avante.diff")
local Llm = require("avante.llm")
@@ -1170,7 +1170,7 @@ function Sidebar:get_commands()
end,
clear = function(args, cb)
local chat_history = {}
Path.history.save(self.code.bufnr, chat_history)
History.save(self.code.bufnr, chat_history)
self:update_content("Chat history cleared", { focus = false, scroll = false })
vim.defer_fn(function()
self:close()
@@ -1239,7 +1239,7 @@ function Sidebar:create_input()
return
end
local chat_history = Path.history.load(self.code.bufnr)
local chat_history = History.load(self.code.bufnr)
---@param request string
local function handle_submit(request)
@@ -1356,7 +1356,7 @@ function Sidebar:create_input()
request = request,
response = full_response,
})
Path.history.save(self.code.bufnr, chat_history)
History.save(self.code.bufnr, chat_history)
end
Llm.stream({
@@ -1564,7 +1564,7 @@ function Sidebar:get_selected_code_size()
end
function Sidebar:render()
local chat_history = Path.history.load(self.code.bufnr)
local chat_history = History.load(self.code.bufnr)
local sidebar_height = api.nvim_win_get_height(self.code.winid)
local selected_code_size = self:get_selected_code_size()