You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ask a natural language question about the codebase. This tool uses an AI agent to autonomously search code, read files, and find symbol references/definitions to answer your question.
246
+
247
+
The agent will:
248
+
- Analyze your question and determine what context it needs
249
+
- Search the codebase using multiple strategies (code search, symbol lookup, file reading)
250
+
- Synthesize findings into a comprehensive answer with code references
251
+
252
+
Returns a detailed answer in markdown format with code references, plus a link to view the full research session (including all tool calls and reasoning) in the Sourcebot web UI.
253
+
254
+
This is a blocking operation that may take 30-60+ seconds for complex questions as the agent researches the codebase.
255
+
`,
256
+
{
257
+
question: z.string().describe("The question to ask about the codebase."),
258
+
repo: z.string().describe("The repository to ask the question on."),
259
+
},
260
+
async({
261
+
question,
262
+
repo,
263
+
})=>{
264
+
constresponse=awaitaskCodebase({
265
+
question,
266
+
repos: [repo],
267
+
});
242
268
269
+
// Format the response with the answer and a link to the chat
270
+
constformattedResponse=dedent`
271
+
${response.answer}
272
+
273
+
---
274
+
**View full research session:** ${response.chatUrl}
0 commit comments