Skip to content

Commit

Permalink
Merge pull request #30 from your-papa/dev
Browse files Browse the repository at this point in the history
Relase 0.2.4
  • Loading branch information
nicobrauchtgit authored Feb 28, 2024
2 parents 9e3e2fe + bd950f8 commit 1af4669
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/components/Chat/Chat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="--background-modifier-border flex h-full flex-col">
<div class="--background-modifier-border flex h-full flex-col gap-1">
<QuickSettingsDrawer />
{#if $plugin.data.isChatComfy}
<MessagesBubble bind:textarea />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Chat/Input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
</script>

<!-- save delete and rag settings slightly above input field -->
<div class="relative pb-1">
<div class="relative">
<div
class="absolute -top-[3.3rem] left-1/2 flex -translate-x-1/2 items-center gap-3 rounded-t-2xl border-solid border-x-[--background-modifier-border] border-b-transparent border-t-[--background-modifier-border] {$isChatInSidebar
class="absolute -top-[54px] left-1/2 flex -translate-x-1/2 items-center gap-3 rounded-t-2xl border border-solid border-x-[--background-modifier-border] border-b-transparent border-t-[--background-modifier-border] {$isChatInSidebar
? 'bg-[--background-secondary]'
: 'bg-[--background-primary]'} p-2"
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Chat/MessagesBubble.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
<div
bind:this={chatWindow}
on:scroll={() => (isAutoScrolling = chatWindow.scrollTop + chatWindow.clientHeight + 1 >= chatWindow.scrollHeight)}
class="chat-window mb-1 w-full flex-grow select-text overflow-y-scroll rounded-md border border-solid border-[--background-modifier-border] p-4"
class="chat-window w-full flex-grow select-text overflow-y-scroll rounded-md border border-solid border-[--background-modifier-border] p-4"
>
{#each $chatHistory as message (message.id)}
{#if message.role === 'User'}
<div class="mb-3 flex justify-end">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="group max-w-[80%] rounded-t-lg rounded-bl-lg px-4" style="background-color: hsla(var(--color-accent-hsl), 0.4);">
<div class="group max-w-[80%] rounded-t-lg rounded-bl-lg px-4" style="background-color: var(--text-selection);">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
Expand Down
18 changes: 7 additions & 11 deletions src/components/Chat/MessagesCompact.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
<div
bind:this={chatWindow}
on:scroll={() => (isAutoScrolling = chatWindow.scrollTop + chatWindow.clientHeight + 1 >= chatWindow.scrollHeight)}
class="mb-1 w-full flex-grow select-text overflow-y-scroll rounded-md border border-solid border-[--background-modifier-border]"
class="w-full flex-grow select-text overflow-y-scroll rounded-md border border-solid border-[--background-modifier-border]"
>
{#each $chatHistory as message (message.id)}
{#if message.role === 'User'}
<div
class="group border-x-0 border-b border-t-0 border-solid border-[--background-modifier-border] {$isChatInSidebar
? 'var(--background-secondary-alt)'
: 'var(--background-primary-alt)'} p-2"
class="group border-x-0 border-b border-t-0 border-solid border-[--background-modifier-border] p-2 pr-4 {$isChatInSidebar
? 'bg-[--background-secondary-alt]'
: 'bg-[--background-primary-alt]'}"
>
<div class="text-primary mt-2 font-bold">User</div>
<div class="text-[--text-accent] mt-2 font-bold">User</div>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
Expand Down Expand Up @@ -82,12 +82,8 @@
</div>
</div>
{:else}
<div
class="group border-x-0 border-b border-t-0 border-solid border-[--background-modifier-border] {$isChatInSidebar
? 'bg-[--background-secondary-alt]'
: 'bg-[--background-primary-alt]'} p-2"
>
<div class="text-primary mt-2 font-bold">Smart2Brain</div>
<div class="group border-x-0 border-b border-t-0 border-solid border-[--background-modifier-border] p-2 pr-4">
<div class="text-[--text-accent] mt-2 font-bold">Smart2Brain</div>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
Expand Down
2 changes: 1 addition & 1 deletion src/components/Chat/QuickSettingsDrawer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
</div>
{/if}
{/if}
<div class="absolute bottom-0 z-10 flex w-full justify-center {$isChatInSidebar ? 'bg-[--background-secondary]' : 'bg-[--background-primary]'}">
<div class="absolute bottom-0 z-10 flex w-full justify-center">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
Expand Down

0 comments on commit 1af4669

Please sign in to comment.