GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): stop question answers from resetting the editor caret · pingdotgg/t3code@ce4c22f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components
    • ChatView.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/ChatView.tsx‎

Copy file name to clipboardExpand all lines: apps/web/src/components/ChatView.tsx
+4-16Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7793,13 +7793,7 @@ export default function ChatView(props: ChatViewProps) {
77937793
);
77947794

77957795
const onChangeActivePendingUserInputCustomAnswer = useCallback(
7796-
(
7797-
questionId: string,
7798-
value: string,
7799-
nextCursor: number,
7800-
expandedCursor: number,
7801-
_cursorAdjacentToMention: boolean,
7802-
) => {
7796+
(questionId: string, value: string) => {
78037797
if (!activePendingUserInput) {
78047798
return;
78057799
}
@@ -7818,16 +7812,10 @@ export default function ChatView(props: ChatViewProps) {
78187812
),
78197813
},
78207814
}));
7821-
const snapshot = composerRef.current?.readSnapshot();
7822-
if (
7823-
snapshot?.value !== value ||
7824-
snapshot.cursor !== nextCursor ||
7825-
snapshot.expandedCursor !== expandedCursor
7826-
) {
7827-
composerRef.current?.focusAt(nextCursor);
7828-
}
7815+
// The editor owns this selection. Resetting it before the answer renders
7816+
// can re-enter Lexical with offsets from the previous skill token.
78297817
},
7830-
[activePendingUserInput, activePendingRequestKey, composerRef],
7818+
[activePendingUserInput, activePendingRequestKey],
78317819
);
78327820

78337821
const onAdvanceActivePendingUserInput = useCallback(() => {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.