The Snapshot Editor helps you edit and test saved snapshots within DataChat.
Open the Editor
To edit a saved snapshot:
- Select Snapshots in the sidebar of the homepage.
- Select the snapshot to edit.
- Click the Edit Snapshot button. Or, right-click and select Edit Snapshot.
Edit a Snapshot
The sidebar of the Snapshot Editor provides options for changing and managing your snapshot.
Click in a DataChat sentence to edit it directly, as you would a text file. Autocomplete helps to ensure sentence structure.
Add or Remove Sentences
To add a sentence:
- Place the cursor at the beginning of a line to add a sentence before the selected line. Or place the cursor at the end of a line to add a sentence after the selected line.
- Press Enter
- Enter the sentence you'd like to add.
To delete a sentence:
- Use the checkbox to select the lines that you'd like to delete.
- Click the Cut button.
You can also select the entire sentence and delete it.
Undo or Redo Edits
To undo an edit, click Command + Z.
To redo an edit, click Shift + Command + Z.
To undo an edit, click Ctrl + Z.
To redo an edit, click Shift + Ctrl + Z.
Changes cannot be undone or redone if the sentence that the change targets has been replayed.
When you've finished making changes, click Save.
Verify Edited Snapshots
If a snapshot is verified, a green check appears to the left of the snapshot name. If you edit a verified snapshot, the snapshot changes to unverified, and the green check changes to a red icon.
To verify a snapshot—to ensure it works as expected in a session—click the Restart button from the sidebar to run each DataChat sentence.
If no errors are encountered, the snapshot is automatically verified and saved.
If one of the edits introduces an error, the replay will stop and highlight in red the line that contains an error. Edit the snapshot and click Restart or Continue.
Snapshots that haven't been verified in the Editor before (such as older snapshots) are marked as unverified when they're next opened in the Editor.
Manage Snapshot Versions
When you save a snapshot with the same name as an existing snapshot, or make a change and save it, a new version of that snapshot is created. To review previous versions or revert back to a previous version in the Editor, you can:
- Click the Versions button to view each version of the snapshot.
- Click the row for the version you want to review or revert to. The contents of that version appear in the main pane of the Editor.
- Make the desired edits or reversions to the selected version.
- Click Restore to make this version the most recent version, or click Save As to save this version as a new snapshot. Give your new snapshot a name, then click Submit.
To test that your changes work the way you intended, click the Replay button from the sidebar. You can select to have the snapshot replay stepwise or continuously. Chat responses and and visualizations will appear on the right side of the Editor.