feat(ui): 强化 AI 工作中动效——构思占位/流式进度条/波动三点/转圈
- 动效基元:ai-dot 波动(三点竖跳)、ai-stream 不确定进度条、ai-breathe 呼吸微光(均带 reduced-motion 回退) - ThinkingIndicator 升级为明显波动;新增 Spinner / StreamingBar / GenerationSkeleton 原子件;Button 加 loading 态 - 写作台:首 token 前正文区『AI 正在构思本章…』占位(补最大缺口,不再空白像卡死)+ 流式顶部进度条 - 整章重写流式进度条;续写/润色忙碌骨架 + 触发键转圈;生成器/角色/世界观改用 Button loading
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { ThinkingIndicator } from "@/components/ThinkingIndicator";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import { GenerationSkeleton } from "@/components/ui/GenerationSkeleton";
|
||||
import { cn } from "@/lib/ui/variants";
|
||||
import type { AiMessageView } from "@/lib/api/types";
|
||||
import { bubbleSide, type AcceptAction } from "@/lib/workbench/aiConversation";
|
||||
@@ -73,7 +73,8 @@ function Bubble({ message, action, onAccept }: BubbleProps) {
|
||||
)}
|
||||
>
|
||||
{showThinking ? (
|
||||
<ThinkingIndicator label="生成中" className="text-sm text-cinnabar" />
|
||||
// 空正文的进行中 ai 气泡(如同步 refine 的整段等待):呼吸微光骨架,比单三点更明显。
|
||||
<GenerationSkeleton label="生成中" lines={2} className="min-w-[8rem]" />
|
||||
) : (
|
||||
<p className="max-h-56 overflow-y-auto whitespace-pre-wrap text-sm text-ink">
|
||||
{message.content}
|
||||
|
||||
Reference in New Issue
Block a user