Skip to content

Commit dcb82fa

Browse files
committed
feat(diff): add experimental unified diff support, refactor handling
- Introduce experimental unified diff parsing and application utilities - Refactor mappings to support both block and unified diff formats - Add configuration option to select diff format - Update prompts and instructions for diff formats and tool usage - Improve chat UI parsing for diff blocks - Add tests for diff utilities and edge cases Signed-off-by: Tomas Slusny <[email protected]>
1 parent 418562e commit dcb82fa

File tree

10 files changed

+620
-300
lines changed

10 files changed

+620
-300
lines changed

lua/CopilotChat/config.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
---@field tools string|table<string>|nil
2020
---@field resources string|table<string>|nil
2121
---@field sticky string|table<string>|nil
22+
---@field diff 'block'|'unified'?
2223
---@field language string?
2324
---@field temperature number?
2425
---@field headless boolean?
@@ -62,6 +63,7 @@ return {
6263
tools = nil, -- Default tool or array of tools (or groups) to share with LLM (can be specified manually in prompt via @).
6364
resources = 'selection', -- Default resources to share with LLM (can be specified manually in prompt via #).
6465
sticky = nil, -- Default sticky prompt or array of sticky prompts to use at start of every new chat (can be specified manually in prompt via >).
66+
diff = 'block', -- Default diff format to use, 'block' or 'unified'.
6567
language = 'English', -- Default language to use for answers
6668

6769
temperature = 0.1, -- Result temperature

0 commit comments

Comments
 (0)