mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 19:11:03 +08:00
fix(vscode): keep diff identifiers intact
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"kilo-code": patch
|
||||
---
|
||||
|
||||
Keep changed identifiers intact when highlighting edits within diff lines.
|
||||
@@ -2,8 +2,8 @@ import { describe, expect, test } from "bun:test"
|
||||
import { createDefaultOptions } from "./index"
|
||||
|
||||
describe("Pierre diff options", () => {
|
||||
test("highlights changed characters in unified and split diffs", () => {
|
||||
expect(createDefaultOptions("unified").lineDiffType).toBe("char")
|
||||
expect(createDefaultOptions("split").lineDiffType).toBe("char")
|
||||
test("keeps changed identifiers intact in unified and split diffs", () => {
|
||||
expect(createDefaultOptions("unified").lineDiffType).toBe("word-alt")
|
||||
expect(createDefaultOptions("split").lineDiffType).toBe("word-alt")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -10,7 +10,9 @@ import { createDefaultOptions as defaults, styleVariables } from "@opencode-ai/u
|
||||
|
||||
export { styleVariables }
|
||||
|
||||
export const LINE_DIFF_TYPE = "char" as const
|
||||
// Character matching fragments inserted identifiers when they share letters with
|
||||
// existing symbols. Word-alt keeps those logical additions visually intact.
|
||||
export const LINE_DIFF_TYPE = "word-alt" as const
|
||||
|
||||
// Pierre 1.1 treats its changed-line override properties as tint targets. Apply
|
||||
// Kilo semantic surfaces at the computed row level so host diff colors stay final.
|
||||
|
||||
Reference in New Issue
Block a user