17289 Commits

Author SHA1 Message Date
dileepyavan
cc9f34504b Rename agent sandbox settings (#307237)
* Rename agent sandbox settings

* refactoring for review comments

* Update src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts

Update for deprecation

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-01 20:56:32 +00:00
Anthony Kim
54b695e02e Add windowsUseConptyDll setting to runInTerminal tests (#307185) 2026-04-01 10:49:44 -07:00
Benjamin Pasero
40a2f79f6d Revert skipping of tests (#307137)
Revert "unblock build (#307047)"

This reverts commit a1ceb20175.
2026-04-01 16:30:50 +00:00
Megan Rogge
a9ccde3863 Terminal tools: replace isBackground with mode=sync|async, remove await_terminal tool (#307141) 2026-04-01 11:40:36 -04:00
Alex Ross
82ec78a528 Disable more flaky tests (#307102) 2026-04-01 14:19:38 +02:00
Benjamin Pasero
a1ceb20175 unblock build (#307047) 2026-04-01 08:10:26 +00:00
Megan Rogge
6c3a002c90 remove shell integration none tests (#306932) 2026-03-31 14:30:41 -07:00
Alex Ross
8906163852 Skip flaky terminal test (#306668) 2026-03-31 20:23:15 +11:00
Raymond Zhao
c1f3775929 chore: run npm audit fix (#306509) 2026-03-30 16:32:21 -07:00
Megan Rogge
61e3ba6f04 skip flakey sandbox test for now (#306417)
part of #305722
2026-03-30 21:57:09 +00:00
dependabot[bot]
fc734bd35b Bump brace-expansion from 1.1.12 to 1.1.13 in /extensions/markdown-language-features (#305820)
Bump brace-expansion in /extensions/markdown-language-features

Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.12 to 1.1.13.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.12...v1.1.13)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 17:27:59 +02:00
Martin Aeschlimann
cc13977fc4 rename VS Code Dark -> Dark 2026 (#306364) 2026-03-30 15:24:38 +00:00
dileepyavan
a2d7b9e13b [Sandbox] Notify user to run out of sandbox if the domain is not included in allowedDomains. (#306121)
* Rename sandbox setting to chat.agent.sandbox (#303421)

Rename the top-level sandbox setting from `chat.tools.terminal.sandbox.enabled`
to `chat.agent.sandbox` to reflect that sandboxing is a general agent concept,
not terminal-specific.

- Update setting ID value to `chat.agent.sandbox`
- Update description to be more general
- Deprecate old `chat.tools.terminal.sandbox.enabled` setting
- Update telemetry event name

Fixes #303421

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* updating terminal sandbox to agent sandbox

* removed allowTrustedDomains

* correcting the settings keys for sandboxing

* correcting the settings keys for sandboxing

* Explicit notification for blocked domains before running the command

* Fix terminal sandbox follow-ups

* main merge

* fixing tests

* Update src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Update src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts"

This reverts commit b956dfa719.

* removing local files

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-30 15:33:04 +02:00
Ladislau Szomoru
f92a4853f7 Git - change the default value for the git.detectWorktrees setting (#306286) 2026-03-30 10:43:16 +00:00
dileepyavan
57d9535056 Rename sandbox setting to chat.agent.sandbox (#303421) (#305846)
* Rename sandbox setting to chat.agent.sandbox (#303421)

Rename the top-level sandbox setting from `chat.tools.terminal.sandbox.enabled`
to `chat.agent.sandbox` to reflect that sandboxing is a general agent concept,
not terminal-specific.

- Update setting ID value to `chat.agent.sandbox`
- Update description to be more general
- Deprecate old `chat.tools.terminal.sandbox.enabled` setting
- Update telemetry event name

Fixes #303421

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* updating terminal sandbox to agent sandbox

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-29 01:31:02 +00:00
Rob Lourens
c065b175fd Add argument parsing, suite filtering, and grep support to integration test scripts (#305837)
* 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.
2026-03-28 11:23:37 +11:00
Ladislau Szomoru
cbc57242ed Sessions - wire up the discard changes action (#305830) 2026-03-27 22:04:27 +00:00
dependabot[bot]
e49f2d1a54 Bump node-forge from 1.3.2 to 1.4.0 in /extensions/vscode-api-tests (#305343)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.2 to 1.4.0.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.2...v1.4.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.4.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 14:15:43 -07:00
Matt Bierner
187a98616b Revert "Replace child_process.exec with execFile to prevent potential command injection" 2026-03-27 10:57:37 -07:00
Yogeshwaran C
7466d76783 fix: modernize HTML sample snippet (#304818)
Update the built-in HTML sample snippet to follow current web standards
and reduce unnecessary boilerplate:

- Add lang attribute to <html> tag as first tab stop (W3C recommended)
- Remove outdated IE compatibility meta tag (IE is no longer supported)
- Remove unnecessary type='text/css' and media='screen' from <link>
  (default values in HTML5)
- Remove <script> tag (modern templates often handle scripts differently)
- Move viewport meta before title (following common convention)

Fixes #272331

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-03-27 10:25:15 -07:00
Ladislau Szomoru
bdea2b4df8 Git - scaffold the git extension API (#305643)
* Git - scaffold the git extension API

* Pull request feedback
2026-03-27 13:56:36 +00:00
Matt Bierner
87d56f7104 Merge pull request #305550 from mjbvz/dev/mjbvz/tense-dragon
Use `areUrisEqual` helper for better uri checks
2026-03-27 01:01:26 -07:00
Matt Bierner
bd5b480c23 Use areUrisEqual helper for better uri checks 2026-03-27 00:42:39 -07:00
Matt Bierner
5f966ed2ed Also default to treating macos as case insensitive for md file checks 2026-03-27 00:38:30 -07:00
dileepyavan
6afe980a82 Preserve $TMPDIR when retrying terminal commands outside the sandbox (#304601)
* Changes to include environment variables for retry without sandboxing

* adding e2e tests

* fixing code formatting
2026-03-27 05:49:29 +00:00
Matt Bierner
93ca9c0929 Merge pull request #304958 from yogeshwaran-c/fix/image-preview-checkerboard-triangles
fix: use conic-gradient for image preview transparency checkerboard
2026-03-26 20:16:01 -07:00
Matt Bierner
33fac91d75 Merge pull request #287050 from AshtonYoon/fix/janky-scrolling-in-markdown-preview
Fix janky scrolling in markdown preview with code blocks
2026-03-26 16:23:25 -07:00
dependabot[bot]
b04a4405e9 Bump brace-expansion from 5.0.3 to 5.0.5 in /extensions/html-language-features (#305338)
Bump brace-expansion in /extensions/html-language-features

Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.3 to 5.0.5.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.3...v5.0.5)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 22:46:17 +00:00
dependabot[bot]
a01680ec5c Bump brace-expansion from 5.0.2 to 5.0.5 in /extensions/css-language-features (#305337)
Bump brace-expansion in /extensions/css-language-features

Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.2 to 5.0.5.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.2...v5.0.5)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 22:42:18 +00:00
dependabot[bot]
4f27118367 Bump brace-expansion from 5.0.3 to 5.0.5 in /extensions/json-language-features (#305335)
Bump brace-expansion in /extensions/json-language-features

Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.3 to 5.0.5.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.3...v5.0.5)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 22:33:29 +00:00
Matt Bierner
243bce7593 Merge branch 'main' into fix/janky-scrolling-in-markdown-preview 2026-03-26 15:14:38 -07:00
Matt Bierner
f8da1a6af6 Merge pull request #305063 from microsoft/dev/mjbvz/underlying-roadrunner
Pick up TS 6.0
2026-03-26 15:03:24 -07:00
dependabot[bot]
c707b6a4c5 Bump picomatch from 2.3.1 to 2.3.2 in /extensions/git (#304911)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-03-26 21:48:34 +00:00
dependabot[bot]
1fc1079580 Bump picomatch from 2.3.1 to 2.3.2 in /extensions/markdown-language-features (#304920)
Bump picomatch in /extensions/markdown-language-features

Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-03-26 21:47:56 +00:00
dependabot[bot]
3ffea6b30b Bump picomatch from 2.3.1 to 2.3.2 in /extensions/npm (#304917)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-03-26 21:47:36 +00:00
Matt Bierner
d5370dfd46 Merge pull request #304973 from yogeshwaran-c/fix/svg-zoom-no-dimensions-v2
fix: enable zoom for SVGs without explicit width/height dimensions
2026-03-26 14:24:16 -07:00
Megan Rogge
c4f707a8a4 tweak run_in_terminal changes (#304843) 2026-03-26 21:23:26 +00:00
Raymond Zhao
5281aa14f2 Merge branch 'main' into fix/svg-zoom-no-dimensions-v2 2026-03-26 14:02:56 -07:00
Raymond Zhao
1513faadcf Merge branch 'main' into dev/mjbvz/underlying-roadrunner 2026-03-26 14:02:35 -07:00
Alex Ross
84f7ab5aa0 Update grammars (#305181) 2026-03-26 09:35:55 -07:00
Matt Bierner
7cf0c55551 Pick up TS 6.0
Fixes #304483
2026-03-25 23:59:23 -07:00
yogeshwaran-c
ef6d5f314e fix: send user preferences to TS server even without visible editor
When ensureConfigurationForDocument is called and no visible text editor
is found for the document, getFormattingOptions returns undefined and
the method returns early without sending any configuration including
user preferences like preferTypeOnlyAutoImports to the TS server.

This causes source.addMissingImports to ignore the user's
preferTypeOnlyAutoImports setting.

Fix by falling back to undefined formatting options when no visible
editor is found, ensuring user preferences are always sent.

Closes #272479
2026-03-26 06:45:15 +05:30
yogeshwaran-c
91826e61d8 fix: enable zoom for SVGs without explicit width/height dimensions
SVG images that rely solely on a viewBox attribute (without explicit
width/height) could not be zoomed in the image preview because they
have no intrinsic dimensions. CSS zoom had no effect since the SVG
would simply re-render to fill whatever container size it was given.

- Set explicit minWidth/minHeight on the image element when
  naturalWidth/naturalHeight are 0, giving CSS zoom concrete pixel
  dimensions to scale
- Handle firstZoom() division by zero when naturalWidth is 0 by
  defaulting to scale 1x
- Clear explicit dimensions when returning to scale-to-fit mode

Fixes #240638
2026-03-26 06:26:00 +05:30
yogeshwaran-c
451b858997 fix: use conic-gradient for image preview transparency checkerboard
The transparency checkerboard pattern in the image preview used two
overlapping linear-gradient(45deg, ...) backgrounds with offset
positions. At certain zoom levels, subpixel rendering caused visible
triangular artifacts at the gradient boundaries.

Replace with a single conic-gradient per theme, which creates a clean
four-square checkerboard tile without diagonal edges, eliminating
the rendering artifacts at all zoom levels.

Closes #229565
2026-03-26 06:11:00 +05:30
Ladislau Szomoru
19e3c145cb Sessions - source control providers do not need the parent/child relationship (#304830) 2026-03-25 18:07:01 +00:00
Alexandru Dima
3460bdb15c Fix command rewriting issues when terminal sandboxing is enabled (#303859)
* 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 #303769
Fixes #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
2026-03-22 18:04:12 +01:00
Alexandru Dima
ca117fbb4f Accept "Command produced no output" when shell integration is off (#303866)
Accept "Command produced no output" when shell integration is off (#303865)
2026-03-22 14:36:27 +00:00
Alex Dima
487646cee8 Attempt to cover up the run_in_terminal tool not being registered quickly 2026-03-22 10:50:35 +01:00
Alexandru Dima
5563927f89 Fix terminal output capture: prevent premature idle detection and handle partial command echoes
- setupRecreatingStartMarker returns IDisposable to stop marker recreation
  before sending commands (prevents marker jumping on PSReadLine re-renders)
- noneExecuteStrategy waits for cursor to move past start line after sendText
  before starting idle detection (prevents end marker at same line as start)
- findCommandEcho supports suffix matching for partial command echoes from
  wrapped getOutput() results (shell integration ON with long commands)
- Suffix matching requires mid-word split to avoid false positives on output
  that happens to be a suffix of the command (e.g. echo output)
- Integration tests: use ; separator on Windows, add && conversion test,
  handle Windows exit code quirks with cmd /c
2026-03-22 00:46:48 +01:00
Alex Dima
4ed68ee36f Fix slash history test 2026-03-21 23:23:32 +01:00