Something went wrong. Try again.
Codex App without electron
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940//! Application composition: shared services live in a GPUI Global, while each//! CodexGui assembles one window's views and presentation state.
mod bootstrap;mod windows;use crate::{ controllers::WorkspaceController, gui::{SourceRegistry, Workbench},};use gpui::{ Context, Entity, Global, IntoElement, Render, Subscription, Task, Window, WindowHandle,};use gpui_component::Root;pub(crate) use windows::{TabContent, init, open_window, reopen};
/// Strong application ownership survives the destruction of every window.pub(crate) struct ApplicationServices(pub Entity<AppServices>);impl Global for ApplicationServices {}
pub(crate) struct AppServices { workspace: Entity<WorkspaceController>, sources: Entity<SourceRegistry>, pub(crate) appearance: Entity<crate::settings::Appearance>, window_title: &'static str, windows: Vec<WindowHandle<Root>>, _url_task: Task<()>, _subscriptions: Vec<Subscription>,}
/// A window's composition. Connections and controllers belong to AppServices.pub struct CodexGui { workbench: Entity<Workbench>, _subscriptions: Vec<Subscription>,}impl Render for CodexGui { fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement { self.workbench.clone() }}