Reapply "Use Project instead of Workspace in ContextStore (#28402)" (#28441)

Motivation for this change is to use `ContextStore` in headless
assistant, which requires it to not depend on UI entities like
`Workspace`.

This reapplies a change that was revert was in #28428, and fixes the panic.

Release Notes:

- N/A
9f6c5e2877Michael Sloan committed on 4/9/2025, 4:56:14 PM· committed by GitHubparent7bf6cd4
6 files changedLine totals unavailable