ai写作
This commit is contained in:
1 parent
10d7190ea4
commit
772e75f04d
13 files changed
+1001
-127
No files matched your search
@@ -10,6 +10,8 @@ import { InterventionCard } from './InterventionCard';
|
||||
import { WritingSkeletonCard } from './WritingSkeletonCard';
|
||||
import { DraftStreamingView } from './DraftStreamingView';
|
||||
import { OutlineStreamingView } from './OutlineStreamingView';
|
||||
import { ReviewStreamingView } from './ReviewStreamingView';
|
||||
import { RevisionSummaryCard } from './RevisionSummaryCard';
|
||||
|
||||
const STATUS_LABEL: Record<string, string> = {
|
||||
idle: '就绪',
|
||||
@@ -68,7 +70,9 @@ export function AIWritingPanel() {
|
||||
{!isIdle && (
|
||||
<AIWritingTimeline
|
||||
events={state.progressEvents}
|
||||
interventionSlot={
|
||||
completedInterventions={state.completedInterventions}
|
||||
currentPause={state.currentPause}
|
||||
currentInterventionSlot={
|
||||
state.currentPause ? (
|
||||
<InterventionCard
|
||||
pauseEvent={state.currentPause}
|
||||
@@ -85,12 +89,24 @@ export function AIWritingPanel() {
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* 大纲流式思考框 */}
|
||||
{/* 大纲流式思考框(有内容时显示,同时隐藏骨架屏) */}
|
||||
{state.status === 'writing_outline' && (state.outlineStreamingText || state.outlineThinkingText) && (
|
||||
<OutlineStreamingView text={state.outlineStreamingText} thinkingText={state.outlineThinkingText} />
|
||||
)}
|
||||
|
||||
{/* 草稿流式打字机视图 */}
|
||||
{/* 编辑审核流式结果(逐条到达时显示) */}
|
||||
{state.status === 'reviewing' && state.streamingReviewItems.length > 0 && (
|
||||
<ReviewStreamingView items={state.streamingReviewItems} />
|
||||
)}
|
||||
|
||||
{/* 修改完成摘要 */}
|
||||
{state.revisionSummary && (
|
||||
<div className="px-4 pb-2">
|
||||
<RevisionSummaryCard summary={state.revisionSummary} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 草稿流式打字机视图(有内容时显示) */}
|
||||
{state.status === 'writing_draft' && state.streamingDraftSections.length > 0 && (
|
||||
<DraftStreamingView
|
||||
title={state.streamingDraftTitle}
|
||||
@@ -98,13 +114,21 @@ export function AIWritingPanel() {
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* 等待骨架屏:模型正在计算时显示,有干预卡则隐藏,写作时由流式视图代替 */}
|
||||
{showSkeleton && state.status !== 'writing_draft' && (
|
||||
{/*
|
||||
骨架屏统一规则:
|
||||
- 正在运行 + 无干预卡 + 非草稿写作阶段(草稿由下方单独处理)
|
||||
- writing_outline 有流式内容时由 OutlineStreamingView 接管,骨架隐藏
|
||||
*/}
|
||||
{showSkeleton &&
|
||||
state.status !== 'writing_draft' &&
|
||||
!(state.status === 'writing_outline' && (state.outlineStreamingText || state.outlineThinkingText)) &&
|
||||
!(state.status === 'reviewing' && state.streamingReviewItems.length > 0) && (
|
||||
<div className="px-4 pb-4">
|
||||
<WritingSkeletonCard status={state.status} />
|
||||
</div>
|
||||
)}
|
||||
{/* 草稿阶段:流式数据还未到达前显示骨架 */}
|
||||
|
||||
{/* 草稿阶段:流式数据未到达前显示骨架 */}
|
||||
{state.status === 'writing_draft' && state.streamingDraftSections.length === 0 && (
|
||||
<div className="px-4 pb-4">
|
||||
<WritingSkeletonCard status="writing_draft" />
|
||||
|
||||
Reference in new issue
Block a user