extension: Add debug_adapters to extension manifest (#30676)

Also pass worktree to the get_dap_binary.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-05-20 11:01:33 +02:00 committed by GitHub
parent b1c7fa1dac
commit a092e2dc03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 147 additions and 59 deletions

View file

@ -141,6 +141,7 @@ pub trait Extension: Send + Sync + 'static {
dap_name: Arc<str>,
config: DebugTaskDefinition,
user_installed_path: Option<PathBuf>,
worktree: Arc<dyn WorktreeDelegate>,
) -> Result<DebugAdapterBinary>;
}

View file

@ -87,6 +87,8 @@ pub struct ExtensionManifest {
pub snippets: Option<PathBuf>,
#[serde(default)]
pub capabilities: Vec<ExtensionCapability>,
#[serde(default)]
pub debug_adapters: Vec<Arc<str>>,
}
impl ExtensionManifest {
@ -274,6 +276,7 @@ fn manifest_from_old_manifest(
indexed_docs_providers: BTreeMap::default(),
snippets: None,
capabilities: Vec::new(),
debug_adapters: vec![],
}
}
@ -301,6 +304,7 @@ mod tests {
indexed_docs_providers: BTreeMap::default(),
snippets: None,
capabilities: vec![],
debug_adapters: Default::default(),
}
}