The Custom Visual AI panel in the Studio edits the visual beside you: it reads the code and the tile's data, writes and patches the files, sets options, and checks how the result renders before you apply anything. This page covers the operations it runs on a tile, their limits and what stops them. For the authoring flow from a first prompt, see Author a custom visual with AI; for what a custom visual is, Custom visuals and the visual library.
What the assistant can do
Read. It reads the current source with line numbers, the tile's source tier and libraries, its bindings, options and interaction settings, and a profile of the bound fields: their types, ranges, null rate and a few sample values. It can list the assets the visual carries and fetch a vetted example skeleton for a visual family.
Write. It replaces whole files, patches a passage by search and replace, replaces a range of lines, sets the options values, binds fields to the visual's data roles, and changes interaction settings. Every write lands in the editor as an unapplied edit.
Check and preview. It runs the authoring checks and gets findings back with a code, a severity, the file and line where known and a suggested fix. It can render the visual at one size with one dataset and attach a small picture of the render to the conversation.
Patch by exact match. A patch finds its text byte for byte, whitespace included, and expects it exactly as many times as it declares, once by default. If the text is not found the way it expects, nothing changes and the step's card reads No change:.
Replace a range of lines. The line numbers come from the last read of the file. After an edit, the lines below the range shift, so the file is read again before more lines are addressed; a range outside the file is refused.
Write whole files. A full write sends whole files, and a visual that already has a source is not overwritten by accident. Each part must stay under its cap: visual.html 96 KiB, visual.css 64 KiB, visual.js 128 KiB, and 256 KiB for all parts together. visual.js exists only on the HTML + JS tier, and libraries are named by library and major version, such as d3@7.
Patches to the same file apply in the order they are sent, and several files can change in one turn. What lands is a change you apply; the apply and save flow is on The custom visual Studio.
Roles, fields and options
Roles and fields. The assistant declares a visual's data roles and binds the fields already in the tile's Data well to them. It never adds a field to the well itself: when the code needs a field that is not bound, it names one from the fields the report offers and asks you to drag it in, then continues once it is bound. The caps on roles and fields are on Custom visual options, data and limits.
Options. It writes the options as plain JSON values: no functions, and no colour literals. Colours are stored as theme token names, such as accent or chart-3, and the code resolves them, so the visual follows the report's theme. A set of options stays under 16 KiB, and by default the values merge over the ones already there.
Interactions. It can change the tile's interaction settings, such as how selections behave and whether links may open; the effect on other tiles is described in Filters, slicers and interactions, and the host rules that decide which links, images and players work are on Sandbox, network and the allowlist.
Checks, previews and the repair loop
Checks. A check grades the current code and returns findings worst first; each finding carries a code, a severity (error or warning), the file and line where known, the measured value and the fix. A check with nothing to report reads Clean.
Previews. A preview renders once, at one size and one dataset: tile, wide or narrow, drawing from your live rows (up to 200 in a preview), an empty set, or a hostile set of awkward values that tests how the code copes. When the render can be captured, a JPEG of up to 1024 px comes with the result.
The repair loop. After a failed preview or a check with errors, the assistant repairs the code and runs again, at most three automatic repair rounds in one turn. It then stops and reports the last error, and a Try to fix again chip is offered.
What stops an edit
No Studio open. An edit travels from the conversation to the Studio tab that holds your tile. When no Studio is connected, the assistant cannot reach the code: open the tile in the Studio with the AI panel and ask again.
No tile behind the conversation. The conversation is attached to the tile it was opened from; it cannot edit anything else.
Permissions. Every step re-checks that you hold Use DataPrism AI and Author DataPrism Custom Visuals, that the report is one you can edit, and that you are not acting as another user. When one of these fails, the edit is refused and the reply says so. See Who can do what in DataPrism.
The 20-second deadline. The Studio must answer each step within about 20 seconds; a step that gets no answer fails and is not applied.
The 60-operation budget. One turn can make at most 60 operations on one visual. Past the limit, further operations wait for your next message; the next turn has a fresh budget.
A stop or a closed tab. If you stop the turn or close the Studio, the operation in flight is not applied. Steps that finished before it stay in the editor as unapplied edits.
Note
A refused or timed-out step never changes the visual: no part of it is applied, the tile keeps the code it had, and the conversation says why.
Questions, answered
Why did the assistant say the visual studio is not connected?
An edit travels from the conversation to the Studio tab that holds your tile, so it needs a live Studio connection. Open the tile in the Studio with the Custom Visual AI panel open and ask again.
Is there a limit to how much the assistant can change in one turn?
Yes. One turn can make at most 60 operations on one visual. When a turn reaches the limit, it asks you to continue in a new message, and the next turn has a fresh budget.
The assistant reported a timeout. Was anything changed?
No. The Studio must answer a step within about 20 seconds; a step that gets no answer fails and no part of it is applied. Ask again and it makes a fresh attempt.
I closed the Studio while the assistant was working. What happened to the change?
An operation that was in flight when the Studio closed is not applied. Open the tile's Studio again and ask for the change.
I stopped the assistant's turn. What happens to what it already did?
The step that was running when you stopped is not applied. Steps that finished earlier stay in the editor as unapplied edits, so review them before you apply.
The assistant asked me to drag a field onto the tile. Why can it not add it itself?
The assistant never changes the report's fields; it only binds the fields already in the tile's Data well to the visual's data roles. When the code needs another field, it names one from the fields the report offers and you drag it in; the assistant continues once the field is bound.
How much does one step return at once?
A check returns up to 40 findings by default and up to 200 when a fuller list is asked for, and the true total always comes with it. Field suggestions return up to 8 by default and up to 40. One result carries at most three preview pictures.
Why does the assistant keep colours out of the visual's options?
Options values hold no colour literals. The assistant stores a theme token name instead, such as accent or chart-3, and your code resolves it with the theme, so the visual follows the report's style. See Custom visual options, data and limits.
Why can the assistant not edit while I impersonate another user?
Custom visual authoring is refused while you act as another user: each step re-checks the two permissions and your edit access to the report, and impersonation fails that check. End the session and open the tile's Studio again. See Impersonate a user.