diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 7994b3196f58..2ab4fc4e26f1 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -7793,13 +7793,7 @@ export default function ChatView(props: ChatViewProps) { ); const onChangeActivePendingUserInputCustomAnswer = useCallback( - ( - questionId: string, - value: string, - nextCursor: number, - expandedCursor: number, - _cursorAdjacentToMention: boolean, - ) => { + (questionId: string, value: string) => { if (!activePendingUserInput) { return; } @@ -7818,16 +7812,10 @@ export default function ChatView(props: ChatViewProps) { ), }, })); - const snapshot = composerRef.current?.readSnapshot(); - if ( - snapshot?.value !== value || - snapshot.cursor !== nextCursor || - snapshot.expandedCursor !== expandedCursor - ) { - composerRef.current?.focusAt(nextCursor); - } + // The editor owns this selection. Resetting it before the answer renders + // can re-enter Lexical with offsets from the previous skill token. }, - [activePendingUserInput, activePendingRequestKey, composerRef], + [activePendingUserInput, activePendingRequestKey], ); const onAdvanceActivePendingUserInput = useCallback(() => {