What the companion can change
It proposes edits and new files for you to review, and renames, moves and organises files on request.
Ask for a change and the companion proposes it: it reads the file first, then drafts the exact edits. Nothing is written until you review the proposal, accept the changes you want and apply them. The same goes for new files and templates it suggests. It can also create folders, rename an item (links to it follow the new name) and move items into a folder (their links follow too); those save at once, and an open file shows them straight away.
To move something to the Trash it asks first, in the thread: Keep leaves everything as it is, Move to Trash goes ahead. Items stay in the Trash for 30 days.
Undo
Under a reply that changed files you'll see what changed and Undo. It takes back everything that reply did at once, newest first: applied proposals, new folders, renames, moves and the Trash. CTRL/CMD+Z in Files does the same, as for your own renames and moves. A file you've edited since is left as it is, and the panel says which.