Merge branch 'feat/improve-search-architecture' of https://github.com/ItzCrazyKns/Perplexica into feat/improve-search-architecture

This commit is contained in:
ItzCrazyKns
2025-12-27 13:34:10 +05:30
2 changed files with 13 additions and 11 deletions

View File

@@ -21,8 +21,8 @@ const Copy = ({
) as SourceBlock[]; ) as SourceBlock[];
const contentToCopy = `${initialMessage}${ const contentToCopy = `${initialMessage}${
sources.length > 0 && sources.length > 0
`\n\nCitations:\n${sources ? `\n\nCitations:\n${sources
.map((source) => source.data) .map((source) => source.data)
.flat() .flat()
.map( .map(
@@ -30,6 +30,7 @@ const Copy = ({
`[${i + 1}] ${s.metadata.url.startsWith('file_id://') ? s.metadata.fileName || 'Uploaded File' : s.metadata.url}`, `[${i + 1}] ${s.metadata.url.startsWith('file_id://') ? s.metadata.fileName || 'Uploaded File' : s.metadata.url}`,
) )
.join(`\n`)}` .join(`\n`)}`
: ''
}`; }`;
navigator.clipboard.writeText(contentToCopy); navigator.clipboard.writeText(contentToCopy);

View File

@@ -205,8 +205,9 @@ const Navbar = () => {
useEffect(() => { useEffect(() => {
if (sections.length > 0 && sections[0].message) { if (sections.length > 0 && sections[0].message) {
const newTitle = const newTitle =
sections[0].message.query.substring(0, 30) + '...' || sections[0].message.query.length > 30
'New Conversation'; ? `${sections[0].message.query.substring(0, 30).trim()}...`
: sections[0].message.query || 'New Conversation';
setTitle(newTitle); setTitle(newTitle);
const newTimeAgo = formatTimeDifference( const newTimeAgo = formatTimeDifference(