wip: connect to github

This commit is contained in:
2026-04-23 11:18:43 +01:00
parent 302d0d3222
commit b327648d31
12 changed files with 399 additions and 97 deletions

View File

@@ -9,6 +9,7 @@ use crate::{api, app};
pub struct Global {
pub safe_area: gpui::Bounds<gpui::Pixels>,
pub current_theme: theme::Theme,
pub rng: rand::prelude::ThreadRng,
}
pub struct Chrome {}
@@ -50,10 +51,14 @@ impl gpui::Render for Chrome {
impl gpui::Global for Global {}
pub fn current_theme<'a, E>(cx: &'a gpui::Context<E>) -> &'a theme::Theme {
pub fn current_theme(cx: &gpui::App) -> &theme::Theme {
&cx.global::<Global>().current_theme
}
pub fn rng(cx: &mut gpui::App) -> &mut rand::prelude::ThreadRng {
&mut cx.global_mut::<Global>().rng
}
pub fn query_store<'a, E>(cx: &'a gpui::Context<E>) -> &'a query::Store<api::QueryContext> {
cx.global::<query::Store<api::QueryContext>>()
}