Skip to content

Commit 490f5cc

Browse files
committed
Merge branch 'base64&sse'
# Conflicts: # components/Chatbar/components/ChatbarSettings.tsx
2 parents 9e6954d + fdc5cff commit 490f5cc

File tree

25 files changed

+1469
-1736
lines changed

25 files changed

+1469
-1736
lines changed

components/Chat/Chat.tsx

Lines changed: 247 additions & 169 deletions
Large diffs are not rendered by default.

components/Chat/ChatInput.tsx

Lines changed: 525 additions & 372 deletions
Large diffs are not rendered by default.

components/Chat/ChatMessage.tsx

Lines changed: 443 additions & 251 deletions
Large diffs are not rendered by default.

components/Chat/ModelSelect.tsx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,27 @@ export const ModelSelect = () => {
4545
{t('Model')}
4646
</label>
4747
<div className="w-full rounded-lg border border-neutral-200 bg-transparent pr-2 text-neutral-900 dark:border-neutral-600 dark:text-white">
48-
<select
49-
className="w-full bg-transparent p-2"
50-
placeholder={t('Select a model') || ''}
51-
value={selectedConversation?.model?.id || defaultModelId}
52-
onChange={handleChange}
53-
>
54-
{models.map((model) => (
55-
<option
56-
key={model.id}
57-
value={model.id}
58-
className="dark:bg-[#343541] dark:text-white"
59-
>
60-
{model.id === defaultModelId
61-
? `Default (${model.id})`
62-
: model.id}
63-
</option>
64-
))}
65-
</select>
48+
{/*<select*/}
49+
{/* className="w-full bg-transparent p-2"*/}
50+
{/* placeholder={t('Select a model') || ''}*/}
51+
{/* value={selectedConversation?.model?.id || defaultModelId}*/}
52+
{/* onChange={handleChange}*/}
53+
{/*>*/}
54+
{/* {models.map((model) => (*/}
55+
{/* <option*/}
56+
{/* key={model.id}*/}
57+
{/* value={model.id}*/}
58+
{/* className="dark:bg-[#343541] dark:text-white"*/}
59+
{/* >*/}
60+
{/* {model.id === defaultModelId*/}
61+
{/* ? `Default (${model.id})`*/}
62+
{/* : model.id}*/}
63+
{/* </option>*/}
64+
{/* ))}*/}
65+
{/*</select>*/}
66+
<div className="w-full p-2">
67+
{selectedConversation?.model?.id || defaultModelId}
68+
</div>
6669
</div>
6770
</div>
6871
);

components/Chat/SystemPrompt.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import {FC, KeyboardEvent, useCallback, useEffect, useRef, useState,} from 'reac
22

33
import {useTranslation} from 'next-i18next';
44

5-
import {DEFAULT_SYSTEM_PROMPT} from '@/utils/app/const';
6-
75
import {Conversation} from '@/types/chat';
86
import {Prompt} from '@/types/prompt';
97

components/Chatbar/Chatbar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ export const Chatbar = () => {
244244
<Sidebar<Conversation>
245245
side={'left'}
246246
isOpen={showChatbar}
247+
canCreateChat={models && models.length > 0}
247248
addItemButtonTitle={t('New chat')}
248249
itemComponent={<Conversations conversations={filteredConversations}/>}
249250
folderComponent={<ChatFolders searchTerm={searchTerm}/>}

components/Chatbar/components/ChatbarSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const ChatbarSettings = () => {
5959
onClick={() => setIsSettingDialog(true)}
6060
/>
6161

62-
<QueryUrl api={api} onApiChange={handleApiChange} />
62+
<QueryUrl api={api} onApiChange={handleApiChange} />
6363

6464
{/*<Key apiKey={apiKey} onApiKeyChange={handleApiKeyChange} />*/}
6565

components/Promptbar/PromptBar.context.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

components/Promptbar/Promptbar.state.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

components/Promptbar/Promptbar.tsx

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)