all repos — llm_aggregator @ 4606d779c74690e4871c7f038cef0b43c93b6788

A CLI tool to aggregate RSS feeds and summarise them with LLMs

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.6.0] - 2026-04-22
 10
 11### Added
 12
 13- **Comprehensive unit test suite**, including CLI argument tests
 14  (`--feeds-file`, `--prompt`, `--api-key`, `--model`, `--base-url`),
 15  configuration tests, aggregator tests, output formatter tests, processor
 16  tests and defaults tests.
 17- **`--base-url` CLI option**: configure custom API endpoints for different LLM
 18  providers. Should support any OpenAI-compatible provider.
 19  - Environment variable: `LLM_AGGREGATOR_BASE_URL`
 20- `internal/defaults` package
 21- `docs/TESTING.md` which contains a comprehensive testing guide with test
 22  descriptions
 23
 24### Changed
 25
 26- **Configuration defaults**: All packages now use `defaults.Default*` constants
 27  - `internal/config`: Uses `defaults.Default*` for default values
 28  - `internal/runtime`: Uses `defaults.Default*` for runtime defaults
 29  - `internal/llm`: Uses `defaults.Default*` for LLM client defaults
 30
 31### Fixed
 32
 33- `nil` pointer safety in aggregator
 34  - Added nil checks for `progressCtx` across all log statements
 35  - `FeedAggregator` now works correctly when progress context is nil
 36  - Tests use `NewFeedAggregatorWithProgress` with explicit progress context
 37
 38## [0.5.0] - 2026-04-22
 39
 40### Added
 41
 42- **Accurate token counting with tiktoken**
 43  - New `internal/tokeniser` package using OpenAI's tiktoken-go library
 44  - BPE tokenisation for accurate token counting vs rough character estimation
 45  - Encoding caching to avoid repeated initialisation overhead
 46  - Model-aware encoding selection (cl100k_base, o200k_base, etc.)
 47  - `CountTokens()` and `CountMessagesTokens()` functions
 48  - Fallback to rough estimation when tiktoken initialisation fails
 49- **Concurrent feed fetching**: Feeds are now fetched concurrently using
 50  `golang.org/x/sync/errgroup`
 51  - Semaphore limits concurrent requests to 10 to avoid server overload
 52  - Mutex-protected shared state for thread-safe article collection
 53  - Partial failures don't stop other feeds from being processed
 54- **Scrollable summary in TUI**
 55  - Bubble Tea viewport component for browsing long summaries
 56  - Keyboard navigation: j/k or arrows (scroll), Space/B (page), g/G
 57  (start/end)
 58  - Mouse wheel scrolling support
 59  - Scroll progress indicator showing position and total lines
 60
 61### Changed
 62
 63- **Streamlined configuration management**: Viper now uses global instance with
 64automatic precedence handling. Simplified configuration flow: Parse → GetViper
 65→ BindCLIArgs → ViperToRuntime
 66- **TUI colour scheme**: All hex colour codes replaced with ANSI 256-colour
 67  palette
 68
 69### Fixed
 70
 71- Viewport now properly handles scroll events via `Update()`. Summary content
 72  pre-wrapped to viewport width before display
 73- Fixed string literal colour names to use actual variables
 74
 75## [0.4.0] - 2026-04-21
 76
 77### Changed 
 78
 79- **TUI is now fully functional and production-ready**: Replaced the
 80work-in-progress TUI implementation with a robust Bubble Tea command pattern:
 81  - Runtime execution now uses native `tea.Cmd` instead of manual goroutine
 82  orchestration.
 83  - Added real-time progress updates via `progress.Progress` interface with
 84  stage, substage, and article count messages.
 85  - TUI displays a spinner, elapsed time, and final summary inline.
 86  - Removed signal handling and channel synchronisation in favour of Bubble
 87  Tea's built-in lifecycle.
 88  - `TUIProgress` now only sends messages to an existing program, simplifying
 89  integration.
 90  - Both verbose mode (`SimpleLogger`) and TUI mode share the same
 91  `progress.Progress` interface.
 92
 93## [0.3.0] - 2026-04-21
 94
 95### Added
 96
 97- **Configuration file support via TOML** (XDG-compliant and cross-platform)
 98  - Load settings from `~/.config/llm_aggregator/config.toml`
 99  - Supports all aggregation, API, and output options
100  - Example configuration file at `configs/config.example.toml`
101- **Environment variable support with `LLM_AGGREGATOR_` prefix**
102  - All configuration options can be set via environment variables
103  - Precedence order: CLI arguments > environment variables > config file >
104  built‑in defaults
105- New `internal/config` package with Viper integration
106  - `Load()` and `Save()` methods for configuration management
107  - `GetConfigPath()` for XDG‑compliant config file location
108  - `ConfigExists()` to check for existing configuration
109- Comprehensive unit tests for configuration loading, saving, and environment
110  variable precedence (`internal/config/config_test.go`)
111
112### Changed
113
114- **Environment variable renamed:** `DEEPSEEK_API_KEY`115  `LLM_AGGREGATOR_API_KEY`
116- **CLI help text** now reflects the new API key environment variable and
117  general configuration options
118- **Command‑line argument precedence** implemented in `cmd/llm_aggregator.go`
119via `applyConfiguration()`
120- Updated all help text, documentation, and code references
121- `README.md` completely revised with a new "Configuration" section
122
123### Removed
124
125- Global `QuietMode` and `VerboseMode` variables from
126`internal/config/config.go`. Replaced by runtime‑specific configuration in
127`runtime.Runtime` and CLI arguments
128- Hardcoded system prompt in `runtime.NewRuntime()`. Now left empty, allowing
129configuration or client default to be used
130- CLI flags now correctly override config file and environment variables
131
132## [0.2.0] - 2026-04-21
133
134### Changed
135
136- Moved all progress and status messages behind `-v/--verbose` flag
137- Default CLI mode is now silent except for final output and errors
138- Components (aggregator, processor, LLM client) use logger interface
139controlled by verbose flag
140
141## [0.1.0] - 2026-04-21
142
143### Added
144
145- Complete translation from Python prototype to Go implementation
146- RSS/Atom feed parsing using `gofeed` library
147- DeepSeek API integration via `openai-go` client, configured for `/chat/completions` endpoint
148- Content filtering and processing with keyword‑based include/exclude, date filtering, and sorting
149- Command‑line interface using `go‑arg` with automatic help and version flags
150- Multiple output formats: plain text, GitHub‑flavoured markdown, and JSON
151- Terminal user interface (TUI) built with `bubbletea` featuring:
152  - Animated progress bar with gradient colours (`#FF7CCB` to `#FDFF8C`)
153  - Live article counters (aggregated/processed)
154  - Elapsed time display
155  - Coloured status indicators using `lipgloss` styling
156  - Keyboard controls (q/Ctrl+C to quit)
157- Web content extraction fallback using `goquery` when feed descriptions are minimal
158- Configurable limits: articles per feed, maximum age, total articles
159- Token estimation and API usage logging
160- Environment variable support (`LLM_AGGREGATOR_API_KEY`) for authentication
161- Example feeds file with technology, programming, and free software sources
162
163### Changed
164
165- Program structure organised into standard Go layout: `cmd/`, `internal/`, `pkg/`
166- English spelling conventions maintained throughout (colour, initialise, summarise)
167- Error handling improved with specific messages for common API failures (invalid key, rate limits, etc.)
168- Progress reporting unified through a `ProgressContext` interface for both TUI and CLI modes
169
170### Fixed
171
172- Initial API endpoint mismatch (using `/responses` instead of `/chat/completions`)
173- Nil pointer dereferences when handling optional feed metadata (author, dates)
174- String repetition syntax errors in Go (replaced `"="*80` with `strings.Repeat`)
175- CLI help/version flag handling to show information without requiring other arguments
176- Type compatibility issues with `openai-go` v3 API (message parameters, token usage fields)