mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
0c4bcdbb86
* feat(reddit): subscribed command + expose id/created_utc/selftext on listing commands Adds `opencli reddit subscribed` to list the user's subscribed subreddits, mirroring `saved.js`'s cookie auth + AuthRequiredError pattern. Auto-paginates via `/subreddits/mine/subscriptions.json` (max 1000 subs, default 100). Also extends the JSON output of `popular` / `search` / `subreddit` with `id`, `created_utc`, `selftext` (and `author` on popular) — the table view stays clean (columns: unchanged), but `--format json` now surfaces fields needed for downstream content-recommendation tooling that filters by post age, dedupes by post id, or uses self-post bodies for embeddings. Tests: 4 new vitest cases for subscribed.js (happy / auth fail / HTTP / --limit truncation). All existing reddit tests still pass. Note on cli-manifest.json diff: the rebuild on fork/main drops 13 entries whose source files import lowercase `selectorError` from `@jackwener/opencli/errors` (the actual export is `SelectorError` — casing bug pre-existing in fork/main). Not introduced by this PR. * fix(reddit): harden subscribed listing contract * fix(reddit): require subreddit identity for subscriptions --------- Co-authored-by: jackwener <jakevingoo@gmail.com>