From e70cdf118bb7fc8be9a0b48e03bf09a7dcea07b4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 6 May 2024 15:04:37 -0700 Subject: [PATCH] refac: styling --- .../chat/Messages/CitationsModal.svelte | 15 +- .../chat/Messages/ResponseMessage.svelte | 914 +++++++++--------- 2 files changed, 454 insertions(+), 475 deletions(-) diff --git a/src/lib/components/chat/Messages/CitationsModal.svelte b/src/lib/components/chat/Messages/CitationsModal.svelte index 79a9a9720..1043577e8 100644 --- a/src/lib/components/chat/Messages/CitationsModal.svelte +++ b/src/lib/components/chat/Messages/CitationsModal.svelte @@ -23,7 +23,7 @@
-
+
{$i18n.t('Citation')}
@@ -45,12 +45,10 @@
-
-
- {#each mergedDocuments as document} + {#each mergedDocuments as document, documentIdx}
-
+
{$i18n.t('Source')}
@@ -58,14 +56,17 @@
-
+
{$i18n.t('Content')}
 						{document.document}
 					
-
+ + {#if documentIdx !== mergedDocuments.length - 1} +
+ {/if} {/each}
diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index de59239e1..297e390a5 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -387,52 +387,6 @@ {/each}
{/if} - {#if flattenedCitations} -
- {#each [...Object.keys(flattenedCitations)] as source} -
- - -
- {/each} -
- {/if} -
@@ -513,432 +467,456 @@ {/each} {/if} - - {#if message.done} -
- {#if siblings.length > 1} -
- - -
- {siblings.indexOf(message.id) + 1} / {siblings.length} -
- - -
- {/if} - - {#if !readOnly} - - - - {/if} - - - - - - {#if !readOnly} - - - - - - - - {/if} - - - - - - {#if $config.images && !readOnly} - - - - {/if} - - {#if message.info} - - - - {/if} - - {#if isLastMessage && !readOnly} - - - - - - - - {/if} -
- {/if} - - {#if showRateComment} - { - updateChatMessages(); - }} - /> - {/if}
{/if}
+ + {#if flattenedCitations} +
+ +
+ {#each [...Object.keys(flattenedCitations)] as source, idx} + + +
+
+ [{idx + 1}] +
+ + +
+ {/each} +
+ {/if} + + {#if message.done} +
+ {#if siblings.length > 1} +
+ + +
+ {siblings.indexOf(message.id) + 1} / {siblings.length} +
+ + +
+ {/if} + + {#if !readOnly} + + + + {/if} + + + + + + {#if !readOnly} + + + + + + + + {/if} + + + + + + {#if $config.images && !readOnly} + + + + {/if} + + {#if message.info} + + + + {/if} + + {#if isLastMessage && !readOnly} + + + + + + + + {/if} +
+ {/if} + + {#if showRateComment} + { + updateChatMessages(); + }} + /> + {/if} {/if}