Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(chat): show input field on new chat instead of empty state

Gabriel Stein69b77b921a88
diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsx
index df9aa61b7..3fd5d2860 100644
--- a/src/components/chat/ChatView.tsx
+++ b/src/components/chat/ChatView.tsx
@@ -42,19 +42,24 @@ export default function ChatView() {
if (id === activeConversationId) return;
setActiveConversationId(id);
setActiveTitle(title);
+ setIsNewChat(false);
await persistence.loadConversation(id);
},
[activeConversationId, persistence]
);
+ const [isNewChat, setIsNewChat] = useState(false);
+
const handleNewChat = useCallback(() => {
setActiveConversationId(null);
setActiveTitle(t("chat.untitled"));
+ setIsNewChat(true);
persistence.handleNewChat();
}, [persistence, t]);
const handleTextSubmit = useCallback(
async (text: string) => {
+ setIsNewChat(false);
let convId = activeConversationId;
if (!convId) {
const title = text.length > 50 ? `${text.slice(0, 50)}...` : text;
@@ -125,7 +130,7 @@ export default function ChatView() {
return () => window.removeEventListener("keydown", handleKeyDown);
}, [handleNewChat]);
- const hasActiveChat = activeConversationId !== null || persistence.messages.length > 0;
+ const hasActiveChat = activeConversationId !== null || persistence.messages.length > 0 || isNewChat;
return (
<>