feat(app): handle new architecture

This commit is contained in:
ItzCrazyKns
2025-11-23 19:58:46 +05:30
parent e0ba476ca4
commit 956a768a86
14 changed files with 945 additions and 508 deletions

View File

@@ -15,7 +15,14 @@ const Copy = ({
return (
<button
onClick={() => {
const contentToCopy = `${initialMessage}${section?.sourceMessage?.sources && section.sourceMessage.sources.length > 0 && `\n\nCitations:\n${section.sourceMessage.sources?.map((source: any, i: any) => `[${i + 1}] ${source.metadata.url}`).join(`\n`)}`}`;
const contentToCopy = `${initialMessage}${
section?.message.responseBlocks.filter((b) => b.type === 'source')
?.length > 0 &&
`\n\nCitations:\n${section.message.responseBlocks
.filter((b) => b.type === 'source')
?.map((source: any, i: any) => `[${i + 1}] ${source.metadata.url}`)
.join(`\n`)}`
}`;
navigator.clipboard.writeText(contentToCopy);
setCopied(true);
setTimeout(() => setCopied(false), 1000);