CHANGELOG.md (view raw)
1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a
6Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
7[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
9## [0.8.0] - 2026-04-23
10
11### Added
12
13- **Thinking tags toggle in TUI**: LLMs that output `<think>`/`</think>`
14 thinking tags now have those sections automatically removed from the summary
15 display by default. Users can press `t` to toggle the thinking section back
16 on, displayed in gray at the head of the output with XML tags stripped for
17 cleaner presentation. A status indicator shows whether thinking is currently
18 visible.
19
20## [0.7.1] - 2026-04-22
21
22### Fixed
23
24- Environment variables were correctly overriding config file values, but CLI
25 arguments without explicit flags were also overriding config file values
26 unintentionally.
27 - Root cause: `go-arg` was populating struct fields with default values
28 from `default:` tags even when those CLI flags weren't provided
29 - Fix: Removed `default:` tags from Args struct fields for LLM options
30 (`model`, `base-url`, `api-key`, `max-tokens`, `temperature`);
31 Viper's own default handling is sufficient
32 - Fix: Changed Args struct fields from value types to pointer types
33 (`*string`, `*int`, `*float64`) so that "not provided on CLI" can be
34 distinguished from "provided but zero/empty"
35 - Fix: Updated `BindCLIArgs()` and `isZero()` to properly handle pointer
36 types and distinguish nil pointers from zero values
37- `isZero()` with compound type switch cases: Compound type cases like `case
38 *int, *int8, *int16, *int32, *int64` don't properly handle nil comparison when
39 stored in an interface variable. Fixed by splitting into individual type cases.
40- `isZero()` missing nil interface handling: When a nil pointer is stored
41 in an `any` interface, `value != nil` returns `true` (the interface itself
42 is not nil). Added early `if v == nil { return true }` check.
43
44## [0.7.0] - 2026-04-22
45
46### Added
47
48- **`--dry-run` option**: Validate configuration and preview what would happen
49 without making any LLM API calls. Useful for validating feeds file and
50 configuration, checking article counts and filtering results and anything
51 else that can be done "offline".
52- **Styled terminal output using `lipgloss`**: All CLI output now uses ANSI
53 colour codes for better readability:
54- **`$NO_COLOR` environment variable support**: Respects the ["no
55color"](https://no-color.org/) standard. When `NO_COLOR` is set, all styling is
56disabled and plain text is output instead.
57
58### Changed
59
60- API key validation now only occurs when not using `--dry-run` mode
61
62## [0.6.0] - 2026-04-22
63
64### Added
65
66- **Comprehensive unit test suite**, including CLI argument tests
67 (`--feeds-file`, `--prompt`, `--api-key`, `--model`, `--base-url`),
68 configuration tests, aggregator tests, output formatter tests, processor
69 tests and defaults tests.
70- **`--base-url` CLI option**: configure custom API endpoints for different LLM
71 providers. Should support any OpenAI-compatible provider.
72 - Environment variable: `LLM_AGGREGATOR_BASE_URL`
73- `internal/defaults` package
74- `docs/TESTING.md` which contains a comprehensive testing guide with test
75 descriptions
76
77### Changed
78
79- **Configuration defaults**: All packages now use `defaults.Default*` constants
80 - `internal/config`: Uses `defaults.Default*` for default values
81 - `internal/runtime`: Uses `defaults.Default*` for runtime defaults
82 - `internal/llm`: Uses `defaults.Default*` for LLM client defaults
83
84### Fixed
85
86- `nil` pointer safety in aggregator
87 - Added nil checks for `progressCtx` across all log statements
88 - `FeedAggregator` now works correctly when progress context is nil
89 - Tests use `NewFeedAggregatorWithProgress` with explicit progress context
90
91## [0.5.0] - 2026-04-22
92
93### Added
94
95- **Accurate token counting with tiktoken**
96 - New `internal/tokeniser` package using OpenAI's tiktoken-go library
97 - BPE tokenisation for accurate token counting vs rough character estimation
98 - Encoding caching to avoid repeated initialisation overhead
99 - Model-aware encoding selection (cl100k_base, o200k_base, etc.)
100 - `CountTokens()` and `CountMessagesTokens()` functions
101 - Fallback to rough estimation when tiktoken initialisation fails
102- **Concurrent feed fetching**: Feeds are now fetched concurrently using
103 `golang.org/x/sync/errgroup`
104 - Semaphore limits concurrent requests to 10 to avoid server overload
105 - Mutex-protected shared state for thread-safe article collection
106 - Partial failures don't stop other feeds from being processed
107- **Scrollable summary in TUI**
108 - Bubble Tea viewport component for browsing long summaries
109 - Keyboard navigation: j/k or arrows (scroll), Space/B (page), g/G
110 (start/end)
111 - Mouse wheel scrolling support
112 - Scroll progress indicator showing position and total lines
113
114### Changed
115
116- **Streamlined configuration management**: Viper now uses global instance with
117automatic precedence handling. Simplified configuration flow: Parse → GetViper
118→ BindCLIArgs → ViperToRuntime
119- **TUI colour scheme**: All hex colour codes replaced with ANSI 256-colour
120 palette
121
122### Fixed
123
124- Viewport now properly handles scroll events via `Update()`. Summary content
125 pre-wrapped to viewport width before display
126- Fixed string literal colour names to use actual variables
127
128## [0.4.0] - 2026-04-21
129
130### Changed
131
132- **TUI is now fully functional and production-ready**: Replaced the
133work-in-progress TUI implementation with a robust Bubble Tea command pattern:
134 - Runtime execution now uses native `tea.Cmd` instead of manual goroutine
135 orchestration.
136 - Added real-time progress updates via `progress.Progress` interface with
137 stage, substage, and article count messages.
138 - TUI displays a spinner, elapsed time, and final summary inline.
139 - Removed signal handling and channel synchronisation in favour of Bubble
140 Tea's built-in lifecycle.
141 - `TUIProgress` now only sends messages to an existing program, simplifying
142 integration.
143 - Both verbose mode (`SimpleLogger`) and TUI mode share the same
144 `progress.Progress` interface.
145
146## [0.3.0] - 2026-04-21
147
148### Added
149
150- **Configuration file support via TOML** (XDG-compliant and cross-platform)
151 - Load settings from `~/.config/llm_aggregator/config.toml`
152 - Supports all aggregation, API, and output options
153 - Example configuration file at `configs/config.example.toml`
154- **Environment variable support with `LLM_AGGREGATOR_` prefix**
155 - All configuration options can be set via environment variables
156 - Precedence order: CLI arguments > environment variables > config file >
157 built‑in defaults
158- New `internal/config` package with Viper integration
159 - `Load()` and `Save()` methods for configuration management
160 - `GetConfigPath()` for XDG‑compliant config file location
161 - `ConfigExists()` to check for existing configuration
162- Comprehensive unit tests for configuration loading, saving, and environment
163 variable precedence (`internal/config/config_test.go`)
164
165### Changed
166
167- **Environment variable renamed:** `DEEPSEEK_API_KEY` →
168 `LLM_AGGREGATOR_API_KEY`
169- **CLI help text** now reflects the new API key environment variable and
170 general configuration options
171- **Command‑line argument precedence** implemented in `cmd/llm_aggregator.go`
172via `applyConfiguration()`
173- Updated all help text, documentation, and code references
174- `README.md` completely revised with a new "Configuration" section
175
176### Removed
177
178- Global `QuietMode` and `VerboseMode` variables from
179`internal/config/config.go`. Replaced by runtime‑specific configuration in
180`runtime.Runtime` and CLI arguments
181- Hardcoded system prompt in `runtime.NewRuntime()`. Now left empty, allowing
182configuration or client default to be used
183- CLI flags now correctly override config file and environment variables
184
185## [0.2.0] - 2026-04-21
186
187### Changed
188
189- Moved all progress and status messages behind `-v/--verbose` flag
190- Default CLI mode is now silent except for final output and errors
191- Components (aggregator, processor, LLM client) use logger interface
192controlled by verbose flag
193
194## [0.1.0] - 2026-04-21
195
196### Added
197
198- Complete translation from Python prototype to Go implementation
199- RSS/Atom feed parsing using `gofeed` library
200- DeepSeek API integration via `openai-go` client, configured for `/chat/completions` endpoint
201- Content filtering and processing with keyword‑based include/exclude, date filtering, and sorting
202- Command‑line interface using `go‑arg` with automatic help and version flags
203- Multiple output formats: plain text, GitHub‑flavoured markdown, and JSON
204- Terminal user interface (TUI) built with `bubbletea` featuring:
205 - Animated progress bar with gradient colours (`#FF7CCB` to `#FDFF8C`)
206 - Live article counters (aggregated/processed)
207 - Elapsed time display
208 - Coloured status indicators using `lipgloss` styling
209 - Keyboard controls (q/Ctrl+C to quit)
210- Web content extraction fallback using `goquery` when feed descriptions are minimal
211- Configurable limits: articles per feed, maximum age, total articles
212- Token estimation and API usage logging
213- Environment variable support (`LLM_AGGREGATOR_API_KEY`) for authentication
214- Example feeds file with technology, programming, and free software sources
215
216### Changed
217
218- Program structure organised into standard Go layout: `cmd/`, `internal/`, `pkg/`
219- English spelling conventions maintained throughout (colour, initialise, summarise)
220- Error handling improved with specific messages for common API failures (invalid key, rate limits, etc.)
221- Progress reporting unified through a `ProgressContext` interface for both TUI and CLI modes
222
223### Fixed
224
225- Initial API endpoint mismatch (using `/responses` instead of `/chat/completions`)
226- Nil pointer dereferences when handling optional feed metadata (author, dates)
227- String repetition syntax errors in Go (replaced `"="*80` with `strings.Repeat`)
228- CLI help/version flag handling to show information without requiring other arguments
229- Type compatibility issues with `openai-go` v3 API (message parameters, token usage fields)