@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
39 lines • 1.45 kB
TypeScript
import { FixedRing, type ScalarEntry } from "../stream-utils.ts";
import type { DetectorMatch } from "../types.ts";
export declare const NEAR_DUPLICATE_MIN_CHARS = 64;
export declare const NEAR_DUPLICATE_MIN_WORD_CHARS = 24;
export declare const NEAR_DUPLICATE_SIMILARITY = 0.5;
export declare const NEAR_DUPLICATE_LOOKBACK = 32;
export declare const NEAR_DUPLICATE_WINDOW = 12;
export declare const NEAR_DUPLICATE_ECHO_THRESHOLD = 8;
export declare const NEAR_DUPLICATE_TEXT_RETENTION_MAX = 512;
interface ParagraphSignature {
readonly tokens: ReadonlySet<string>;
readonly startOffset: number;
readonly sample: string;
}
interface WindowEntry {
readonly echoed: boolean;
readonly startOffset: number;
readonly anchorStartOffset: number;
}
export interface NearDuplicateState {
readonly history: FixedRing<ParagraphSignature>;
readonly window: FixedRing<WindowEntry>;
lineLength: number;
lineWordChars: number;
lineHasContent: boolean;
lineStartOffset: number;
lineText: string;
lineLastChar: string;
length: number;
wordChars: number;
startOffset: number;
retained: string;
fenced: boolean;
insideFence: boolean;
}
export declare function createNearDuplicateState(): NearDuplicateState;
export declare function updateNearDuplicates(state: NearDuplicateState, entry: ScalarEntry): DetectorMatch | null;
export {};
//# sourceMappingURL=collapse-near-duplicates.d.ts.map