- Add message count header ("Thread contains N message(s)") so users
know upfront how many messages to expect
- Add clear message separators with position (=== Message 1/8: id ===)
- Strip HTML <script> and <style> blocks before removing tags
- Use rune-based truncation to avoid breaking multi-byte UTF-8 chars
- Truncate long message bodies to 500 chars for cleaner output
- Add comprehensive unit tests for stripHTMLTags function
Fixes issue where threads with many messages or HTML content would
produce overwhelming output that could get truncated.
This adds a new `gmail thread modify` subcommand that uses the Gmail API's
Threads.Modify endpoint to apply label changes to all messages in a thread
at once.
Usage:
gog gmail thread modify <threadId> --add "Label1,Label2" --remove "Label3"
Features:
- Resolves label names to IDs automatically
- Supports both adding and removing labels in a single operation
- JSON output mode for programmatic use
BREAKING CHANGE: The `gmail thread` command is now a parent command with
subcommands. Use `gmail thread get <id>` instead of `gmail thread <id>`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>