Skip to content

Conversation

@dustinhealy
Copy link
Collaborator

@dustinhealy dustinhealy commented Dec 12, 2025

Summary

This pull request addresses the Copilot comments made in #9669 and fixed in #10898's branch (62395f8).

UI and Error Handling Improvements:

  • Updated error rendering in MCPUIResource to fall back to resourceId if uiResource.name is unavailable, preventing blank error messages.

Type Safety and Utility Refactoring:

  • Improved the handleUIAction utility by explicitly typing its parameters with UIActionResult and TAskFunction, and replaced console statements with the logger utility for better logging consistency. [1] [2] [3]

Attachment and Message Handling:

  • Fixed the attachment selector to filter out entries with empty attachment arrays, ensuring only relevant attachments are processed.
  • Adjusted the ShareMessagesProvider to set conversation to null in the shared view context, clarifying that no actual conversation object is present.

Resource ID Generation:

  • Refined the logic for generating resource IDs for UI resources, ensuring that only valid string content is used for hashing, which prevents potential errors with non-string values.

Change Type

  • New feature (non-breaking change which adds functionality)

Testing

Ensured MCP-UI elements (single and carousel) rendered and were interactable in main chat and shared view.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@dustinhealy dustinhealy marked this pull request as ready for review December 12, 2025 21:55
@danny-avila danny-avila merged commit 5b0cce2 into dev-staging Dec 12, 2025
7 checks passed
@danny-avila danny-avila deleted the chore/mcp-ui-copilot-comments branch December 12, 2025 22:10
maxesse pushed a commit to maxesse/LibreChat that referenced this pull request Dec 25, 2025
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