|
@@ -13,6 +13,7 @@
|
|
|
import LightBulb from '$lib/components/icons/LightBulb.svelte';
|
|
|
import Markdown from '../Messages/Markdown.svelte';
|
|
|
import Skeleton from '../Messages/Skeleton.svelte';
|
|
|
+ import { chatId, models, socket } from '$lib/stores';
|
|
|
|
|
|
export let id = '';
|
|
|
export let messageId = '';
|
|
@@ -118,6 +119,9 @@
|
|
|
let res;
|
|
|
[res, controller] = await chatCompletion(localStorage.token, {
|
|
|
model: model,
|
|
|
+ model_item: $models.find((m) => m.id === model),
|
|
|
+ session_id: $socket?.id,
|
|
|
+ chat_id: $chatId,
|
|
|
messages: [
|
|
|
...messages,
|
|
|
{
|
|
@@ -246,11 +250,11 @@
|
|
|
{#if responseContent === null}
|
|
|
{#if !floatingInput}
|
|
|
<div
|
|
|
- class="flex flex-row gap-0.5 shrink-0 p-1 bg-white dark:bg-gray-850 dark:text-gray-100 text-medium rounded-lg shadow-xl"
|
|
|
+ class="flex flex-row shrink-0 p-0.5 bg-white dark:bg-gray-850 dark:text-gray-100 text-medium rounded-xl shadow-xl border border-gray-100 dark:border-gray-800"
|
|
|
>
|
|
|
{#each actions as action}
|
|
|
<button
|
|
|
- class="px-1 hover:bg-gray-50 dark:hover:bg-gray-800 rounded-sm flex items-center gap-1 min-w-fit"
|
|
|
+ class="px-1.5 py-[1px] hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl flex items-center gap-1 min-w-fit transition"
|
|
|
on:click={async () => {
|
|
|
selectedText = window.getSelection().toString();
|
|
|
selectedAction = action;
|
|
@@ -321,9 +325,11 @@
|
|
|
</div>
|
|
|
{/if}
|
|
|
{:else}
|
|
|
- <div class="bg-white dark:bg-gray-850 dark:text-gray-100 rounded-xl shadow-xl w-80 max-w-full">
|
|
|
+ <div
|
|
|
+ class="bg-white dark:bg-gray-850 dark:text-gray-100 rounded-3xl shadow-xl w-80 max-w-full border border-gray-100 dark:border-gray-800"
|
|
|
+ >
|
|
|
<div
|
|
|
- class="bg-gray-50/50 dark:bg-gray-800 dark:text-gray-100 text-medium rounded-xl px-3.5 py-3 w-full"
|
|
|
+ class="bg-white dark:bg-gray-850 dark:text-gray-100 text-medium rounded-3xl px-3.5 pt-3 w-full"
|
|
|
>
|
|
|
<div class="font-medium">
|
|
|
<Markdown id={`${id}-float-prompt`} {content} />
|
|
@@ -331,7 +337,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
- class="bg-white dark:bg-gray-850 dark:text-gray-100 text-medium rounded-xl px-3.5 py-3 w-full"
|
|
|
+ class="bg-white dark:bg-gray-850 dark:text-gray-100 text-medium rounded-3xl px-3.5 py-3 w-full"
|
|
|
>
|
|
|
<div class=" max-h-80 overflow-y-auto w-full markdown-prose-xs" id="response-container">
|
|
|
{#if !responseContent || responseContent?.trim() === ''}
|