Commit Graph

1404 Commits

Author SHA1 Message Date
Roland Grunberg
4f39e1da78 Respond to review comments.
- Rename adjustWhitespace to keepWhitespace
- Retain default behaviour of adjusting whitespace when keepWhitespace
  not defined

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
2025-01-14 09:23:10 -05:00
Roland Grunberg
68c2087f8f Expose adjustWhitespace to TextEditor API.
- Disable adjustWhitespace in text edits with snippets so that code
  actions do not adjust snippet indentation by default
- Adjust Emmet extension so that adjustWhitespace is enabled
- Add testcase

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
2025-01-14 09:23:10 -05:00
Benjamin Pasero
06c07d24ef Asymmetry in Memento API's JSON encoding/decoding (fix #209479) (#237800) 2025-01-13 13:04:40 +01:00
Aiday Marlen Kyzy
69d97b0773 Revert "Expose shell's environment - bash " (#237791)
Revert "Expose shell's environment - bash  (#237602)"

This reverts commit e6805d7927.
2025-01-13 10:54:20 +01:00
Anthony Kim
e6805d7927 Expose shell's environment - bash (#237602)
* start terminal shell env proposed

* fix typo

* progress on shellEnvDetectionCapability, mainThreadTerminalSI

* update IShellEnvDetectionCapability interface

* touch up on $shellEnvChange

* adjust IShellEnvDetectionCapability

* properly listen to envChangeEvent
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>

* Serialize env map, expose on exthost

* start adding to zsh script

* receive environment variable in extension host, properly escape "
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>

* clean up

* Add TODO: properly escape double quotes, figure out why JSON parse fails for bash

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>

* Fix nonce check, ignore PS1 for now in bash

* Add some simple PS1 string tests to deserializeMessage

* New approach of sending env entries separately

* be able to get EnvSingleVar

* few comments

* add function signature for start, set, end environment var

* implement EnvStart, EnvEntry, EnvEnd for single env entry

* deserialize env value for EnvEntry

* Remove unncessary comments

* only leave pwsh in this PR and exclude other shells

* keep exlcuding other shell env - only pwsh should remain

* Update src/vs/workbench/api/common/extHostTerminalShellIntegration.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vscode-dts/vscode.proposed.terminalShellEnv.d.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/workbench/contrib/terminal/common/scripts/shellIntegration-rc.zsh

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/workbench/contrib/terminal/common/scripts/shellIntegration-rc.zsh

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/workbench/api/common/extHostTerminalShellIntegration.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/capabilities/shellEnvDetectionCapability.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/workbench/api/common/extHost.protocol.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/capabilities/shellEnvDetectionCapability.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/capabilities/shellEnvDetectionCapability.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/capabilities/shellEnvDetectionCapability.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/capabilities/capabilities.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* add comment for ShellEnvDetection

* change envs in shellEnvDetectionCapability to env

* Mention escaping character for EnvJSON similar to commandLine

* Do not fire env event if env has not changed

* add link to CommandLine

* follow main branch format so I avoid merge conflict

* remove resolved TODO

* Update src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* use vscode object equals

* add zsh update_env for shellIntegration-zsh.sh

* add EnvStart, EnvEntry, EnvEnd

* why doesnt if [ "$__vsc_stable" = "0" ]; work

* add test to check shellPath

* stop messing with formatting

* try to be more detail in testing

* clean up

* dont change the format

* properly use stable/insider flag so update_env on insiders

* modify test after feedback

* rename to *EnvironmentSingleVar and make it transactional via _pending env

* add docs for *EnvSingle and update bash script to conform to *EnvSingle

* Update src/vs/platform/terminal/common/capabilities/shellEnvDetectionCapability.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/platform/terminal/common/capabilities/shellEnvDetectionCapability.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* remove _env.clear from start and make _env non-readonly

* Update src/vs/platform/terminal/common/capabilities/shellEnvDetectionCapability.ts

---------

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
2025-01-10 16:22:07 -08:00
Daniel Imms
2bcd6c467e Retry executeCommand integration test on failure
It's unclear how this happened and seems like a very rare flake.
2025-01-08 09:16:51 -08:00
Matt Bierner
4daea74ba9 Finalize paste api and drop api tweaks
Fixes #30066

This finalizes the documentPaste api. This api allows extensions to attach metadata on text copy and change how content is pasted. Some examples:

- Updating imports for pasted code
- Inserting an image as an attachment in notebooks
- Pasting files converts them to relative text paths
2025-01-07 14:57:16 -08:00
Johannes Rieken
04eff405cf restore history sharing rules for agents (#233930) 2024-11-15 18:48:35 +01:00
Johannes Rieken
434e2d6b5c stuff (#233905)
* align chat history filtering

* tweak styles of hunk menu

* fix tests
2024-11-15 17:32:37 +01:00
Tyler James Leonhardt
15333a70d8 Implement a handle property that is a string (#233267)
* Implement a `handle` property that is a string

For Microsoft auth

* fix integration tests
2024-11-07 09:44:37 -08:00
Daniel Imms
b2dc7fddf2 Fix failing test on macOS
Started failing with #232968
2024-11-04 05:31:10 -08:00
Andrea Mah
3551cb01fa edit API names and remove findFiles2New and aiTextSearchProviderNew (#232431)
* remove references to findfiles2New and aiTextSearchProviderNew
2024-10-29 18:41:23 -07:00
Johannes Rieken
71d55cd282 chore - clean up LanguageModelChatProvider (step 1) (#232414)
* chore - clean up `LanguageModelChatProvider` (step 1)

* fix compilo
2024-10-28 14:38:51 +01:00
Rob Lourens
f50c72f404 Don't throw when adding an implementation to agents with a disabled when clause (#232094)
Fix microsoft/vscode-copilot#9658
2024-10-23 14:46:06 -07:00
Rob Lourens
d9f379b135 Finalize ChatRequest#model (#231811)
* Finalize ChatRequest#model
Fix #230844

* Register model to fix tests
2024-10-21 16:42:23 -07:00
Benjamin Pasero
c025c19d14 eng - reduce some unused deps (#231221) 2024-10-13 12:38:11 +02:00
Johannes
e6f315d2fc eng - use esModuleInterop for extensions 2024-10-01 21:57:30 +02:00
Robo
9494a89080 chore: add npmrc to extensions folder (#230214) 2024-10-01 12:43:01 +02:00
Robo
b5a6aa14a8 feat: switch to npm as default package manager (#226927)
* feat: move from yarn to npm

* chore: skip yarn.lock files

* fix: playwright download

* chore: fix compile and hygiene

* chore: bump vsce@2.17.0

Refs 8b49e9dfdf

* test: update results for bat and sh colorizer tests

* fix: add missing lock files for windows

* fix: switch to legacy-peer-deps

* chore: update markdown-it@14.1.0

Refs 737c95a129

esbuild step in extensions-ci-pr was previously using markdown-it
from root which had userland punycode and was able to compile successfully.

* ci: increase pr timeout for windows integration tests

* chore: fix product build

* build: ignore extension dev dependency for rcedit

* build: fix working directory inside container

* build: fix dependency generation

* npm: update dependencies

* ci: use global npmrc

* ci: update cache

* ci: setup global npmrc for private npm auth

* build: fix extension bundling

* chore: sync npm dependencies

* ci: debug env variables for container

* ci: fix win32 cli pipeline

* build: fix npmrc config usage for build/ and remote/ dirs

* fix: windows build

* fix: container builds

* fix: markdown-language-features tests and bundling

```
[03:58:22] Error: Command failed: /Users/demohan/.nvm/versions/node/v20.15.1/bin/node /Users/demohan/github/vscode/extensions/markdown-language-features/esbuild-notebook.js --outputRoot /Users/demohan/github/vscode/.build/extensions/markdown-language-features
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds userland package based on beed9aee2c

* fix: container builds for distro

* chore: update yarn occurrences

* fixup! chore: bump vsce@2.17.0

Uses the closest version to `main` branch that does not
include d3cc84cdec
while still having the fix 8b49e9dfdf

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: throw error when yarn is used for installation

* chore: add review feedback

* chore: switch exec => run where needed

* chore: npm sync dependencies

* fix: markdown-language-features bundling

```
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds missing userland package based on markdown-it/markdown-it@beed9ae,
can be removed once we update markdown-it >= 14.1.0

* ci: rename no-yarn-lock-changes.yml

* chore: sync npm dependencies

* ci: restore no-yarn-lock-changes.yml

We can disable it in a separate PR to keep the required
checks happy and also need workflow edit perms.

* chore: sync npm dependencies

* ci: rebuild cache

* ci: fix no-package-lock-changes.yml

* chore: bump distro

* chore: rm yarn.lock files

* chore: rm yarn.lock files without dependencies

* chore: add vscode-selfhost-import-aid to postinstall dirs

* chore: bump distro
2024-09-06 22:18:02 +09:00
Andrea Mah
c2aa3c4625 let findfiles2new use an array of includes/excludes (#226103)
* let findfiles2new use an array of includes/excludes
2024-08-21 19:14:01 -07:00
Rob Lourens
36257be8ef Add ChatTitleProvider, updates to Show Chats (#225997)
* Sort chat history entries by lastMessageDate

* Add date labels to chat history picker

* Remove unused dynamic 'isDefault'

* Add ChatTitleProvider

* Disallow deleting and moving active chats

* Add test for new data normalization

* Fix build and add test

* Fix new test
2024-08-19 15:40:38 -07:00
Peng Lyu
28e80d4036 Revert dirty notebooks after each test (#225820) 2024-08-16 23:14:47 +02:00
Aaron Munger
1c5490e38a Option in showNotebook to open as REPL (#225273)
* new API option and flag

* show the notebook as a repl

* handle any notebook type, dispose all model refs

* open notebook doc as scratchpad

* delay loading the model for untitled notebooks until shown

* add initial content consistently for untitled

* simplify utitled notebook creation

* recover open untitled notebook as dirty behavior
2024-08-14 14:21:22 -07:00
Daniel Imms
929eba4808 Finalize shellIntegration API
Fixes #145234
2024-08-04 09:27:32 -07:00
Daniel Imms
957cc73060 Disable whole suite 2024-07-11 16:04:59 -07:00
Daniel Imms
f46e27c6f7 Disable executeCommand test
Looking into this exact thing later in #221399 anyway
2024-07-11 15:55:57 -07:00
Christof Marti
125c83df26 Test basic auth for proxy (#220034) 2024-07-08 16:39:26 +02:00
Christof Marti
298c72219b Module not shared on Windows? 2024-06-24 19:37:11 +02:00
Christof Marti
3cdb165262 Update to @vscode/proxy-agent 0.21.0 2024-06-24 19:37:11 +02:00
Johannes Rieken
feae5bf5d6 make sure errors are recreated when making LM requests (#216807)
* add integration tests for LanguageModelChat#sendRequest

* make sure errors are recreated when making LM requests

* disable test with a note for later

* fix remote integration tests
2024-06-24 09:50:48 +02:00
Christof Marti
e0a7112fd5 Test custom root certificate (microsoft/vscode-copilot-release#1294) 2024-06-21 10:39:28 +02:00
Rob Lourens
ee173b0e65 Tools API tweaks, merge into lmTools (#216750)
* Tools API tweaks, merge into lmTools

* Rename more id -> name

* Fix

* Add lmTools API version
2024-06-20 18:54:00 -07:00
Rob Lourens
7abff3e641 Fix vscode-api-tests in stable (#213733) 2024-05-28 15:29:20 -07:00
Rob Lourens
b9d35d9145 Don't register chat participants in stable (#213244)
* Don't register chat participants in stable
And fork some Additions APIs into chatParticipantPrivate

* Remove stale proposals

* Move more API out of Additions
2024-05-22 21:07:40 +02:00
Rob Lourens
14ebfdc345 Add variable 'isSlow' (#212657)
* Add variable 'isSlow'
Since 'codebase' doesn't really work as a reference, I'm only making accessible to our agents for now

* fix

* Check for slow variables in parser as well
2024-05-15 17:40:21 -07:00
Rob Lourens
6643db734a Add chat variable id and rename to 'references' (#212480)
* Add chat variable id

* Rename 'variables' to 'references'

* Replace other 'variables' usages

* Fix tests
2024-05-13 14:30:14 -07:00
Robo
5216c04428 chore: update to electron 29 (#209818)
* chore: update electron@29.1.0

* chore: update typings to 20.x

* chore: bump electron@29.1.5

* ci: fix crash in compiling extensions-ci

* chore: disable .d.ts check for build/

$ ../node_modules/.bin/tsc -p tsconfig.build.json
node_modules/@types/chokidar/index.d.ts:21:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/@types/chokidar/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

21 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
                ~~~~~~~~~

node_modules/chokidar/types/index.d.ts:8:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/chokidar/types/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

8 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
               ~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  node_modules/@types/chokidar/index.d.ts:21
     1  node_modules/chokidar/types/index.d.ts:8

Refs a0f9e09f64

* chore: update core types

* temp: fix layer validation

* chore: update nodejs checksums

* ci: use latest v20 LTS for missing node-gyp

Refs eacec5f490

* ci: define LIBCPP_HARDENING_MODE

* ci: fix crash in vscode-web-min-ci

* chore: update rpm deps-list

* chore: bump tree-sitter-typescript@0.20.5

* chore: bump electron@29.3.0

* chore: bump electron@29.3.1

* chore: update rpm deps-list for x86_64

* ci: disable io_uring UV backend on linux

* ci: disable io_uring backend for oss as well

* chore: update typings to 20.x

* ci: add TODO for io_uring workaround

* chore: bump distro

* chore: update preinstall node version checks

* chore: update @types/gulp

Refs https://github.com/microsoft/vscode/issues/212442

* ci: disable io_uring in more test suites
2024-05-11 01:20:28 +09:00
Rob Lourens
9c336bfa87 Add test for FunctionBreakpoint change (#212284)
See #211894
2024-05-08 20:41:49 +02:00
Johannes Rieken
6874fc7394 Joh/ministerial-swan (#212096)
* first cut of embeddings API

https://github.com/microsoft/vscode/issues/212083

* add event

* fix tests
2024-05-06 16:50:13 +02:00
Daniel Imms
d95fae2e2d Fix flaky integration tests on mac 2024-05-01 13:22:17 -07:00
Rob Lourens
b8292ab7f2 Replace ChatResolvedVariable with ChatValueReference (#211665)
* Replace ChatResolvedVariable with ChatValueReference
Participant API
#199908

* Fix integration test

* any -> unknown
2024-05-01 09:14:54 -07:00
Daniel Imms
c398f717a9 Consolidate ansi functions into strings.ts 2024-04-26 07:22:16 -07:00
Benjamin Pasero
47e4d24fa1 vscode API - globalState / workspaceState unit test flake (fix #210575) (#210632) 2024-04-18 10:54:47 +02:00
Daniel Imms
762cbd66a8 More logging, disable on Windows 2024-04-16 15:26:45 -07:00
Daniel Imms
f18f406e30 Improve assertions 2024-04-16 15:06:34 -07:00
Daniel Imms
4080745f7e Merge remote-tracking branch 'origin/main' into tyriar/si_integration_tests 2024-04-16 13:56:38 -07:00
Connor Peet
97df4dad38 api: finalize windowActivity (#210491)
Closes #181569
2024-04-16 11:03:14 -07:00
Daniel Imms
fa1e2afd99 Set SI to enabled in integration tests 2024-04-15 08:53:11 -07:00
Daniel Imms
6162e457e3 Add shellIntegration ext api integration tests
Part of #145234
2024-04-12 12:21:09 -07:00
Don Jayamanne
f309a5e375 Fix test failure and improve visibility check (#210128)
* Fix test failure when UI is small

* oops
2024-04-11 08:07:50 +02:00