Skip to content

feat: add --with-status flag to load#24

Open
Chaitanya-Keyal wants to merge 1 commit into
midhunmonachan:mainfrom
Chaitanya-Keyal:feat/load-with-status
Open

feat: add --with-status flag to load#24
Chaitanya-Keyal wants to merge 1 commit into
midhunmonachan:mainfrom
Chaitanya-Keyal:feat/load-with-status

Conversation

@Chaitanya-Keyal

Copy link
Copy Markdown

Fixes #23

This pull request adds a new --with-status flag to the codex-profiles load command, allowing users to display the status of a loaded profile immediately after loading. The implementation includes both CLI and JSON output support, robust error handling for status retrieval failures, and thorough test coverage for the new functionality.

Implementation Details

  • Added a --with-status flag to the codex-profiles load command, updating the CLI help text and documentation to reflect this new option.
  • Modified the load_profile logic in src/profiles.rs and its invocation to accept and handle the with_status flag, displaying the profile status after loading when requested. This includes both human-readable and JSON output modes, with error handling for status retrieval failures.
  • Refactored status rendering logic by extracting render_entry_details for improved code clarity and reuse.

Test coverage

  • Added tests for the new --with-status flag, verifying both successful status display and graceful handling of status retrieval failures in CLI and JSON output modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add --with-status flag to load

1 participant