feat: manual compact instead of automatic compact (#1996)
This commit is contained in:
@@ -1312,6 +1312,7 @@ function M.get_commands()
|
||||
{ description = "Show help message", name = "help" },
|
||||
{ description = "Clear chat history", name = "clear" },
|
||||
{ description = "New chat", name = "new" },
|
||||
{ description = "Compact history messages to save tokens", name = "compact" },
|
||||
{
|
||||
shorthelp = "Ask a question about specific lines",
|
||||
description = "/lines <start>-<end> <question>",
|
||||
@@ -1329,6 +1330,7 @@ function M.get_commands()
|
||||
end,
|
||||
clear = function(sidebar, args, cb) sidebar:clear_history(args, cb) end,
|
||||
new = function(sidebar, args, cb) sidebar:new_chat(args, cb) end,
|
||||
compact = function(sidebar, args, cb) sidebar:compact_history_messages(args, cb) end,
|
||||
lines = function(_, args, cb)
|
||||
if cb then cb(args) end
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user