Commit ea69c24b authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix: allow message switch during regeneration


Co-Authored-By: default avatarPandazki <onlrrr@gmail.com>
parent a32a7527
...@@ -352,9 +352,6 @@ ...@@ -352,9 +352,6 @@
{/if} {/if}
</Name> </Name>
{#if message.content === ''}
<Skeleton />
{:else}
{#if message.files} {#if message.files}
<div class="my-2.5 w-full flex overflow-x-auto gap-2 flex-wrap"> <div class="my-2.5 w-full flex overflow-x-auto gap-2 flex-wrap">
{#each message.files as file} {#each message.files as file}
...@@ -429,6 +426,8 @@ ...@@ -429,6 +426,8 @@
{message.content} {message.content}
</div> </div>
</div> </div>
{:else if message.content === ''}
<Skeleton />
{:else} {:else}
{#each tokens as token} {#each tokens as token}
{#if token.type === 'code'} {#if token.type === 'code'}
...@@ -486,7 +485,7 @@ ...@@ -486,7 +485,7 @@
</div> </div>
{/if} {/if}
{#if message.done} {#if message.done || siblings.length > 1}
<div <div
class=" flex justify-start space-x-1 overflow-x-auto buttons text-gray-700 dark:text-gray-500" class=" flex justify-start space-x-1 overflow-x-auto buttons text-gray-700 dark:text-gray-500"
> >
...@@ -538,6 +537,7 @@ ...@@ -538,6 +537,7 @@
</div> </div>
{/if} {/if}
{#if message.done}
{#if !readOnly} {#if !readOnly}
<Tooltip content={$i18n.t('Edit')} placement="bottom"> <Tooltip content={$i18n.t('Edit')} placement="bottom">
<button <button
...@@ -898,6 +898,7 @@ ...@@ -898,6 +898,7 @@
</button> </button>
</Tooltip> </Tooltip>
{/if} {/if}
{/if}
</div> </div>
{/if} {/if}
...@@ -915,7 +916,6 @@ ...@@ -915,7 +916,6 @@
{/if} {/if}
</div> </div>
</div> </div>
{/if}
</div> </div>
</div> </div>
{/key} {/key}
......
<div class="w-full mt-3"> <div class="w-full mt-3 mb-4">
<div class="animate-pulse flex w-full"> <div class="animate-pulse flex w-full">
<div class="space-y-2 w-full"> <div class="space-y-2 w-full">
<div class="h-2 bg-gray-200 dark:bg-gray-600 rounded mr-14" /> <div class="h-2 bg-gray-200 dark:bg-gray-600 rounded mr-14" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment