mirror of https://github.com/buster-so/buster.git
Merge remote-tracking branch 'origin/staging' into dal-fix-report-bugs
This commit is contained in:
commit
550f8f2257
|
@ -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;
|
||||
|
|
|
@ -48,7 +48,7 @@ export const useReportEditor = ({
|
|||
|
||||
const editor = usePlateEditor({
|
||||
plugins,
|
||||
value: [],
|
||||
value,
|
||||
readOnly: disabled || isStreaming
|
||||
});
|
||||
|
||||
|
|
|
@ -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 (
|
||||
<div className={cn('h-full space-y-1.5 overflow-y-auto pt-9', className)}>
|
||||
<div
|
||||
className={cn(
|
||||
'absolute right-5 bottom-5 h-15 w-15 animate-bounce rounded-full',
|
||||
isStreamingMessage ? 'bg-purple-400' : 'bg-green-400'
|
||||
)}
|
||||
/>
|
||||
{report ? (
|
||||
<>
|
||||
<ReportPageHeader
|
||||
|
|
Loading…
Reference in New Issue