Eduards commited on
Commit
15d490d
·
1 Parent(s): e2d4b0a

Merge with master fixes

Browse files
app/components/chat/BaseChat.tsx CHANGED
@@ -19,9 +19,8 @@ import * as Tooltip from '@radix-ui/react-tooltip';
19
  import styles from './BaseChat.module.scss';
20
  import type { ProviderInfo } from '~/utils/types';
21
  import { ExportChatButton } from '~/components/chat/chatExportAndImport/ExportChatButton';
22
- import { ImportButton } from '~/components/chat/chatExportAndImport/ImportButton';
23
  import { ExamplePrompts } from '~/components/chat/ExamplePrompts';
24
- import { ImportFolderButton } from '~/components/chat/ImportFolderButton';
25
 
26
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
27
  const providerList = PROVIDER_LIST;
@@ -311,7 +310,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
311
  </div>
312
  </div>
313
  </div>
314
- {!chatStarted && ImportButton(importChat)}
315
  {!chatStarted && ExamplePrompts(sendMessage)}
316
  </div>
317
  <ClientOnly>{() => <Workbench chatStarted={chatStarted} isStreaming={isStreaming} />}</ClientOnly>
 
19
  import styles from './BaseChat.module.scss';
20
  import type { ProviderInfo } from '~/utils/types';
21
  import { ExportChatButton } from '~/components/chat/chatExportAndImport/ExportChatButton';
22
+ import { ImportButtons } from '~/components/chat/chatExportAndImport/ImportButtons';
23
  import { ExamplePrompts } from '~/components/chat/ExamplePrompts';
 
24
 
25
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
26
  const providerList = PROVIDER_LIST;
 
310
  </div>
311
  </div>
312
  </div>
313
+ {!chatStarted && ImportButtons(importChat)}
314
  {!chatStarted && ExamplePrompts(sendMessage)}
315
  </div>
316
  <ClientOnly>{() => <Workbench chatStarted={chatStarted} isStreaming={isStreaming} />}</ClientOnly>
app/components/chat/chatExportAndImport/{ImportButton.tsx → ImportButtons.tsx} RENAMED
@@ -1,8 +1,9 @@
1
  import type { Message } from 'ai';
2
  import { toast } from 'react-toastify';
3
  import React from 'react';
 
4
 
5
- export function ImportButton(importChat: ((description: string, messages: Message[]) => Promise<void>) | undefined) {
6
  return (
7
  <div className="flex flex-col items-center justify-center flex-1 p-4">
8
  <input
@@ -59,6 +60,10 @@ export function ImportButton(importChat: ((description: string, messages: Messag
59
  <div className="i-ph:upload-simple" />
60
  Import Chat
61
  </button>
 
 
 
 
62
  </div>
63
  </div>
64
  </div>
 
1
  import type { Message } from 'ai';
2
  import { toast } from 'react-toastify';
3
  import React from 'react';
4
+ import { ImportFolderButton } from '~/components/chat/ImportFolderButton';
5
 
6
+ export function ImportButtons(importChat: ((description: string, messages: Message[]) => Promise<void>) | undefined) {
7
  return (
8
  <div className="flex flex-col items-center justify-center flex-1 p-4">
9
  <input
 
60
  <div className="i-ph:upload-simple" />
61
  Import Chat
62
  </button>
63
+ <ImportFolderButton
64
+ importChat={importChat}
65
+ className="px-4 py-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary hover:bg-bolt-elements-background-depth-3 transition-all flex items-center gap-2"
66
+ />
67
  </div>
68
  </div>
69
  </div>