Files
Ely-GPUI-Components/src/lib.rs
T
ZacharyZhang-NY 6151291443 T23a: AI chat, messages
- messages: yours in a quiet bubble, the assistant's as prose beside its mark,
  system notes, errors; avatars, headers with model and time, footers
- MessageList over gpui's bottom-aligned list: drawn near the view, held at the
  newest, counting arrivals while away; a way back down; day separators
- streaming text and markdown reveal toward the text as it grows, with a caret;
  a blinking cursor before the first words
- CodeBlock with language, copy, run, apply, download and folding;
  MarkdownRenderer::code lets messages draw fences with it
- pictures, grids, files, voice notes, video over host frames, link previews
- quotes, actions, an editor that takes focus, versions, regenerate, stop and
  continue
- errors with retry, a rate limit counting down, feedback, thinking blocks
- gallery: the AI Chat page with scripted states
2026-09-26 05:35:09 -04:00

52 lines
1.2 KiB
Rust

mod assets;
pub mod buttons;
pub mod charts;
pub mod chat;
pub mod collab;
pub mod data_display;
pub mod debug;
pub mod documents;
pub mod editor;
pub mod feedback;
pub mod finance;
pub mod forms;
pub mod git;
pub mod layout;
pub mod lists;
pub mod menus;
pub mod motion;
pub mod navigation;
pub mod overlays;
pub mod primitives;
pub mod shell;
pub mod tables;
pub mod terminal;
pub mod theme;
pub mod typography;
pub use assets::Assets;
use gpui::{App, KeyBinding};
use crate::primitives::{FocusNext, FocusPrev, IconName};
/// Loads fonts and the theme, binds Tab and text keys. Call once, first.
pub fn init(cx: &mut App) {
match cx.asset_source().load(IconName::Check.path()) {
Ok(Some(_)) => {}
Ok(None) => panic!("ely: pass `ely_gpui_component::Assets` to `Application::with_assets`"),
Err(error) => panic!("ely: asset source failed: {error:#}"),
}
assets::load_fonts(cx).expect("ely: embedded fonts failed to register");
theme::Theme::init(cx);
cx.bind_keys([
KeyBinding::new("tab", FocusNext, None),
KeyBinding::new("shift-tab", FocusPrev, None),
]);
forms::bind_keys(cx);
editor::bind_keys(cx);
terminal::bind_keys(cx);
documents::bind_keys(cx);
}