diff --git a/client/src/components/Artifacts/ArtifactCodeEditor.tsx b/client/src/components/Artifacts/ArtifactCodeEditor.tsx index 82ed3d9da4..4ab2b182b8 100644 --- a/client/src/components/Artifacts/ArtifactCodeEditor.tsx +++ b/client/src/components/Artifacts/ArtifactCodeEditor.tsx @@ -179,9 +179,10 @@ export const ArtifactCodeEditor = function ({ bundlerURL: template === 'static' ? config.staticBundlerURL : config.bundlerURL, }; }, [config, template, fileKey]); - const [readOnly, setReadOnly] = useState(externalReadOnly ?? isSubmitting ?? false); + const initialReadOnly = (externalReadOnly ?? false) || (isSubmitting ?? false); + const [readOnly, setReadOnly] = useState(initialReadOnly); useEffect(() => { - setReadOnly(externalReadOnly ?? isSubmitting ?? false); + setReadOnly((externalReadOnly ?? false) || (isSubmitting ?? false)); }, [isSubmitting, externalReadOnly]); if (Object.keys(files).length === 0) { diff --git a/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx b/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx index f512f2dcbd..29f2e7187a 100644 --- a/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx +++ b/client/src/components/Chat/Messages/Content/Parts/Reasoning.tsx @@ -69,7 +69,7 @@ const Reasoning = memo(({ reasoning, isLast }: ReasoningProps) => { return (