Files
Ely-GPUI-Components/examples/gallery/pages/agent/mod.rs
T
ZacharyZhang-NY 62397cbba1 T24c: Agent, changes
- FileChangeCard: a proposed change to one file, its path and counts,
  Reject and Accept in a slot that keeps presses off the header; opened,
  the diff through a headless git::DiffViewer with its folds opening
- MultiFileDiffReview: every file at once, the total counts, how many are
  reviewed, Reject all and Accept all; verdicts as collab::Decision
- git::DiffViewer gains headless, leaving the file's header to its owner
- CommandExecutionCard is terminal::CommandBlock
- gallery: three proposed files and a command's block
2026-09-26 08:37:45 -04:00

53 lines
1.4 KiB
Rust

mod changes;
mod progress;
mod tools;
use gpui::{AnyElement, App, IntoElement, ParentElement, Window, div};
use super::Page;
use crate::script::Step;
pub const PAGE: Page = Page {
number: 24,
slug: "agent",
title: "Agent",
summary: "An assistant at work: the tools it calls, what it asks before it acts, how far it has come and what it would change.",
render,
script: SCRIPT,
};
const SCRIPT: &[Step] = &[
Step::DownAt("agent-call", 60.0, 18.0),
Step::UpAt("agent-call", 60.0, 18.0),
Step::Wait(300),
Step::Shot("tool-call"),
Step::Click("agent-approve-open"),
Step::Wait(300),
Step::Shot("approval"),
Step::Key("escape"),
Step::Wait(200),
Step::DownAt("agent-call", 60.0, 18.0),
Step::UpAt("agent-call", 60.0, 18.0),
Step::Wait(200),
Step::Click("agent-advance"),
Step::Wait(300),
Step::Shot("plan"),
Step::DownAt("agent-changes", 30.0, 51.0),
Step::UpAt("agent-changes", 30.0, 51.0),
Step::Wait(300),
Step::Shot("changes"),
Step::DownAt("agent-changes", 30.0, 51.0),
Step::UpAt("agent-changes", 30.0, 51.0),
Step::Wait(200),
];
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
div()
.child(tools::calls(window, cx))
.child(tools::approval(window, cx))
.child(progress::steps(window, cx))
.child(progress::agents(window, cx))
.child(changes::changes_section(window, cx))
.into_any_element()
}