-
Notifications
You must be signed in to change notification settings - Fork 246
feat(gen-ai): wrap prompt in tags for storage COMPASS-10083 #7636
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3783456
wrap prompt in tags
mabaasit 3aa3d8e
send metadata to api
mabaasit 3fc7998
assertions in e2e test
mabaasit 0e960ba
clean up
mabaasit febb55d
handle fle collections
mabaasit fc099ed
clean up and fix tests
mabaasit e21540e
Merge branch 'main' into COMPASS-10083-wrap-data-in-tags
mabaasit 1986932
types fix
mabaasit 5354f9a
pass request id in headers
mabaasit 5db3992
Merge branch 'main' into COMPASS-10083-wrap-data-in-tags
mabaasit 9db8104
query-bar fixes
mabaasit a55cd55
aggregation fixes
mabaasit cde9414
fix tests and check
mabaasit a43af96
fix tests
mabaasit 78df9e1
Merge branch 'main' into COMPASS-10083-wrap-data-in-tags
mabaasit 90837b3
fix tests
mabaasit 45277c2
escape user input
mabaasit 80db680
escape user_prompt tag from input
mabaasit e7786c2
allow headers for cors in tests
mabaasit a3716a5
hash user id
mabaasit 401897d
Merge branch 'main' into COMPASS-10083-wrap-data-in-tags
mabaasit 641d379
Merge branch 'main' of https://github.com/mongodb-js/compass into COM…
mabaasit aabe250
fix test
mabaasit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
escape user input
- Loading branch information
commit 45277c29bd3aaa42c831d1927fe6fc60fee1f21f
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using type assertion
as anybypasses TypeScript's type safety. SincesensitiveStorageis conditionally present based on the discriminated union, use a type guard or check the property existence first:if ('sensitiveStorage' in metadata) { expect(metadata.sensitiveStorage).to.equal('sensitive'); }.