feat: cache tool use (#1496)

This commit is contained in:
yetone
2025-03-05 19:43:18 +08:00
committed by GitHub
parent 232d4b1340
commit 93c2e1fd83

View File

@@ -281,6 +281,12 @@ function M.parse_curl_args(provider, prompt_opts)
end
end
if #tools > 0 then
local last_tool = vim.deepcopy(tools[#tools])
last_tool.cache_control = { type = "ephemeral" }
tools[#tools] = last_tool
end
return {
url = Utils.url_join(provider_conf.endpoint, "/v1/messages"),
proxy = provider_conf.proxy,