Skip to content

Commit

Permalink
Merge pull request #492 from sugarforever/fix/relavantDocUI
Browse files Browse the repository at this point in the history
fix: fixed incomplete content display  #486
  • Loading branch information
satrong authored May 29, 2024
2 parents 04878b8 + e3944dc commit eb6d82c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions components/Sources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ defineProps<{
<div class="bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-600 p-2 rounded"
v-for="(relevant_document, index) in relevant_documents"
:key="index">
<Source :source="relevant_document?.metadata?.source" />
<UPopover mode="hover" :popper="{ placement: 'right' }">
<pre class="line-clamp-3 text-gray-500 text-sm whitespace-break-spaces"
v-html="relevant_document?.pageContent" />
<template #panel>
<pre class="p-4 text-gray-500 text-sm whitespace-break-spaces"
<UPopover mode="hover">
<div>
<Source :source="relevant_document?.metadata?.source" />
<pre class="line-clamp-3 text-gray-500 text-sm whitespace-break-spaces"
v-html="relevant_document?.pageContent" />
</div>
<template #panel>
<div class="max-h-[40vh] overflow-auto">
<pre class="p-4 text-gray-500 text-sm whitespace-break-spaces"
v-html="relevant_document?.pageContent" />
</div>
</template>
</UPopover>
</div>
Expand Down

0 comments on commit eb6d82c

Please sign in to comment.