Wait for agent2 feature flag before loading panel (#36583)
Release Notes: - N/A
This commit is contained in:
parent
6ed29fbc34
commit
de12633591
1 changed files with 12 additions and 0 deletions
|
@ -523,6 +523,7 @@ impl AgentPanel {
|
||||||
anyhow::Ok(())
|
anyhow::Ok(())
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load(
|
pub fn load(
|
||||||
workspace: WeakEntity<Workspace>,
|
workspace: WeakEntity<Workspace>,
|
||||||
prompt_builder: Arc<PromptBuilder>,
|
prompt_builder: Arc<PromptBuilder>,
|
||||||
|
@ -572,6 +573,17 @@ impl AgentPanel {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Wait for the Gemini/Native feature flag to be available.
|
||||||
|
let client = workspace.read_with(cx, |workspace, _| workspace.client().clone())?;
|
||||||
|
if !client.status().borrow().is_signed_out() {
|
||||||
|
cx.update(|_, cx| {
|
||||||
|
cx.wait_for_flag_or_timeout::<feature_flags::GeminiAndNativeFeatureFlag>(
|
||||||
|
Duration::from_secs(2),
|
||||||
|
)
|
||||||
|
})?
|
||||||
|
.await;
|
||||||
|
}
|
||||||
|
|
||||||
let panel = workspace.update_in(cx, |workspace, window, cx| {
|
let panel = workspace.update_in(cx, |workspace, window, cx| {
|
||||||
let panel = cx.new(|cx| {
|
let panel = cx.new(|cx| {
|
||||||
Self::new(
|
Self::new(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue