Skip to main content
Glama

AI Conversation Logger

by fablefang
index.ts1.46 kB
export const CONSTANTS = { // 文件和存储相关常量 AI_LOGS_DIR: 'ai-logs', // 搜索相关常量 DEFAULT_SEARCH_LIMIT: 10, // 日期和时间格式 DATE_FORMAT_ISO_PREFIX: 10, // 用于 substring(0, 10) 获取日期部分 // 平台标识 PLATFORMS: { CLAUDE_CODE: 'claude-code', CURSOR: 'cursor', VSCODE: 'vscode', IDEA: 'idea', UNKNOWN: 'unknown' } as const, // 文件扩展名 FILE_EXTENSIONS: { MARKDOWN: '.md', JSON: '.json' } as const, // 错误消息 ERROR_MESSAGES: { INVALID_PARAMETERS: '参数验证失败', FILE_OPERATION_FAILED: '文件操作失败', SEARCH_FAILED: '搜索操作失败', PROJECT_NOT_FOUND: '项目未找到', INVALID_DATE_RANGE: '无效的日期范围' } as const } as const; // 支持的平台类型 export type SupportedPlatform = typeof CONSTANTS.PLATFORMS[keyof typeof CONSTANTS.PLATFORMS]; // 错误类型 export class ValidationError extends Error { constructor(message: string, public details?: unknown) { super(message); this.name = 'ValidationError'; } } export class FileOperationError extends Error { constructor(message: string, public filePath?: string, public operation?: string) { super(message); this.name = 'FileOperationError'; } } export class SearchError extends Error { constructor(message: string, public query?: string) { super(message); this.name = 'SearchError'; } }

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/fablefang/ai-conversation-logger-mcp'

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