Cornacai · a session with a coding agent
Screenshots
1 Session 1 · demo-agent 1.0 ╭─ Prompt · mode ask ────────────────────────────────────────────────────────────────────────────────────────╮ │Greet by name in @src/main.rs │ ╰───────────────── src/main.rs ─────────────────────────────────────────────────────────────────────────────╯ Enter send · Alt+Enter line · @ file · Ctrl+N new · Alt+N/P switch · Ctrl+T shell · F2 log · Ctrl+Q quit
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 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Enter send · Alt+Enter line · @ file · Esc cancel · Ctrl+N new · Alt+N/P switch · Ctrl+T shell · F2 log ·
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 main prints a fixed Hello. I will read the name from the first argument, with world as the default: ╭─ Permission ─────────────────────────────────────────────────────────────────────────╮ let name =│ The agent asks to run · Greeting by name │ .nth(1│ “Run the tests” (the agent's words) │ .unwra│ $ cargo test │ │ │ │ 1 Allow once 2 Always allow cargo test 3 Reject │ ▸ edit Edit│ │ ✓ diff src/│ 1–9 choose · Esc rejects once │ Wrote src/m╰──────────────────────────────────────────────────────────────────────────────────────╯ ▸ 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) · mode ask ────────────────────────────────────────────────────────────╮ │Ask the agent… @ names a file │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Enter send · Alt+Enter line · @ file · Esc cancel · Ctrl+N new · Alt+N/P switch · Ctrl+T shell · F2 log ·
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 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 Wrote src/main.rs ▸ 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 ────────────────────────────────────────────────────────────────────────────────────────╮ │Ask the agent… @ names a file │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Enter send · Alt+Enter line · @ file · Ctrl+N new · Alt+N/P switch · Ctrl+T shell · F2 log · Ctrl+Q quit