* Add merge script for extension configuration policies from distro
Adds build/lib/policies/mergeExtensionPolicies.ts which fetches the
distro's product.json (at the commit pinned in package.json) and merges
extensionConfigurationPolicy entries into policyData.jsonc.
The --export-policy-data step only captures policies from the OSS
configuration registry. Extension policies (e.g., Copilot settings)
are defined in vscode-distro's product.json and are not available in
the OSS dev build. This merge script bridges that gap.
Workflow: ./scripts/code.sh --export-policy-data && node build/lib/policies/mergeExtensionPolicies.ts
Also updates:
- policyExport integration test to run the merge step
- add-policy skill documentation with extension policy lifecycle
* Simplify extension policy format: drop localization block from distro
- mergeExtensionPolicies.ts now reads only description/category from
the distro and synthesizes localization key/value pairs internally
- Integration test gracefully skips merge step when distro is unavailable
- Updated SKILL.md to document the simplified distro format
* docs: use gh auth token in policy export command
* Handle old distro format missing description/category fields
* docs: add troubleshooting section for merge step in policy skill
* Require description and category fields in extension policy entries
* Add extension configuration policies to policyData.jsonc
* Address PR feedback: fix disclaimer, log targetPath, strip GITHUB_TOKEN from test
* fix: revert extension policies from policyData.jsonc, remove console.log from test
Extension policies should only be added after the distro PR merges.
Test runner disallows console output in tests.
* Add mock distro test for mergeExtensionPolicies, remove merge from export test
- mergeExtensionPolicies.ts: add DISTRO_PRODUCT_JSON env var to
override the distro path (for testing without private repo access)
- New test: creates a mock product.json, runs the merge script,
verifies policies are added correctly and idempotently
- Export test: no longer runs the merge step (avoids needing
distro access or GITHUB_TOKEN in CI)
* Update distro and regenerate policyData.jsonc with extension policies
* Fix CI: add extension policy fixture for export test
The export test now runs mergeExtensionPolicies using a checked-in
fixture file instead of requiring distro access or GITHUB_TOKEN.
When extension policies change in the distro, regenerate both
policyData.jsonc and the fixture file.
* Integrate extension policy merge into --export-policy-data
- Removed mergeExtensionPolicies.ts — no separate CLI tool needed
- --export-policy-data now reads build/lib/policies/extensionPolicies.json
and merges extension policies into the output automatically
- Single command workflow: ./scripts/code.sh --export-policy-data
- Simplified test — no merge step, no GITHUB_TOKEN, no distro access
- Updated SKILL.md to document the simplified workflow
* Dynamic distro reading: --export-policy-data fetches from distro directly
- policyExport.contribution.ts reads distro product.json dynamically:
1. DISTRO_PRODUCT_JSON env var (for testing)
2. .build/distro/mixin/stable/product.json (local checkout)
3. GitHub API with GITHUB_TOKEN (remote fetch)
- New scripts/export-policy-data.sh wrapper: sets up GITHUB_TOKEN
via gh CLI and runs the export
- Deleted build/lib/policies/extensionPolicies.json (no static copy)
- Test uses DISTRO_PRODUCT_JSON with a fixture file
- Uses sandbox process.env and VSBuffer (renderer-safe)
* Replace bash wrapper with cross-platform TS script
- New build/lib/policies/exportPolicyData.ts: handles transpilation,
GITHUB_TOKEN setup via gh CLI, and runs --export-policy-data
- Added 'npm run export-policy-data' script to package.json
- Removed scripts/export-policy-data.sh
- Updated SKILL.md and test error message
* Use OAuth device flow for GitHub token acquisition
exportPolicyData.ts now acquires tokens via:
1. GITHUB_TOKEN env var (if set)
2. gh CLI (fast, non-interactive)
3. GitHub OAuth device flow (interactive, no dependencies)
Based on vscode-copilot-chat's getToken.mts pattern.
* Fix error messages to reference npm run export-policy-data
* Fix disclaimer to reference npm run export-policy-data, clean up stale refs
* Clarify test fixture is static and not expected to track distro changes
* Add inline comment in test clarifying fixture is static
* SKILL.md: add step to update distro commit hash in package.json
* Remove inline comment per PR feedback
* Remove local .build/distro/ fallback path per PR feedback
* feat: hide hardcoded CLI/Claude harnesses when providerApi is enabled
When `chat.customizations.providerApi.enabled` is true, the browser
harness service now only registers the Local (VS Code) harness statically.
All additional harnesses are expected to come from extensions via the
provider API rather than the hardcoded built-ins.
- CustomizationHarnessService reads the providerApi setting at construction
time and only includes CLI/Claude harnesses when the setting is off
- Simplify _getAllHarnesses(): external harnesses no longer shadow static
ones with the same id (the overlap case can't happen when providerApi is
on and only Local is registered)
- Simplify registerExternalHarness dispose: drop the 'restored static
harness' fallback guard — always fall back to first available harness
- Remove tests that verified the now-deleted external-overrides-static
behaviour
* fix: extension menu contributions now evaluated for the hooks section
buildCreateActions() had an early 'return actions' for the hooks code
path that exited before the extension menu contribution check. This meant
extensions contributing to chat/customizations/create with a
'aiCustomizationManagementSection == hooks' when-clause were silently
ignored.
Move the AICustomizationManagementCreateMenuId evaluation (and its
'if (extensionCreateActions.length > 0) return extensionCreateActions'
short-circuit) to immediately after the commandId override check and
before the hooks-specific block, so extension-contributed actions take
precedence for all section types including hooks.
* Sessions: Add Copilot status indicator to sidebar footer
Add a Copilot status button to the AccountWidget in the sessions app
sidebar footer. The button shows the current Copilot status icon and
opens a ChatStatusDashboard hover popup on click.
- Add per-section disable options to ChatStatusDashboard to control
which sections render (disableInlineSuggestionsSettings,
disableModelSelection, disableProviderOptions,
disableCompletionsSnooze, disableContributions)
- Copilot status button is hidden when the update button is visible
- Status icon updates based on entitlement, sessions, and quota state
- Scoped CSS overrides for dashboard popup in sessions context
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Copilot status button accessibility and disposable leak
- Set aria-label on the Copilot status button so screen readers
announce the current status tooltip
- Track dashboard DisposableStore via MutableDisposable registered
on the widget, ensuring cleanup on widget disposal or re-click
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove native tooltip from Copilot status button
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add chat model reference inspection (Written by Copilot)
* Add archive state and age to chat model inspection (Written by Copilot)
* fix import
* Cleanups
* test