extensions: Add "Debug Adapters" category to the extension store (#32845)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-06-17 12:09:08 +02:00 committed by GitHub
parent b13144eb1f
commit 6ad9a66cf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 46 additions and 9 deletions

View file

@ -465,6 +465,7 @@ CREATE TABLE extension_versions (
provides_slash_commands BOOLEAN NOT NULL DEFAULT FALSE,
provides_indexed_docs_providers BOOLEAN NOT NULL DEFAULT FALSE,
provides_snippets BOOLEAN NOT NULL DEFAULT FALSE,
provides_debug_adapters BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (extension_id, version)
);

View file

@ -0,0 +1,2 @@
alter table extension_versions
add column provides_debug_adapters bool not null default false

View file

@ -321,6 +321,9 @@ impl Database {
provides_snippets: ActiveValue::Set(
version.provides.contains(&ExtensionProvides::Snippets),
),
provides_debug_adapters: ActiveValue::Set(
version.provides.contains(&ExtensionProvides::DebugAdapters),
),
download_count: ActiveValue::NotSet,
}
}))
@ -431,6 +434,10 @@ fn apply_provides_filter(
condition = condition.add(extension_version::Column::ProvidesSnippets.eq(true));
}
if provides_filter.contains(&ExtensionProvides::DebugAdapters) {
condition = condition.add(extension_version::Column::ProvidesDebugAdapters.eq(true));
}
condition
}

View file

@ -27,6 +27,7 @@ pub struct Model {
pub provides_slash_commands: bool,
pub provides_indexed_docs_providers: bool,
pub provides_snippets: bool,
pub provides_debug_adapters: bool,
}
impl Model {
@ -68,6 +69,10 @@ impl Model {
provides.insert(ExtensionProvides::Snippets);
}
if self.provides_debug_adapters {
provides.insert(ExtensionProvides::DebugAdapters);
}
provides
}
}