- 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
35 lines
824 B
Rust
35 lines
824 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),
|
|
];
|
|
|
|
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
|
|
div()
|
|
.child(tools::calls(window, cx))
|
|
.child(tools::approval(window, cx))
|
|
.into_any_element()
|
|
}
|