Detailed changes
@@ -10814,6 +10814,28 @@ dependencies = [
"workspace-hack",
]
+[[package]]
+name = "onboarding_ui"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "client",
+ "command_palette_hooks",
+ "component",
+ "db",
+ "editor",
+ "feature_flags",
+ "gpui",
+ "settings",
+ "settings_ui",
+ "theme",
+ "ui",
+ "util",
+ "workspace",
+ "workspace-hack",
+ "zed_actions",
+]
+
[[package]]
name = "once_cell"
version = "1.21.3"
@@ -102,6 +102,7 @@ members = [
"crates/node_runtime",
"crates/notifications",
"crates/ollama",
+ "crates/onboarding_ui",
"crates/open_ai",
"crates/open_router",
"crates/outline",
@@ -314,6 +315,7 @@ multi_buffer = { path = "crates/multi_buffer" }
node_runtime = { path = "crates/node_runtime" }
notifications = { path = "crates/notifications" }
ollama = { path = "crates/ollama" }
+onboarding_ui = { path = "crates/onboarding_ui" }
open_ai = { path = "crates/open_ai" }
open_router = { path = "crates/open_router", features = ["schemars"] }
outline = { path = "crates/outline" }
@@ -0,0 +1,35 @@
+[package]
+name = "onboarding_ui"
+version = "0.1.0"
+edition.workspace = true
+publish.workspace = true
+license = "GPL-3.0-or-later"
+
+[lints]
+workspace = true
+
+[lib]
+path = "src/onboarding_ui.rs"
+
+[features]
+test-support = []
+
+[dependencies]
+anyhow.workspace = true
+client.workspace = true
+command_palette_hooks.workspace = true
+component.workspace = true
+db.workspace = true
+feature_flags.workspace = true
+gpui.workspace = true
+settings.workspace = true
+settings_ui.workspace = true
+theme.workspace = true
+ui.workspace = true
+util.workspace = true
+workspace-hack.workspace = true
+workspace.workspace = true
+zed_actions.workspace = true
+
+[dev-dependencies]
+editor = { workspace = true, features = ["test-support"] }
@@ -0,0 +1,41 @@
+use command_palette_hooks::CommandPaletteFilter;
+use feature_flags::FeatureFlagAppExt as _;
+use gpui::App;
+use settings_ui::SettingsUiFeatureFlag;
+use workspace::Workspace;
+
+use gpui::actions;
+
+actions!(onboarding, [ShowOnboarding]);
+
+pub fn init(cx: &mut App) {
+ cx.observe_new(|workspace: &mut Workspace, _, _cx| {
+ workspace.register_action(|_workspace, _: &ShowOnboarding, _window, _cx| {
+ // Onboarding implementation will go here
+ });
+ })
+ .detach();
+
+ feature_gate_onboarding_ui_actions(cx);
+}
+
+fn feature_gate_onboarding_ui_actions(cx: &mut App) {
+ const ONBOARDING_ACTION_NAMESPACE: &str = "onboarding";
+
+ CommandPaletteFilter::update_global(cx, |filter, _cx| {
+ filter.hide_namespace(ONBOARDING_ACTION_NAMESPACE);
+ });
+
+ cx.observe_flag::<SettingsUiFeatureFlag, _>({
+ move |is_enabled, cx| {
+ CommandPaletteFilter::update_global(cx, |filter, _cx| {
+ if is_enabled {
+ filter.show_namespace(ONBOARDING_ACTION_NAMESPACE);
+ } else {
+ filter.hide_namespace(ONBOARDING_ACTION_NAMESPACE);
+ }
+ });
+ }
+ })
+ .detach();
+}