2 Commits

Author SHA1 Message Date
b71f76c8b3 feat: 添加本地缓存功能,减少API调用
- 实现SQLite缓存模块,支持高效查询和存储
- 添加缓存键生成策略(基于原文+语言对的SHA256哈希)
- 集成缓存到Translator类,先查缓存再调用API
- 添加缓存管理命令:cache clear, cache stats, cache cleanup
- 实现组合缓存清理策略(数量限制+时间过期)
- 添加完整的单元测试
- 更新配置文件模板,添加缓存配置
- 更新文档和版本记录

版本: v0.5.1
2026-03-29 21:10:28 +08:00
6807371c5e feat: add content filter and code processing module (v0.3.0)
- Add content filter module (internal/content/)
- Implement basic character filtering (control chars, line breaks, symbols)
- Implement code block and inline code detection
- Implement comment detection for 30+ languages (JS/Python/Go/HTML/etc)
- Add go-enry dependency for intelligent language detection
- Add SkipKeywords config option (default: TODO/FIXME/HACK/XXX/etc)
- Integrate content processing into Translator
- Update config.yaml with skip_keywords
2026-03-29 18:41:25 +08:00