修复聊天消息加载占位的网关错误展示 #24
@ -66,6 +66,7 @@ import {
|
||||
import { toast } from "sonner";
|
||||
import { useCanvasStore } from "@/store/canvas";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { getGatewayErrorPageMessage } from "@/lib/request-error";
|
||||
import { fetcher, fetchWithErrorHandlers, generateUUID } from "@/lib/utils";
|
||||
import {
|
||||
fetchUploadWithRetry,
|
||||
@ -373,7 +374,9 @@ function MarkdownResponseFallback({
|
||||
}: Pick<ResponseProps, "children" | "className">) {
|
||||
return (
|
||||
<div className={cn("whitespace-pre-wrap break-words [overflow-wrap:anywhere]", className)}>
|
||||
{children}
|
||||
{typeof children === "string"
|
||||
? getGatewayErrorPageMessage(children) || children
|
||||
: children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user