Draft
Conversation
* Initial plan * Remove getConnectionInfo references from OperationParser and CosmosDbOperationsService Co-authored-by: languy <21954022+languy@users.noreply.github.com>
…out with chatBox styling
…generation and content restrictions
…/cdb-chat-participant-with-copilot-query
…ide-by-side; refactor imports for consistency
…enhanced security
* Initial plan * Disable AI features when GitHub Copilot is not available Co-authored-by: languy <21954022+languy@users.noreply.github.com> * Fix documentation in copilotUtils.ts Co-authored-by: languy <21954022+languy@users.noreply.github.com> * feat: enhance AI feature availability checks and user feedback * refactor: remove getAIFeaturesDisabledReason function and related localization logic * fix: update comments for clarity on AI feature checks and retry logic * feat: add new localization strings for query cancellation and schema properties * fix: fix format * fix: fix unit tests --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: languy <21954022+languy@users.noreply.github.com> Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
…ion (#2923) * Initial plan * Add sanitization utilities and apply to chat participant and tree items - Create comprehensive sanitization utilities (escapeHtml, escapeMarkdown, safeCodeBlock, etc.) - Add 32 unit tests covering XSS prevention scenarios - Apply sanitization to chat participant markdown output - Apply sanitization to tree item tooltips - All tests pass, code compiles successfully Co-authored-by: languy <21954022+languy@users.noreply.github.com> * Add URL scheme validation and sanitize container tooltips - Add URL scheme validation to openUrl to prevent command injection - Sanitize partition key paths in container tooltips - Fix TypeScript linting errors Co-authored-by: languy <21954022+languy@users.noreply.github.com> * Address code review feedback - Move HTML_ESCAPE_MAP to module-level constant - Use escaped backticks instead of spaces for inline code - Add inline comments explaining triple backtick escaping strategy - Wrap numbers and booleans in code blocks for consistency - Update tests to match new escaping behavior Co-authored-by: languy <21954022+languy@users.noreply.github.com> * Fix incomplete sanitization - escape backslashes in inline code - Escape backslashes before backticks to prevent incomplete sanitization - Add tests for backslash escaping - CodeQL security check now passes with 0 alerts Co-authored-by: languy <21954022+languy@users.noreply.github.com> * Revert tree/tooltip changes and sanitize query generation input - Revert CosmosDBItemResourceItem.ts to remove sanitization (not needed for tree tooltips) - Revert CosmosDBContainerResourceItem.ts to remove sanitization (not needed for tree tooltips) - Revert openUrl.ts to remove URL scheme validation (not needed) - Add sanitizeSqlComment() function to prevent SQL comment injection - Sanitize user prompt and currentQuery in QueryEditorTab generateQuery method - Add 7 new tests for SQL comment sanitization - Keep all chat participant sanitization intact Co-authored-by: languy <21954022+languy@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: languy <21954022+languy@users.noreply.github.com> Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
…ng in chat requests
…ake query generation more robust
…on based on string comparisons)
…ut current query and add new query)
…d adding relevant context
… and general question handling - Added methods to load and cache Cosmos DB reference assets for enriched context in chat responses. - Implemented handling for general questions about Azure Cosmos DB, allowing users to ask broader queries. - Updated system prompt to encourage the use of reference documentation for accurate responses. - Modified intent extraction to include a new operation for general questions.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2883