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 137 to 138

Compare

+34 −0 in 1 place
Lines 561–600 at 138 (were 561–566 at 137)
561561 return out;
562562 }
563563
564+ /** Two visible neighbours without retaining the file's historical sequence. */
565+ visibleNeighbours(path: string, line: LineId): LineId[] {
566+ const graph = this.graph;
567+ const target = graph.lineN(line);
568+ const start = graph.startCodeOf(path);
569+ if (target < 0 || start === undefined) return [];
570+ const scan = (nodes: Iterable<number>): LineId[] => {
571+ let previous: LineId | undefined;
572+ let found = false;
573+ for (const n of nodes) {
574+ if (n === target) {
575+ found = true;
576+ continue;
577+ }
578+ let deleted = false;
579+ for (const seq of graph.eachDeleterSeqOf(n))
580+ if (this.#has(seq)) {
581+ deleted = true;
582+ break;
583+ }
584+ if (deleted) continue;
585+ const id = graph.lineIdOf(n);
586+ if (found) return previous === undefined ? [id] : [previous, id];
587+ previous = id;
588+ }
589+ return found && previous !== undefined ? [previous] : [];
590+ };
591+ if (this.#hasMoves && graph.hasOrderedChildren)
592+ return graph.withProjectionScratch((scratch) =>
593+ scan(scratchLayoutNodes(graph, (id) => this.#has(graph.atom(id).seq), scratch, graph.nodeOf(start))),
594+ );
595+ return scan(this.#layoutNodes(start));
596+ }
564598 /** Index of a line in `sequence(path)`, or -1. */
565599 sequenceIndex(path: string, line: LineId): number {
566600 const f = this.#file(path, true);
MCP
compare on this site's /mcp
CLI
abso diff 137 138 src/engine/view.ts --json
JSON
/christopher/abso-core/compare/137..138?file=src%2Fengine%2Fview.ts&format=json