-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Use actual configuration for policy export #270283
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
base: main
Are you sure you want to change the base?
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
@deepak1556Matched files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the policy export system from a build-time tree-sitter based approach to a runtime VS Code service with proper localization support. The refactoring enables more accurate policy generation by using actual configuration data rather than static code parsing.
Key changes:
- Replaces build-time tree-sitter policy parsing with runtime VS Code service
- Updates IPolicy interface to include category and localization properties
- Adds comprehensive unit tests for the new policy writer system
Reviewed Changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/vs/workbench/contrib/policyExport/electron-browser/policyExport.contribution.ts |
New workbench contribution that triggers policy export on startup when --export-policy-type flag is present |
src/vs/platform/policy/node/writer/policyWriterService.ts |
Core service implementing policy export logic with translation support and file writing |
src/vs/platform/policy/node/writer/policies/*.ts |
Policy type implementations (Boolean, Number, String, StringEnum, Object) extending BasePolicy |
src/vs/base/common/policy.ts |
Updated IPolicy interface with category enum and localization properties |
build/lib/policies.ts |
Removed old tree-sitter based policy extraction system |
.github/workflows/policy-check.yml |
New CI workflow to validate policy export functionality |
Overview
Validation
npx tsx build/lib/policies.ts
Output Differences
General
Code - OSS
->Code - OSS Dev
since now retrieving name from productService instead of product.json directlyChatMCP
-> defaults to noneTelemetryLevel
-> defaults to allChatAgentExtensionTools
now reuseschat.extensionToolsEnabled
instead of defining a duplicate stringPlatform: darwin
Platform: win32
ref: #257569