Files
Ely-GPUI-Components/examples/gallery/pages/mod.rs
T
ZacharyZhang-NY 1db0a0db44 T24a: Agent, tool calls
- ToolCallCard: a step mark, the tool in mono, what it touched and how long
  it took; a press opens its arguments and result as code, an error in red
- ToolCallGroup folds several calls under one line
- ToolApprovalDialog over overlays::Dialog: Deny or Run, one answer; Escape,
  the scrim and the close deny
- PermissionPrompt: deny, always allow or allow once, in place
- chat::StepState gains Failed; chat::step_mark draws a step's mark for
  search steps and tool calls alike
- typography::format::took reads ms, seconds or minutes
- gallery: an Agent page with calls in each state, a group, the dialog and
  the prompt
2026-09-26 08:00:21 -04:00

74 lines
1.2 KiB
Rust

mod agent;
mod buttons;
mod charts;
mod chat;
mod collab;
mod data;
mod debug;
mod documents;
mod editor;
mod feedback;
mod finance;
mod forms;
mod git;
mod layout;
mod lists;
mod menus;
mod motion;
mod navigation;
mod overlays;
mod primitives;
mod shell;
mod tables;
mod terminal;
mod theme;
mod typography;
use gpui::{AnyElement, App, Window};
use crate::script::Step;
pub struct Page {
pub number: u8,
pub slug: &'static str,
pub title: &'static str,
pub summary: &'static str,
pub render: fn(&mut Window, &mut App) -> AnyElement,
/// Interactions shot after the static pages.
pub script: &'static [Step],
}
pub const ALL: &[Page] = &[
primitives::PAGE,
typography::PAGE,
layout::PAGE,
shell::PAGE,
buttons::PAGE,
forms::PAGE,
navigation::PAGE,
menus::PAGE,
overlays::PAGE,
feedback::PAGE,
motion::PAGE,
data::PAGE,
lists::PAGE,
tables::PAGE,
charts::PAGE,
finance::PAGE,
editor::PAGE,
terminal::PAGE,
git::PAGE,
debug::PAGE,
documents::PAGE,
collab::PAGE,
chat::PAGE,
agent::PAGE,
theme::PAGE,
];
pub use shell::{open_about, open_managed};
pub fn find(slug: &str) -> Option<usize> {
ALL.iter().position(|page| page.slug == slug)
}