Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add generated caution text to the messages with corresponding keywords #5298

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

OEvgeny
Copy link
Collaborator

@OEvgeny OEvgeny commented Sep 16, 2024

Fixes #

Changelog Entry

  • Added a content generated badge to AI-generated messages, in PR #5298, by @OEvgeny

Description

This PR adds a content generated badge to messages that are identified as AI-generated content.

Design

The implementation targets all white-label and both theme variant experiences:

  • In white-label we show a grayed text at the bottom (before references)
  • In fluent variant we show a badge before references
  • In copilot variant we hide the badge as there is another one on copilot header area

Specific Changes

  • Created isAIGeneratedActivity.ts to identify AI-generated content
  • Updated TextContent.tsx, MarkdownTextContent.tsx, and PlainTextContent.tsx to include the generated badge
  • Modified ActivityDecorator.module.css to style the generated badge
  • Updated test files to include scenarios with AI-generated content

-

  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@OEvgeny OEvgeny changed the title feat: add generated text to the messages with corresponding keywords feat: add generated caution text to the messages with corresponding keywords Sep 16, 2024
@OEvgeny OEvgeny marked this pull request as ready for review September 16, 2024 21:26
@OEvgeny OEvgeny requested a review from compulim September 16, 2024 22:48
@OEvgeny OEvgeny merged commit 4b9342a into main Sep 16, 2024
25 checks passed
@OEvgeny OEvgeny deleted the feature/generated-badge branch September 16, 2024 23:04
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