T24d: Agent, previews
- BrowserPreview: the address with a lock and a spinner while it loads, the host's frame shown, and the frames so far along the foot as Tab stops; ScreenshotStream is that strip - ComputerUseViewer: the host's frame, a ring where the agent points that rings again at each new point, and what it does there - LivePreview: the host's page under its address, with reload - ArtifactPanel: title, versions through chat::BranchNavigator, Preview and Source when it has both, copy and download; it fails loud with neither - gallery: frames cut from the gallery's own pages; one asset! macro in main.rs replaces three copies
This commit is contained in:
1 parent
8c92651e6a
commit
dcc4a39e56
16 files changed
+842
-36
No files matched your search
@@ -11,16 +11,6 @@ use gpui::{App, IntoElement, ParentElement, Styled, Window, div, px};
|
||||
|
||||
use crate::ui::{keep, noise, section, set};
|
||||
|
||||
macro_rules! asset {
|
||||
($name:literal) => {
|
||||
concat!(
|
||||
env!("CARGO_MANIFEST_DIR"),
|
||||
"/examples/gallery/assets/",
|
||||
$name
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
const SHORT: &str = "fn lift(c: f32, t: f32) -> f32 {\n c + t * (1.0 - c)\n}";
|
||||
|
||||
const LONG: &str = "/// Every accent in the library, lifted for its theme.\npub struct Accents {\n base: Hsla,\n light: f32,\n dark: f32,\n}\n\nimpl Accents {\n pub fn new(base: Hsla) -> Self {\n Self { base, light: 0.5, dark: 0.62 }\n }\n\n /// The accent as the theme shows it.\n pub fn shown(&self, dark: bool) -> Hsla {\n let t = if dark { self.dark } else { self.light };\n lift(self.base, t)\n }\n\n /// A hover, one step louder.\n pub fn hover(&self, dark: bool) -> Hsla {\n lift(self.shown(dark), 0.08)\n }\n\n /// A press, two steps louder.\n pub fn press(&self, dark: bool) -> Hsla {\n lift(self.shown(dark), 0.16)\n }\n}";
|
||||
|
||||
@@ -19,16 +19,6 @@ use crate::{
|
||||
ui::{keep, noise, section, set},
|
||||
};
|
||||
|
||||
macro_rules! asset {
|
||||
($name:literal) => {
|
||||
concat!(
|
||||
env!("CARGO_MANIFEST_DIR"),
|
||||
"/examples/gallery/assets/",
|
||||
$name
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
const SYSTEM: &str = "You answer about color in plain words. Cite sources.";
|
||||
|
||||
/// The composer's text, which the prompt menu fills.
|
||||
|
||||
Reference in new issue
Block a user