Skip to main content
Glama

In Memoria

test-debug.jsโ€ข2.06 kB
#!/usr/bin/env node import { SemanticAnalyzer } from './rust-core/index.js'; import fs from 'fs'; async function testWithTempFile() { console.log('๐Ÿ” Testing with temporary file...\n'); try { // Create a test directory and file const testDir = './temp-test'; if (!fs.existsSync(testDir)) { fs.mkdirSync(testDir); } const testFile = `${testDir}/example.ts`; const testContent = `export class UserService { private users: User[] = []; async createUser(userData: CreateUserRequest): Promise<User> { const user = new User(userData); this.users.push(user); return user; } } interface User { id: string; name: string; } function validateUser(user: User): boolean { return user.id && user.name; }`; fs.writeFileSync(testFile, testContent); console.log(`๐Ÿ“ Created test file: ${testFile}`); console.log(`Content length: ${testContent.length} characters`); const analyzer = new SemanticAnalyzer(); // Test single file analysis console.log('\n๐Ÿ” Testing single file analysis...'); const fileConcepts = await analyzer.analyzeFileContent(testFile, testContent); console.log(`โœ… File analysis found ${fileConcepts.length} concepts:`); fileConcepts.forEach(concept => { console.log(` - ${concept.name} (${concept.concept_type}) - confidence: ${concept.confidence}`); }); // Test directory learning console.log('\n๐Ÿ“š Testing directory learning...'); const learnedConcepts = await analyzer.learnFromCodebase(testDir); console.log(`โœ… Directory learning found ${learnedConcepts.length} concepts:`); learnedConcepts.forEach(concept => { console.log(` - ${concept.name} (${concept.concept_type}) in ${concept.file_path}`); }); // Cleanup fs.rmSync(testDir, { recursive: true, force: true }); console.log('\n๐Ÿงน Cleaned up test files'); } catch (error) { console.error('โŒ Test failed:', error); console.error('Stack:', error.stack); } } testWithTempFile();

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pi22by7/In-Memoria'

If you have feedback or need assistance with the MCP directory API, please join our Discord server