优化新会话页面显示布局

This commit is contained in:
xintaofei
2026-03-10 23:49:28 +08:00
parent 380f430d5a
commit 5960ccebb9
3 changed files with 92 additions and 29 deletions

View File

@@ -36,6 +36,7 @@ interface MessageListViewProps {
sessionStats?: SessionStats | null
detailLoading?: boolean
detailError?: string | null
hideEmptyState?: boolean
}
interface ResolvedMessageGroup extends MessageGroup {
@@ -133,6 +134,7 @@ export function MessageListView({
sessionStats = null,
detailLoading = false,
detailError = null,
hideEmptyState = false,
}: MessageListViewProps) {
const t = useTranslations("Folder.chat.messageList")
const sharedT = useTranslations("Folder.chat.shared")
@@ -237,14 +239,15 @@ export function MessageListView({
}, [])
const emptyState = useMemo(
() => (
<div className="px-4 py-12 text-center">
<p className="text-muted-foreground text-sm">
{t("emptyConversation")}
</p>
</div>
),
[t]
() =>
hideEmptyState ? null : (
<div className="px-4 py-12 text-center">
<p className="text-muted-foreground text-sm">
{t("emptyConversation")}
</p>
</div>
),
[hideEmptyState, t]
)
const agentPlanOverlayKey = liveMessage?.id ?? `history-${conversationId}`