* 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
* Enable test/test-integration scripts to take file.test.ts arguments
The agent likes to use them this way, when it doesn't read the skill
Co-authored-by: Copilot <copilot@github.com>
* And this
* Fixes
* update
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
* Add argument parsing, suite filtering, and grep support to integration test scripts
- Add --run, --runGlob, --grep, --suite, and --help argument parsing
- --suite selects extension host test suites (comma-separated, glob patterns)
- --grep forwards test name filter to all runners via MOCHA_GREP env var
- Validate --suite filter matches at least one known suite
- Add MOCHA_GREP support to testrunner.js, CSS and HTML test runners
- Seed user settings to suppress dock bounce notifications
- Always apply *.integrationTest.js glob for node.js tests
- Add integration-tests skill documentation
* Address Copilot review feedback
- Quote cd $ROOT, rm -rf $VSCODEUSERDATADIR, rmdir %VSCODEUSERDATADIR%
- Quote --runGlob pattern to prevent premature glob expansion
- Use GREP_ARGS array for safe grep forwarding in .sh
- Use conditional call with proper quoting for grep in .bat
- Deduplicate suite list into KNOWN_SUITES variable
- Remove unused EXTRA_ARGS and ARGS variables from .bat
* Fix Windows CI: remove unnecessary enabledelayedexpansion
The original script used plain 'setlocal'. Adding 'enabledelayedexpansion'
may affect path resolution behavior on Windows CI. Since no delayed
expansion (\!var\!) syntax is used, revert to the original 'setlocal'.
* Fix Windows CI: capture %~dp0 before call :label corrupts it
In Windows batch, 'call :label' can change what %~dp0 resolves to.
Our should_run_suite subroutine uses 'call :should_run_suite', which
caused %~dp0 to resolve to the wrong directory for extension paths
that appear after the subroutine call. Capture the script directory
once at startup into %SCRIPT_DIR% and use it everywhere.
* feat: enhance AICustomizationListWidget with grouping and badge support for external customization items
* feat: add user data profile service and infer storage from URI in AICustomizationListWidget
* Copilot CLI session 8af2fd4a-10fe-4bba-b408-f1b90cebc8dc changes
* docs: add chatSessionCustomizationProvider API chain to customizations editor skill
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address PR review feedback
- Remove duplicate sectionToIcon, reuse getSectionIcon instance method
- Use Map for O(1) groupKey lookups instead of O(n²) includes/find
- Check active project root in inferStorageFromUri for Sessions window
- Set pluginUri on provider items and use it for storage inference
- Remove redundant plugin check from inferStorageFromUri (handled by caller)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Teach the fix-error workflow to read error construction code before
proposing fixes. Instead of hardcoding knowledge about specific error
types (e.g., listener leak categories), the AI is instructed to:
1. Search for where the error is constructed in the codebase
2. Read the surrounding code to understand conditions, categories, thresholds
3. Use that understanding to determine the correct fix strategy
Includes a listener leak example showing how reading ListenerLeakError
construction in event.ts reveals the dominated/popular classification.
Relates to #289777
* fix#304030: show custom agent names as-is without title-casing
formatDisplayName was converting dashes/underscores to spaces and
applying title case (e.g. nls-code-helper → Nls Code Helper). This
made names inconsistent between the customization view and the agent
dropdown. Now only strips .md extension, showing names exactly as
defined in frontmatter headers.
* fix#304131: show workspace-relative paths in customization tooltips
Workspace items now show paths relative to the project root (e.g.
.github/instructions/coding-standards.instructions.md) instead of
absolute paths (/Users/.../workspace/.github/...).
* fix#304133: show extension name instead of full path in tooltips
Extension items now show 'Extension: github.copilot-chat' in the
tooltip instead of the full filesystem path into the extension
directory. The extensionLabel is populated from the extensionIdByUri
map during item post-processing.
* fix#304178: use save icon instead of ambiguous checkmark
The editor save indicator now uses Codicon.save (floppy disk) instead
of Codicon.check (bare checkmark), making it clear that the indicator
is about save status rather than an enable/disable toggle.
* fix#304183: show user-scoped hooks in sessions window
HOOKS_FILTER excluded PromptsStorage.user, so hooks in
~/.copilot/hooks/ were filtered out in the sessions window (and
any harness using the restricted filter). User hooks are now
supported in CLI, so add user storage to the allowed sources.
* fix: improve list layout footer fallback and remove extension tooltip
- Use 80px footer height fallback instead of 0 when sectionHeader
has not rendered yet, preventing list from overlapping the footer
on first paint
- Wait for async section load in fixture before final layout
- Remove extensionLabel tooltip (implementation detail, not relevant
to users)
* fix#304178: show loading spinner before saved icon, remove green color
The save indicator now shows a spinning loading animation while the
file is being saved (onDidChangeDirty dirty→clean transition), then
switches to the save icon when the save completes (onDidSave). The
special green color was removed to use the default description
foreground color instead.
* fix: simplify list layout to use CSS flex instead of manual height calculation
All three list widgets (AICustomizationListWidget, McpListWidget,
PluginListWidget) now rely on CSS flex layout to distribute space
between search bar, list container, and footer. The layout() method
sets the widget height, clears any manual list container height,
and reads clientHeight (forcing a synchronous reflow) to get the
flex-computed height for the WorkbenchList.
This eliminates hardcoded fallback values, requestAnimationFrame
correction loops, and manual offsetHeight arithmetic that caused
the list to overlap the footer on first render.
* revert: drop save indicator icon changes (#304178)
Reverts the checkmark→save icon change, the loading spinner, and the
green color removal. The save indicator is back to the original
Codicon.check with green color — this will be addressed separately.
* fix: show Built-in/Extension name in tooltips, fix MCP scroll, hide copy path for built-in
- Built-in items show 'Built-in' in tooltip instead of file path
- Non-built-in extension items show 'Extension: {displayName}'
- Copy path context menu hidden for built-in items
- Fix MCP/Plugin scroll: fall back to passed height when container
is hidden (display:none → clientHeight=0), and re-layout when
section becomes visible via selectSectionById
- Remove unused resolveExtensionGroupKey method
* fix: use explicit height calculation for list layout instead of flex clientHeight
The flex-based clientHeight approach was unreliable — reflow timing
varied between the component explorer and the real product, causing
the list to clip behind the footer at certain window sizes.
Reverts to explicit height calculation by measuring sibling elements
(search bar, footer, back link) via offsetHeight and subtracting
from total height. For hidden widgets (MCP/Plugin when not the
active tab), layout is skipped since offsetHeight returns 0; the
selectSectionById re-layout handles showing them later.
Removes the rAF wait from the fixture since explicit measurement
doesn't depend on paint timing.
* Stabilize AI customizations editor fixtures
* Add narrow viewport fixture variants and fix widget overflow clipping
* fix: defer layout when offsetHeight returns 0 during display:none → visible transition
When switching sections in the Chat Customizations editor, the
container transitions from display:none to visible. The layout
method fires synchronously before the browser has reflowed, causing
offsetHeight to return 0 for sibling elements. Previously, layout
bailed out entirely, leaving the virtual list with no viewport
height — resulting in missing rows and empty space.
Now defers layout to the next animation frame so measurements
are accurate after the reflow completes.
* skill: add live debugging workflow to chat-customizations-editor skill
* skill: reference launch skill instead of duplicating agent-browser docs
* skill: add fixture gotchas — built-in grouping, editor contribution mocks, screenshot stability
* ci: add blocksCi labels to key customization fixtures for automated regression gating
* refactor: replace type assertion mutations with immutable map in applyBuiltinGroupKeys
* fix: show extension display name instead of ID for agent extension source labels
* fix: re-layout list when toggling browse mode in MCP/plugin widgets
When toggling browse mode, the back link appears/disappears but
layout() was never re-called, causing the list height to not
account for the changed chrome. This clipped the last entry.
Cache the last layout dimensions and re-call layout() after
toggling browse mode.
Fixes https://github.com/microsoft/vscode/issues/304139
* fix: register IProductService in AI customization component fixtures
The AICustomizationListWidget recently added a dependency on
IProductService but the component fixtures were not updated,
causing all AI customization fixtures to fail with
'depends on UNKNOWN service productService'.
* fix: address PR review — remove manual layout() in fixtures, fix null! in ParsedPromptFile
* fix: command rewriting issues when terminal sandboxing is enabled
Fixes two issues with sandboxed terminal commands:
1. Sandboxed commands end up in shell history (#303769): The
PreventHistoryRewriter was running before SandboxRewriter, so the
leading space was applied to the inner command but not the final
sandbox-wrapped command. Moved PreventHistoryRewriter to run last.
2. cd CWD prefix not stripped in sandbox mode (#303848): The
SandboxedCommandLinePresenter was using the original (un-rewritten)
command for display, bypassing cd prefix stripping. Changed to use
forDisplay instead.
3. Fixed forDisplay being clobbered: The rewriter loop unconditionally
overwrote forDisplay, so later rewriters without a forDisplay
(like PreventHistoryRewriter) would clear the sandbox's display
value. Changed to only update when explicitly provided.
Fixes#303769Fixes#303848
* update doc comment for SandboxedCommandLinePresenter
* improve execute strategy logging for CI diagnostics
Upgrade strategy selection and completion logs to info level in
runInTerminalTool. In richExecuteStrategy, log at info level when
running in CI (for diagnosing shell integration race conditions)
and debug otherwise.
* fix: include ignorespace in bash shell integration history verification
When VSCODE_PREVENT_SHELL_HISTORY=1 is set (which it is for all tool
terminals created by the run_in_terminal tool), the bash shell
integration script sets HISTCONTROL="ignorespace" (line 67). This
causes bash to exclude space-prefixed commands from history.
Later in the same script (line 200), a regex decides whether to use
`history 1` or $BASH_COMMAND to capture the current command in
__vsc_preexec. The regex checks for erasedups, ignoreboth, and
ignoredups — but NOT ignorespace. This is a bug because:
1. The same script sets HISTCONTROL=ignorespace 130 lines earlier
2. ignoreboth (which IS in the regex) is defined by bash as
"ignorespace + ignoredups" — so the compound form was handled
but the simple form was not
The consequence: with HISTCONTROL=ignorespace and __vsc_history_verify=1,
__vsc_preexec calls `history 1` to get the current command. But the
command has a leading space (added by PreventHistoryRewriter), so bash
history never recorded it. `history 1` returns the PREVIOUS command
or nothing. This causes __vsc_current_command to be wrong or empty.
In __vsc_command_complete, when __vsc_current_command is empty, the
script sends the OSC sequence 633;D WITHOUT an exit code (line 373).
The VS Code side then receives onCommandFinished with exitCode=undefined,
breaking exit code detection for ALL tool terminal commands on bash.
The fix adds ignorespace to the existing regex, so bash falls back to
$BASH_COMMAND (which always works regardless of history settings).
This matches the behavior already provided when ignoreboth is set.
* docs: improve fix-ci-failures skill with faster log retrieval workflow
* component explorer fixture for chat customization tabs
* chat customizations: full editor fixture + developer skill
* Refine AI customization management editor fixtures
* fix: update DOM element creation to use shorthand syntax
---------
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
* chore: ralph loop checkpoint - 2026-02-17 12:48
* fix shell script
* Inline compile stage into platform jobs
Remove the standalone Compile stage from the ADO pipeline. Each
platform job (Windows, Linux, macOS, Alpine, Web) now compiles
TypeScript itself instead of downloading a shared Compilation artifact.
- Add VSCODE_RUN_CHECKS parameter to Linux jobs for hygiene/lint/CG
- Add VSCODE_RUN_COMPILE_EXTRAS parameter to macOS jobs for telemetry
extraction and sourcemap upload
- Remove VSCODE_COMPILE_ONLY parameter entirely
- Delete product-compile.yml (no longer referenced)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Always run telemetry extraction on macOS builds
The macOS Universal app merge requires both x64 and arm64 builds to have
identical file sets. Telemetry extraction was only running on arm64 (via
VSCODE_RUN_COMPILE_EXTRAS), causing the universal merge to fail due to
missing telemetry-core.json and telemetry-extensions.json in the x64 build.
Move telemetry extraction outside the VSCODE_RUN_COMPILE_EXTRAS gate so
it runs on all macOS builds. Sourcemap upload remains gated.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Run telemetry extraction on all client builds
All client builds (Linux, Windows, macOS) need telemetry-core.json and
telemetry-extensions.json. Previously only macOS arm64 ran extract-telemetry.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Only run telemetry extraction on Linux x64 (client build)
Linux arm64 and armhf are server-only builds, no need for telemetry files.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove .ralph scaffolding files
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix telemetry extraction on Windows with native PowerShell
The bash extract-telemetry.sh script fails on Windows because the Unix
bin shim gets interpreted as Node.js code. Use a native PowerShell
implementation that calls the extractor JS entry point directly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Handle missing telemetry files gracefully on Windows
The telemetry extractor may skip emitting declarations-resolved.json
when no events are found. Handle this case with a warning instead of
failing the build.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Use deterministic build date from git commit timestamp
When each platform compiles independently, the build date embedded in
cli.js (via INSERT_PRODUCT_CONFIGURATION) differs between machines
because each uses new Date().toISOString(). This causes the macOS
Universal app merge to fail since cli.js SHA differs between x64/arm64.
Fix: use the git commit date (git log -1 --format=%cI HEAD) instead
of the current wall-clock time. This ensures all independent builds
on different machines produce identical timestamps.
Updated in:
- build/lib/date.ts: writeISODate() uses git commit date
- build/next/index.ts: bundle(), transpile, and readISODate fallback
all use git commit date
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove redundant extensions-ci task from CI pipelines
core-ci (esbuild path) already includes cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask, and compileExtensionMediaBuildTask.
Running extensions-ci in parallel caused a race condition where
core-ci's rimraf of .build/extensions clashed with extensions-ci
writing to the same directory.
Also removes dead code:
- extensions-ci and extensions-ci-pr task definitions (fully subsumed)
- core-ci-old task (useEsbuildTranspile is always true)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* remove VSCODE_RUN_COMPILE_EXTRAS
* address PR feedback regarding code duplication of `getGitCommitDate()` function by exporting a single helper function from `build/lib/date.ts` and importing it in `build/next/index.ts` to ensure consistent behavior and improve code maintainability.
* update readISODate function to return git commit date instead of current date
* add telemetry sorting script and integrate into build process for consistent output
* refactor telemetry extraction process: replace shell script with TypeScript implementation
* update skill
* update telemetry-extractor dependency to version 1.19.0
* fix build
* fix more duplicate telemetry definition issues
* cleanup
* refactor: consolidate validation checks into quality checks and remove obsolete tasks
* bust the cache
* undo cache bust
* fix expression
* fix
* fix: update Azure storage account name in quality checks
* fix: initialize stages set with 'Quality'
* fix: add VSCODE_BUILD_TYPE parameter with options for Product and CI builds
* fix: update Azure Pipeline CLI to use parameters instead of variables for queueing builds
* fix: update VSCODE_BUILD_TYPE parameter values for clarity
* fix: update default value for VSCODE_BUILD_TYPE parameter to 'Product'
* leaner
* even leaner
* only npm ci in build
* 💄
* run entire npm ci
* fix
* fix
* fix it
* Inline CompileCLI into platform stages
- Remove centralized CompileCLI stage
- Move CLI jobs into Windows, Linux, macOS stages as independent jobs
- CLI jobs now compile, publish unsigned mid-job, sign, and publish signed
- Platform compile jobs use deemon + waitForArtifacts for async CLI download
- Delete separate CLI sign jobs (now merged into CLI compile jobs)
- Remove CompileCLI from publish.ts stage tracking
* fix: macOS CLI signing - use proper directory structure for ESRP
* fix: add BUILDS_API_URL to Windows and Linux job templates
* fix: label Linux CLI jobs clearly
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: João Moreno <22350+joaomoreno@users.noreply.github.com>
- Updated @vscode/component-explorer to version 0.1.1-16 and @vscode/component-explorer-cli to version 0.1.1-12 in package.json and package-lock.json.
- Added new test fixtures for chat question carousel, code action list, find widget, inline completions extras, rename widget, and suggest widget.
- Implemented rendering logic for new fixtures to enhance testing capabilities for various components.
* Add tool-rename-deprecation skill for legacy name backward compat
* Fix deprecated name resolution for namespaced tool references in toolsets
When a tool belongs to a toolset and has legacyToolReferenceFullNames,
the deprecated names map now includes the namespaced form (e.g.
vscode/openSimpleBrowser → vscode/openIntegratedBrowser). Previously
only the bare name was mapped, so agent files using the full
toolSet/toolName path got 'Unknown tool' instead of the rename hint.
* Revert Growth agent isReadOnly infrastructure
Remove the isReadOnly extension point property and Growth-specific
infrastructure from the chat sessions API that was added in #294255.
This was scaffolding for a growth session approach via the extension
chatSessions API, which is being replaced with a core-side implementation.
Removed:
- isReadOnly on IChatSessionsExtensionPoint and its schema
- isReadOnly filtering in session target/delegation pickers
- contribution?.isReadOnly parameter from getAgentCanContinueIn
- Growth from getAgentSessionProvider (prevents cache persistence)
- Growth-specific and isReadOnly tests
Kept:
- AgentSessionProviders.Growth enum value (used by new implementation)
- ChatSessionStatus.NeedsInput in proposed API + ext host types
- Growth cases in name/icon/description switch statements
* growth notification for new chat users
* hygiene skill
* Update src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Address PR review feedback
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>