diff --git a/apps/web/src/api/buster-electric/reports/hooks.ts b/apps/web/src/api/buster-electric/reports/hooks.ts index ddbd581dc..489e936b9 100644 --- a/apps/web/src/api/buster-electric/reports/hooks.ts +++ b/apps/web/src/api/buster-electric/reports/hooks.ts @@ -24,7 +24,6 @@ export const useTrackAndUpdateReportChanges = ({ DEFAULT_UPDATE_OPERATIONS, (report) => { if (report.value) { - console.log('report', report.value); const queryKey = reportsQueryKeys.reportsGetReport(reportId).queryKey; queryClient.setQueryData(queryKey, (v) => { if (!v) return v; diff --git a/apps/web/src/components/ui/report/useReportEditor.tsx b/apps/web/src/components/ui/report/useReportEditor.tsx index 5567a7a8f..1824aa23f 100644 --- a/apps/web/src/components/ui/report/useReportEditor.tsx +++ b/apps/web/src/components/ui/report/useReportEditor.tsx @@ -48,7 +48,7 @@ export const useReportEditor = ({ const editor = usePlateEditor({ plugins, - value: [], + value, readOnly: disabled || isStreaming }); diff --git a/apps/web/src/controllers/ReportPageControllers/ReportPageController.tsx b/apps/web/src/controllers/ReportPageControllers/ReportPageController.tsx index 433ed4c0a..855cbc17b 100644 --- a/apps/web/src/controllers/ReportPageControllers/ReportPageController.tsx +++ b/apps/web/src/controllers/ReportPageControllers/ReportPageController.tsx @@ -25,6 +25,7 @@ export const ReportPageController: React.FC<{ const isStreamingMessage = useChatIndividualContextSelector((x) => x.isStreamingMessage); const content: ReportElementsWithIds = report?.content || []; + const commonClassName = 'sm:px-[max(64px,calc(50%-350px))]'; const { mutate: updateReport } = useUpdateReport(); @@ -46,18 +47,10 @@ export const ReportPageController: React.FC<{ debouncedUpdateReport({ reportId, content }); }); - const commonClassName = 'sm:px-[max(64px,calc(50%-350px))]'; - - useTrackAndUpdateReportChanges({ reportId, subscribe: false }); + useTrackAndUpdateReportChanges({ reportId, subscribe: isStreamingMessage }); return (
-
{report ? ( <>