Commit Graph

1269 Commits

Author SHA1 Message Date
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
Alex Dima
436b09abc3 Fix sandbox tests for Linux: handle different shell path and error message
- Handle /usr/bin/bash (Linux) vs /bin/bash (macOS) in /tmp write test
- Handle 'Read-only file system' (Linux) vs 'Operation not permitted' (macOS)
- Add 'Read-only file system' to outputLooksSandboxBlocked heuristic
- Replace newlines with spaces (not empty) to handle terminal wrapping
- Extract outputLooksSandboxBlocked as exported function with unit tests
2026-03-21 22:36:04 +01:00
Alex Dima
f4644120bc Cover case where the command is duplicated in stripCommandEchoAndPrompt 2026-03-21 22:28:19 +01:00
Alex Dima
f4c042bfc8 Relax some tests when shell integration is off 2026-03-21 19:56:04 +01:00
Alex Dima
865568dbbc fix: Linux CI sandbox prereqs, platform-aware tests, broader prompt stripping
- Add bubblewrap and socat to Linux CI apt-get install
- Make sandbox test assertions platform-aware (macFileSystem vs linuxFileSystem)
- Make /etc/shells test accept both macOS and Linux first-line format
- Broaden wrapped prompt fragment regex to handle path chars (ts/testWorkspace$)
- Fix continuation pattern to match user@host:path wrapped lines
- Apply stripCommandEchoAndPrompt to getOutput() in BasicExecuteStrategy
  (basic shell integration lacks reliable 133;C markers so getOutput()
  can include command echo)
- Keep RichExecuteStrategy getOutput() unstripped (rich integration
  has reliable markers)
2026-03-21 19:06:50 +01:00
Alex Dima
34dd7810b7 fix: strip command echo and prompt from terminal output (#303531)
Prevent sandbox-wrapped command lines from leaking as output when

commands produce no actual output. Adds stripCommandEchoAndPrompt()

to isolate real output from marker-based terminal buffer captures.

Also adds configurable idle poll interval and shell integration

timeout=0 support for faster test execution.
2026-03-21 17:43:25 +01:00
Kyle Cutler
3f4f33b7da Fix close tracking in browser API (#303304) 2026-03-19 13:47:36 -07:00
Kyle Cutler
0bc4bad6ef Proposed browser API for debug support (#300577)
* Proposed browser API for debug support

* build, feedback

* Web stubs

* fix

* close guard

* fixes, add close()

* clean

* Fixes, tests

* lint

* Simplfiy

* feedback
2026-03-13 16:32:58 +01:00
Don Jayamanne
5b38f1d529 Update default model selection to prioritize 'copilot' vendor in ExtHostLanguageModels (#298903)
* Update default model selection to prioritize 'copilot' vendor in ExtHostLanguageModels

* Fix tests

* Fix tests
2026-03-06 21:48:45 +11:00
Alex Ross
856ea291a5 No need to throw when an element with the same ID comes in (#299154)
* No need to throw when an element with the same ID comes in
Fixes microsoft/vscode-pull-request-github#8073

* Fix tests
2026-03-04 13:50:35 +01:00
Christof Marti
2fd6a33c04 Surface power API 2026-02-05 16:57:40 +01:00
Alex Ross
9519571a4a Skip flaky test " setTextDocumentLanguage for notebook cells" (#293072) 2026-02-05 11:04:16 +00:00
Alex Ross
f89c803449 Try once again to fix the element already registered bug (#290795)
Fixes microsoft/vscode-pull-request-github#8073
2026-01-27 18:11:33 +01:00
Anthony Kim
acb22942b0 Remove winpty support (#289025)
* Bump node-pty to 1.2.0-beta.7

* Deprecate TerminalSettingId.WindowsEnableConpty setting

* Remove windowsEnableConpty instead of deprecating

* Remove WINPTY from ps.ts

* Remove winpty from appropriate comments

* Remove winpty from IProcessReadyWindowsPty

* Remove from classifier.json. TODO on resize for node-pty

* Try adding option to test

* Add reference to issue
2026-01-21 08:32:11 -08:00
Johannes Rieken
d13c32e27f disable flakly test again https://github.com/microsoft/vscode/issues/254042 (#283836) 2025-12-16 15:45:42 +00:00
Alex Ross
950ca05d5c Reapply element already registered race condition fix (#283079)
Fixes microsoft/vscode-pull-request-github#8073
2025-12-12 18:01:41 +01:00
Johannes Rieken
5d52b31d8d understand why tests fails (#282002)
https://github.com/microsoft/vscode/issues/254042
2025-12-08 17:18:19 +00:00
Alex Ross
653d30ab18 Revert "Fix element already registered (#281000)" (#281278)
* Revert "Fix element already registered (#281000)"

This reverts commit ca3f2212d1.

* skip test
2025-12-04 09:43:55 -08:00
Alex Ross
472dee5115 Another fix for "element with id not registered" error (#281269)
Fixes microsoft/vscode-pull-request-github#8073
2025-12-04 16:49:41 +00:00
Alex Ross
ca3f2212d1 Fix element already registered (#281000)
Fixes microsoft/vscode-pull-request-github#8073
2025-12-03 09:59:37 -08:00
Don Jayamanne
2ad979732c Remove unwanted console.logs (#277374) 2025-11-14 11:37:45 +01:00
Daniel Imms
0f2bcf765a Merge branch 'main' into tyriar/274723_platform_terminal__api 2025-11-10 06:57:41 -08:00
Daniel Imms
b2481854e8 Fix test expectations 2025-11-10 06:57:11 -08:00
Don Jayamanne
6644d4f0cb Ensure node-pty module is accessbile for chat extension (#276388)
* Ensure node-pty module is accessbile for chat extension

* Update extensions/vscode-api-tests/src/singlefolder-tests/chat.test.ts

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

* Update extensions/vscode-api-tests/src/singlefolder-tests/chat.test.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-10 04:02:15 +01:00
Daniel Imms
80ebe13f31 Remove as any in vscode-api-tests
Part of #269213
2025-11-02 01:21:53 -07:00
Alexandru Dima
65b22997d7 Convert flaky API tests to unit tests (#273398)
Convert flaky API test to unit test (#253863 , #254041)

I maintain my conviction that there is an unrelated run-away API test which steals focus while these tests execute which then leads to these tests failing, since the undo command is sensitive to the current focused editor.
2025-10-26 15:11:46 +01:00
Benjamin Pasero
f77f4c50cd eng - disable start debugging test that is flaky (#242033) (#272273) 2025-10-20 15:24:28 +02:00
Dmitriy Vasyura
bfba6b040c Add toggle support for QuickInput/QuickPick, resourceUri support for QuickPickItem (#271598)
* Add quickPickItemResource API proposal

* Transfer resourceUri from extension host to main thread.

* Make proposed API checks consistent.

* Process resourceUri

* Fix up resourceUri mapping logic

* API proposal

* Transfer toggles from extension host to main thread

* Support Folder icon, refactor label/description derivation.

* Update

* Update API proposal per API review

* Update transfer logic per API changes

* Move toggles to the base input interface

* Handle toggle button type

* Fix up

* Updates

* Propagate checked state, dispose removed toggles.

* Nit

* Expand icons

* Feedback/updates

* Added comments, PR feedback

* Updates

* Revert some change, add typings and unit-tests to converters.

* Add a quick pick test for resourceUri

* Test updates
2025-10-18 15:57:07 -07:00
Matt Bierner
1c35a4d05c Enforce single quote string usage in extension tests
Single quoted string usage is already enforced everywhere except our tests. Having this inconsistent style can confuse contributors and code generation

Starting with converting over tests in the `extensions` dir
2025-10-15 01:51:43 -07:00
Johannes Rieken
0d1a3c7c7c fix some any-casts in vsocde-api-tests (#270186)
https://github.com/microsoft/vscode/issues/269213
2025-10-07 08:16:31 -04:00
Matt Bierner
360c9fd134 Add lint rule for as any and bulk ignore all existing breaks
For #269213

This adds a new eslint rule for `as any` and `<any>({... })`. We'd like to remove almost all of these, however right now the first goal is to prevent them in new code. That's why with this first PR I simply add `eslint-disable` comments for all breaks

Trying to get this change in soon after branching off for release to hopefully minimize disruption during debt week work
2025-10-02 23:38:33 -07:00
Aaron Munger
1986d172c4 skip test for failing again (#266230) 2025-09-11 17:28:59 +00:00
Aaron Munger
c8c7793eec poll for change to allow async update (#265724)
* poll for change to allow async update

* import poll
2025-09-08 13:05:44 -07:00
Logan Ramos
2eae3caa26 Implement API changes from TPI feedback (#265213)
* Implement API changes from TPI feedback

* Update names

* Handle old fallback
2025-09-04 17:45:03 -04:00
Daniel Imms
832ae085a4 Merge pull request #263623 from rwoll/fix-blockOnResponse
skip flakey blockOnResponse tests
2025-08-27 10:49:55 -07:00
Logan Ramos
a18d41e90a Finalize LM API (#263415)
* Finalize BYOK API

* More byok

* Fix compile errors

* Feedback

* Fix fat fingering

* Fix capabilities

* Bump version

* Rename contrib point + activation events

* Update test

* Add proposed api check to require authorization

* Change comment
2025-08-27 17:25:34 +00:00
Ross A. Wollman
87b4d2a251 skip flakey blockOnResponse tests
`workbench.action.chat.open.blockOnResponse` is flaking in CI. So far,
I cannot reproduce locally so skipping to avoid noise in CI while I
debug.

Since the core logic (i.e. not the test) is only hit if `blockOnResponse`
is set to `true`, leaving it in is low-risk.

Relates #263572.
Relates #263575.
2025-08-27 10:24:04 -07:00
Rob Lourens
a9ca87f882 Reenable integration test (#263181)
Some things have changed, hoping this is more stable now
Fix #242671
2025-08-24 13:41:59 -07:00
Ross Wollman
58c4c3bf4b Wait for agent loop to finish in automation (#262370)
* add `workbench.action.chat.open::waitForComplete`

* s/waitForCompletion/blockOnResponse

* cleanup tests

* remove unused comment

* Apply suggestion from @connor4312

Co-authored-by: Connor Peet <connor@peet.io>

* fixup tests

* don't block test loop on invokeTool

* Revert "don't block test loop on invokeTool"

This reverts commit d8d16dbe79.

* fix tool confirmation test

* attempt to account for the flip of isPendingConfirmation

* [DEBUG] debug CI flake

* register tool so it exists in all test envs

* finish configuring custom tool

* run test in seperate chat windows

* revert debug changes

* remove timeout dep

* fix assertion

* cleaup tests by examining output of command directly

---------

Co-authored-by: Connor Peet <connor@peet.io>
2025-08-20 10:13:48 -07:00
Bhavya U
43452f464f Remove startup experimentation code and setup splitWelcomeChat view as getting started experience (#262068)
* Remove startup experimentation code and setup splitWelcomeChat view as getting started experience

* Remove experimental visibility check from welcome message in ChatWidget

* cleanup

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2025-08-18 10:24:29 +00:00
Logan Ramos
f6b2bec410 Modify LM api based on feedback (#261645)
* API feedback

* Some further API cleanup

* Some API stuff

* Try more cleanup

* CI please pass

* READONLY
2025-08-14 16:59:44 -04:00
Don Jayamanne
eb649d0d93 Add some logging to identify flaky notebooks tests (#261200) 2025-08-12 13:29:19 +02:00
Alex Ross
1b97fc2890 Skip flaky undo/redo stack tests (#260514)
See https://github.com/microsoft/vscode/issues/254041
2025-08-08 01:59:25 -07:00
Don Jayamanne
fd38deac92 Skip flaky notebook test (#258223)
Skip flaky test
2025-07-28 13:46:15 +00:00
Logan Ramos
8551a1d51d Finalize the bring your own key api (#255892)
* Start small

* start on new byok api

* Some more api work

* Hook up more of the API

* A single file with no errors yay!

* Some cleanup

* Slow and steady progress

* More code

* Add resolve

* Hate everything

* More progress on rewriting id

* Some error fixing

* Fix null service

* Use claude to fix tests

* Fix tests

* Fix tests

* More test fixing

* Some setup

* Some model picker stuff

* Fix model picker with new BYOK api

* Remove support for contirbuting to mdel picker action bar

* Adjust to allow for user prompting

* Add event

* Fix conflicts
2025-07-18 13:42:55 -04:00
Alex Ross
8c938d137a Disable flaky workspace test (#256250)
See https://github.com/microsoft/vscode/issues/253863
2025-07-16 07:17:49 -07:00
Alex Ross
c23b94c04d Skip "breakpoints are available before accessing debug extension API" (#255982)
See https://github.com/microsoft/vscode/issues/254039
2025-07-15 09:48:51 +00:00