Skip to content

chore(cas): update allowed attachment types tooltip to chat widget#104

Open
norman-le wants to merge 3 commits into
developfrom
chore/JAR-9901-update-file-tooltip-widgets
Open

chore(cas): update allowed attachment types tooltip to chat widget#104
norman-le wants to merge 3 commits into
developfrom
chore/JAR-9901-update-file-tooltip-widgets

Conversation

@norman-le

Copy link
Copy Markdown

Changes:

  • Added ALLOWED_ATTACHMENTS constant in src/constants.ts defining supported file types (PDF, CSV, DOC/DOCX, XLS/XLSX, HTML, TXT, MD, GIF, JPEG, PNG, TIFF, WEBP), multiple file support, and 30MB max size
  • Called chatServiceInstance.setAllowedAttachments() in initChat when attachments are not disabled
  • Added tests verifying the call is made (and skipped when attachments are disabled)

Context: Ported from UiPath/AgentInterfaces#1027 — updates the chat tooltip to reflect supported file types for the Analyze Attachments tool.

Copilot AI review requested due to automatic review settings June 17, 2026 14:42
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Package Line Coverage
datatable 88.29%
multi-file-upload 87.27%
conversational-agent-chat 89.09%
validation-station 87.75%

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_ATTACHMENTS constant 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 setAllowedAttachments behavior 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.

Comment thread packages/conversational-agent-chat/src/constants/attachments.ts
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.

2 participants