Delegate installed plugin recommendation filtering to the endpoint (#61374)

## What changed

Request plugin suggestions with `includeInstalled=false` and use the endpoint results without filtering against loaded plugins or the local installed-plugin cache. Retain disabled-tool and client eligibility filtering, and remove plugin loading that was only needed for recommendation filtering.

## Testing

Update tests to verify the query parameter and confirm that endpoint recommendations survive local installed-cache filtering while disabled tools remain excluded.

GitOrigin-RevId: a1b199f9ac8da7dae40abe46b6ccfaf1d8230a5c
This commit is contained in:
Alex Zamoshchin
2026-11-13 21:00:04 +00:00
committed by copyberry
parent 7194b21776
commit a46c5be77e
7 changed files with 12 additions and 64 deletions
+3 -2
View File
@@ -49,11 +49,12 @@ async fn remote_plugin_list_routes_the_complete_query_url() {
}
#[tokio::test]
async fn recommended_plugins_requests_codex_suggestions_endpoint() {
async fn recommended_plugins_requests_uninstalled_codex_suggestions() {
let server = MockServer::start().await;
Mock::given(method("GET"))
.and(path("/backend-api/ps/plugins/suggested/codex"))
.and(query_param("scope", "GLOBAL"))
.and(query_param("includeInstalled", "false"))
.respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!({
"enabled": true,
"plugins": [],
@@ -78,7 +79,7 @@ async fn recommended_plugins_requests_codex_suggestions_endpoint() {
assert_eq!(
recorded_http_client_urls(&selected_urls),
vec![format!(
"{}/backend-api/ps/plugins/suggested/codex?scope=GLOBAL",
"{}/backend-api/ps/plugins/suggested/codex?scope=GLOBAL&includeInstalled=false",
server.uri()
)]
);