diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx
index 9865d69..8c7589a 100644
--- a/app/components/chat/BaseChat.tsx
+++ b/app/components/chat/BaseChat.tsx
@@ -23,45 +23,8 @@ import { ImportButtons } from '~/components/chat/chatExportAndImport/ImportButto
import { ExamplePrompts } from '~/components/chat/ExamplePrompts';
import FilePreview from './FilePreview';
-
-// @ts-ignore TODO: Introduce proper types
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => {
- return (
-
-
-
-
- );
-};
+import { ModelSelector } from '~/components/chat/ModelSelector';
+import { SpeechRecognitionButton } from '~/components/chat/SpeechRecognition';
const TEXTAREA_MIN_HEIGHT = 76;
@@ -93,31 +56,6 @@ interface BaseChatProps {
setImageDataList?: (dataList: string[]) => void;
}
-const SpeechRecognitionButton = ({
- isListening,
- onStart,
- onStop,
- disabled,
-}: {
- isListening: boolean;
- onStart: () => void;
- onStop: () => void;
- disabled: boolean;
-}) => {
- return (
-
- {isListening ? : }
-
- );
-};
-
export const BaseChat = React.forwardRef(
(
{
diff --git a/app/components/chat/ModelSelector.tsx b/app/components/chat/ModelSelector.tsx
new file mode 100644
index 0000000..1bc7a66
--- /dev/null
+++ b/app/components/chat/ModelSelector.tsx
@@ -0,0 +1,63 @@
+import type { ProviderInfo } from '~/types/model';
+import type { ModelInfo } from '~/utils/types';
+
+interface ModelSelectorProps {
+ model?: string;
+ setModel?: (model: string) => void;
+ provider?: ProviderInfo;
+ setProvider?: (provider: ProviderInfo) => void;
+ modelList: ModelInfo[];
+ providerList: ProviderInfo[];
+ apiKeys: Record;
+}
+
+export const ModelSelector = ({
+ model,
+ setModel,
+ provider,
+ setProvider,
+ modelList,
+ providerList,
+}: ModelSelectorProps) => {
+ return (
+
+
+
+
+ );
+};
diff --git a/app/components/chat/SpeechRecognition.tsx b/app/components/chat/SpeechRecognition.tsx
new file mode 100644
index 0000000..18c66c7
--- /dev/null
+++ b/app/components/chat/SpeechRecognition.tsx
@@ -0,0 +1,28 @@
+import { IconButton } from '~/components/ui/IconButton';
+import { classNames } from '~/utils/classNames';
+import React from 'react';
+
+export const SpeechRecognitionButton = ({
+ isListening,
+ onStart,
+ onStop,
+ disabled,
+}: {
+ isListening: boolean;
+ onStart: () => void;
+ onStop: () => void;
+ disabled: boolean;
+}) => {
+ return (
+
+ {isListening ? : }
+
+ );
+};