mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-16 17:07:14 +03:00
assistant: Feature flag terminal inline assistant (#13732)
This PR adds a feature flag for the terminal inline assistant because we want to keep it internal for now. Release Notes: - N/A
This commit is contained in:
parent
193be271a8
commit
51ee60b421
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -382,6 +382,7 @@ dependencies = [
|
|||||||
"ctor",
|
"ctor",
|
||||||
"editor",
|
"editor",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
|
"feature_flags",
|
||||||
"file_icons",
|
"file_icons",
|
||||||
"fs",
|
"fs",
|
||||||
"futures 0.3.28",
|
"futures 0.3.28",
|
||||||
|
@ -23,6 +23,7 @@ client.workspace = true
|
|||||||
collections.workspace = true
|
collections.workspace = true
|
||||||
command_palette_hooks.workspace = true
|
command_palette_hooks.workspace = true
|
||||||
editor.workspace = true
|
editor.workspace = true
|
||||||
|
feature_flags.workspace = true
|
||||||
file_icons.workspace = true
|
file_icons.workspace = true
|
||||||
fs.workspace = true
|
fs.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
@ -462,6 +462,11 @@ impl AssistantPanel {
|
|||||||
.focus_handle(cx)
|
.focus_handle(cx)
|
||||||
.contains_focused(cx)
|
.contains_focused(cx)
|
||||||
{
|
{
|
||||||
|
use feature_flags::FeatureFlagAppExt;
|
||||||
|
if !cx.has_flag::<feature_flags::TerminalInlineAssist>() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(terminal_view) = terminal_panel
|
if let Some(terminal_view) = terminal_panel
|
||||||
.read(cx)
|
.read(cx)
|
||||||
.pane()
|
.pane()
|
||||||
|
@ -29,6 +29,11 @@ impl FeatureFlag for Remoting {
|
|||||||
const NAME: &'static str = "remoting";
|
const NAME: &'static str = "remoting";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct TerminalInlineAssist {}
|
||||||
|
impl FeatureFlag for TerminalInlineAssist {
|
||||||
|
const NAME: &'static str = "terminal-inline-assist";
|
||||||
|
}
|
||||||
|
|
||||||
pub trait FeatureFlagViewExt<V: 'static> {
|
pub trait FeatureFlagViewExt<V: 'static> {
|
||||||
fn observe_flag<T: FeatureFlag, F>(&mut self, callback: F) -> Subscription
|
fn observe_flag<T: FeatureFlag, F>(&mut self, callback: F) -> Subscription
|
||||||
where
|
where
|
||||||
|
Loading…
Reference in New Issue
Block a user