mirror of https://github.com/buster-so/buster.git
hot fix for j dawg
This commit is contained in:
parent
253a6b427a
commit
39b68445a0
|
@ -5,7 +5,7 @@
|
|||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "next dev --turbo",
|
||||
"dev:fast": "make start-fast",
|
||||
"dev:fast": "make fast",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint && npx prettier --write . '!src/components/ui/icons/**' --log-level error",
|
||||
|
|
|
@ -64,6 +64,9 @@ export const ReportEditor = React.memo(
|
|||
// Initialize the editor instance using the custom useEditor hook
|
||||
const isReady = useRef(false);
|
||||
|
||||
// readOnly = true;
|
||||
// isStreaming = true;
|
||||
|
||||
const editor = useReportEditor({
|
||||
isStreaming,
|
||||
mode,
|
||||
|
@ -127,12 +130,12 @@ export const ReportEditor = React.memo(
|
|||
variant={variant}
|
||||
readonly={readOnly}
|
||||
disabled={disabled}
|
||||
className={containerClassName}>
|
||||
className={cn('pb-[20vh]', containerClassName)}>
|
||||
<Editor
|
||||
style={style}
|
||||
placeholder={placeholder}
|
||||
disabled={disabled}
|
||||
className={cn('pb-[20vh]', className)}
|
||||
className={className}
|
||||
autoFocus
|
||||
/>
|
||||
</EditorContainer>
|
||||
|
|
|
@ -53,14 +53,19 @@ export const StreamContentPlugin = createPlatePlugin({
|
|||
}
|
||||
|
||||
// Prevent undo/redo and defer normalization for performance
|
||||
editor.tf.withScrolling(() => {
|
||||
editor.tf.withScrolling(
|
||||
() => {
|
||||
editor.tf.withoutSaving(() => {
|
||||
editor.tf.withoutNormalizing(() => {
|
||||
const operations = buildUpdateOperations(editor, chunks);
|
||||
executeOperations(operations);
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
{
|
||||
scrollOptions: { behavior: 'smooth' }
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue