Add the Codebase Search Tool to Agentic Chat - support implicit project inclusion
Context
As part of supporting "Chat with your codebase" in Agentic Chat, we need to introduce the Codebase Search Tool into it.
This search tool must be able to support codebase search on:
- the implicitly included project: the active project in the user's workspace - THIS ISSUE
- explicitly included projects: projects included through
/include <repository>- addressed #1288 (moved)
For the sake of iteration, we will only concern ourselves with the first item in this issue.
References
Proposal
- Add a new tool definition for
CodebaseSearchin the Duo Workflow tools list, and update the Duo Workflow Tools Registry accordingly. - This tool should make use of the API introduced in Add a new API endpoint for the Codebase Search ... (gitlab-org/gitlab#555843 - closed)
- For further exploration:
- Consider making use of the AI model to extract the best
search_termfor the API from the user's question. For example, if the user question is "How do I create an ActiveRecord migration?", the tool may extract "create an ActiveRecord migration" as thesearch_termto send to the API - Consider making use of the AI model to determine the
knnandlimitneeded for the search
- Consider making use of the AI model to extract the best
Edited by Pam Artiaga