Choose actions and allow edits
Start with filtering and sorting. Add more capabilities only when your application needs them. An action is a named operation the assistant can request, such as selecting records or updating a cell. The application decides which actions are available.
The snippets on this page extend the quick-start configuration; interpret is your configured interpreter.
Choose the capabilities
Section titled “Choose the capabilities”Only configured actions are advertised to the interpreter. Missing required plugins are not silently replaced with custom implementations.
| Capability | Configuration | Execution and boundary |
|---|---|---|
| Filter and sort | Default | Composes canonical filter AST and sort criteria. |
| Column metadata, navigation, layout and grouping | gridActions: {} | Existing grid APIs; local grouping is omitted with a remote executor. |
| Read, find and aggregate local rows | gridActions: { readRows: true } | Explicit bounded reads of disclosed fields. Results initially stay in the host UI. |
| Checkbox row selection | gridActions: { rowKey: 'id' } | Stable explicit record IDs and installed RowSelectPlugin; does not disclose cell values. |
| Cell updates and row add/duplicate/delete | dataActions and HistoryPlugin | Local preview, explicit Apply/Cancel, native validation and undo/redo. |
| Column add/remove/change | schemaActions and HistoryPlugin | Approved host column presets; preview before Apply. |
| Formulas, import/export, charts or backend work | integrations or custom actions | Host-owned recipes and permissions. |
| Native Pivot, Gantt, Scheduler and Kanban operations | Product adapter in actions | Uses the mounted product’s existing owner and permission model. |
| Questions and clarification | Interpreter returns answer or clarification | No grid mutation. The model needs explicit evidence to answer data questions. |
| Remember previous turns | conversation | Bounded prompts and visible summaries sent with subsequent requests. |
| Answer from an action result | answerFromAction | One additional answer-only call, using explicitly projected evidence. |
gridActions.enabled optionally limits the registry. Available names are grid.inspect, grid.read, grid.find, grid.aggregate, grid.focus, grid.select, grid.highlight, grid.selectRecords, columns.visibility, columns.move, columns.resize, columns.pin, columns.autosize, grouping.set and grouping.expand.
Visibility uses ColumnHidePlugin, autosizing uses AutoSizeColumnPlugin, highlighting uses CellFlashPlugin, and record selection uses RowSelectPlugin. These actions are advertised only when their owner is available. Coordinates are zero-based positions in the current visible view, including group rows; they are not stable record IDs. Column moves currently require flat headers and stay within one pinned area.
grid.aggregate supports sum/count/average/min/max on the expanded visible local view. It excludes collapsed descendants and cannot provide full remote-dataset totals. Count excludes null/missing values. Limits are 50,000 scanned positions, ten measures, two grouping fields, 50 groups and 16 KiB output. Exceeding a limit fails rather than silently returning partial totals. Use your server’s analytical owner for complete remote data.
Preview data and schema changes
Section titled “Preview data and schema changes”import { HistoryPlugin } from '@revolist/revogrid-pro';
// Include HistoryPlugin in grid.plugins alongside the other installed plugins.grid.aiAssistant = { interpret, dataActions: { rowKey: 'id', maxRows: 100, createRow: ({ source, values }) => ({ ...source, ...values, id: crypto.randomUUID(), }), canMutate: ({ before }) => before?.locked !== true, }, schemaActions: { protectedColumns: ['customerId'], presets: [{ id: 'tax', description: 'Add the approved tax column', column: { prop: 'tax', name: 'Tax', filter: 'number' }, }], },};cells.update, rows.duplicate and rows.delete select authored records by stable string/number IDs or a filter AST, never by visible row coordinates. rows.add and duplication require the host’s createRow factory. Data actions check readonly rules, strict validators and canMutate during preparation and again before Apply. No partial batch commits. They support scalar values and are bounded to 100 affected rows by default, 1,000 maximum; remote/tree source owners require custom actions. Factories must be side-effect free during preparation.
Schema actions are columns.add/columns.change using an approved preset ID, and columns.remove using a field ID. Definitions and callbacks stay local. Removing a definition retains row values; changing it does not convert data. The row key, protected columns and excluded fields remain protected.
Data/schema edits use existing grid History. Filter/sort steps, Restore and Reset are a separate history of view criteria. Layout changes persist independently. Effective schema changes refresh the disclosed fields and begin a new view-history baseline.