diff --git a/app/components/home.tsx b/app/components/home.tsx
index 70b92633..8d67122f 100644
--- a/app/components/home.tsx
+++ b/app/components/home.tsx
@@ -170,7 +170,7 @@ export function PromptHints(props: {
);
}
-export function Chat(props: { showSideBar?: () => void }) {
+export function Chat(props: { showSideBar?: () => void, sideBarShowing?: boolean }) {
type RenderMessage = Message & { preview?: boolean };
const chatStore = useChatStore();
@@ -446,7 +446,7 @@ export function Chat(props: { showSideBar?: () => void }) {
setAutoScroll(false);
setTimeout(() => setPromptHints([]), 100);
}}
- autoFocus
+ autoFocus={!props?.sideBarShowing}
/>
}
@@ -648,7 +648,7 @@ export function Home() {
}}
/>
) : (
- setShowSideBar(true)} />
+ setShowSideBar(true)} sideBarShowing={showSideBar} />
)}