Set WI runtime to context - #1423
Conversation
WalkthroughExtension activation now sets VS Code context flag ChangesRuntime Context Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@wi/wi-extension/src/extension.ts`:
- Around line 119-120: The call to vscode.commands.executeCommand('setContext',
'WI.isWiRuntime', ...) is not awaited, so the context may not be applied before
ProductUpdateServiceClient is constructed; make the surrounding function async
(if not already) and await vscode.commands.executeCommand(...) or chain a
.then() so that ProductUpdateServiceClient instantiation happens only after the
promise resolves (refer to vscode.commands.executeCommand and
ProductUpdateServiceClient in the diff).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a3c50815-cca3-4e54-b2a0-5c40179fa366
📒 Files selected for processing (1)
wi/wi-extension/src/extension.ts
Set WI runtime to context
Purpose
Related wso2/vscode-extensions#2196
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning
Summary by CodeRabbit