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 165 to 166

Compare

+18 −3 in 3 places
Lines 1–5 at 166 (were 1–6 at 165)
11import { startNode } from "../keys.ts";
22import { StableSet } from "../state-source.ts";
3−import { joinLines } from "../text.ts";
43import type { FileAttrs, ReadView, SeqLine, VisibleLine } from "../view.ts";
54import type { ExperimentalMarkerProjection, MarkerState } from "./projection-marker.ts";
65
Lines 73–86 at 166 (were 74–80 at 165)
7473 }
7574 lineNumber(path: string, line: string): number {
7675 this.#assertLive();
77− return this.lines(path).findIndex((item) => item.id === line);
76+ let index = 0;
77+ for (const id of this.#adapter.lineIds(this.#state, path)) {
78+ this.#assertLive();
79+ if (id === line) return index;
80+ index++;
81+ }
82+ this.#assertLive();
83+ return -1;
7884 }
7985 sameText(path: string, other: ReadView): boolean {
8086 this.#assertLive();
Lines 199–214 at 166 (were 193–199 at 165)
193199 }
194200 text(path: string): string {
195201 this.#assertLive();
196− return joinLines([...this.visibleLines(path)].map((line) => line.text));
202+ let text = "",
203+ part = "";
204+ for (const line of this.visibleLines(path)) {
205+ part += `${line.text}\n`;
206+ if (part.length >= 16384) {
207+ text += part;
208+ part = "";
209+ }
210+ }
211+ return text + part;
197212 }
198213 hasFile(path: string): boolean {
199214 this.#assertLive();
MCP
compare on this site's /mcp
CLI
abso diff 165 166 src/engine/experimental/projection-reader.ts --json
JSON
/christopher/abso-core/compare/165..166?file=src%2Fengine%2Fexperimental%2Fprojection-reader.ts&format=json