Skip to content

fix(cli): add dry run for agent copy#350

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-agent-copy-dry-run
Open

fix(cli): add dry run for agent copy#350
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-agent-copy-dry-run

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Adds a preview-only path for cortex agent copy.

Bounty issue: PlatformNetwork/bounty-challenge#53089

Changes:

  • Add --dry-run to CopyArgs.
  • Let dry-run pass destination-exists checks and report whether --force would be required.
  • Print resolved source/destination and existence/force status without creating the agents directory or writing the destination file.
  • Keep normal copy behavior unchanged.
  • Fix the current main read_file_with_encoding test import so agent command tests compile.

Validation:

  • cargo +stable fmt --package cortex-cli --check
  • cargo +stable test --package cortex-cli agent_cmd::tests::tests::test_copy_args_dry_run -- --nocapture
  • cargo +stable test --package cortex-cli agent_cmd::tests -- --nocapture
  • cargo +stable check --package cortex-cli --lib
  • cargo +stable build --package cortex-cli --bin Cortex
  • real CLI smoke for help text, dry-run output, no destination file write, and existing-destination Force required: yes
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

1 participant