File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/lib/components/chat/Messages/Citations Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 160160 {/if }
161161 </div >
162162
163+ <!-- PATCH ADD LINK TO SOURCE -->
164+ {#if document ?.metadata ?.data ?.url }
165+ <div
166+ class =" text-sm font-medium dark:text-gray-300 flex items-center gap-2 w-fit mb-1"
167+ >
168+ {$i18n .t (' Source' )}
169+ <Tooltip
170+ className =" w-fit"
171+ content ={$i18n .t (' Open link' )}
172+ placement =" top-start"
173+ tippyOptions ={{ duration : [500 , 0 ] }}
174+ >
175+ <a
176+ class =" hover:text-gray-500 dark:hover:text-gray-100 underline grow line-clamp-1"
177+ href ={document .metadata .data .url }
178+ target =" _blank"
179+ >
180+ {document .metadata .data .url }
181+ </a >
182+ </Tooltip >
183+ </div >
184+ {/if }
185+ <!-- PATCH ADD LINK TO SOURCE - END -->
186+
163187 {#if document .metadata ?.html }
164188 <iframe
165189 class =" w-full border-0 h-auto rounded-none"
You can’t perform that action at this time.
0 commit comments