Download src/code-intel-manager.js from VanyaJ/bada-terminal: direct link, hf CLI and curl.
- Browser
- Download file 18.6 kB
-
https://huggingface.co/VanyaJ/bada-terminal/resolve/main/src/code-intel-manager.js
- Command line
-
hf download hf://VanyaJ/bada-terminal/src/code-intel-manager.js
-
curl -L -o code-intel-manager.js https://huggingface.co/VanyaJ/bada-terminal/resolve/main/src/code-intel-manager.js
18.6 kB
| const fs = require('fs'); | |
| const path = require('path'); | |
| const { execSync } = require('child_process'); | |
| const crypto = require('crypto'); | |
| const db = require('../knowledge-db'); | |
| const { SecurityGateway } = require('./security-gateway'); | |
| const CodeDiffEngine = require('./code-diff-engine'); | |
| class CodeIntelManager { | |
| constructor() { | |
| this.projects = new Map(); // projectId -> projectConfig | |
| this.securityGateway = new SecurityGateway(); | |
| this.diffEngine = new CodeDiffEngine(db); | |
| this.loadProjectsFromPreferences(); | |
| } | |
| /** | |
| * Load registered projects from dev_preferences database. | |
| */ | |
| async loadProjectsFromPreferences() { | |
| try { | |
| // Find all global project registrations | |
| // Category: 'project_config', Key: 'metadata' | |
| const prefs = await db.getDevPreferences('global', 'project_config'); | |
| for (const p of prefs) { | |
| try { | |
| const config = JSON.parse(p.preference_value); | |
| // ์ฃผ์: ๋ชจ๋ ๋ฑ๋ก ํ์ project_id ๋ 'global' ์ด๋ฏ๋ก, ๋ฐ๋์ config.projectId ๋ฅผ ๋งต ํค๋ก ์ฌ์ฉํด์ผ ํ๋ค. | |
| // (์ด์ ๊ตฌํ์ p.project_id ๋ฅผ ์ฌ์ฉํด ๋ชจ๋ ํ๋ก์ ํธ๊ฐ 'global' ํค ํ๋๋ก ๋ฎ์ด์จ์ง๋ ๋ฒ๊ทธ๊ฐ ์์์) | |
| if (config && config.projectId) { | |
| this.projects.set(config.projectId, config); | |
| } | |
| } catch (e) { /* intentional: JSON ํ์ฑ ์คํจ ์ ์๋ณธ ์ ์ง */ } | |
| } | |
| } catch (e) { | |
| console.warn('[CodeIntelManager] Failed to load projects from preferences:', e.message); | |
| } | |
| } | |
| /** | |
| * Get project config by path. | |
| */ | |
| getProjectId(projectPath) { | |
| return crypto.createHash('md5').update(path.resolve(projectPath)).digest('hex').substring(0, 16); | |
| } | |
| /** | |
| * Register a new project for code intelligence. | |
| * @param {string} projectPath | |
| * @param {Object} options - { role: 'main'|'reference', securityLevel: 1|2|3, autoIndex: true, preferredLlm: 'auto' } | |
| */ | |
| async registerProject(projectPath, options = {}) { | |
| const resolvedPath = path.resolve(projectPath); | |
| if (!fs.existsSync(resolvedPath)) { | |
| throw new Error(`ํ๋ก์ ํธ ๊ฒฝ๋ก๊ฐ ์กด์ฌํ์ง ์์ต๋๋ค: ${projectPath}`); | |
| } | |
| const projectId = this.getProjectId(resolvedPath); | |
| const role = options.role || 'main'; | |
| const securityLevel = options.securityLevel || 1; | |
| const preferredLlm = options.preferredLlm || 'auto'; | |
| const projectConfig = { | |
| projectId, | |
| path: resolvedPath, | |
| name: path.basename(resolvedPath), | |
| role, | |
| securityLevel, | |
| preferredLlm, | |
| registeredAt: new Date().toISOString() | |
| }; | |
| // Save project registration to dev_preferences (global scope) | |
| await db.saveDevPreference('global', { | |
| category: 'project_config', | |
| preference_key: `project_${projectId}`, | |
| preference_value: JSON.stringify(projectConfig), | |
| confidence: 1.0, | |
| source: 'user_explicit' | |
| }); | |
| this.projects.set(projectId, projectConfig); | |
| // Setup Git Hook | |
| const gitHookInstalled = this.diffEngine.setupGitHook(resolvedPath); | |
| projectConfig.gitHookInstalled = gitHookInstalled; | |
| // Trigger Initial Code Analysis | |
| if (options.autoIndex !== false) { | |
| // Run CodeParser analyze | |
| const CodeParser = require('../code-parser'); // ๋ฃจํธ์ code-parser.js (src ๊ธฐ์ค ํ ๋จ๊ณ ์). ์ํ ์ฐธ์กฐ ๋ฐฉ์ง ์ํด ๋์ ๋ก๋ | |
| console.log(`[CodeIntelManager] Starting initial analysis for project: ${projectConfig.name}`); | |
| const result = await CodeParser.analyze(projectId, resolvedPath); | |
| // Capture initial git commit snapshot if available | |
| try { | |
| const commitHash = execSync('git rev-parse HEAD', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const author = execSync('git log -1 --format=%an', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const message = execSync('git log -1 --format=%s', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const timestamp = execSync('git log -1 --format=%cI', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const snapshot = await this.diffEngine.captureSnapshot(projectId, commitHash); | |
| await db.saveChangeHistory(projectId, { | |
| commit_hash: commitHash, | |
| commit_message: message, | |
| commit_author: author, | |
| commit_timestamp: timestamp, | |
| changed_symbols: [], | |
| diff_summary: { added: snapshot.symbols.length, modified: 0, deleted: 0 }, | |
| snapshot_json: JSON.stringify(snapshot) | |
| }); | |
| } catch (gitErr) { | |
| console.warn(`[CodeIntelManager] Git snapshot skip for initial index of ${resolvedPath}:`, gitErr.message); | |
| } | |
| } | |
| return projectConfig; | |
| } | |
| /** | |
| * Run incremental update for changed files. | |
| * @param {string} projectId | |
| * @param {Array<string>} changedFiles | |
| */ | |
| async incrementalUpdate(projectId, changedFiles = null) { | |
| const config = this.projects.get(projectId); | |
| if (!config) { | |
| throw new Error(`๋ฑ๋ก๋์ง ์์ ํ๋ก์ ํธ ID์ ๋๋ค: ${projectId}`); | |
| } | |
| const projectPath = config.path; | |
| let filesToUpdate = changedFiles; | |
| // If no changed files list, try to find via git diff | |
| if (!filesToUpdate) { | |
| try { | |
| const diffOutput = execSync('git diff --name-only HEAD~1', { cwd: projectPath, encoding: 'utf-8' }); | |
| filesToUpdate = diffOutput.split('\n').map(f => f.trim()).filter(f => f && fs.existsSync(path.join(projectPath, f))); | |
| } catch (e) { | |
| console.warn(`[CodeIntelManager] Git diff failed for incremental update, running full analysis:`, e.message); | |
| } | |
| } | |
| const CodeParser = require('../code-parser'); // ๋ฃจํธ์ code-parser.js (src ๊ธฐ์ค ํ ๋จ๊ณ ์) | |
| if (filesToUpdate && filesToUpdate.length > 0) { | |
| console.log(`[CodeIntelManager] Running incremental update for ${filesToUpdate.length} files in ${config.name}`); | |
| // Update only changed files in DB | |
| for (const fileRelPath of filesToUpdate) { | |
| const fullPath = path.join(projectPath, fileRelPath); | |
| const fileExt = path.extname(fileRelPath).toLowerCase(); | |
| if (!['.js', '.jsx', '.ts', '.tsx', '.py'].includes(fileExt)) continue; | |
| const content = fs.readFileSync(fullPath, 'utf-8'); | |
| let parsedData = { entities: [], imports: [] }; | |
| if (['.js', '.jsx', '.ts', '.tsx'].includes(fileExt)) { | |
| parsedData = CodeParser.parseJsTs(fullPath, content); | |
| } else if (fileExt === '.py') { | |
| parsedData = CodeParser.parsePython(content); | |
| } | |
| // Save Code Symbols | |
| for (const entity of parsedData.entities) { | |
| const entityId = `code-${fullPath}#${entity.name}`; | |
| await db.saveCodeSymbol(projectId, { | |
| id: entityId, | |
| symbol_type: entity.type, | |
| name: entity.name, | |
| file_path: fileRelPath, | |
| start_line: entity.startLine, | |
| end_line: entity.endLine, | |
| signature: entity.type === 'class' ? `class ${entity.name}` : `${entity.name}()`, | |
| properties: { file: fullPath } | |
| }); | |
| // Save Code Relation | |
| await db.saveCodeRelation(projectId, { | |
| source_symbol_id: `file-${fullPath}`, | |
| target_symbol_id: entityId, | |
| relation_type: entity.type === 'class' ? 'defines_class' : 'defines_function' | |
| }); | |
| } | |
| } | |
| // Record commit snapshot | |
| try { | |
| const commitHash = execSync('git rev-parse HEAD', { cwd: projectPath, encoding: 'utf-8' }).trim(); | |
| const author = execSync('git log -1 --format=%an', { cwd: projectPath, encoding: 'utf-8' }).trim(); | |
| const message = execSync('git log -1 --format=%s', { cwd: projectPath, encoding: 'utf-8' }).trim(); | |
| const timestamp = execSync('git log -1 --format=%cI', { cwd: projectPath, encoding: 'utf-8' }).trim(); | |
| const latestHistories = await db.getChangeHistory(projectId); | |
| const prevSnapshot = latestHistories.length > 0 && latestHistories[0].snapshot_json | |
| ? JSON.parse(latestHistories[0].snapshot_json) | |
| : { symbols: [], relations: [] }; | |
| const currentSnapshot = await this.diffEngine.captureSnapshot(projectId, commitHash); | |
| const diff = this.diffEngine.diffSnapshots(prevSnapshot, currentSnapshot); | |
| await db.saveChangeHistory(projectId, { | |
| commit_hash: commitHash, | |
| commit_message: message, | |
| commit_author: author, | |
| commit_timestamp: timestamp, | |
| changed_symbols: diff.modified.concat(diff.added).map(s => s.id), | |
| diff_summary: { added: diff.added.length, modified: diff.modified.length, deleted: diff.removed.length }, | |
| snapshot_json: JSON.stringify(currentSnapshot) | |
| }); | |
| } catch (gitErr) { | |
| console.warn('[CodeIntelManager] Failed to record git commit history:', gitErr.message); | |
| } | |
| } else { | |
| // Full run as backup | |
| await CodeParser.analyze(projectId, projectPath); | |
| } | |
| } | |
| /** | |
| * Get all registered projects. | |
| */ | |
| getProjects() { | |
| // ๋ ๋๋ฌ ํธํ์ ์ํด ์ ๊ทํ๋ ํ๋(id/status/last_analyzed_at)๋ฅผ ํจ๊ป ์ ๊ณตํ๋ค. | |
| return Array.from(this.projects.values()).map(c => ({ | |
| ...c, | |
| id: c.projectId, | |
| status: c.lastAnalyzedAt ? 'analyzed' : 'pending', | |
| last_analyzed_at: c.lastAnalyzedAt || c.registeredAt || null | |
| })); | |
| } | |
| /** | |
| * Compare main and reference projects. | |
| * @param {string} mainProjectId | |
| * @param {string} referenceProjectId | |
| * @param {string} query | |
| */ | |
| async compareProjects(mainProjectId, referenceProjectId, query = '') { | |
| const mainSymbols = await db.searchCodeSymbols(mainProjectId, query); | |
| const refSymbols = await db.searchCodeSymbols(referenceProjectId, query); | |
| const mainMap = new Map(mainSymbols.map(s => [s.name, s])); | |
| const refMap = new Map(refSymbols.map(s => [s.name, s])); | |
| const common = []; | |
| const uniqueToMain = []; | |
| const uniqueToRef = []; | |
| for (const [name, mainSym] of mainMap.entries()) { | |
| if (refMap.has(name)) { | |
| common.push({ | |
| name, | |
| mainSymbol: mainSym, | |
| refSymbol: refMap.get(name) | |
| }); | |
| } else { | |
| uniqueToMain.push(mainSym); | |
| } | |
| } | |
| for (const [name, refSym] of refMap.entries()) { | |
| if (!mainMap.has(name)) { | |
| uniqueToRef.push(refSym); | |
| } | |
| } | |
| const totalSymbols = mainSymbols.length + refSymbols.length; | |
| const similarityScore = totalSymbols > 0 | |
| ? (common.length * 2) / totalSymbols | |
| : 0; | |
| return { | |
| similarityScore, | |
| commonCount: common.length, | |
| mainOnlyCount: uniqueToMain.length, | |
| refOnlyCount: uniqueToRef.length, | |
| common: common.slice(0, 100), // Cap for display | |
| uniqueToMain: uniqueToMain.slice(0, 100), | |
| uniqueToRef: uniqueToRef.slice(0, 100) | |
| }; | |
| } | |
| /** | |
| * ๋ฑ๋ก๋ ํ๋ก์ ํธ๋ฅผ ์ฌ๋ถ์ํ๋ค. (UI '์ฌ๋ถ์' ๋ฒํผ โ analyze-code-project IPC) | |
| * CodeParser.analyze ๋ก ์ฌ๋ณผ ์ ์ฒด๋ฅผ ๋ค์ ์ธ๋ฑ์ฑํ๊ณ , ๊ฐ๋ฅํ๋ฉด git ์ค๋ ์ท์ ๊ฐฑ์ ํ๋ค. | |
| * @param {string} projectId | |
| * @returns {Promise<{success:boolean, projectId:string, symbolCount:number, name:string}>} | |
| */ | |
| async analyzeProject(projectId) { | |
| const config = this.projects.get(projectId); | |
| if (!config) { | |
| throw new Error(`๋ฑ๋ก๋์ง ์์ ํ๋ก์ ํธ ID์ ๋๋ค: ${projectId}`); | |
| } | |
| const resolvedPath = config.path; | |
| if (!fs.existsSync(resolvedPath)) { | |
| throw new Error(`ํ๋ก์ ํธ ๊ฒฝ๋ก๊ฐ ์กด์ฌํ์ง ์์ต๋๋ค: ${resolvedPath}`); | |
| } | |
| const CodeParser = require('../code-parser'); // ๋ฃจํธ์ code-parser.js (src ๊ธฐ์ค ํ ๋จ๊ณ ์) | |
| console.log(`[CodeIntelManager] ํ๋ก์ ํธ ์ฌ๋ถ์ ์์: ${config.name}`); | |
| const result = await CodeParser.analyze(projectId, resolvedPath); | |
| // git ์ค๋ ์ท ๊ฐฑ์ (์ ํ) โ git ์ ์ฅ์๊ฐ ์๋๋ฉด ์กฐ์ฉํ ๊ฑด๋๋ด๋ค. | |
| await this._captureGitSnapshot(projectId, resolvedPath); | |
| // ์ต์ ๋ถ์ ์๊ฐ ๊ธฐ๋ก | |
| config.lastAnalyzedAt = new Date().toISOString(); | |
| await db.saveDevPreference('global', { | |
| category: 'project_config', | |
| preference_key: `project_${projectId}`, | |
| preference_value: JSON.stringify(config), | |
| confidence: 1.0, | |
| source: 'user_explicit' | |
| }); | |
| const symbols = await db.searchCodeSymbols(projectId, ''); | |
| console.log(`[CodeIntelManager] ์ฌ๋ถ์ ์๋ฃ: ${config.name} (์ฌ๋ณผ ${symbols.length}๊ฐ)`); | |
| return { success: true, projectId, name: config.name, symbolCount: symbols.length, result: result || null }; | |
| } | |
| /** | |
| * git ์ปค๋ฐ ์ค๋ ์ท์ ์บก์ฒํด ๋ณ๊ฒฝ ์ด๋ ฅ์ ์ ์ฅํ๋ค(git ์ ์ฅ์๊ฐ ์๋๋ฉด ๋ฌด์). | |
| * registerProject ์ ์ด๊ธฐ ์ธ๋ฑ์ฑ ๋ก์ง๊ณผ ๋์ผ ์ฑ ์์ ์ฌ์ฌ์ฉ ๋ชฉ์ . | |
| * @private | |
| */ | |
| async _captureGitSnapshot(projectId, resolvedPath) { | |
| try { | |
| const commitHash = execSync('git rev-parse HEAD', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const author = execSync('git log -1 --format=%an', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const message = execSync('git log -1 --format=%s', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const timestamp = execSync('git log -1 --format=%cI', { cwd: resolvedPath, encoding: 'utf-8' }).trim(); | |
| const snapshot = await this.diffEngine.captureSnapshot(projectId, commitHash); | |
| await db.saveChangeHistory(projectId, { | |
| commit_hash: commitHash, | |
| commit_message: message, | |
| commit_author: author, | |
| commit_timestamp: timestamp, | |
| changed_symbols: [], | |
| diff_summary: { added: snapshot.symbols.length, modified: 0, deleted: 0 }, | |
| snapshot_json: JSON.stringify(snapshot) | |
| }); | |
| } catch (gitErr) { | |
| console.warn(`[CodeIntelManager] git ์ค๋ ์ท ๊ฑด๋๋(${resolvedPath}):`, gitErr.message); | |
| } | |
| } | |
| /** | |
| * ํ๋ก์ ํธ์ ์ฝ๋ ์ฌ๋ณผ ๋ชฉ๋ก์ ์กฐํํ๋ค. (get-code-symbols IPC) | |
| * @param {string} projectId | |
| * @param {Object} options - { limit, query } | |
| * @returns {Promise<Array>} | |
| */ | |
| async getSymbols(projectId, options = {}) { | |
| const query = options.query || ''; | |
| const symbols = await db.searchCodeSymbols(projectId, query); | |
| const limit = options.limit || 0; | |
| return limit > 0 ? symbols.slice(0, limit) : symbols; | |
| } | |
| /** | |
| * ๋ฑ๋ก๋ ํ๋ก์ ํธ๋ฅผ ์ญ์ ํ๋ค. ๋ฑ๋ก ์ ๋ณด(dev_preferences)์ ์ธ๋ฑ์ฑ๋ ์ฝ๋ ๋ฐ์ดํฐ๋ฅผ ํจ๊ป ์ ๊ฑฐํ๋ค. | |
| * @param {string} projectId | |
| * @returns {Promise<{success:boolean, projectId:string}>} | |
| */ | |
| async deleteProject(projectId) { | |
| if (!this.projects.has(projectId)) { | |
| throw new Error(`๋ฑ๋ก๋์ง ์์ ํ๋ก์ ํธ ID์ ๋๋ค: ${projectId}`); | |
| } | |
| // 1) ์ธ๋ฑ์ฑ๋ ์ฝ๋ ์ฌ๋ณผ/๊ด๊ณ/์ด๋ ฅ ์ ๊ฑฐ | |
| try { | |
| await db.deleteCodeProjectData(projectId); | |
| } catch (e) { | |
| console.warn('[CodeIntelManager] ์ฝ๋ ๋ฐ์ดํฐ ์ญ์ ๊ฒฝ๊ณ :', e.message); | |
| } | |
| // 1-2) ์ฝ๋๋งต ๊ทธ๋ํ ๋ ธ๋/์ฃ์ง ์ ๊ฑฐ (ํด์ projectId ๋ ์ฝ๋์ธํ ์ ์ฉ์ด๋ผ ์์ ) | |
| try { | |
| await db.clearProjectData(projectId); | |
| } catch (e) { | |
| console.warn('[CodeIntelManager] ์ฝ๋๋งต ๊ทธ๋ํ ์ญ์ ๊ฒฝ๊ณ :', e.message); | |
| } | |
| // 2) ๋ฑ๋ก ์ ๋ณด(dev_preferences) ์ ๊ฑฐ | |
| await db.deleteDevPreference('global', 'project_config', `project_${projectId}`); | |
| // 3) ๋ฉ๋ชจ๋ฆฌ ์บ์์์ ์ ๊ฑฐ | |
| this.projects.delete(projectId); | |
| console.log(`[CodeIntelManager] ํ๋ก์ ํธ ์ญ์ ์๋ฃ: ${projectId}`); | |
| return { success: true, projectId }; | |
| } | |
| /** | |
| * ํ๋ก์ ํธ ์ฝ๋ ์ธํ ๋ฆฌ์ ์ค ๋ฐ์ดํฐ๋ฅผ ์ง๋ ฌํ ๊ฐ๋ฅํ ๋ฒ๋ค๋ก ๋ด๋ณด๋ธ๋ค. (ํ์ผ ์ ์ฅ์ฉ) | |
| * @param {string} projectId | |
| * @returns {Promise<Object>} { version, config, symbols, relations, history } | |
| */ | |
| async exportProject(projectId) { | |
| const config = this.projects.get(projectId); | |
| if (!config) { | |
| throw new Error(`๋ฑ๋ก๋์ง ์์ ํ๋ก์ ํธ ID์ ๋๋ค: ${projectId}`); | |
| } | |
| const symbols = await db.searchCodeSymbols(projectId, ''); | |
| const relations = await db.getAllCodeRelations(projectId); | |
| const history = await db.getChangeHistory(projectId); | |
| return { | |
| version: 1, | |
| exportedAt: new Date().toISOString(), | |
| config, | |
| symbols, | |
| relations, | |
| history | |
| }; | |
| } | |
| /** | |
| * ๋ด๋ณด๋ธ ๋ฒ๋ค์ ํ์ฌ DB๋ก ๋ถ๋ฌ์จ๋ค(๊ฐ์ ธ์ค๊ธฐ). ๋์ผ ID ์กด์ฌ ์ ๋ฐ์ดํฐ๋ฅผ ๋ณํฉ/๊ฐฑ์ ํ๋ค. | |
| * ๋ณด์: ๊ฒฝ๋ก๋ ์๋ณธ ๊ทธ๋๋ก ๋ณต์ํ๋, ์ ๋ขฐํ ์ ์๋ ์ฌ์ฉ์ ๋ด๋ณด๋ด๊ธฐ ํ์ผ๋ง ๋์์ผ๋ก ํ๋ค. | |
| * @param {Object} bundle - exportProject ๊ฒฐ๊ณผ ๊ตฌ์กฐ | |
| * @returns {Promise<{success:boolean, projectId:string, symbolCount:number}>} | |
| */ | |
| async importProject(bundle) { | |
| if (!bundle || typeof bundle !== 'object' || !bundle.config || !bundle.config.projectId) { | |
| throw new Error('์ฌ๋ฐ๋ฅด์ง ์์ ๊ฐ์ ธ์ค๊ธฐ ํ์ผ ํ์์ ๋๋ค. (config.projectId ๋๋ฝ)'); | |
| } | |
| const config = bundle.config; | |
| const projectId = config.projectId; | |
| // 1) ๋ฑ๋ก ์ ๋ณด ๋ณต์ | |
| config.importedAt = new Date().toISOString(); | |
| await db.saveDevPreference('global', { | |
| category: 'project_config', | |
| preference_key: `project_${projectId}`, | |
| preference_value: JSON.stringify(config), | |
| confidence: 1.0, | |
| source: 'user_explicit' | |
| }); | |
| this.projects.set(projectId, config); | |
| // 2) ์ฌ๋ณผ ๋ณต์ | |
| let symbolCount = 0; | |
| for (const s of (bundle.symbols || [])) { | |
| try { await db.saveCodeSymbol(projectId, s); symbolCount++; } catch (e) { /* ๊ฐ๋ณ ์ฌ๋ณผ ์คํจ ๋ฌด์ */ } | |
| } | |
| // 3) ๊ด๊ณ ๋ณต์ | |
| for (const r of (bundle.relations || [])) { | |
| try { await db.saveCodeRelation(projectId, r); } catch (e) { /* ๊ฐ๋ณ ๊ด๊ณ ์คํจ ๋ฌด์ */ } | |
| } | |
| // 4) ๋ณ๊ฒฝ ์ด๋ ฅ ๋ณต์ | |
| for (const h of (bundle.history || [])) { | |
| try { | |
| await db.saveChangeHistory(projectId, { | |
| commit_hash: h.commit_hash, | |
| commit_message: h.commit_message, | |
| commit_author: h.commit_author, | |
| commit_timestamp: h.commit_timestamp, | |
| changed_symbols: h.changed_symbols, | |
| diff_summary: h.diff_summary, | |
| snapshot_json: h.snapshot_json | |
| }); | |
| } catch (e) { /* ๊ฐ๋ณ ์ด๋ ฅ ์คํจ ๋ฌด์ */ } | |
| } | |
| console.log(`[CodeIntelManager] ํ๋ก์ ํธ ๊ฐ์ ธ์ค๊ธฐ ์๋ฃ: ${config.name} (์ฌ๋ณผ ${symbolCount}๊ฐ)`); | |
| return { success: true, projectId, name: config.name, symbolCount }; | |
| } | |
| } | |
| // Singleton instance | |
| module.exports = new CodeIntelManager(); | |