Versions 45 to 318
new file, 136 lines
4+
10+
17+
18+function push(p: Project, agent: string, file: string, old: string, now: string, message: string, time: number) {
23+
24+test("normalized text ignores whitespace, wrapping, quotes, trailing commas, line-end semicolons and lone arrow parentheses", () => {
30+
31+test("pairing: a rewrapped run pairs by its characters, a real edit by similarity, a new line with nothing", () => {
32+ assert.deepEqual(pairIn(["f(a, b);"], ["f(", " a,", " b,", ");"], 1), { index: 0, formatting: true });
33+ assert.deepEqual(pairIn(["const n = Math.min(8, w);"], ["const n = Math.min(cap ?? 8, w);"], 0), {
40+
42+ const p = setup({ "q.ts": "export function take(w: number) {\n\tconst n = Math.min(8, w);\n\treturn n;\n}\n" });
43+ push(p, "ann", "q.ts", "Math.min(8, w)", "Math.min(cap ?? 8, w)", "Cap the batch at 8, tunable per project", 10); // v1
44+ push(p, "bob", "q.ts", "\treturn n;\n", "\treturn n; // the count\n", "Say what n is", 20); // v2, beside it
54+
68+
71+ push(p, "fmt", "a.ts", "call(alpha, beta);\n", "call(\n\talpha,\n\tbeta,\n);\n", "Wrap", 10); // v1
81+
88+
91+ for (let i = 1; i <= 4; i++) push(p, "ann", "a.ts", `v = ${i - 1}`, `v = ${i}`, `to ${i}`, i * 10);
99+
100+test("code moved to another file in one push is followed back into the file it came from", () => {
102+ "big.ts": "export const keep = 1;\nexport function tide(level: number) {\n\treturn level * 2;\n}\n",
110+ p.edit("bob", { file: "small.ts", old: "export const other = 1;\n", new: `export const other = 1;\n${tide}` }, 21);
123+ p.edit("ann", { file: "big.ts", old: "export const keep = 1;\n", new: `export const keep = 1;\n${moved}` }, 31);
- MCP
- compare on this site's /mcp
- CLI
- abso diff 45 318 worker/project/test/trail.test.ts --json
- JSON
- /christopher/abso-core/compare/45..318?file=worker%2Fproject%2Ftest%2Ftrail.test.ts&format=json