fix: restore video chat visibility and correct video route branch
This commit is contained in:
parent
23521d8362
commit
e14fdbbe85
@ -3471,7 +3471,9 @@ export async function POST(request: Request) {
|
||||
effectiveProviderType === "doubao-video" ||
|
||||
actualModelId.includes("seedance");
|
||||
const isOpenAICompatImageModel =
|
||||
resolvedModelSupportsImageGen && providerType === "openai.chat";
|
||||
resolvedModelSupportsImageGen &&
|
||||
providerType === "openai.chat" &&
|
||||
!isVolcanoVideoModel;
|
||||
console.log("[Chat API] Is volcano video model:", isVolcanoVideoModel);
|
||||
|
||||
// 🆕 处理 OpenAI 兼容的生图模型输出(防止返回 data:image;base64 原文)
|
||||
|
||||
@ -28,7 +28,7 @@ export const MessageContent = ({
|
||||
}: MessageContentProps) => (
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-col gap-2 overflow-hidden rounded-lg px-4 py-3 text-foreground text-sm",
|
||||
"min-w-0 flex flex-col gap-2 rounded-lg px-4 py-3 text-foreground text-sm",
|
||||
"group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground",
|
||||
"group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground",
|
||||
"is-user:dark",
|
||||
|
||||
@ -220,7 +220,7 @@ export const Response = ({
|
||||
...props
|
||||
}: ResponseProps) => {
|
||||
const streamdownClassName = cn(
|
||||
"size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_code]:whitespace-pre-wrap [&_code]:break-words [&_pre]:max-w-full [&_pre]:overflow-x-auto",
|
||||
"w-full min-w-0 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_code]:whitespace-pre-wrap [&_code]:break-words [&_pre]:max-w-full [&_pre]:overflow-x-auto",
|
||||
className
|
||||
);
|
||||
const processingKey = `${isProcessingEnhance}-${isProcessingRmbg}-${isProcessingExtend}-${isProcessingAngleEdit}-${isProcessingWatermarkRemove}`;
|
||||
|
||||
@ -145,7 +145,7 @@ const PurePreviewMessage = ({
|
||||
regenerate,
|
||||
sendMessage,
|
||||
isReadonly,
|
||||
requiresScrollPadding: _requiresScrollPadding,
|
||||
requiresScrollPadding,
|
||||
onImageEdit,
|
||||
onDrawingComplete,
|
||||
onImageEnhance,
|
||||
@ -208,7 +208,7 @@ const PurePreviewMessage = ({
|
||||
)}
|
||||
|
||||
<div
|
||||
className={cn("flex flex-col", {
|
||||
className={cn("flex min-w-0 flex-col", {
|
||||
"gap-2 md:gap-4": message.parts?.some(
|
||||
(p) => p.type === "text" && p.text?.trim()
|
||||
),
|
||||
@ -475,6 +475,7 @@ const PurePreviewMessage = ({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{requiresScrollPadding ? <div className="h-20 md:h-24" /> : null}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user