@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
26 lines • 1.2 kB
TypeScript
export declare const LONG_LINE_FAST_PATH_LIMIT = 500;
type IntraLineDiff = {
readonly removedLine: string;
readonly addedLine: string;
};
/**
* Compute word-level diff and render with inverse on changed parts.
* Uses diffWords which groups whitespace with adjacent words for cleaner highlighting.
* Strips leading whitespace from inverse to avoid highlighting indentation.
*/
export declare function renderIntraLineDiffWithDiffWords(oldContent: string, newContent: string): IntraLineDiff;
export declare function renderIntraLineDiff(oldContent: string, newContent: string): IntraLineDiff;
export declare function renderIntraLineDiffFastPath(oldContent: string, newContent: string): IntraLineDiff | null;
export interface RenderDiffOptions {
/** File path (unused, kept for API compatibility) */
filePath?: string;
}
/**
* Render a diff string with colored lines and intra-line change highlighting.
* - Context lines: dim/gray
* - Removed lines: red, with inverse on changed tokens
* - Added lines: green, with inverse on changed tokens
*/
export declare function renderDiff(diffText: string, _options?: RenderDiffOptions): string;
export {};
//# sourceMappingURL=diff.d.ts.map