Ensure we use the new agent when opening the panel for the first time (#36988)

Antonio Scandurra created

Release Notes:

- N/A

Change summary

crates/agent_ui/src/agent_panel.rs | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

crates/agent_ui/src/agent_panel.rs 🔗

@@ -618,6 +618,10 @@ impl AgentPanel {
                         }
                         cx.notify();
                     });
+                } else {
+                    panel.update(cx, |panel, cx| {
+                        panel.new_agent_thread(AgentType::NativeAgent, window, cx);
+                    });
                 }
                 panel
             })?;