refactor: history messages (#1934)

This commit is contained in:
yetone
2025-04-30 03:07:18 +08:00
committed by GitHub
parent f9aa75459d
commit f10b8383e3
36 changed files with 1699 additions and 1462 deletions

View File

@@ -215,14 +215,6 @@ function M.setup()
E.setup({ provider = auto_suggestions_provider })
end
if Config.behaviour.enable_cursor_planning_mode then
local cursor_applying_provider_name = Config.cursor_applying_provider or Config.provider
local cursor_applying_provider = M[cursor_applying_provider_name]
if cursor_applying_provider and cursor_applying_provider ~= provider then
E.setup({ provider = cursor_applying_provider })
end
end
if Config.memory_summary_provider then
local memory_summary_provider = M[Config.memory_summary_provider]
if memory_summary_provider and memory_summary_provider ~= provider then
@@ -277,4 +269,13 @@ function M.get_config(provider_name)
return type(cur) == "function" and cur() or cur
end
function M.get_memory_summary_provider()
local provider_name = Config.memory_summary_provider
if provider_name == nil then
if M.openai.is_env_set() then provider_name = "openai-gpt-4o-mini" end
end
if provider_name == nil then provider_name = Config.provider end
return M[provider_name]
end
return M