ITADN

Enhance CLI diagnostics and startup

#115Pull Requestobrmao 创建于 2025-05-24
O
obrmaocommented
This commit improves the startup experience and diagnostic capabilities of the gpt-cli. Key changes: - Improved API Key Error Message: The error message displayed when no OpenAI API key is found is now more user-friendly. It provides clearer instructions on how to set the API key, including mentioning specific configuration file paths (`~/.config/gpt-cli/gpt.yml` or `~/.gptrc`) and the `OPENAI_API_KEY` environment variable. It also suggests creating a configuration file if one doesn't exist. - Configuration Loading Logging: Basic logging has been added to the configuration loading process. The CLI now logs whether a configuration file is being used (and its path) or if no configuration file is found (in which case, it defaults to environment variables). This will help you diagnose issues related to configuration loading. - Unit Tests: Added unit tests for the new error messaging and logging to ensure they function as expected and to prevent regressions.
合并状态:未合并 0 条评论