Skip to main content
Glama

AutoDev Codebase MCP Server

by anrgct
storage.ts1.14 kB
import * as vscode from 'vscode' import * as path from 'path' import { IStorage } from '../../abstractions/core' /** * VSCode storage adapter implementing IStorage interface */ export class VSCodeStorage implements IStorage { constructor(private readonly context: vscode.ExtensionContext) {} getGlobalStorageUri(): string { return this.context.globalStorageUri.fsPath } createCachePath(workspacePath: string): string { // Create a unique cache path based on workspace path const workspaceHash = this.hashString(workspacePath) const cachePath = path.join(this.getGlobalStorageUri(), 'codebase-cache', workspaceHash) return cachePath } getCacheBasePath(): string { return path.join(this.getGlobalStorageUri(), 'codebase-cache') } /** * Create a simple hash of a string for cache directory naming */ private hashString(str: string): string { let hash = 0 for (let i = 0; i < str.length; i++) { const char = str.charCodeAt(i) hash = ((hash << 5) - hash) + char hash = hash & hash // Convert to 32-bit integer } return Math.abs(hash).toString(36) } }

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/anrgct/autodev-codebase'

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