Skip to content

Conversation

@ZyuT0h
Copy link
Contributor

@ZyuT0h ZyuT0h commented Aug 14, 2025

Passed ArtefactID from section.jsx -> catalogueItemView.jsx -> itemChat

itemChat: A contextual chatbot that answers questions only about the currently selected artefact.

  • Handles empty inputs and prevents multiple submissions while loading.
  • Sends messages to /chatbot/query with artefactID, newPrompt, and current history.
  • User messages appear immediately when sent
  • Shows separate background colors for user (blue.50) and assistant (green.50) messages.
  • Scrolls to the latest message automatically (useRef + useEffect).
  • Handles Enter key submission and prevents accidental multi-line inputs.

@ZyuT0h ZyuT0h requested a review from Prakhar896 August 14, 2025 15:59
@ZyuT0h ZyuT0h self-assigned this Aug 14, 2025
@ZyuT0h ZyuT0h added the enhancement New feature or request label Aug 14, 2025
@ZyuT0h ZyuT0h changed the title Zhengyu Updated itemChat Aug 14, 2025
Copy link
Contributor

@Prakhar896 Prakhar896 left a comment

Choose a reason for hiding this comment

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

LGTM

@Prakhar896 Prakhar896 merged commit 034a00c into main Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants