fix(ai写作): 历史记录 in_progress 不再误显示「进行中」转圈
刷新=重置后,开始过但没跑完的会话 DB status 永远停在 in_progress、且无任何活进程, 历史列表却转圈显示「进行中」,误导用户以为还在运行。改为中性、不转圈的「未完成」 (text-slate-400)。真正在跑的 background(后台挂起,有 executor 驱动)保留「挂起中」转圈。 改 WRITING_STATUS_PILL(侧栏列表) + STATUS_LABELS(下拉)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8385d1913a
commit
e889cc25cf
2 files changed
+6
-2
No files matched your search
@@ -6,7 +6,8 @@ import { cn } from '@/lib/utils';
|
||||
import type { AIWritingSessionSummary } from '../../api/ai-writing-sessions';
|
||||
|
||||
export const STATUS_LABELS: Record<string, { label: string; color: string }> = {
|
||||
in_progress: { label: '进行中', color: 'text-blue-500' },
|
||||
// 刷新=重置后 in_progress 会话已无活进程,显示中性「未完成」而非「进行中」,避免歧义。
|
||||
in_progress: { label: '未完成', color: 'text-slate-400' },
|
||||
// 后台挂起中:后端正自动驱动到定稿(离页/刷新/切号不打断)。
|
||||
background: { label: '挂起中', color: 'text-sky-500' },
|
||||
draft_ready: { label: '草稿', color: 'text-amber-500' },
|
||||
|
||||
@@ -97,8 +97,11 @@ function getTemplateVisual(tpl: ResearchTemplate, index: number): TemplateVisual
|
||||
}
|
||||
|
||||
// 历史记录状态药丸样式(对齐多智能体会商的历史记录观感)。
|
||||
// 注:`in_progress` 不再转圈显示「进行中」——刷新=重置后这些会话已无任何活进程,
|
||||
// 转圈会误导用户以为还在跑;统一显示为中性、不动的「未完成」。真正还在跑的是 `background`
|
||||
// (后台挂起,有 AIWritingJobExecutor 驱动),保留「挂起中」转圈。
|
||||
const WRITING_STATUS_PILL: Record<string, { label: string; className: string; spin?: boolean; dot?: boolean }> = {
|
||||
in_progress: { label: "进行中", className: "text-primary", spin: true },
|
||||
in_progress: { label: "未完成", className: "text-slate-400" },
|
||||
background: { label: "挂起中", className: "text-sky-500", spin: true },
|
||||
draft_ready: { label: "草稿", className: "text-amber-500" },
|
||||
review_ready: { label: "审核", className: "text-purple-500", dot: true },
|
||||
|
||||
Reference in new issue
Block a user