From 73ff524a8f28c139d2eff91406371ec318d038aa Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 22 Sep 2024 20:31:53 +0200 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 37 +++++++++++------------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 5de4e7c7c..0b848b3cd 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -89,8 +89,6 @@ let eventConfirmationInputValue = ''; let eventCallback = null; - let showModelSelector = true; - let selectedModels = ['']; let atSelectedModel: Model | undefined; @@ -1790,14 +1788,7 @@ /> {/if} - 0} - {chat} - {initNewChat} - /> + 0} {initNewChat} /> @@ -1840,19 +1831,19 @@
0} + {messages} + {selectedModels} + {processing} {sendPrompt} {continueGeneration} {regenerateResponse} {mergeResponses} {chatActionHandler} {showMessage} + bottomPadding={files.length > 0} />
@@ -1865,6 +1856,8 @@ bind:selectedToolIds bind:webSearchEnabled bind:atSelectedModel + {messages} + {selectedModels} availableToolIds={selectedModelIds.reduce((a, e, i, arr) => { const model = $models.find((m) => m.id === e); if (model?.info?.meta?.toolIds ?? false) { @@ -1873,8 +1866,6 @@ return a; }, [])} transparentBackground={$settings?.backgroundImageUrl ?? false} - {selectedModels} - {messages} {submitPrompt} {stopResponse} on:call={async () => { @@ -1886,6 +1877,13 @@
{ const model = $models.find((m) => m.id === e); if (model) { @@ -1893,16 +1891,9 @@ } return a; }, [])} - bind:history - bind:chatFiles - bind:params - bind:files - bind:pane={controlPane} {submitPrompt} {stopResponse} {showMessage} - modelId={selectedModelIds?.at(0) ?? null} - chatId={$chatId} {eventTarget} />