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
@@ -56,10 +59,11 @@ export function createMcpServer(): McpServer {
56
59
}
57
60
);
58
61
59
-
server.registerTool(
60
-
"ask_codebase",
61
-
{
62
-
description: dedent`
62
+
if(hasLanguageModels){
63
+
server.registerTool(
64
+
"ask_codebase",
65
+
{
66
+
description: dedent`
63
67
DO NOT USE THIS TOOL UNLESS EXPLICITLY ASKED TO. THE PROMPT MUST SPECIFICALLY ASK TO USE THE ask_codebase TOOL.
64
68
65
69
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.
@@ -75,24 +79,24 @@ export function createMcpServer(): McpServer {
75
79
76
80
When using this in shared environments (e.g., Slack), you can set the visibility parameter to 'PUBLIC' to ensure everyone can access the chat link.
77
81
`,
78
-
inputSchema: z.object({
79
-
query: z.string().describe("The query to ask about the codebase."),
80
-
repos: z.array(z.string()).optional().describe("The repositories accessible to the agent. If not provided, all repositories are accessible."),
81
-
languageModel: languageModelInfoSchema.optional().describe("The language model to use. If not provided, defaults to the first model in the config."),
82
-
visibility: z.enum(['PRIVATE','PUBLIC']).optional().describe("The visibility of the chat session. Defaults to PRIVATE for authenticated users."),
0 commit comments