Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(copilot): optimize namespace for export to playground VSCODE-654 #887

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

alenakhineika
Copy link
Contributor

@alenakhineika alenakhineika commented Nov 26, 2024

Description

  • Update prompt with the use() example to generate a playground with a proper namespace usage
  • Rebrand to MongoDB Copilot Extension instead of participant in the context menu

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@alenakhineika alenakhineika marked this pull request as ready for review November 28, 2024 12:08
@alenakhineika alenakhineika merged commit 7ea659c into main Dec 3, 2024
8 checks passed
@alenakhineika alenakhineika deleted the VSCODE-654-namespace-for-export-to-playground branch December 3, 2024 12:11
@@ -4,6 +4,30 @@ export class ExportToPlaygroundPrompt extends PromptBase<PromptArgsBase> {
protected getAssistantPrompt(): string {
return `You are a MongoDB expert.
Your task is to convert user's code written in any programming language to the MongoDB mongosh shell script.
If the user's code contains a database and collection name, preserve them in the transpiled code,
otherwise use '<YOUR_DATABASE_NAME>' and 'YOUR_COLLECTION_NAME' placeholders.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not sure if the model actually consolidates those when generating the response, but the formatting here is inconsistent - we should choose whether we want to include <> or not and use a consistent formatting for both db and col.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! It should definitely be aligned. I will open a tiny pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants