Files
Ely-GPUI-Components/examples/gallery/pages/agent/mod.rs
T
ZacharyZhang-NY aac5e4ead2 T24a round 1 fix
- overlays::Dialog caps its card at the window, a title bar's height clear
  at each end, and scrolls its body while heading and actions stay; the
  fullscreen body scrolls too; test a_tall_dialog_keeps_its_actions_in_the_window
- ToolCallCard's tool name gives way with an Ellipsis, so time and chevron
  stay in a narrow column; the gallery shows one at 280px
- the Agent script shuts the card it opened, so each theme's shot opens it
- AGENTS: dialogs fit the window
2026-09-26 08:09:46 -04:00

38 lines
931 B
Rust

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 and what it asks before it acts.",
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),
];
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
div()
.child(tools::calls(window, cx))
.child(tools::approval(window, cx))
.into_any_element()
}