Cornacai · a session with a coding agent
Screenshots
1 Session 1 · demo-agent 1.0 ╭─ Prompt · mode Ask (Shift+Tab, Alt+M · Plan mode too) ─────────────────────────────────────────────────────╮ │Greet by name in @src/main.rs │ ╰───────────────── src/main.rs ─────────────────────────────────────────────────────────────────────────────╯ Enter send · Alt+Enter line · Shift+Tab/Alt+M mode · Alt+M choose a mode · Ctrl+N new · Ctrl+O reopen
1 Greeting by name … · demo-agent 1.0 ❯ Greet by name in @src/main.rs please wit╭─ Review the edit ───────────────────────────────────────────────────────────────────────────────╮ │ The agent wants to change src/main.rs · Greeting by name │ ▸ Thi│ @@ -2 +2,2 @@ │ The│ 1 1 fn main() { │ │ 2 - println!("Hello"); │ The c│ 2 + let name = std::env::args().nth(1).unwrap_or("world".into()); │ │ 3 + println!("Hello, {name}!"); │ main │ 3 4 } │ │ │ │ │ let │ │ │ │ │ │ │ │ │ │ ▸ edi│ │ ⠴ dif│ │ │ │ │ │ │ │ │ │ │ │ │ │ Plan │ │ ✓ Re│ 1 hunks · 0 of 1 decided │ ▸ Ta│ n/p next or previous hunk · a/r accept or reject it · A/R all of them · y write what is │ ○ Ru│ accepted · x or Esc reject the write │ ╭─ th╰─────────────────────────────────────────────────────────────────────────────────────────────────╯─────╮ │Ask the agent… @ names a file │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ]/n Next hunk · [/p Previous hunk · Enter Open or fold the unchanged lines · a Accept the hunk
1 Greeting by name … · demo-agent 1.0 ❯ Greet by name in @src/main.rs please with @src/main.rs ▸ Thinking The program prints a fixed greeting; the name can come from … The change ╭─ The agent asks to run · Greeting by name ───────────────────────────────────────────╮ main prints│ Run `cargo test` in the workspace │ │ Why, in the agent's words: │ │ │ Now the tests, to check both greetings. │ let name =│ 1 Allow once · allow it this time; the agent asks again next time │ .nth(1│ 2 Always allow cargo test · allow it, and let the agent do this without asking (it │ .unwra│ keeps the choice, usually for this session) │ │ 3 Reject · refuse this time; the agent is told and may try another way │ │ │ ▸ edit Edit│ 1 Allow once 2 Always allow cargo test 3 Reject │ ✓ diff src/│ │ Wrote src/m│ “Run the tests” (the agent's words) │ │ $ cargo test │ Now the tes│ 1–9 choose · Esc rejects once │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ▸ execute Run the tests pending Plan ✓ Read src/main.rs ✓ Take the name from the arguments ▸ Run the tests ╭─ the agent is working (Esc cancels · Alt+Q queues) · mode Ask (Shift+Tab, Alt+M · Plan mode too) ──────────╮ │Ask the agent… @ names a file │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
1 Greeting by name · demo-agent 1.0 │ ▸ Thinking │ The program prints a fixed greeting; the name can come from … │ ┃ The change ┃ ┃ main prints a fixed Hello. I will read the name from the first argument, with world as the default: ┃ ┃ ┃ let name = std::env::args() ┃ .nth(1) ┃ .unwrap_or("world".into()); ┃ ┃ ┃ ▸ edit Edit src/main.rs ✓┃ diff src/main.rs (+2 −1) ┃ Wrote src/main.rs ┃ ┃ Now the tests, to check both greetings. ┃ ┃ ▸ execute Run the tests ✓┃ test result: ok. 3 passed ┃ ┃ Done: cargo run -- Ada now prints Hello, Ada!, and the tests pass. ┃ ┃ Plan ✓ Read src/main.rs ✓ Take the name from the arguments ✓ Run the tests ╭─ Prompt · mode Ask (Shift+Tab, Alt+M · Plan mode too) ─────────────────────────────────────────────────────╮ │Ask the agent… @ names a file │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Enter send · Alt+Enter line · Shift+Tab/Alt+M mode · Alt+M choose a mode · Ctrl+N new · Ctrl+O reopen