Commit Graph
4 Commits
Author SHA1 Message Date
weishu 1b99c9422b fix: handle underscores in project path generation
Add underscore to the regex pattern in getProjectPath to ensure underscores
are replaced with hyphens, along with existing handling for slashes, colons,
and dots. Includes test case for paths with underscores.
2025-12-17 20:00:35 +08:00
weishu a696cafdd4 refactor: remove macOS caffeinate sleep prevention functionality 2025-12-17 15:59:50 +08:00
weishu c2b886896b feat: add interactive CLI token configuration with settings persistence
Implements comprehensive token management with intelligent priority resolution.
Token sources (highest to lowest priority): environment variable, settings file,
interactive prompt. Changes include:

- Updated home directory from ~/.happy to ~/.config/hapi (env var: HAPI_HOME_DIR)
- Added cliApiToken field to Settings interface for persistent storage
- Made cliApiToken mutable in Configuration class (private field with getter/setter)
- Created ui/tokenInit.ts module for token initialization with fallback prompt
- Enhanced auth command: login (interactive input), logout (clear token), status (show source)
- Updated doctor command to correctly identify token source and mask saved token in output
- Token initialization called early in startup flow to ensure availability before API use
2025-12-16 21:54:55 +08:00
weishu b4654acb92 init 2025-12-16 15:03:50 +08:00