Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 265 to 266

Compare

+24 −0 in 2 places
Lines 56–62 at 266 (were 56–61 at 265)
5656 | "knowPaths"
5757 | "laidOut"
5858 | "forget"
59+ | "placedDifferently"
5960 | "fileOfNumber"
6061 | "lineNumberOf"
6162 | "visibleWriters"
Lines 544–572 at 266 (were 543–548 at 265)
543544 return parent;
544545 }
545546
547+ /**
548+ * The files where a moved line sits, in this view or in `other`, when the two place it differently: a different
549+ * relocation wins, or a different parent (abso Capacity). Besides the files a draft's atoms name, these are the only
550+ * ones a draft's moves can lay out differently from its base, since a line's descendants follow it. Undefined when
551+ * either view resolves its moves in scratch, which keeps no map of them to compare.
552+ */
553+ placedDifferently(other: View): Set<string> | undefined {
554+ if (this.#scratchMoves() || other.#scratchMoves()) return undefined;
555+ const here = this.#hasMoves ? this.#relocationsN() : undefined;
556+ const there = other.#hasMoves ? other.#relocationsN() : undefined;
557+ const files = new Set<string>();
558+ const add = (n: number) => {
559+ files.add(this.#fileOfN(n));
560+ files.add(other.#fileOfN(n));
561+ };
562+ for (const [n, x] of here ?? []) {
563+ const y = there?.get(n);
564+ if (!y || y.parent !== x.parent || y.r.atom !== x.r.atom) add(n);
565+ }
566+ for (const n of there?.keys() ?? []) if (!here?.has(n)) add(n);
567+ return files;
568+ }
546570 /** Whether any atom in the set moves lines. */
547571 hasMoves(): boolean {
548572 return this.#hasMoves;
MCP
compare on this site's /mcp
CLI
abso diff 265 266 src/engine/view.ts --json
JSON
/christopher/abso-core/compare/265..266?file=src%2Fengine%2Fview.ts&format=json