Skip to content

Commit 1eb6bf5

Browse files
committed
Merge remote-tracking branch 'origin/main' into VSCODE-574-export-to-playground
# Conflicts: # src/editors/playgroundController.ts # src/participant/participant.ts # src/participant/prompts/schema.ts # src/telemetry/telemetryService.ts # src/test/suite/editors/playgroundController.test.ts # src/test/suite/participant/participant.test.ts # src/test/suite/telemetry/telemetryService.test.ts
2 parents b6c30eb + 2cf7a18 commit 1eb6bf5

23 files changed

+928
-748
lines changed

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
# List staged files only.
52
fileList=$(git diff --diff-filter=AM --cached --name-only)
63

CHANGELOG.md

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Change Log
22

3+
## [v1.9.1](https://github.com/mongodb-js/vscode/releases/tag/v1.9.1) - 2024-09-30
4+
5+
## What's Changed
6+
* fix: remove enabledApiProposals from package.json VSCODE-631 by @Anemy in https://github.com/mongodb-js/vscode/pull/849
7+
8+
9+
**Full Changelog**: https://github.com/mongodb-js/vscode/compare/v1.9.0...v1.9.1
10+
11+
12+
## [v1.9.0](https://github.com/mongodb-js/vscode/releases/tag/v1.9.0) - 2024-09-30
13+
14+
## What's Changed
15+
* feat(chat): add VSCode Copilot chat participant VSCODE-528 in https://github.com/mongodb-js/vscode/pull/839
16+
17+
## New Contributors
18+
* @nirinchev made their first contribution in https://github.com/mongodb-js/vscode/pull/813
19+
20+
**Full Changelog**: https://github.com/mongodb-js/vscode/compare/v1.8.1...v1.9.0
21+
22+
323
## [v1.8.1](https://github.com/mongodb-js/vscode/releases/tag/v1.8.1) - 2024-09-02
424

525
## What's Changed
@@ -392,37 +412,3 @@ To dig deeper please feel free to follow the links mentioned below:
392412
- Updated the Atlas link to have https (#259)
393413

394414

395-
## [v0.4.1](https://github.com/mongodb-js/vscode/releases/tag/v0.4.1) - 2021-02-10
396-
397-
### Changed
398-
399-
- Updated the Atlas link in the overview page (#250)
400-
401-
### Fixed
402-
403-
- Fixed an issue with playground connectivity not defaulting the `directConnection` option to true (VSCODE-234, #255)
404-
- Fixed an issue around showing an error while editing a playground file without an active MongoDB connection (VSCODE-231, #251)
405-
406-
407-
## [v0.4.0](https://github.com/mongodb-js/vscode/releases/tag/v0.4.0) - 2021-01-25
408-
409-
### Added
410-
411-
- Added the ability to edit documents opened from the explorer panel (VSCODE-219, #226, #239)
412-
- Added the ability to open and edit documents from playground results (VSCODE-222, #232)
413-
- Added icons for connect and playground panel actions (VSCODE-179, #240)
414-
- Added the ability to specify multiple hosts and ports in the connection form (VSCODE-208, #224)
415-
- Added a feature where we show the overview page when the extension is first installed (VSCODE-167, #225)
416-
417-
### Changed
418-
419-
- Changed how we generate default connection names for new connections to better represent multiple hosts and ports, and srv records (VSCODE-221, #227)
420-
- Changed how we show connectivity errors with the connection form (VSCODE-196, #217)
421-
422-
### Fixed
423-
424-
- Fix opening documents with a binary `_id` from the explorer panel (VSCODE-118, #220)
425-
- Fixed playground log output panel to not display when a playground is open and when a playground is run and there was no log output (#234)
426-
- Fixed code lenses for partial playground executions sometimes being missing (VSCODE-226, #243)
427-
428-

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,25 @@ Connect to Atlas Stream Processing instances and develop stream processors using
7777

7878
![Atlas Stream Processing Playground](resources/screenshots/atlas-stream-processing.png)
7979

80+
### MongoDB Copilot Participant
81+
82+
Use natural language to interact with your clusters and generate MongoDB-related code with GitHub Copilot Chat in VS Code.
83+
84+
_Note: To use the MongoDB Participant, you must have the [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) extension. By using Copilot Chat you agree to [GitHub Copilot chat preview terms](https://docs.github.com/en/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-chat-in-your-ide). Find more details about the MongoDB GenAI Features in the [FAQ](https://www.mongodb.com/docs/generative-ai-faq/)._
85+
86+
#### How to use the MongoDB Participant
87+
88+
1. Enter `@MongoDB` in the chat input field to start a conversation with the MongoDB Participant.
89+
90+
![MongoDB Participant](resources/screenshots/mongodb-participant.png)
91+
92+
2. Start typing `/` in the chat window to get the list of available chat participant commands.
93+
94+
![MongoDB Participant Commands](resources/screenshots/mongodb-participant-commands.png)
95+
96+
- `/docs` is a participant command that finds answers to coding-related questions in the [MongoDB documentation](https://www.mongodb.com/docs/).
97+
- `/query` is a participant command that generates MongoDB queries from natural language to be used with a connected MongoDB cluster. It generates both queries and aggregations depending on the complexity of the request. It utilizes schema to reduce model hallucinations. It provides a code action to open generated code in a playground and an action to directly run the code from the Copilot chat interface.
98+
- `/schema` is a participant command that analyzes and returns information about a collection's schema.
8099

81100
## Extension Settings
82101

@@ -99,6 +118,8 @@ Connect to Atlas Stream Processing instances and develop stream processors using
99118
| `mdb.useDefaultTemplateForPlayground` | Choose whether to use the default template for playground files or to start with an empty playground editor. | `true` |
100119
| `mdb.uniqueObjectIdPerCursor` | The default behavior is to generate a single ObjectId and insert it on all cursors. Set to true to generate a unique ObjectId per cursor instead. | `false` |
101120
| `mdb.sendTelemetry` | Opt-in and opt-out for diagnostic and telemetry collection. | `true` |
121+
| `mdb.confirmRunCopilotCode` | Show a confirmation message before running code generated by the MongoDB participant. | `true` |
122+
| `mdb.useSampleDocsInCopilot` | Enable sending sample field values with the VSCode copilot chat @MongoDB participant /query command. | `false` |
102123

103124
## Additional Settings
104125

package-lock.json

Lines changed: 43 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
},
1717
"publisher": "mongodb",
1818
"categories": [
19+
"AI",
20+
"Chat",
21+
"Data Science",
1922
"Programming Languages",
2023
"Snippets",
2124
"Other"
@@ -32,9 +35,6 @@
3235
"color": "#3D4F58",
3336
"theme": "dark"
3437
},
35-
"enabledApiProposals": [
36-
"chatParticipantAdditions"
37-
],
3838
"license": "SEE LICENSE IN LICENSE.txt",
3939
"main": "./dist/extension.js",
4040
"scripts": {
@@ -191,11 +191,11 @@
191191
"title": "MongoDB: Change Active Connection with Participant"
192192
},
193193
{
194-
"command": "mdb.runParticipantQuery",
194+
"command": "mdb.runParticipantCode",
195195
"title": "Run Content Generated by Participant"
196196
},
197197
{
198-
"command": "mdb.openParticipantQueryInPlayground",
198+
"command": "mdb.openParticipantCodeInPlayground",
199199
"title": "Open Generated by Participant Content In Playground"
200200
},
201201
{
@@ -780,15 +780,15 @@
780780
"when": "false"
781781
},
782782
{
783-
"command": "mdb.runParticipantQuery",
783+
"command": "mdb.runParticipantCode",
784784
"when": "false"
785785
},
786786
{
787-
"command": "mdb.openParticipantQueryInPlayground",
787+
"command": "mdb.openParticipantCodeInPlayground",
788788
"when": "false"
789789
},
790790
{
791-
"command": "mdb.runParticipantQuery",
791+
"command": "mdb.runParticipantCode",
792792
"when": "false"
793793
},
794794
{
@@ -1268,7 +1268,7 @@
12681268
"@typescript-eslint/eslint-plugin": "^5.62.0",
12691269
"@typescript-eslint/parser": "^5.62.0",
12701270
"@vscode/test-electron": "^2.4.1",
1271-
"@vscode/vsce": "^2.31.1",
1271+
"@vscode/vsce": "^3.1.0",
12721272
"buffer": "^6.0.3",
12731273
"chai": "^4.5.0",
12741274
"chai-as-promised": "^7.1.2",
57.2 KB
Loading
55.8 KB
Loading

src/commands/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ enum EXTENSION_COMMANDS {
7878
MDB_DROP_STREAM_PROCESSOR = 'mdb.dropStreamProcessor',
7979

8080
// Chat participant.
81-
OPEN_PARTICIPANT_QUERY_IN_PLAYGROUND = 'mdb.openParticipantQueryInPlayground',
82-
RUN_PARTICIPANT_QUERY = 'mdb.runParticipantQuery',
81+
OPEN_PARTICIPANT_CODE_IN_PLAYGROUND = 'mdb.openParticipantCodeInPlayground',
82+
RUN_PARTICIPANT_CODE = 'mdb.runParticipantCode',
8383
CONNECT_WITH_PARTICIPANT = 'mdb.connectWithParticipant',
8484
SELECT_DATABASE_WITH_PARTICIPANT = 'mdb.selectDatabaseWithParticipant',
8585
SELECT_COLLECTION_WITH_PARTICIPANT = 'mdb.selectCollectionWithParticipant',

0 commit comments

Comments
 (0)