UNPKG

bigparse

Version:

MCP server that gives Claude instant, intelligent access to your codebase using Language Server Protocol

52 lines (47 loc) 1.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkAndElicitLSP = checkAndElicitLSP; exports.createElicitationPrompt = createElicitationPrompt; const language_servers_js_1 = require("../resources/language-servers.js"); async function checkAndElicitLSP(language) { // Check if the language server is installed const isInstalled = await (0, language_servers_js_1.checkLanguageServer)(language); if (isInstalled) { return null; // No elicitation needed } const lsInfo = language_servers_js_1.LANGUAGE_SERVERS[language]; if (!lsInfo) { return null; // Unknown language } // Return elicitation data return { type: 'language_server_missing', language, serverName: lsInfo.name, installCommand: lsInfo.installCommand, benefits: [ 'Extract accurate symbols (classes, functions, interfaces)', 'Find all references to a symbol across files', 'Jump to symbol definitions', 'Get type information and documentation', 'Enable semantic code navigation' ] }; } function createElicitationPrompt(elicitation) { return ` The ${elicitation.serverName} is not installed. This language server would enable: ${elicitation.benefits.map(b => `• ${b}`).join('\n')} Without it, BigParse can still: • Index and search files • Use regex patterns • Cache results for fast access You have several options: 1. **Install automatically** - Use the \`install_language_server\` tool with language: "${elicitation.language}" 2. **Install manually** - Run: ${elicitation.installCommand} 3. **Continue without** - Proceed with basic features only 4. **Check all servers** - Use the \`check_language_servers\` tool to see what's installed The language server uses ~150-300MB of memory when active. `.trim(); } //# sourceMappingURL=lsp-check.js.map