-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(roo): add versioned settings support with minPluginVersion gating #9934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Re-review complete for the latest changes on this pull request. No issues were identified in the new changes, and all related tests are passing.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
|
The old clients are still looking for |
See if that last commit works. |
Add ability to gate model settings behind minimum plugin versions.
Settings from the Roo API can now be either direct values or wrapped
with { value: T, minPluginVersion: string } to conditionally apply
based on the extension version.
- Add versionedSettings.ts with semver comparison utilities
- Add resolveVersionedSettings() to process versioned values
- Update getRooModels() to resolve versioned settings
- Add comprehensive tests for all utility functions
…lity Address review feedback from @mrubens: Old clients expect plain values in the settings field (e.g., includedTools as array of strings). Changes: - Add new versionedSettings field to RooModelSchema for version-gated values - Keep settings field for plain values (backward compatible with old clients) - New clients read from both fields: settings first, then overlay versionedSettings - Update documentation to clarify the two-field approach - Add tests for versionedSettings overlay behavior
ceb0be7 to
c28d8ea
Compare
Based on mrubens' review feedback:
- Restructure versionedSettings to use version number as the key instead of
having minPluginVersion on each setting value
- Use semver-compare library instead of custom compareSemver function
- Add findHighestMatchingVersion() to find the highest version <= current
extension version
- Make versionedSettings independent - use the highest versioned setting
that's <= current version, OR fall back to plain settings if none match
New structure:
versionedSettings: {
'3.36.4': {
includedTools: ['search_replace'],
excludedTools: ['apply_diff'],
},
'3.35.0': { ... },
}
The resolver finds the highest version key <= current plugin version and uses
those settings entirely. If no version matches, falls back to plain settings.
Changes Made in Response to @mrubens ReviewAddressed all review comments: 1. Restructured versionedSettings to use version as the keyThe new structure uses the version number as the key instead of having versionedSettings: {
'3.36.4': {
includedTools: ['search_replace'],
excludedTools: ['apply_diff'],
},
'3.35.0': { ... },
}2. Added semver-compare libraryReplaced the custom 3. Added logic to find highest version <= currentAdded 4. Made versionedSettings independentThe versioned settings are now independent - the resolver finds the highest matching version and uses those settings entirely. If no version matches, falls back to plain All local tests pass (4603 tests). CI checks are running. |
Summary
Add the ability to gate model settings behind minimum plugin versions for the Roo provider. Settings from the Roo Code Cloud API can now be either direct values or wrapped with
{ value: T, minPluginVersion: string }to conditionally apply based on the extension version.This enables the API to ship new features that only activate on newer plugin versions, providing backward compatibility while allowing gradual feature rollouts.
Changes
versionedSettings.tswith:isVersionedValue()- Type guard to detect versioned value objectscompareSemver()- Compares two semantic version stringsmeetsMinimumVersion()- Checks if current version meets minimum requirementresolveVersionedSettings()- Resolves versioned settings based on current plugin versiongetRooModels()inroo.tsto resolve versioned settings before applying to model infoUsage Example
Settings from the API can be in either format:
Important
Adds versioned settings support to Roo provider with minimum plugin version gating, including utility functions and tests.
versionedSettings.tswith functions likeisVersionedValue(),compareSemver(),meetsMinimumVersion(), andresolveVersionedSettings().getRooModels()inroo.tsto resolve versioned settings before applying to model info.versionedSettings.spec.tsto cover utility functions.roo.spec.tsto verify versioned settings application.semver-compareand@types/semver-comparetopackage.jsondependencies.This description was created by
for 3783869. You can customize this summary. It will automatically update as commits are pushed.