#99

feat: local prompt caching (opt-in disk cache + ai cache commands)

Openmoah0911wants to merge intofrom

Closes #98

Opt-in disk cache for ai text|image|video|audio|evaluate.

  • New src/lib/cache.ts (hash sha256(model+prompt+system+images+options+apiKey), ~/.cache/ai-cli via XDG_CACHE_HOME/AI_CLI_CACHE_DIR, TTL 7d via AI_CLI_CACHE_TTL, LRU prune, apiKey isolation, never cache failures)
  • New ai cache status/clear/prune/path at src/commands/cache.ts registered at src/index.ts
  • Wire --cache/--no-cache/--cache-ttl into all generation commands
  • Docs: packages/ai-cli/README.md, apps/web/docs/configuration.mdx, new apps/web/docs/cache.mdx; release 0.5.3 CHANGELOG.md

Verified bun test 257 pass, bunx tsc --noEmit clean, help shows cache.

Fork branch moah0911/ai-cli:feat/prompt-cache.

Activity

6
vercel[bot]1mo ago

@moah0911 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot]reviewed1mo ago
vercel[bot]reviewed1mo ago
vercel[bot]reviewed1mo ago