feat: support acp (#2649)
This commit is contained in:
@@ -1700,4 +1700,12 @@ function M.fix_diff(diff)
|
||||
return table.concat(the_final_diff_lines, "\n")
|
||||
end
|
||||
|
||||
function M.get_unified_diff(text1, text2, opts)
|
||||
opts = opts or {}
|
||||
opts.result_type = "unified"
|
||||
opts.ctxlen = opts.ctxlen or 3
|
||||
|
||||
return vim.diff(text1, text2, opts)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -26,7 +26,7 @@ function Tokens.calculate_tokens(content)
|
||||
elseif type(item) == "table" and item.type == "image" then
|
||||
text = text .. item.source.data
|
||||
elseif type(item) == "table" and item.type == "tool_result" then
|
||||
text = text .. item.content
|
||||
if type(item.content) == "string" then text = text .. item.content end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user