Skip to main content
Glama
NorthSeacoder

Frontend Test Generation & Code Review MCP Server

app-context.ts1.34 kB
/** * AppContext - 提供全局依赖注入容器(轻量级) */ import type { OpenAIClient } from '../clients/openai.js'; import type { EmbeddingClient } from '../clients/embedding.js'; import type { Cache } from '../cache/cache.js'; import type { StateManager } from '../state/manager.js'; import type { ContextStore, Memory } from './context.js'; import type { MCPTrackingService } from '../utils/tracking-service.js'; import type { WorkspaceManager } from '../orchestrator/workspace-manager.js'; import type { ProjectDetector } from '../orchestrator/project-detector.js'; import type { GitClient } from '../clients/git-client.js'; import type { WorkerPool } from '../workers/worker-pool.js'; export interface AppContext { openai: OpenAIClient; embedding: EmbeddingClient; cache: Cache; state: StateManager; contextStore: ContextStore; memory: Memory; tracking?: MCPTrackingService; workspaceManager?: WorkspaceManager; projectDetector?: ProjectDetector; gitClient?: GitClient; workerPool?: WorkerPool; } let currentContext: AppContext | null = null; export function setAppContext(context: AppContext): void { currentContext = context; } export function getAppContext(): AppContext { if (!currentContext) { throw new Error('AppContext has not been initialized'); } return currentContext; }

Latest Blog Posts

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/NorthSeacoder/fe-testgen-mcp'

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