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,
|
DEFAULT_UPDATE_OPERATIONS,
|
||||||
(report) => {
|
(report) => {
|
||||||
if (report.value) {
|
if (report.value) {
|
||||||
console.log('report', report.value);
|
|
||||||
const queryKey = reportsQueryKeys.reportsGetReport(reportId).queryKey;
|
const queryKey = reportsQueryKeys.reportsGetReport(reportId).queryKey;
|
||||||
queryClient.setQueryData(queryKey, (v) => {
|
queryClient.setQueryData(queryKey, (v) => {
|
||||||
if (!v) return v;
|
if (!v) return v;
|
||||||
|
|
|
@ -48,7 +48,7 @@ export const useReportEditor = ({
|
||||||
|
|
||||||
const editor = usePlateEditor({
|
const editor = usePlateEditor({
|
||||||
plugins,
|
plugins,
|
||||||
value: [],
|
value,
|
||||||
readOnly: disabled || isStreaming
|
readOnly: disabled || isStreaming
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const ReportPageController: React.FC<{
|
||||||
const isStreamingMessage = useChatIndividualContextSelector((x) => x.isStreamingMessage);
|
const isStreamingMessage = useChatIndividualContextSelector((x) => x.isStreamingMessage);
|
||||||
|
|
||||||
const content: ReportElementsWithIds = report?.content || [];
|
const content: ReportElementsWithIds = report?.content || [];
|
||||||
|
const commonClassName = 'sm:px-[max(64px,calc(50%-350px))]';
|
||||||
|
|
||||||
const { mutate: updateReport } = useUpdateReport();
|
const { mutate: updateReport } = useUpdateReport();
|
||||||
|
|
||||||
|
@ -46,18 +47,10 @@ export const ReportPageController: React.FC<{
|
||||||
debouncedUpdateReport({ reportId, content });
|
debouncedUpdateReport({ reportId, content });
|
||||||
});
|
});
|
||||||
|
|
||||||
const commonClassName = 'sm:px-[max(64px,calc(50%-350px))]';
|
useTrackAndUpdateReportChanges({ reportId, subscribe: isStreamingMessage });
|
||||||
|
|
||||||
useTrackAndUpdateReportChanges({ reportId, subscribe: false });
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('h-full space-y-1.5 overflow-y-auto pt-9', className)}>
|
<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 ? (
|
{report ? (
|
||||||
<>
|
<>
|
||||||
<ReportPageHeader
|
<ReportPageHeader
|
||||||
|
|
Loading…
Reference in New Issue