Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(chat): don't autofocus chat input when in preview (#3036)
gbirman2cd1e8f12bbc
diff --git a/js/app/packages/block-chat/component/Chat.tsx b/js/app/packages/block-chat/component/Chat.tsxindex 7142283ae9..2d1ae0d622 100644--- a/js/app/packages/block-chat/component/Chat.tsx+++ b/js/app/packages/block-chat/component/Chat.tsx@@ -1,3 +1,4 @@+import { useMaybePreviewPanel } from '@app/component/PreviewPanel';import { useNavigatedFromJK } from '@app/component/useNavigatedFromJK';import type { SendBuilder } from '@block-chat/blockClient';import { TopBar } from '@block-chat/component/TopBar';@@ -81,6 +82,7 @@ function ChatInner(props: {const scopeId = blockHotkeyScopeSignal.get;const blockElement = blockElementSignal.get;const { navigatedFromJK } = useNavigatedFromJK();+ const isPreview = !!useMaybePreviewPanel();const [scrollRef, setScrollRef] = createSignal<HTMLElement>();const [showStreamDebug, setShowStreamDebug] = createSignal(false);const [markdownText, setMarkdownText] = createSignal(@@ -311,7 +313,7 @@ function ChatInner(props: {chatId={chat.chatId()}onSend={onSend}onStop={onStop}- autoFocusOnMount={true}+ autoFocusOnMount={!isPreview}/></div></div>