Inline model picker props (#146)
This commit is contained in:
@@ -65,7 +65,7 @@ export function ChatInput({ chatId }: { chatId?: number }) {
|
||||
const posthog = usePostHog();
|
||||
const [inputValue, setInputValue] = useAtom(chatInputValueAtom);
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
const { settings, updateSettings } = useSettings();
|
||||
const { settings } = useSettings();
|
||||
const appId = useAtomValue(selectedAppIdAtom);
|
||||
const { refreshVersions } = useVersions(appId);
|
||||
const { streamMessage, isStreaming, setIsStreaming, error, setError } =
|
||||
@@ -341,12 +341,7 @@ export function ChatInput({ chatId }: { chatId?: number }) {
|
||||
</div>
|
||||
<div className="pl-2 pr-1 flex items-center justify-between">
|
||||
<div className="pb-2">
|
||||
<ModelPicker
|
||||
selectedModel={settings.selectedModel}
|
||||
onModelSelect={(model) =>
|
||||
updateSettings({ selectedModel: model })
|
||||
}
|
||||
/>
|
||||
<ModelPicker />
|
||||
</div>
|
||||
<button
|
||||
onClick={() => setShowTokenBar(!showTokenBar)}
|
||||
|
||||
@@ -20,7 +20,7 @@ export function HomeChatInput({
|
||||
const posthog = usePostHog();
|
||||
const [inputValue, setInputValue] = useAtom(homeChatInputValueAtom);
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
const { settings, updateSettings } = useSettings();
|
||||
const { settings } = useSettings();
|
||||
const { isStreaming } = useStreamChat({
|
||||
hasChatId: false,
|
||||
}); // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
@@ -146,12 +146,7 @@ export function HomeChatInput({
|
||||
)}
|
||||
</div>
|
||||
<div className="px-2 pb-2">
|
||||
<ModelPicker
|
||||
selectedModel={settings.selectedModel}
|
||||
onModelSelect={(model) =>
|
||||
updateSettings({ selectedModel: model })
|
||||
}
|
||||
/>
|
||||
<ModelPicker />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user