Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Conversation

@nlarew
Copy link
Collaborator

@nlarew nlarew commented Jul 17, 2025

Jira: (EAI-1086) [UI] Add client handler for reference link click

Changes

  • Adds Chatbot.onReferenceClick() callback

@nlarew nlarew requested a review from Copilot July 21, 2025 22:35
Copy link

Copilot AI left a comment

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 adds support for handling reference link clicks in the MongoDB Chatbot UI by introducing an onReferenceClick callback that gets passed through the component hierarchy and triggers when users click on reference links in chat messages.

  • Adds onReferenceClick callback to the main Chatbot component props
  • Threads the callback through all relevant components (useChatbot, Message, ChatMessageFeed, etc.)
  • Integrates the callback with the rich links system to trigger when reference links are clicked

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
useChatbot.tsx Adds onReferenceClick prop to hook interface and return data
messageLinks.ts Updates formatReferences and getMessageLinks to accept and use onReferenceClick callback
Message.tsx Passes onReferenceClick to getMessageLinks function
Chatbot.tsx Adds onReferenceClick prop to component interface
ChatMessageFeed.tsx Retrieves onReferenceClick from context and passes to Message component
App.tsx Adds example onReferenceClick handlers with console.log statements
package.json Updates various LeafyGreen UI and chat component dependencies to newer versions

@nlarew nlarew merged commit 2826400 into main Jul 22, 2025
1 check passed
@nlarew nlarew deleted the onReferenceClick branch July 22, 2025 14:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants