extension_host: Refactor capability checks (#35139)

This PR refactors the extension capability checks to be centralized in
the `CapabilityGranter`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-07-26 16:53:19 -04:00 committed by GitHub
parent 290f84a9e1
commit d7b403e981
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 193 additions and 41 deletions

View file

@ -134,10 +134,12 @@ fn manifest() -> ExtensionManifest {
slash_commands: BTreeMap::default(),
indexed_docs_providers: BTreeMap::default(),
snippets: None,
capabilities: vec![ExtensionCapability::ProcessExec {
command: "echo".into(),
args: vec!["hello!".into()],
}],
capabilities: vec![ExtensionCapability::ProcessExec(
extension::ProcessExecCapability {
command: "echo".into(),
args: vec!["hello!".into()],
},
)],
debug_adapters: Default::default(),
debug_locators: Default::default(),
}