用途:该技能用于在构建基于 GPUI 框架的桌面 UI 应用时,生成符合 Zed 编辑器与 gpui-component 库风格的生产级 Rust 组件代码。适用场景包括用 gpui crate 开发桌面应用、基于 RenderOnce 或 Render trait 编写自定义组件、用 ActiveTheme 实现主题化组件、构建自动补全/补全菜单、命令面板与弹出菜单,以及使用 gpui-component crate 时。
主要能力:覆盖表单组件(Button、Input、NumberInput、Checkbox、Switch、Radio、Select、Slider)、布局组件(Dialog、Popover、Menu/PopupMenu、Tab、Accordion、Sidebar、Dock)、展示组件(Badge、Avatar、Icon、Label、Tooltip、Notification)与数据组件(Table、List/VirtualList、Tree、Chart)。支持无状态 RenderOnce 与有状态 Render/Entity 两种组件模式,并通过 cx.theme() 读取背景、前景、语义与边框等主题色。还提供带 LSP 补全的 Input、CompletionProvider 与命令面板实现方式。
使用方式:项目依赖 gpui 与 gpui-component,入口通过 Application::new().run 并调用 gpui_component::init(cx)、cx.open_window 与 Root::new 搭建应用。详细模式可参考 reference/components.md、reference/theming.md、reference/input-lsp.md、reference/menus.md 等参考文件。
限制:资料未提供具体的授权方式、收费、价格、性能数据或平台支持范围,这些事实暂未提供;实际 API 与行为以所用 gpui、gpui-component 版本为准。