An agent writes the code. You read it, and you mark the lines that are wrong. stage collects those marks into one review, and gives the review back to the agent.
Write a comment
Section titled “Write a comment”- Press
0to focus the diff. - Press
v. The line cursor appears. - Press
jorkto move the cursor to the line you want. - Press
vagain to hold one end of a range, then move to the other end. - Press
c. - Type the comment and press
ctrl+s.
The comment is written in the diff, at the line, and not in a window that hides the code you are reading.
Read them back
Section titled “Read them back”A comment shows as a card under the line it belongs to. A second pass over the file shows what you already said. In the split layout the card sits on the side that holds the new code.
The review list
Section titled “The review list”Press # to see every comment in one place.
| Key | Action |
|---|---|
enter |
Go to the line of the comment |
e |
Change the comment |
d |
Delete the comment |
y |
Copy the whole review as text |
s |
Send the review to an agent |
esc |
Close the list |
A review is text: the path, the line number, the code, and what you wrote. Nothing is written to the repository, and nothing is committed.
Send it to the agent
Section titled “Send it to the agent”Press s. The review goes to the agent in the pane beside you.
When more than one agent is running, stage asks which one. Each row names the agent and where it is, so you send to the one you mean.
stage sends the text and the Enter key as two separate requests, and waits between them. Some agents handle a paste in the background. Such an agent can absorb an Enter that arrives in the same burst. The review then sits unsent in the composer. Two requests make that impossible.
s needs a terminal that stage recognizes. Read
Terminal integrations for the list, and for
the answer when the key is not there.
Without an agent
Section titled “Without an agent”Press y to copy the review, and paste it wherever the agent is. The review is
the same text either way.