Download wp-calypso/client/performance-profiler/components/llm-message/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 882 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/performance-profiler/components/llm-message/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/performance-profiler/components/llm-message/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/performance-profiler/components/llm-message/index.tsx
882 Bytes
| import clsx from 'clsx'; | |
| import { useTranslate } from 'i18n-calypso'; | |
| import { ReactNode } from 'react'; | |
| import AIIcon from 'calypso/assets/images/performance-profiler/ai-icon.svg'; | |
| import AILoadingIcon from 'calypso/assets/images/performance-profiler/ai-loading-icon.svg'; | |
| import './style.scss'; | |
| interface LLMMessageProps { | |
| message: string | ReactNode; | |
| secondaryArea?: ReactNode; | |
| rotate?: boolean; | |
| } | |
| export const LLMMessage = ( { message, rotate, secondaryArea }: LLMMessageProps ) => { | |
| const translate = useTranslate(); | |
| return ( | |
| <div className="performance-profiler-llm-message"> | |
| <div className="content"> | |
| <img | |
| src={ rotate ? AILoadingIcon : AIIcon } | |
| alt={ translate( 'AI generated content icon' ) } | |
| className={ clsx( { rotate: !! rotate } ) } | |
| /> | |
| <span className="message">{ message }</span> | |
| </div> | |
| { secondaryArea } | |
| </div> | |
| ); | |
| }; | |