Clarity

ai assistant

Smart Editing

AI-powered search-and-replace with fuzzy matching.

How It Works

When you ask the AI to edit your document, it uses a smart search-and-replace system:

  1. 1The AI identifies the text to change
  2. 2It uses fuzzy matching to find the exact location (tolerant of whitespace differences)
  3. 3It proposes the replacement text
  4. 4You see a diff preview before the change is applied

Batch Edits

The AI can apply multiple edits in a single operation using batch_apply_edits. Each edit is validated independently, and you can approve or reject them individually.

Quick Edit Mode

For small, inline changes, the AI can use quick edit mode — a lightweight editing flow that shows changes directly in the editor with green (added) and red (removed) highlighting.

Planning Mode

For larger operations, the AI can enter planning mode:

  1. 1It first reads your files (read-only)
  2. 2Presents a plan of proposed changes
  3. 3You approve the plan
  4. 4It executes all changes in sequence

This ensures you always have visibility into what the AI will do before it does it.

Was this helpful?
Smart Editing — Clarity Docs