[Code Embeddings Query] Trigger ad-hoc indexing worker
Context
As part of &19655, we are going to implement ad-hoc embeddings indexing of projects.
With ad-hoc indexing, it's possible that a user asks a question about a project, Agentic Chat triggers the SemanticCodeSearch tool, and it turns out that a project does not have code embeddings yet. In this scenario we need to:
- In
Ai::ActiveContext::Queries::Code, check whether theAi::ActiveContext::Code::Repositoryrecord for the project exists (issue: #576632 (closed)) - If it does not exist
- Trigger the
AdHocIndexingWorker- THIS ISSUE - Return a response that the record does not exist yet (issue: #576632 (closed))
- Trigger the
Proposal
In Ai::ActiveContext::Queries::Code, trigger the AdHocIndexingWorker if the Ai::ActiveContext::Code::Repository.
Note: this is dependent on the AdHocIndexingWorker already being introduced.
Edited by 🤖 GitLab Bot 🤖