UNPKG

mcp-ai-agent-guidelines

Version:

A comprehensive Model Context Protocol server providing advanced tools, resources, and prompts for implementing AI agent best practices

25 lines 822 B
/** * Abstract base class for all diagram handlers. * Enforces consistent contract across all diagram types. */ export class BaseDiagramHandler { /** * Apply theme to generated diagram. * Can be overridden by handlers with custom theme logic. */ applyTheme(diagram, theme) { if (!theme) return diagram; return `%%{init: {'theme':'${theme}'}}%%\n${diagram}`; } /** * Validate input description. * Can be overridden by handlers with specific validation rules. * Default implementation allows empty descriptions for fallback behavior. */ validateInput(_description) { // Base implementation allows empty descriptions // Handlers can override if they need stricter validation } } //# sourceMappingURL=base.handler.js.map