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 162 to 163

Compare

+15 −3 in 1 place
Lines 175–195 at 163 (were 175–183 at 162)
175175 fileOf(line: string): string {
176176 this.#assertLive();
177177 if (line.startsWith("^")) return line.slice(1);
178− const marker = this.#adapter.markers.get(this.#state.locator, this.graph.lineN(line) + 1);
179− if (marker?.kind !== "line") throw Error("missing projected line");
180− return this.#adapter.sequence.fileAt(this.#state.sequence, marker.enter);
178+ let current = line;
179+ while (!current.startsWith("^")) {
180+ const n = this.graph.lineN(current);
181+ if (n < 0) throw Error("unknown projected line");
182+ const marker = this.#adapter.markers.get(this.#state.locator, n + 1);
183+ if (marker?.kind === "line") return this.#adapter.sequence.fileAt(this.#state.sequence, marker.enter);
184+ // A line written outside this view has no marker. Follow canonical ancestry
185+ // until it reaches a line whose placement this view actually contains.
186+ if (marker || this.#adapter.members.get(this.#state.membership, this.graph.writerSeqOf(n))?.present)
187+ throw Error("missing projected line");
188+ const parent = this.graph.lineParent(current);
189+ if (parent === undefined) throw Error("missing projected line parent");
190+ current = parent;
191+ }
192+ return current.slice(1);
181193 }
182194 text(path: string): string {
183195 this.#assertLive();
MCP
compare on this site's /mcp
CLI
abso diff 162 163 src/engine/experimental/projection-reader.ts --json
JSON
/christopher/abso-core/compare/162..163?file=src%2Fengine%2Fexperimental%2Fprojection-reader.ts&format=json