VSCode PIO - Dynamic Project Selector

Is there a way to build the project associated with the active file tab ?

I want to build “test” project if activ tab is from “test” project and “klm” project if active tab is from “klm” project (and default project if file isn’t in a project in workspace).
I want to do this dynamicaly, without choosing by myself :

Is this possible ?

This was the old way before an extension update, which many people complained wasn’t working for them, hence the manual selection now, see Having to separately select a default to compile and upload since v2.3.0 · Issue #2410 · platformio/platformio-vscode-ide · GitHub. This behavior is currently not changeable.