This commit is contained in:
Timothy J. Baek 2024-09-22 20:31:53 +02:00
parent 8532f9da03
commit 73ff524a8f

View File

@ -89,8 +89,6 @@
let eventConfirmationInputValue = ''; let eventConfirmationInputValue = '';
let eventCallback = null; let eventCallback = null;
let showModelSelector = true;
let selectedModels = ['']; let selectedModels = [''];
let atSelectedModel: Model | undefined; let atSelectedModel: Model | undefined;
@ -1790,14 +1788,7 @@
/> />
{/if} {/if}
<Navbar <Navbar {chat} {title} bind:selectedModels shareEnabled={messages.length > 0} {initNewChat} />
{title}
bind:selectedModels
bind:showModelSelector
shareEnabled={messages.length > 0}
{chat}
{initNewChat}
/>
<PaneGroup direction="horizontal" class="w-full h-full"> <PaneGroup direction="horizontal" class="w-full h-full">
<Pane defaultSize={50} class="h-full flex w-full relative"> <Pane defaultSize={50} class="h-full flex w-full relative">
@ -1840,19 +1831,19 @@
<div class=" h-full w-full flex flex-col {chatIdProp ? 'py-4' : 'pt-2 pb-4'}"> <div class=" h-full w-full flex flex-col {chatIdProp ? 'py-4' : 'pt-2 pb-4'}">
<Messages <Messages
chatId={$chatId} chatId={$chatId}
{selectedModels}
{processing}
bind:history bind:history
bind:messages
bind:autoScroll bind:autoScroll
bind:prompt bind:prompt
bottomPadding={files.length > 0} {messages}
{selectedModels}
{processing}
{sendPrompt} {sendPrompt}
{continueGeneration} {continueGeneration}
{regenerateResponse} {regenerateResponse}
{mergeResponses} {mergeResponses}
{chatActionHandler} {chatActionHandler}
{showMessage} {showMessage}
bottomPadding={files.length > 0}
/> />
</div> </div>
</div> </div>
@ -1865,6 +1856,8 @@
bind:selectedToolIds bind:selectedToolIds
bind:webSearchEnabled bind:webSearchEnabled
bind:atSelectedModel bind:atSelectedModel
{messages}
{selectedModels}
availableToolIds={selectedModelIds.reduce((a, e, i, arr) => { availableToolIds={selectedModelIds.reduce((a, e, i, arr) => {
const model = $models.find((m) => m.id === e); const model = $models.find((m) => m.id === e);
if (model?.info?.meta?.toolIds ?? false) { if (model?.info?.meta?.toolIds ?? false) {
@ -1873,8 +1866,6 @@
return a; return a;
}, [])} }, [])}
transparentBackground={$settings?.backgroundImageUrl ?? false} transparentBackground={$settings?.backgroundImageUrl ?? false}
{selectedModels}
{messages}
{submitPrompt} {submitPrompt}
{stopResponse} {stopResponse}
on:call={async () => { on:call={async () => {
@ -1886,6 +1877,13 @@
</Pane> </Pane>
<ChatControls <ChatControls
bind:history
bind:chatFiles
bind:params
bind:files
bind:pane={controlPane}
chatId={$chatId}
modelId={selectedModelIds?.at(0) ?? null}
models={selectedModelIds.reduce((a, e, i, arr) => { models={selectedModelIds.reduce((a, e, i, arr) => {
const model = $models.find((m) => m.id === e); const model = $models.find((m) => m.id === e);
if (model) { if (model) {
@ -1893,16 +1891,9 @@
} }
return a; return a;
}, [])} }, [])}
bind:history
bind:chatFiles
bind:params
bind:files
bind:pane={controlPane}
{submitPrompt} {submitPrompt}
{stopResponse} {stopResponse}
{showMessage} {showMessage}
modelId={selectedModelIds?.at(0) ?? null}
chatId={$chatId}
{eventTarget} {eventTarget}
/> />
</PaneGroup> </PaneGroup>