Commit Graph
3 Commits
Author SHA1 Message Date
kaitranntt d5f2acaa6e feat(hooks): add image/PDF analysis via CLIProxy transformer
Intercept Read tool calls for image/PDF files and route through CLIProxy
with gemini-2.5-flash for vision analysis. Returns text descriptions
instead of blocking, enabling Claude to "see" images via proxy.

Key changes:
- Add image-analyzer-transformer.cjs hook script
- Add ImageAnalysisConfig type and loader
- Add hook installer and profile injector
- Add prompt templates for analysis customization
- Add e2e test suite (excluded from normal CI runs)
- Configure test:e2e script for manual testing

Environment variables:
- CCS_IMAGE_ANALYSIS_ENABLED: Enable/disable (default: 1)
- CCS_IMAGE_ANALYSIS_MODEL: Vision model (default: gemini-2.5-flash)
- CCS_IMAGE_ANALYSIS_TIMEOUT: Timeout in seconds (default: 60)
- CCS_CLIPROXY_API_KEY: API key for CLIProxy auth
- CCS_CLIPROXY_PORT: CLIProxy port (default: 8317)

Closes #426
2026-02-03 20:34:05 -05:00
kaitranntt 5c83429a79 perf(tests): replace real network ops with mock infrastructure
- Add centralized mock infrastructure in tests/mocks/:
  - mock-fetch.ts: Bun native fetch interception
  - mock-http-server.ts: Fake server responses (no ports)
  - fixtures/responses.ts: Preset response constants
  - types.ts: Mock type definitions

- Refactor https-tunnel-proxy.test.ts:
  - Remove TEST_CERT constant (~50 lines)
  - Remove real HTTPS server creation
  - Use invalid hosts for error path testing
  - 26/26 tests pass in ~430ms

- Refactor remote-token-uploader.test.ts:
  - Replace 7 real HTTP servers with mockFetch
  - Reduce from 422 to 289 lines
  - 18/18 tests pass in ~120ms

- Add global test timeout (10s) in bunfig.toml

Test suite: 10+ min → 14 seconds
2026-01-23 23:35:17 -05:00
kaitranntt c3f72e6693 chore: add bunfig.toml and update gitignore for test config
- add bunfig.toml to scope bun test to ./tests/ only
- add ui test output directory to gitignore
- separates main (bun test) and UI (vitest) test runners
2025-12-21 03:29:12 -05:00