Skip to content
1 min read · 59 words

Variable: textDiffTool

ts
const textDiffTool: Tool<SpooledArtifact>;

Defined in: batteries/tools/text_comparison/index.ts:24

Compare two texts and emit a unified-style diff plus an additions/removals summary.

Remarks

mode: 'lines' (default) compares line-by-line; mode: 'words' compares word-by-word. The output is clipped at 60 diff lines — the suffix … (N more lines truncated) is appended if the diff is larger. Identical inputs short-circuit with Texts are identical.