22 Commits

Author SHA1 Message Date
0a40258d9a feat: TUI帮助功能与样式改进
Some checks failed
Release / build (push) Failing after 37s
- 添加帮助信息栏 (bubbles help组件, Ctrl+H切换)
- 翻译卡片样式优化 (Padding空隙、上方内边距)
- 扩展build.sh支持跨平台编译
- release.yaml使用build.sh构建
2026-04-08 02:08:34 +08:00
a9b7a69224 feat: Logo模块化与渐变色统一
- 修复 --help/-h/-?/--version 在交互模式下无响应的问题
- 新增 internal/logo/logo.go 统一管理logo展示
- 新增 build.sh 自动注入git版本号
- TUI头部与CLI使用统一logo模块
- 移除TUI头部的 [Ctrl+C 退出] 显示
- 统一版本号格式: ( v1.1.1-dirty )
2026-04-08 01:08:47 +08:00
c0156a88d6 feat: 修复配置路径BUG并迁移onboard到huh
All checks were successful
Release / build (push) Successful in 12m14s
- 新增路径解析工具 internal/config/path.go
- 配置查找优先级: --config > ~/.config/yoyo/config.yaml > ./configs/config.yaml
- onboard配置保存到 ~/.config/yoyo/config.yaml (符合XDG规范)
- .env文件从 ~/.config/yoyo/.env 加载
- onboard使用huh替代survey库,更现代的交互体验
- 添加Ctrl+C取消支持,打印'你已取消本次配置'
- 保存前增加确认步骤
- 版本号 v0.5.1 -> v1.1.0
2026-04-07 23:51:33 +08:00
b04092fd68 feat: 发布 v1.0.0-beta 版本
- 添加 ASCII 艺术 Logo 带渐变效果
- 改造输入框使用 ::: 紫色分隔符
- 改造信息栏合并显示语言/模型/记录数
- 添加 Spinner 翻译状态动画
- 优化翻译卡片样式
- 版本号三方同步规则
2026-04-07 07:12:00 +08:00
98f2c69151 fix: 应用 CardStyle marginBottom 2026-04-07 04:52:09 +08:00
217db90cfa feat: 升级到 lipgloss/bubbletea v2,实现翻译卡片组件
- 升级 charm.land/lipgloss/v2 v1.1.0 -> v2.0.2
- 升级 charm.land/bubbletea/v2 v1.3.10 -> v2.0.2
- 升级 charm.land/bubbles/v2 -> v2.1.0
- 新增翻译卡片组件:元信息行(Tokens/耗时/模型)、用户输入(碳黑背景)、翻译结果
- 卡片组件间距 5px
- 重构 model.go 适配 v2 API
- 更新 keys.go, messages.go, styles.go
2026-04-07 04:47:58 +08:00
18b191d10d fix: textarea - Enter翻译/Alt+Enter换行 2026-04-06 06:15:34 +08:00
1996e60567 fix: textarea - Enter翻译/Ctrl+Enter换行 2026-04-06 06:08:19 +08:00
3c45730751 fix: textarea - Enter翻译/Ctrl+J换行,禁用Enter自动换行 2026-04-06 06:05:20 +08:00
b35508e623 feat: textarea布局优化 - 全宽/自适应高度(最多7行)/深色背景/窗口尺寸响应 2026-04-06 05:50:11 +08:00
7539987877 fix: textarea输入框 - 隐藏行号/移除提示符/Ctrl+J换行 2026-04-06 05:43:40 +08:00
5fb0d5c58b feat: 模块7 - 多行输入支持 (textarea替换textinput) 2026-04-06 05:39:21 +08:00
59f9c6de18 feat: 实现模块6 - TUI集成翻译 (Enter翻译/异步执行/加载状态) 2026-04-06 05:18:11 +08:00
8c6b08cec8 feat: 实现模块5 - TUI快捷键系统 (Ctrl+L清空/Ctrl+T切换语言) 2026-04-06 05:15:24 +08:00
aefa0e8799 feat: 实现模块4 - TUI状态栏和主题配色 2026-04-06 05:13:24 +08:00
7321951d05 feat: 实现模块3 - TUI翻译显示区 2026-04-06 05:11:23 +08:00
6f872ff285 feat: 实现模块2 - TUI输入组件 (textinput) 2026-04-06 05:10:00 +08:00
1787464f52 feat: 实现模块1 - TUI基础框架 (bubbletea) 2026-04-06 05:07:36 +08:00
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
24ba405d55 feat: add language support and onboard configuration wizard (v0.2.0)
- Add language code intelligent parsing module (internal/lang)
- Support --lang parameter for target language specification
- Support multiple language code formats (BCP47, aliases, Chinese names)
- Implement interactive onboard configuration wizard
- Update Config struct with language fields
- Add survey library dependency for interactive UI
- Improve CLI command interface
- Add comprehensive unit tests for language module
- Update documentation (AGENTS.md, changelog.md, taolun.md, memory.md)

Supported language codes:
- Standard: zh-CN, zh-TW, en-US, en-GB, ja, ko, es, fr, de
- Aliases: cn, en, jp, kr, es, fr, de
- Chinese names: chinese, english, japanese

Commands:
- yoyo "Hello world" - basic translation
- yoyo --lang=cn "Hello world" - specify target language
- yoyo onboard - start configuration wizard
- yoyo onboard --force - force reconfiguration

Version: 0.2.0
2026-03-29 01:30:42 +08:00
ad667fa782 feat: implement core architecture (v0.0.2)
- Implement Config class with YAML loading and environment variable support
- Implement Provider interface and factory pattern
- Implement SiliconFlow provider as example
- Implement Translator core class with prompt management
- Create CLI entry point
- Add configuration template and unit tests
- Update changelog and discussion records

Version: 0.0.2
2026-03-28 23:27:02 +08:00