T24f Agent: control and cost

HumanInputRequest asks a question with answers to pick and a line to
write one; CostBreakdown totals a session and splits it by part.
InterruptButton, TokenUsageChart, TraceViewer and EvalResultTable
point to chat::stop_button, a stacked BarChart, TimelineProfiler and
DataTable.

UsageBar shows amounts as its owner writes them. MemoryPanel and
HumanInputRequest share agent::line::send_line; the chapter's bool
callbacks take forms::OnFlag.

DataTable scrolls columns wider than its box sideways, pinned or not,
and leaves a plain wheel to the page; sortable headers are Tab stops.
TimelineProfiler fits its ruler to its lane, its spans are Tab stops,
and a picked span takes accent.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-26 11:39:24 -04:00
1 parent 061be8a0ff
commit 37e53a5ecb
20 files changed
+934 -180

No files matched your search

+9 -4
View File
@@ -1,13 +1,13 @@
use gpui::{
App, DragMoveEvent, ElementId, Entity, EntityId, FontWeight, InteractiveElement, IntoElement,
ParentElement, Pixels, Rems, SharedString, StatefulInteractiveElement, Styled, canvas, div,
prelude::*,
MouseButton, ParentElement, Pixels, Rems, SharedString, StatefulInteractiveElement, Styled,
canvas, div, prelude::*, transparent_black,
};
use super::{Column, body::sized, table::View};
use crate::layout::seeded::Seeded;
use crate::{
primitives::{DragGhost, Icon, IconName},
primitives::{DragGhost, FocusRing, Icon, IconName},
theme::{ActiveTheme, IconSize, TextSize},
};
@@ -111,6 +111,8 @@ pub(crate) fn header(
.items_center()
.gap_1()
.px_3()
.border_1()
.border_color(transparent_black())
.text_size(theme.text_size(TextSize::Xs))
.font_weight(FontWeight::MEDIUM)
.text_color(colors.fg_muted);
@@ -120,8 +122,11 @@ pub(crate) fn header(
};
cell.when(column.sortable, |cell| {
let key = key.clone();
cell.cursor_pointer()
cell.tab_index(0)
.focus_ring(cx)
.cursor_pointer()
.hover(|style| style.text_color(colors.fg))
.on_mouse_down(MouseButton::Left, |_, window, _| window.prevent_default())
.on_click(move |event, _, cx| {
let join = event.modifiers().shift;
sorter.update(cx, |sorting, cx| {