This repository was archived by the owner on May 15, 2026. It is now read-only.
feat: add cloud environment detection utilities (CLO-646) - #11051
Closed
ghost wants to merge 1 commit into
Closed
Conversation
- Add cloud-environment.ts with utilities to detect cloud and preview environments - Add isCloudEnvironment() to check if running in Roo Code Cloud - Add getAppEnvironment() to get the app environment (development/preview/production) - Add isPreviewEnvironment(), isProductionEnvironment(), isDevelopmentEnvironment() helpers - Add comprehensive tests for all utilities This enables features to behave differently based on the cloud deployment environment, such as detecting preview environments.
Author
Reviewed the cloud environment detection utilities. The implementation is clean, well-documented, and properly tested.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
This PR is part of Linear issue CLO-646: Make cloud agents aware of preview environments.
Description
Adds cloud environment detection utilities to enable the Roo Code extension to detect when it is running in a preview environment (Roo Code Cloud) and adjust behavior accordingly.
Key changes:
src/shared/cloud-environment.tswith utility functions:isCloudEnvironment()- checks if running in Roo Code Cloud viaROO_CODE_IPC_SOCKET_PATHgetAppEnvironment()- returns the app environment (development/preview/production) fromROO_CODE_APP_ENVisPreviewEnvironment(),isProductionEnvironment(),isDevelopmentEnvironment()- convenience helpersRelated PR:
ROO_CODE_APP_ENVfrom cloud infrastructure to the extensionTest Procedure
cd src && npx vitest run shared/__tests__/cloud-environment.spec.tsPre-Submission Checklist
Documentation Updates
Additional Notes
This is part of a two-PR set:
ROO_CODE_APP_ENVfrom SDK through worker to VS CodeBoth PRs should be deployed together for the full feature to work.
Important
Add utilities in
cloud-environment.tsfor detecting cloud environments and app environments, with comprehensive tests incloud-environment.spec.ts.isCloudEnvironment(): Checks forROO_CODE_IPC_SOCKET_PATHto determine cloud environment.getAppEnvironment(): Returns app environment fromROO_CODE_APP_ENV.isPreviewEnvironment(),isProductionEnvironment(),isDevelopmentEnvironment(): Helper functions for specific environments.cloud-environment.spec.tswith 18 test cases covering all utility functions and edge cases.This description was created by
for 15b0124. You can customize this summary. It will automatically update as commits are pushed.