Skip to content

Comments

feat(providers): add Kilo and Roo Code provider support#11

Merged
TonyCasey merged 1 commit intomainfrom
fix/install-issue
Nov 12, 2025
Merged

feat(providers): add Kilo and Roo Code provider support#11
TonyCasey merged 1 commit intomainfrom
fix/install-issue

Conversation

@TonyCasey
Copy link
Owner

@TonyCasey TonyCasey commented Nov 12, 2025

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Resolved an issue where tool configuration files would not refresh correctly during manager updates.

- Implemented `KiloProvider` and `RooProvider` classes to handle `.kilocode/` and `.roo/` configuration setups.
- Updated provider factory to include new tools, resolving "Unknown tool" errors.
- Added comprehensive unit tests for `createProvider` and `setupTool` functionality.
- Bumped version to `2.00.1`.
@coderabbitai
Copy link

coderabbitai bot commented Nov 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Two new provider classes, KiloProvider and RooProvider, are introduced to handle dedicated tool configurations. The factory pattern is extended to instantiate these providers by tool name, and tests verify correct provider instantiation and config.json copying. Version bumped to 2.00.1.

Changes

Cohort / File(s) Change Summary
New Provider Implementations
lib/providers/kilo-provider.js, lib/providers/roo-provider.js
Introduce KiloProvider and RooProvider classes extending BaseProvider, each implementing setupSettings() to copy config.json templates into respective hidden directories (.kilocode/ and .roo/).
Provider Factory Updates
lib/providers/index.js
Import KiloProvider and RooProvider; extend createProvider factory to handle 'kilo' and 'roo' tool names; export both new providers.
Test Coverage
__tests__/lib/providers/index.test.js
Add comprehensive tests verifying correct provider instantiation and setupTool behaviour, including config.json copying and file preservation via mock filesystem.
Metadata & Documentation
package.json, CHANGELOG.md
Bump version to 2.00.1; document fix for Unknown tool errors by wiring dedicated providers for configuration refresh.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant Factory as createProvider
    participant Provider as KiloProvider/RooProvider
    participant Template as Template Directory
    participant Project as Project Hidden Dir
    
    Caller->>Factory: createProvider('kilo' | 'roo', ...)
    Factory->>Provider: new KiloProvider/RooProvider(projectRoot, templatesDir, options)
    Provider->>Provider: super('kilocode'/'roo', 'Kilo Code'/'Roo Code', ...)
    Caller->>Provider: setupSettings()
    Provider->>Template: copyFileFromTemplate('config.json')
    Template-->>Project: config.json with rulesDirectory
    Project-->>Provider: file copied & preserved
    Provider-->>Caller: {success: true}
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

  • Key areas requiring attention:
    • Verify KiloProvider and RooProvider correctly extend BaseProvider and call super() with appropriate identifiers and display names
    • Confirm setupSettings() implementations use copyFileFromTemplate() correctly and target the right hidden directories (.kilocode/ vs .roo/)
    • Validate test assertions for file content preservation and rulesDirectory field configurability
    • Check factory pattern extension in index.js handles all tool names appropriately

Poem

🐰 Two providers hop into place,
Kilo and Roo, they've found their base,
With config templates tucked away tight,
Hidden directories now set just right,
🎉 The factory wires them up so neat!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/install-issue

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 733e17e and 555b04e.

📒 Files selected for processing (6)
  • CHANGELOG.md (1 hunks)
  • __tests__/lib/providers/index.test.js (1 hunks)
  • lib/providers/index.js (3 hunks)
  • lib/providers/kilo-provider.js (1 hunks)
  • lib/providers/roo-provider.js (1 hunks)
  • package.json (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TonyCasey TonyCasey merged commit ed9a764 into main Nov 12, 2025
2 of 3 checks passed
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 12, 2025

Greptile Overview

Greptile Summary

Adds support for Kilo Code and Roo Code AI assistants by implementing two new provider classes that follow the existing BaseProvider pattern.

Key Changes:

  • Implements KiloProvider (lib/providers/kilo-provider.js) and RooProvider (lib/providers/roo-provider.js) that extend BaseProvider
  • Updates provider factory in lib/providers/index.js to include 'kilo' and 'roo' cases, resolving "Unknown tool" errors when users select these tools during setup
  • Adds comprehensive unit tests covering factory instantiation and config file copying
  • Updates CHANGELOG.md to document the bug fix
  • Bumps version from 2.00.0 to 2.00.1

Implementation Quality:
Both new providers are minimal, clean implementations that delegate to BaseProvider.copyFileFromTemplate('config.json') for setup. The pattern is consistent with the existing codebase architecture and properly exports the new classes in the module exports. Templates already exist at templates/kilocode/config.json and templates/roo/config.json, so the implementation will work correctly.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation is straightforward, follows established patterns perfectly, includes proper test coverage, and fixes a legitimate bug. Both providers correctly extend BaseProvider, use the proper constructor pattern with directory names ('kilocode' and 'roo'), and are properly wired into the factory. The templates exist and are valid JSON. No breaking changes or security concerns.
  • No files require special attention

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as setup-command.js
    participant Factory as providers/index.js
    participant Provider as KiloProvider/RooProvider
    participant Base as BaseProvider
    participant FS as File System

    User->>CLI: ai-dotfiles-manager setup
    CLI->>User: Prompt: Select AI tools
    User->>CLI: Select "Kilo Code" or "Roo Code"
    
    CLI->>Factory: setupTool('kilo', projectRoot, templatesDir)
    Factory->>Factory: createProvider('kilo', ...)
    
    alt Tool is 'kilo'
        Factory->>Provider: new KiloProvider(projectRoot, templatesDir)
        Provider->>Base: super('kilocode', 'Kilo Code', ...)
    else Tool is 'roo'
        Factory->>Provider: new RooProvider(projectRoot, templatesDir)
        Provider->>Base: super('roo', 'Roo Code', ...)
    end
    
    Base-->>Provider: Initialize config paths
    Provider-->>Factory: Return provider instance
    
    Factory->>Provider: provider.setup()
    Provider->>Base: setup() (template method)
    Base->>Base: handleExistingConfig()
    Base->>Provider: setupSettings()
    Provider->>Base: copyFileFromTemplate('config.json')
    Base->>FS: Copy templates/{kilocode|roo}/config.json
    FS->>Base: Copy complete
    Base-->>Provider: Setup complete
    Provider-->>Factory: { success: true }
    Factory-->>CLI: Setup result
    CLI->>User: ✓ Kilo Code/Roo Code configuration set up
Loading

Copy link
Contributor

@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.

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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