T25b Generative: queue and results
GenerationQueue shows each job's picture or where it stands, its prompt and its progress, with Cancel, Retry and Remove as its state allows; new rows fold in. GenerationGrid lays a run's results out in their shape: breathing while they come, the picture once done, why one failed with Retry. VariationPicker shows the chosen variation large over thumbnails and ways on from it. ABCompareView sets two to four models' answers side by side, blind until a verdict. ImageCompare points to data_display::BeforeAfter. primitives::framed and checked_ratio now serve previews and generative alike. AGENTS.md records that gpui reads a &str picture as a web address, and that grid rows overgrow tiles that keep a ratio.
This commit is contained in:
1 parent
f0431411d5
commit
81d8d52a09
17 files changed
+1515
-215
No files matched your search
+3
-19
@@ -12,7 +12,7 @@ use crate::{
|
||||
forms::{Pick, Run, reveal, revealer},
|
||||
layout::on_axis,
|
||||
motion::{self, Spinner},
|
||||
primitives::{FocusRing, Icon, IconName, Image, tab_stop},
|
||||
primitives::{FocusRing, Icon, IconName, Image, checked_ratio, framed, tab_stop},
|
||||
theme::{ActiveTheme, AvatarSize, ControlSize, IconSize, Radius, TextSize},
|
||||
typography::Ellipsis,
|
||||
};
|
||||
@@ -20,22 +20,6 @@ use crate::{
|
||||
/// Width over height of a frame from the host, unless it says.
|
||||
const FRAME: f32 = 16.0 / 10.0;
|
||||
|
||||
fn checked(ratio: f32) -> f32 {
|
||||
assert!(ratio.is_finite() && ratio > 0.0, "a frame ratio of {ratio}");
|
||||
ratio
|
||||
}
|
||||
|
||||
/// A box that keeps a frame's shape at the width it is given.
|
||||
fn framed(ratio: f32, cx: &App) -> Div {
|
||||
let mut frame = div()
|
||||
.relative()
|
||||
.w_full()
|
||||
.overflow_hidden()
|
||||
.bg(cx.theme().colors.sunken);
|
||||
frame.style().aspect_ratio = Some(ratio);
|
||||
frame
|
||||
}
|
||||
|
||||
/// The bar over a page: a lock, the address, a spinner while it loads, and the owner's actions.
|
||||
fn address_bar(
|
||||
id: &ElementId,
|
||||
@@ -116,7 +100,7 @@ impl BrowserPreview {
|
||||
|
||||
/// The frames' width over their height, 16:10 unless set, so the boxes take the pictures' shape.
|
||||
pub fn ratio(mut self, width_over_height: f32) -> Self {
|
||||
self.ratio = checked(width_over_height);
|
||||
self.ratio = checked_ratio(width_over_height);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -260,7 +244,7 @@ impl ComputerUseViewer {
|
||||
|
||||
/// The frame's width over its height, 16:10 unless set, so the box takes the picture's shape.
|
||||
pub fn ratio(mut self, width_over_height: f32) -> Self {
|
||||
self.ratio = checked(width_over_height);
|
||||
self.ratio = checked_ratio(width_over_height);
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user