fix preview dialog and waveform behavior

This commit is contained in:
Xin Wang
2026-08-04 23:04:17 +08:00
parent 59588ba88d
commit 0ce5d9774e
3 changed files with 7 additions and 3 deletions

View File

@@ -1050,9 +1050,8 @@ function DebugVoicePanel({
</div>
</div>
{/* 底部双轨波形:会话连通后默认展开,空闲时收起 */}
{/* 底部双轨波形默认收起;展开状态只由用户操作控制。 */}
<WaveformTimelinePanel
key={status === "connected" ? "active" : "idle"}
defaultOpen={false}
userStream={localStream}
agentStream={remoteStream}

View File

@@ -215,6 +215,9 @@ export function ClientMessageDialog({
className="gap-5 sm:max-w-md"
portalContainer={container}
contained={contained}
overlayClassName={
contained ? "bg-black/20 backdrop-blur-md" : undefined
}
showCloseButton={message?.dismissible ?? true}
onEscapeKeyDown={(event) => {
if (!message?.dismissible) event.preventDefault();

View File

@@ -57,15 +57,17 @@ function DialogContent({
showCloseButton = true,
portalContainer,
contained = false,
overlayClassName,
...props
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
showCloseButton?: boolean
portalContainer?: Element | DocumentFragment | null
contained?: boolean
overlayClassName?: string
}) {
return (
<DialogPortal container={portalContainer}>
<DialogOverlay contained={contained} />
<DialogOverlay contained={contained} className={overlayClassName} />
<DialogPrimitive.Content
data-slot="dialog-content"
className={cn(