UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

31 lines • 1.08 kB
import type { ParsedPatch } from "./types.ts"; export declare class StreamingPatchParser { private lineBuffer; private mode; private hunks; pushDelta(delta: string): ParsedPatch[]; finish(): ParsedPatch[]; private snapshot; /** * The live hunk list without cloning, for streaming render only. Callers must treat it as * read-only; mutating it corrupts the parser's in-flight state. Avoids the per-delta * structuredClone over every hunk on the render path. */ getLiveHunks(): readonly ParsedPatch[]; /** The not-yet-newline-terminated line currently being accumulated, for a dimmed in-flight row. */ getPartialLine(): string; private ensureUpdateHunkIsNotEmpty; private handleHeader; private startAdd; private startDelete; private startUpdate; private currentUpdate; private currentChunk; private processLine; private processStarted; private processAdd; private processDelete; private processUpdate; private pushUpdateLine; } //# sourceMappingURL=streaming-parser.d.ts.map