Elffuss BraidHub

kikocis/continue public

bugfix: edit last input not selectable (#7778)

* bugfix: edit last input not selectable

* Update TipTapEditor.tsx
Changesete16d08f8d12163334c002b87c624f6782be35bfe70d4ea089038e5af8c01a426
AuthorPatrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-09-16 11:48 -07:00
CommitterGitHub <noreply@github.com> · 2025-09-16 11:48 -07:00
Parentsd9e1cb092a63

Browse the files at this changeset

3 files changed

modified gui/src/components/mainInput/TipTapEditor/TipTapEditor.tsx +17 −0
@@ -120,6 +120,23 @@
120120 }
121121 }, [props.isMainInput, isStreaming, editor]);
122122
123+ // Recovery mechanism: ensure historical inputs regain editability when streaming ends
124+ useEffect(() => {
125+ if (!isStreaming && !props.isMainInput && editor) {
126+ // Small delay to ensure editor state has settled after streaming transition
127+ const timeoutId = setTimeout(() => {
128+ if (editor && !editor.isDestroyed) {
129+ // Force re-enable the editor
130+ editor.setOptions({ editable: true });
131+ // Trigger view update to refresh editor state
132+ editor.view.dispatch(editor.state.tr);
133+ }
134+ }, 100);
135+
136+ return () => clearTimeout(timeoutId);
137+ }
138+ }, [isStreaming, props.isMainInput]);
139+
123140 const [showDragOverMsg, setShowDragOverMsg] = useState(false);
124141
125142 const [activeKey, setActiveKey] = useState<string | null>(null);
modified packages/continue-sdk/package-lock.json +2 −2
@@ -20,10 +20,10 @@
2020 },
2121 "../config-yaml": {
2222 "name": "@continuedev/config-yaml",
23- "version": "1.0.96",
23+ "version": "1.14.0",
2424 "license": "Apache-2.0",
2525 "dependencies": {
26- "@continuedev/config-types": "file:../config-types",
26+ "@continuedev/config-types": "^1.0.14",
2727 "yaml": "^2.6.1",
2828 "zod": "^3.24.2"
2929 },
modified packages/openai-adapters/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.