Conversation
Adds `codeflash auth login` CLI subcommand that performs the full OAuth PKCE flow, prints the authentication URL, and saves the API key. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @aseembits93's task in 4m 9s —— View job PR Review Summary
Prek ChecksAll checks pass ( Code ReviewBug: Two tests were failing — Fixed and pushed (commit Minor observation (
Duplicate DetectionNo duplicates detected. Test Coverage7 tests added covering all major code paths in Last updated: 2026-03-25 |
⚡️ Codeflash found optimizations for this PR📄 1,583% (15.83x) speedup for
|
The optimization removed redundant operations that duplicated logic already inside `save_api_key_to_rc`. Previously, `auth_login` called `get_shell_rc_path()` (which performs `Path.home()` filesystem operations) and conditionally invoked `shell_rc_path.touch()` on Windows, then passed the result to `save_api_key_to_rc`. The optimized version calls `save_api_key_to_rc(api_key)` directly, because that function already internally calls `get_shell_rc_path()` and safely handles file creation via context managers. Line profiler shows `get_shell_rc_path()` dropped from ~1 ms to negligible per-call overhead, and `shell_rc_path.touch()` overhead was eliminated entirely. Runtime improved from 19 ms to 1.13 ms (1582% speedup) with no regressions across all test scenarios.
…gin-mn55wrey ⚡️ Speed up function `auth_login` by 1,583%
Co-authored-by: Aseem Saxena <undefined@users.noreply.github.com>
Summary
codeflash auth loginCLI subcommand for standalone OAuth authenticationTest plan
auth_login()code paths (existing key, OSError, OAuth failure, success, Windows RC creation)auth loginand bareauthuv run prekpasses on all changed files🤖 Generated with Claude Code