debugger: Disambiguate child session labels (#31526)

Add `(child)` instead of using the same label.

Release Notes:

- Debugger Beta: Made child sessions appear distinct from their parents
in the session selector.
This commit is contained in:
Cole Miller 2025-05-28 21:44:15 -04:00 committed by GitHub
parent f20596c33b
commit 384b11392a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -432,7 +432,10 @@ impl DebugPanel {
};
let dap_store_handle = self.project.read(cx).dap_store().clone();
let label = parent_session.read(cx).label().clone();
let mut label = parent_session.read(cx).label().clone();
if !label.ends_with("(child)") {
label = format!("{label} (child)").into();
}
let adapter = parent_session.read(cx).adapter().clone();
let mut binary = parent_session.read(cx).binary().clone();
binary.request_args = request.clone();