Docs
Docs /Prism AI /Inline edit
Prism AIEditor

Inline edit

Describe a change to the SQL under your cursor and get it back as a diff in the editor, with no chat panel and no copy-paste. Accept, reject, or refine it without leaving the tab.

Query 1
1
SELECT * FROM `ace-analytics.warehouse.dim_vehicle`
Add a WHERE clause to filter for diesel vehicles manufactured after 2015 and order by registration date
Enter to submit, Shift+Enter for new line

Starting an edit

Select the SQL to change (or leave the cursor in a statement, or in an empty editor) and press I (CtrlWinI on Windows and Linux). Edit with AI in the editor’s right-click menu does the same, and so does the use AI link in the empty-tab placeholder.

An input box opens above the selection. Type what you want, Enter to submit, ShiftEnter for a new line, Esc to cancel, including mid-generation. Switching tabs cancels too.

The selected lines shimmer while the agent works. The status text goes from Analyzing query… to Generating edit… and, if the first attempt had parse errors, Refining…; the result is validated before you see it.

Reviewing the diff

The change is written into the editor as a diff: added lines highlighted green, removed lines shown in a red block where they were. A toolbar sits above the first change:

Query 1 · reviewing
1234
SELECT * FROM `ace-analytics.warehouse.dim_vehicle`
WHERE fuel_type = 'DIESEL'
AND manufacture_year > 2015
ORDER BY first_registration_date
Accept · Reject · Follow-up · Open in Prism AI
ActionWhat happens
AcceptKeeps the new SQL, clears the diff
RejectRestores the original
Follow-upReopens the input for another instruction on the same edit; the diff stays visible
Open in Prism AIHands the edit and its context to the panel as a normal conversation

In a query tab the undo history is untouched either way: Z after Accept still steps back through your own edits. In a notebook cell, Accept replaces the cell’s content wholesale and resets its undo history.

What the agent has

The whole tab, the selection, and the schema of the tables the query references. It has one tool, edit_sql, so it’s fast and focused. When the request needs more (an empty editor and a table name to discover, a multi-step rewrite) it delegates to the full panel and the conversation continues there with your prompt already sent.

The panel’s mode selector doesn’t apply here: the diff is the approval, always.

What to ask for

You typeResult
add a WHERE clause for active usersWHERE status = 'active' on the right table
convert to a CTEThe subquery becomes a WITH block
alias every columnAS on each SELECT item
use the partition columnAdds a filter on the table’s partition column, from the schema

Notebook cells and quick fixes

Every notebook cell is its own editor: select inside a cell and use the same shortcut. The lightbulb’s Fix with Prism AI on a diagnostic runs the same flow with the error message and the rule’s own suggested fixes as the prompt, and shimmers only the lines the diagnostic covers.