diff --git a/crates/story/Cargo.toml b/crates/story/Cargo.toml index 8fe292e8..5b742279 100644 --- a/crates/story/Cargo.toml +++ b/crates/story/Cargo.toml @@ -1,32 +1,38 @@ [package] -name = "story" edition = "2024" +name = "story" publish = false version = "0.4.0-preview1" +[features] +inspector = ["gpui-component/inspector"] + [dependencies] anyhow.workspace = true gpui.workspace = true -gpui-component = { workspace = true, features = ["webview", "tree-sitter-languages"] } +gpui-component = { workspace = true, features = [ + "tree-sitter-languages", + "webview", +] } reqwest_client = { path = "../reqwest_client" } +autocorrect = "2.14.2" chrono = "0.4" +color-lsp = "0.2.0" fake = { version = "2.10.0", features = ["dummy"] } +itertools = "0.14.0" +lsp-types.workspace = true rand = "0.8" raw-window-handle = { version = "0.6", features = ["std"] } regex = "1" -smol.workspace = true rust-embed = { version = "8.7.2", features = ["interpolate-folder-path"] } serde = "1" serde_json = "1" -unindent = "0.2.3" +smol.workspace = true tracing.workspace = true tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } tree-sitter-navi = "0.2.2" -itertools = "0.14.0" -lsp-types.workspace = true -autocorrect = "2.14.2" -color-lsp = "0.2.0" +unindent = "0.2.3" [target.'cfg(target_os = "linux")'.dependencies] gtk = { version = "0.18" } diff --git a/crates/story/src/webview_story.rs b/crates/story/src/webview_story.rs index 0eae0bca..e4af0a16 100644 --- a/crates/story/src/webview_story.rs +++ b/crates/story/src/webview_story.rs @@ -44,6 +44,9 @@ impl WebViewStory { let webview = cx.new(|cx| { let builder = wry::WebViewBuilder::new(); + #[cfg(any(debug_assertions, feature = "inspector"))] + let builder = builder.with_devtools(true); + #[cfg(not(any( target_os = "windows", target_os = "macos", diff --git a/crates/ui/Cargo.toml b/crates/ui/Cargo.toml index 70dd18e1..e1b9463e 100644 --- a/crates/ui/Cargo.toml +++ b/crates/ui/Cargo.toml @@ -16,8 +16,9 @@ doctest = false [features] decimal = ["dep:rust_decimal"] -inspector = ["gpui/inspector"] +inspector = ["gpui/inspector", "wry/devtools"] webview = ["dep:wry"] + # For syntax highlighting in Markdown and CodeEditor. tree-sitter-languages = [ "dep:tree-sitter-bash",