mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-22 04:28:39 +02:00
Fix extracted text flashing on SSE stream updates
This commit is contained in:
@@ -219,7 +219,7 @@ function ActualEventStreamViewer({ response }: Props) {
|
|||||||
<SseSummaryFooter
|
<SseSummaryFooter
|
||||||
style={style}
|
style={style}
|
||||||
error={summary.error ? String(summary.error) : null}
|
error={summary.error ? String(summary.error) : null}
|
||||||
isLoading={summary.isLoading}
|
isLoading={summary.isLoading && summary.data == null}
|
||||||
onRenderMarkdownChange={renderMarkdownSetting.set}
|
onRenderMarkdownChange={renderMarkdownSetting.set}
|
||||||
renderMarkdown={renderMarkdown}
|
renderMarkdown={renderMarkdown}
|
||||||
resultKeyPath={summarySettings.resultKeyPath ?? ""}
|
resultKeyPath={summarySettings.resultKeyPath ?? ""}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { getResponseBodySseSummary } from "../lib/responseBody";
|
|||||||
export function useResponseBodySseSummary(response: HttpResponse, resultKeyPath: string | null) {
|
export function useResponseBodySseSummary(response: HttpResponse, resultKeyPath: string | null) {
|
||||||
return useQuery<SseSummary>({
|
return useQuery<SseSummary>({
|
||||||
enabled: resultKeyPath != null,
|
enabled: resultKeyPath != null,
|
||||||
|
placeholderData: (prev) => prev, // Keep previous data on refetch
|
||||||
queryKey: [
|
queryKey: [
|
||||||
"response-body-sse-summary",
|
"response-body-sse-summary",
|
||||||
response.id,
|
response.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user