generate_tabnine_config
Create a Tabnine configuration file to customize AI code completion settings for specific programming languages and project requirements.
Instructions
Generates a .tabnine.json configuration file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | Yes | ||
| languages | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"languages": {
"items": {
"type": "string"
},
"type": "array"
},
"projectName": {
"type": "string"
}
},
"required": [
"projectName",
"languages"
],
"type": "object"
}
Implementation Reference
- src/tools/ideconfigs.ts:54-70 (handler)The main handler function that executes the tool logic: generates a .tabnine.json configuration file based on project name and languages provided as input.export function generateTabnineConfigHandler(args: any) { const { projectName, languages } = args; const content = JSON.stringify({ "version": "1.0.0", "project_name": projectName, "enabled": true, "languages": languages.reduce((acc: any, lang: string) => { acc[lang] = { "enabled": true }; return acc; }, {}), "completion": { "inline": true, "full_line": true } }, null, 2); return { content: [{ type: "text", text: content }] }; }
- src/tools/ideconfigs.ts:45-52 (schema)Zod schema defining the input parameters (projectName and languages) and metadata for the tool.export const generateTabnineConfigSchema = { name: "generate_tabnine_config", description: "Generates a .tabnine.json configuration file.", inputSchema: z.object({ projectName: z.string(), languages: z.array(z.string()) }) };
- src/index.ts:108-108 (registration)Registration of the tool in the main stdio server's toolRegistry Map.["generate_tabnine_config", { schema: generateTabnineConfigSchema, handler: generateTabnineConfigHandler }],
- src/server.ts:114-114 (registration)Registration of the tool in the HTTP server's toolRegistry Map.["generate_tabnine_config", { schema: generateTabnineConfigSchema, handler: generateTabnineConfigHandler }],