Editing Files
When the agent edits a file, you see the diff first -- every write waits for your yes.
What you'll see
- Launch
rysh; in shell mode create a small sample file. - Double-Esc to prompt mode; ask the agent to change a line.
- Agent picks
file_edit(exact-string replace),multi_edit(atomic hunks),file_write, orapply_patch(unified diff) -- each generates a diff and requires approval. - Footer shows the diff preview; press
yto approve (orYapprove-always,nreject,Nreject-with-reason).
Commands shown
rysh
printf 'hello\\nworld\\n' > notes.txt
in notes.txt change the word world to rysh
y
Keys used
Transcript
0:00When the agent edits a file, you see the diff first -- every write waits for your yes.
0:03Launch rysh and drop in a small file we can have the agent edit.
0:08In shell mode, create a quick README so there's something to change.
0:14Double-press Escape to enter prompt mode.
0:20Ask it to change a line. The agent uses file_edit for an exact-string replace, multi_edit for several atomic hunks, file_write to create files, or apply_patch for a unified diff. Each of these is approval-gated.
0:36The footer shows the action with a diff preview. Press y to approve, capital Y to approve always, n to reject, or capital N to reject with a reason.
0:45Nothing touches your files until you approve the diff.