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 174 to 175

Compare

+31 −0 in 2 places
Lines 29–35 at 175 (were 29–34 at 174)
2929
3030/** A visible line of a projected file. */
3131export interface VisibleLine {
32+ readonly textChunks?: () => Iterable<string>;
3233 readonly id: LineId;
3334 readonly text: string;
3435 readonly atom: AtomId;
Lines 543–578 at 175 (were 542–547 at 174)
542543 return true;
543544 }
544545
546+ *lineChunks(path: string): IterableIterator<() => Iterable<string>> {
547+ for (const n of this.#file(path).vis) yield () => this.graph.textChunks(n);
548+ }
550+ /** Visible lines without retaining their text in the view cache. */
551+ *visibleLines(path: string): IterableIterator<VisibleLine> {
552+ const graph = this.graph;
553+ for (const n of this.#file(path).vis)
554+ yield { id: graph.lineIdOf(n), text: graph.textOf(n), atom: graph.idOfSeq(graph.writerSeqOf(n)) };
555+ }
557+ /** Atom-building line handles; text is loaded only when requested. */
558+ buildLines(path: string): readonly VisibleLine[] {
559+ const graph = this.graph;
560+ const vis = this.#file(path).vis;
561+ const lines: VisibleLine[] = new Array(vis.length);
562+ for (let i = 0; i < vis.length; i++) {
563+ const n = vis[i]!;
564+ lines[i] = {
565+ id: graph.lineIdOf(n),
566+ textChunks: () => graph.textChunks(n),
567+ get text() {
568+ return graph.textOf(n);
569+ },
570+ atom: graph.idOfSeq(graph.writerSeqOf(n)),
571+ };
572+ }
573+ return lines;
574+ }
545576 /** Visible lines with their ids. */
546577 lines(path: string): readonly VisibleLine[] {
547578 if (this.#linesCache?.path === path) return this.#linesCache.lines;
MCP
compare on this site's /mcp
CLI
abso diff 174 175 src/engine/view.ts --json
JSON
/christopher/abso-core/compare/174..175?file=src%2Fengine%2Fview.ts&format=json