Skip to content

Commit

Permalink
Fix viewgeneratedprompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ylovato01 committed May 8, 2024
1 parent 7bb0a87 commit fe46847
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions frontend/src/components/ViewGeneratedPrompts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@
<h4 class="mt-5">Come ti possiamo aiutare?</h4>
</div>
<div v-else class="w-100 text-black">
<div v-for="(message, index) in messages" :key="index" class="border-bottom">
<div v-if="message.type === 'user'" class="w-100 p-3 text-black">
<i class="bi bi-person-fill me-2"></i>
<strong>User</strong>
<p>{{ message.text }}</p>
</div>
<div v-else-if="message.type === 'response'" class="w-100 p-3 text-black bg-light border-start border-end">
<i class="bi bi-robot me-2"></i>
<strong>Response</strong>
<p style="white-space: pre-line">{{ message.text }}</p>
<i class="bi bi-clipboard me-2 copy-icon" @click="copyToClipboard(message.text)"></i>
</div>
<div v-if="status" class="w-100 text-center text-black">
<div class="spinner-border text-primary mt-2" role="status">
<span class="visually-hidden">Loading...</span>
<div v-for="(message, index) in messages" :key="index" class="border-bottom">
<div v-if="message.type === 'user'" class="w-100 p-3 text-black">
<i class="bi bi-person-fill me-2"></i>
<strong>User</strong>
<p>{{ message.text }}</p>
</div>
</div>
<div id="container" ref="messagebox"></div>
<div v-else-if="message.type === 'response'" class="w-100 p-3 text-black bg-light border-start border-end">
<i class="bi bi-robot me-2"></i>
<strong>Response</strong>
<p style="white-space: pre-line">{{ message.text }}</p>
<i class="bi bi-clipboard me-2 copy-icon" @click="copyToClipboard(message.text)"></i>
</div>
<div v-if="status" class="w-100 text-center text-black">
<div class="spinner-border text-primary mt-2" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<div id="container" ref="messagebox"></div>
</div>
</div>
</div>
</template>

<script>
Expand Down

0 comments on commit fe46847

Please sign in to comment.