gpui-kit GitHub

Components

ServerList builder

The connections an application holds, and what each one offers.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::agent::ServerList;

Construct

new(ident: impl Into<Ident>) -> Self

Options

Chain onto the value.

server(server: ServerEntry) -> Self
servers(servers: impl IntoIterator<Item = ServerEntry>) -> Self
expanded(ids: impl IntoIterator<Item = SharedString>) -> Self
expanded_ids<S: AsRef<str>>(ids: &[S]) -> Self
selected(id: impl Into<SharedString>) -> Self
on_select(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> Self
on_retry(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> Self
on_toggle(handler: impl Fn(SharedString, bool, &mut Window, &mut App) + 'static) -> Self

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/agent/server_list.rs