* testing: finish up coverage decorations
- Adds an inline decorator for empty-range branches
- Adds hover information for inline coverage hovers
- Fixes the editor not handling decorations that get after/before
content in `updateDecorationOptions`
- Adds an option `label` for branches
- A bunch of other misc tweaks to get coverage looking nice
- Keep decorations in sync if a user makes changes in editor
* update tests
This is the first pass at decorations in-editor. This PR doesn't
actually register the contribution, as it's not ready for selfhosting
yet. This PR creates decorations that look like this. The idea is that
coverage decorations in the glyph margin will always be visibile when
there's coverage, and users can get coverage in their code via hover or
shortcut, with the intention of making coverage unobtrusive and easy to
run all the time.
![](https://memes.peet.io/img/24-01-8e61f4db-f115-4732-affe-59dea879a335.png)
The notable thing is that there is now a third glyph margin row. I
reworked some of the editor code to handle this.
![](https://memes.peet.io/img/24-01-f400369f-650c-4303-be65-e65903f8ad17.png)
Some open questions:
- The glyph margin coverage wants doesn't need to be full-width, should
we add a new 'leftmost' glyph lane instead that's thinner?
- Adding breakpoints in files with coverage is a little annoying since
the breakpoint hint widget can expand the glyph margin on lines with
coverage, and jump back over otherwise. Probably we should never
decrease the number of lanes shown whenever the cursor is over the
glyph margin.
![](https://memes.peet.io/img/24-01-79b53dd9-6fca-41dd-87b5-a113f9c25efb.gif)
This continues on the coverage API I started a few years ago. It adds
initial integration where a "Show Test Coverage" tree item is shown in
the Test Results view, which then opens a dedicated Test Coverage view.
The Test Coverage view is a fairly basic tree view following the draft
design, with further improvements to come.
The 'bars' widget is also built in a reusable way such that it can be
integrated into the explorer, as this was a popular ask both inside and
outside the team.
For #123713.
* chore: rename color var for comment input box
also change the default color to inherit from input.background
* Keep using peekview title background and update editor too
---------
Co-authored-by: Alex Ross <alros@microsoft.com>
* Initial support for accounts entitlements
* Clean up code
* Remove dependency on FIleReader
* Update vi18n.resources.json
* Use IRequestService
* Rename to IGitHubEntitlement
* speech - scaffold a basic core service for registration
* speech - scaffold a basic extension API for speech providers
* cleanup
* speech - improve API to work with events
* simplify
* better api
* cleanup
* Add notes on chat agent API
* Add request ID to context
* variables
* Add partial implementation for another option for a chat agent API
* update
* Notes from api sync
* More notes
* Can invoke an agent and get the response
* Provide a real request
* Notes
* add `slashCommandProvider` - not yet hooked up
* add metadata properties inline, some comments
* some more notes
* Put the new API side-by-side with the old one
* Fix agent title in response
* Fix agent display
* Send slashCommand to request
* Hook up variables
* Get rid of package.json registration option
* Start to implement followups provider
* Add comment
* make it `slashCommandProvider` all the way, use updateAgent for updates icon, fullName, description
* update docs
* only ask for slash command completions when completing a slash-word
* use complex completion item label for command/agent completions
* add `promptText` to `IParsedChatRequestPart` so that some parts don't make it into the prompt (like agent and slash commands)
* only allow agent and slash command at the beginning of the prompt
* remove unused method
* some jsdoc, many renames so that stuff starts with `ChatAgent...`
* reduce `createChatAgent` to the minimum, let the rest be set via setters
* in the renderer know if an agent has slash command and follow ups, safes IPC calls
* use `iconPath` to align with other APIs
* more jsdoc and more obvious TODOs
* fix chat parser with "late" command
* handle error so that the request stops. where is the rendering tho?
* Show error message in response properly
* Don't blow up global / list
* Change proposal name
* Inline followup types
* fix type
* Remove brace in error msg
---------
Co-authored-by: Johannes <johannes.rieken@gmail.com>
* cli: use terrapin for cli builds
* update rust to 1.70 to allow ado artifacts feed on windows
* apparently manaul cargo login is required
* use msrustup
* rustup is no longer user
* update to 1.73
* add rust oss install
* Test using nvmrc in CI
* Force run yarn
* fix
* Bump nvmrc to latest
* Revert "Force run yarn"
This reverts commit af741f37d5.
* Make all jobs use node from nvmrc
And install node-gyp where needed
* Introduce `localize2` function
This is syntax sugar around:
```
{ value localize('id', "Hello"), original: 'Hello' }
```
That will now be returned when you do:
```
localize2('id', "Hello");
```
* fix merge conflic
* new source map due to updated deps
* Experiment with adding ata using `@types` packages shipped in an extension
* Use own file system instead of `https`
* JS/TS type support on web
* Tsconfig needs esModuleInterop not module:nodenext
We actually want webpack to emit commonjs, but need to write ES default
imports to use node-maintainer
* fix package.json indentation
* Adding setting to disable web type acquisition
* Fix merge of yarn lock
* Fixing merge errors
* Fixing errors
* Pick up package externally
* Fixing conflicts
* Bump version
---------
Co-authored-by: Kat Marchán <kzm@zkat.tech>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* eng: add support for snapshot tests
This adds Jest-like support for snapshot testing.
Developers can do something like:
```js
await assertSnapshot(myComplexObject)
```
The first time this is run, the snapshot expectation file is written
to a `__snapshots__` directory beside the test file. Subsequent runs
will compare the object to the snapshot, and fail if it doesn't match.
You can see an example of this in the test for snapshots themselves!
After a successful run, any unused snapshots are cleaned up. On a failed
run, a gitignored `.actual` snapshot file is created beside the
snapshot for easy processing and inspection.
Shortly I will do some integration with the selfhost test extension to
allow developers to easily update snapshots from the vscode UI.
For #189680
cc @ulugbekna @hediet
* fix async stacktraces getting clobbered
* random fixes
* comment out leak detector, for now
* add option to snapshot file extension