test-log.js•1.05 kB
#!/usr/bin/env node
import { ConversationLogger } from './dist/tools/conversationLogger.js';
async function test() {
const logger = new ConversationLogger();
const result = await logger.logConversation({
userInput: "修复MCP服务器的记录问题,包括日期文件创建、记录覆盖等问题",
aiResponse: "优化了MCP服务器实现:移除了文件锁功能,改用简单的对话编号(对话1、对话2),修复了日期文件使用本地时区的问题,解决了记录覆盖的bug,并优化了AI输入格式的提示说明。",
platform: "claude-code",
tags: ["bug修复", "MCP", "优化"],
actions: [
"修改src/tools/conversationLogger.ts - 修复记录覆盖逻辑",
"修改src/storage/markdownFormatter.ts - 改用简单对话编号",
"修改src/storage/fileManager.ts - 移除文件锁功能",
"修改src/index.ts - 优化工具描述",
"修改package.json - 移除锁依赖"
]
});
console.log('测试结果:', result);
}
test().catch(console.error);