Skip to content
caliper ui pro docs

AI inline edit

Rewrite one paragraph of a document with AI without leaving it. The request opens under the paragraph with quick instructions and a field for your own; the answer comes back as a word diff in place, to accept, discard or retry, and an accepted change can be undone.

Pro

Release note: Saved views

Draft

This week we are shipping saved views for every table in the workspace. You can now filter, sort and group a table, save the result under a name, and share it with you're team so everyone starts from the same view instead of rebuilding it each morning.

Saved views are available on every plan. Existing filters you had pinned have been moved over automatically, and nothing you set up before will change unless you edit it.

If something looks wrong after the update, reply to this email and our support team will take a look the same day.

When to use

  • Editors for email, docs, release notes or support replies that offer AI rewriting.
  • Any long text where the writer should see exactly what AI changed before keeping it.

When not to use

  • Generating a whole document from nothing; use a prompt input and a streamed answer.
  • Code; use a file diff, which shows lines and numbers.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/ai-inline-edit

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

AiInlineEdit

6 props
PropTypeDefaultDescription
value *readonly string[]—The document, one string per paragraph.
onChange *(paragraphs: string[]) => void—Called with the whole document when a rewrite is accepted or undone.
onRewrite *(text: string, instruction: string, signal: AbortSignal) => Promise<string>—Returns the rewritten paragraph. Abort the request when the signal fires (Stop). Throw to show an error.
actionsreadonly string[]defaultActionsQuick instructions offered above the field.
labelstring"Document"Accessible name of the document region.
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes region, group and status semantics, with aria-label, aria-expanded, aria-controls and aria-hidden kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/ai-inline-edit.md

The index of every part is at /llms.txt.

More in Assistant screens