chore(cas): update allowed attachment types tooltip to chat widget#104
Open
norman-le wants to merge 3 commits into
Open
chore(cas): update allowed attachment types tooltip to chat widget#104norman-le wants to merge 3 commits into
norman-le wants to merge 3 commits into
Conversation
Contributor
📊 Coverage Report
|
There was a problem hiding this comment.
Pull request overview
This PR updates the conversational agent chat widget to explicitly configure and expose the supported attachment types/size limit (for the upload tooltip / attachment UX) by introducing a shared ALLOWED_ATTACHMENTS configuration and wiring it into chat initialization, with test coverage for both enabled/disabled attachment scenarios.
Changes:
- Added an
ALLOWED_ATTACHMENTSconstant defining supported MIME types/extensions, multi-file support, and a 30MB max size. - Updated chat initialization to call
chatServiceInstance.setAllowedAttachments(ALLOWED_ATTACHMENTS)when attachments are enabled. - Extended unit and surface tests to cover the new
setAllowedAttachmentsbehavior and updated mocks accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/conversational-agent-chat/src/ConversationalAgentChat.tsx | Calls setAllowedAttachments() during initChat when attachments are not disabled. |
| packages/conversational-agent-chat/src/constants.ts | Introduces ALLOWED_ATTACHMENTS configuration used by the chat widget. |
| packages/conversational-agent-chat/src/tests/ConversationalAgentChat.test.tsx | Adds coverage verifying setAllowedAttachments is called/skipped based on disabledFeatures.attachments. |
| packages/conversational-agent-chat/src/tests/ConversationalAgentChat.surface.test.tsx | Updates the Apollo component mock to include setAllowedAttachments to match runtime behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Changes:
ALLOWED_ATTACHMENTSconstant insrc/constants.tsdefining supported file types (PDF, CSV, DOC/DOCX, XLS/XLSX, HTML, TXT, MD, GIF, JPEG, PNG, TIFF, WEBP), multiple file support, and 30MB max sizechatServiceInstance.setAllowedAttachments()ininitChatwhen attachments are not disabledContext: Ported from UiPath/AgentInterfaces#1027 — updates the chat tooltip to reflect supported file types for the Analyze Attachments tool.