refactor(webui): derive footer spacing from thread tail
This commit is contained in:
1 parent
900675e7f8
commit
0f3cabb16d
4 files changed
+23
-20
No files matched your search
@@ -66,8 +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;
|
||||
/** Whether this message is the final display unit in the thread. */
|
||||
isThreadTail?: boolean;
|
||||
cliApps?: CliAppInfo[];
|
||||
mcpPresets?: McpPresetInfo[];
|
||||
slashCommands?: SlashCommand[];
|
||||
@@ -332,7 +332,7 @@ export function MessageBubble({
|
||||
isTurnStreaming = false,
|
||||
temporary = false,
|
||||
showCopyAction = true,
|
||||
isTerminalAssistantSlice = true,
|
||||
isThreadTail = true,
|
||||
cliApps = [],
|
||||
mcpPresets = [],
|
||||
slashCommands = [],
|
||||
@@ -486,7 +486,7 @@ export function MessageBubble({
|
||||
? completedAt
|
||||
: message.createdAt;
|
||||
const assistantTimestampLabel =
|
||||
message.role === "assistant" && !message.isStreaming
|
||||
message.role === "assistant" && !message.isStreaming && !isTurnStreaming
|
||||
? formatMessageEndTime(assistantTimestamp)
|
||||
: "";
|
||||
const showCompletedAt =
|
||||
@@ -494,8 +494,7 @@ export function MessageBubble({
|
||||
&& (!empty || hasReasoning || media.length > 0);
|
||||
const showAssistantTimestamp =
|
||||
assistantTimestampLabel.length > 0
|
||||
&& (!empty || hasReasoning || media.length > 0)
|
||||
&& (!isTurnStreaming || isTerminalAssistantSlice);
|
||||
&& (!empty || hasReasoning || media.length > 0);
|
||||
const assistantTimestampTitle = showAssistantTimestamp ? fmtDateTime(assistantTimestamp) : "";
|
||||
const showAutomationTrigger = showAssistantTimestamp && automationSourceLabel.length > 0;
|
||||
const showAssistantFooterRow =
|
||||
@@ -505,7 +504,7 @@ export function MessageBubble({
|
||||
&& (!empty || hasReasoning || media.length > 0);
|
||||
const showAssistantFooterSlot =
|
||||
hasAssistantFooterContent
|
||||
&& (showAssistantFooterRow || isTerminalAssistantSlice);
|
||||
&& (showAssistantFooterRow || ((message.isStreaming || isTurnStreaming) && isThreadTail));
|
||||
return (
|
||||
<div className="w-full text-[15px]" style={{ lineHeight: "var(--cjk-line-height)" }}>
|
||||
{hasReasoning ? (
|
||||
|
||||
Reference in new issue
Block a user