Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>tags/1.9.1
| import { useAppContext } from '@/context/app-context' | import { useAppContext } from '@/context/app-context' | ||||
| import useTimestamp from '@/hooks/use-timestamp' | import useTimestamp from '@/hooks/use-timestamp' | ||||
| import Tooltip from '@/app/components/base/tooltip' | import Tooltip from '@/app/components/base/tooltip' | ||||
| import { CopyIcon } from '@/app/components/base/copy-icon' | |||||
| import CopyIcon from '@/app/components/base/copy-icon' | |||||
| import { buildChatItemTree, getThreadMessages } from '@/app/components/base/chat/utils' | import { buildChatItemTree, getThreadMessages } from '@/app/components/base/chat/utils' | ||||
| import { getProcessedFilesFromResponse } from '@/app/components/base/file-uploader/utils' | import { getProcessedFilesFromResponse } from '@/app/components/base/file-uploader/utils' | ||||
| import cn from '@/utils/classnames' | import cn from '@/utils/classnames' |
| const prefixEmbedded = 'appOverview.overview.appInfo.embedded' | const prefixEmbedded = 'appOverview.overview.appInfo.embedded' | ||||
| export const CopyIcon = ({ content }: Props) => { | |||||
| const CopyIcon = ({ content }: Props) => { | |||||
| const { t } = useTranslation() | const { t } = useTranslation() | ||||
| const [isCopied, setIsCopied] = useState<boolean>(false) | const [isCopied, setIsCopied] = useState<boolean>(false) | ||||
| return { elapsedTime, isComplete } | return { elapsedTime, isComplete } | ||||
| } | } | ||||
| export const ThinkBlock = ({ children, ...props }: any) => { | |||||
| const ThinkBlock = ({ children, ...props }: React.ComponentProps<'details'>) => { | |||||
| const { elapsedTime, isComplete } = useThinkTimer(children) | const { elapsedTime, isComplete } = useThinkTimer(children) | ||||
| const displayContent = removeEndThink(children) | const displayContent = removeEndThink(children) | ||||
| const { t } = useTranslation() | const { t } = useTranslation() |
| import DOMPurify from 'dompurify' | import DOMPurify from 'dompurify' | ||||
| import ImagePreview from '@/app/components/base/image-uploader/image-preview' | import ImagePreview from '@/app/components/base/image-uploader/image-preview' | ||||
| export const SVGRenderer = ({ content }: { content: string }) => { | |||||
| const SVGRenderer = ({ content }: { content: string }) => { | |||||
| const svgRef = useRef<HTMLDivElement>(null) | const svgRef = useRef<HTMLDivElement>(null) | ||||
| const [imagePreview, setImagePreview] = useState('') | const [imagePreview, setImagePreview] = useState('') | ||||
| const [windowSize, setWindowSize] = useState({ | const [windowSize, setWindowSize] = useState({ |
| result = 'result', | result = 'result', | ||||
| } | } | ||||
| export const JsonSchemaGenerator: FC<JsonSchemaGeneratorProps> = ({ | |||||
| const JsonSchemaGenerator: FC<JsonSchemaGeneratorProps> = ({ | |||||
| onApply, | onApply, | ||||
| crossAxisOffset, | crossAxisOffset, | ||||
| }) => { | }) => { |