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 273 to 274

Compare

+9 −1 in 2 places
Lines 2–20 at 274 (were 2–12 at 273)
22import { StoredText } from "../../src/engine/stored-text.ts";
33import { eachCodeLine } from "./names.ts";
44
5+/**
6+ * Characters of parsed code kept in memory before the rest goes to scratch (abso Capacity). The visible lines it is
7+ * parsed from are already in memory, so this at most doubles a file's text for the call; at 64 KB, every large file's
8+ * code went row by row into scratch and back, 25,000 rows each for abso's index.ts, a third of a cold collisions call.
9+ */
10+export const DEFINITION_CODE_IN_MEMORY = 4_000_000;
512/** Parsed code is temporary derived data, discarded with the scratch transaction. */
613export function withDefinitionCode<T>(
714 view: ReadView,
815 visible: readonly VisibleLine[],
916 operation: (code: readonly string[]) => T,
17+ inMemory = DEFINITION_CODE_IN_MEMORY,
1018): T {
1119 function* source() {
1220 for (const line of visible) yield line.text;
Lines 24–30 at 274 (were 16–22 at 273)
1624 let prefix: string[] = [];
1725 let size = 0;
1826 let pending = iterator.next();
19− while (!pending.done && size + pending.value.length + 1 <= 65536) {
27+ while (!pending.done && size + pending.value.length + 1 <= inMemory) {
2028 prefix.push(pending.value);
2129 size += pending.value.length + 1;
2230 pending = iterator.next();
MCP
compare on this site's /mcp
CLI
abso diff 273 274 worker/project/definition-code.ts --json
JSON
/christopher/abso-core/compare/273..274?file=worker%2Fproject%2Fdefinition-code.ts&format=json