fix(webui): remove intermediate answer footer gap

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-20 11:47:27 +08:00
1 parent fa754c2204
commit 900675e7f8
4 files changed
+38 -2

No files matched your search

+9 -2
View File
@@ -66,6 +66,8 @@ interface MessageBubbleProps {
temporary?: boolean;
/** When false, hide this message's copy button. Default true. */
showCopyAction?: boolean;
/** Whether this is the final assistant text slice before the next user turn. */
isTerminalAssistantSlice?: boolean;
cliApps?: CliAppInfo[];
mcpPresets?: McpPresetInfo[];
slashCommands?: SlashCommand[];
@@ -330,6 +332,7 @@ export function MessageBubble({
isTurnStreaming = false,
temporary = false,
showCopyAction = true,
isTerminalAssistantSlice = true,
cliApps = [],
mcpPresets = [],
slashCommands = [],
@@ -491,14 +494,18 @@ export function MessageBubble({
&& (!empty || hasReasoning || media.length > 0);
const showAssistantTimestamp =
assistantTimestampLabel.length > 0
&& (!empty || hasReasoning || media.length > 0);
&& (!empty || hasReasoning || media.length > 0)
&& (!isTurnStreaming || isTerminalAssistantSlice);
const assistantTimestampTitle = showAssistantTimestamp ? fmtDateTime(assistantTimestamp) : "";
const showAutomationTrigger = showAssistantTimestamp && automationSourceLabel.length > 0;
const showAssistantFooterRow =
showCopyButton || showForkButton || showAssistantTimestamp;
const showAssistantFooterSlot =
const hasAssistantFooterContent =
message.role === "assistant"
&& (!empty || hasReasoning || media.length > 0);
const showAssistantFooterSlot =
hasAssistantFooterContent
&& (showAssistantFooterRow || isTerminalAssistantSlice);
return (
<div className="w-full text-[15px]" style={{ lineHeight: "var(--cjk-line-height)" }}>
{hasReasoning ? (
@@ -344,6 +344,7 @@ const ThreadDisplayUnit = memo(function ThreadDisplayUnit({
message={unit.message}
isTurnStreaming={isTurnStreaming}
temporary={temporary}
isTerminalAssistantSlice={forkIndex !== undefined}
cliApps={cliApps}
mcpPresets={mcpPresets}
slashCommands={slashCommands}