copilot: Update root path on Windows (#11613)

Marshall Bowers and Jason Lee created

This PR updates the root path used by Copilot to be a validate path when
running on Windows.

Release Notes:

- N/A

Co-authored-by: Jason Lee <huacnlee@gmail.com>

Change summary

crates/copilot/src/copilot.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Detailed changes

crates/copilot/src/copilot.rs 🔗

@@ -429,11 +429,17 @@ impl Copilot {
                     env: None,
                 };
 
+                let root_path = if cfg!(target_os = "windows") {
+                    Path::new("C:/")
+                } else {
+                    Path::new("/")
+                };
+
                 let server = LanguageServer::new(
                     Arc::new(Mutex::new(None)),
                     new_server_id,
                     binary,
-                    Path::new("/"),
+                    root_path,
                     None,
                     cx.clone(),
                 )?;