Skip to content

Conversation

FraserKillip
Copy link

Solves #61

@intellectronica
Copy link
Owner

@FraserKillip thanks for the contribution 🙏 Are you OK to fix the linting errors so that we can land this?

@intellectronica intellectronica requested a review from Copilot July 22, 2025 07:02
@intellectronica
Copy link
Owner

This

 if (!agentConfig?.disableBackup) {
    await backupFile(output);
 }

is now repeated so many times across all agents.

Surely we can find a way to implement this that only checks once.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a --disable-backup CLI option to prevent creation of .bak backup files when applying agent configurations, addressing issue #61 by providing users control over backup file generation.

  • Adds disableBackup parameter throughout the configuration chain from CLI to individual agents
  • Updates all agent implementations to conditionally skip backup creation when flag is enabled
  • Includes comprehensive test coverage for the new functionality across all agent types

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/cli/commands.ts Adds the --disable-backup CLI option and passes it to the apply function
src/lib.ts Propagates the disableBackup flag from CLI to agent configurations
src/agents/IAgent.ts Extends the IAgentConfig interface to include the disableBackup option
src/agents/*.ts Updates all agent implementations to conditionally skip backup creation
tests/unit/agents/AgentAdapters.test.ts Adds comprehensive test coverage for backup disabling functionality
README.md Documents the new --disable-backup CLI option with usage examples

@FraserKillip
Copy link
Author

@FraserKillip thanks for the contribution 🙏 Are you OK to fix the linting errors so that we can land this?

@intellectronica 💯 will get this all tidied up. Might take me a couple days between priorities

@FraserKillip FraserKillip force-pushed the feature/disable-bak-file-issue-61 branch from a9ceba1 to 80d39e3 Compare August 8, 2025 08:12
@FraserKillip
Copy link
Author

@intellectronica I think this should be ready for re-review when you have the time :ty:

@intellectronica intellectronica moved this to Backlog in Ruler Aug 24, 2025
@intellectronica intellectronica removed this from Ruler Aug 24, 2025
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.

3 participants