diff --git a/README.md b/README.md index 3011c07215..707c7e3504 100644 --- a/README.md +++ b/README.md @@ -47,25 +47,15 @@ ## 最新更新 -### 2026-12-05 · v0.9.0 +### 2026-12-06 #### 新增 -- 自动导演问题处理策略新增「快速成稿(省用量)」预设:跳过重复写前复核,仅在出现高危硬伤、核心剧情缺口或质量分低于阈值时触发自动修文。 -- 桌面版可在「模型与厂商」单独配置 HTTP、HTTPS 或 SOCKS5 代理,本机与局域网内的 Ollama 等服务自动直连。 -- 新增英文原生起步创作资产库(英文题材基底、推进模式、写法模板与反 AI 规则),按创作语言分流展示并校准英文默认篇幅口径。 -- Demo 体验空间预置中英文各 1 本完整示例作品,新增常用服务商一键预设与即时「测试连接」按钮,访客无需 API Key 即可直接阅读、查看设定与导出。 - -#### 优化 - -- 长篇自动创作流水线全面降本提效,默认链路下单章生产 Token 消耗大幅下降约一半:前置书/卷级稳定设定提升前缀缓存命中、合并章末时间线提取、复用既有章节规划与连续性核对、校准中文上下文预算、提升验收与资产提取容错,并将标点习惯与普通润色建议改为非阻断提醒,避免误触发整轮修文或后续章节重规划。 -- 重构导演工作台章节阅读区与资料区(故事规划、世界设定、伏笔与背包、角色总览与档案详情),统一全局低边框层次与轻量微交互动效。 -- 重制世界地图(羊皮纸等高线战略舆图、势力领地色晕、双图互跳与「AI 补齐地图方位与路线」)与角色关系图谱(防重叠短标签、邻域联动高亮、快搜定位与动态关系时间线)。 +- 导演工作台资料区新增实时「生产流程图」视图:以书卷轴版式直观展示各创作阶段的进度、产出、关联提示词与调用统计,点击节点可在右侧宽抽屉查看完整产出与提示词并直达提示词工作台对应条目。 #### 修复 -- 修复旧作品切换至新版导演后发起「下一步创作」误报“已有进行中的创作”卡住的问题,并在确有活跃任务时直接提供查看与取消入口。 -- 修复顶栏语言切换对齐、模型下拉遮挡与小屏资产库目录截断问题。 +- 修复英文创作模式下开书候选书名、标题工坊与拆章标题仍可能生成中文的问题:按作品创作语言区分中英文标题长度口径与质量检查,英文作品的书名生成、章节标题拆分与自动修复均保持自然英文,同时保留中文创作的原有标题规则。 [查看完整更新历史](docs/releases/release-notes.md) · [角色功能开发计划](docs/plans/character-system-upgrade-plan.md) · [查看已发布的桌面安装包](https://github.com/ExplosiveCoderflome/AI-Novel-Writing-Assistant/releases/latest) diff --git a/client/src/api/directorNext.ts b/client/src/api/directorNext.ts index 65f2185059..278025fbed 100644 --- a/client/src/api/directorNext.ts +++ b/client/src/api/directorNext.ts @@ -47,6 +47,13 @@ export async function getDirectorLedgers(novelId:string):Promise>(`/director-next/novels/${encodeURIComponent(novelId)}/ledgers`)).data; } +export async function getDirectorProductionFlow(novelId: string, chapterId?: string): Promise> { + return (await apiClient.get>( + `/director-next/novels/${encodeURIComponent(novelId)}/production-flow`, + { params: chapterId ? { chapterId } : undefined, errorPresentation: "inline" }, + )).data; +} + export async function annotateVolumeSummaries(novelId: string, volumeIds: string[]) { const { data } = await apiClient.post>( `/director-next/novels/${encodeURIComponent(novelId)}/volume-summary-emphasis`, {volumeIds}, {errorPresentation:"inline"}, diff --git a/client/src/i18n/locales/en/features/directorNext/messages.ts b/client/src/i18n/locales/en/features/directorNext/messages.ts index 0353a22cc3..395f5a328a 100644 --- a/client/src/i18n/locales/en/features/directorNext/messages.ts +++ b/client/src/i18n/locales/en/features/directorNext/messages.ts @@ -1179,4 +1179,58 @@ export default { "worldMapEnrichMissingHint": "Some locations do not yet have saved coordinates or connecting routes. Let AI arrange relative positions and key routes from your saved world settings.", "worldMapEnrichDone": "Updated coordinates for {{locations}} locations and added {{connections}} routes.", "worldMapEnrichDoneWithForces": "Updated coordinates for {{locations}} locations, added {{connections}} routes and {{relations}} organization relations.", + "loadingProductionFlow": "Loading production flow graph…", + "productionFlowTitle": "Production Flow", + "productionFlowDescription": "Track live novel progress across all stages, inspect each step's saved output, linked prompts, and real model invocations. Click any node for details or a stage header to focus its branches.", + "productionFlowLocateActive": "Locate active step", + "productionFlowRefresh": "Refresh flow graph", + "productionFlowLoadFailed": "The production flow graph could not be loaded.", + "productionFlowRetry": "Reload", + "productionFlowSummarySteps": "Core steps", + "productionFlowSummaryChapters": "Completed chapters", + "productionFlowSummaryCalls": "Model calls", + "productionFlowSummaryQualityDebts": "{{count}} chapters need review", + "productionFlowStageFilterAria": "Filter production flow by stage", + "productionFlowOverviewTab": "Full book", + "productionFlowToggleBranches": "Show branches", + "productionFlowChapterScopeLabel": "Inspect chapter", + "productionFlowStatusCompleted": "Done", + "productionFlowStatusRunning": "Running", + "productionFlowStatusWaitingGate": "Awaiting confirmation", + "productionFlowStatusAttention": "Needs review", + "productionFlowStatusPaused": "Paused", + "productionFlowStatusSkipped": "Skipped", + "productionFlowStatusPending": "Pending", + "productionFlowStageProgress": "{{done}} / {{total}} done", + "productionFlowFocusStage": "Focus", + "productionFlowHasPromptHint": "This step uses a prompt template", + "productionFlowSelectNodeHint": "Select any step node on the flow graph to inspect its saved output, linked prompt templates, and model execution history.", + "productionFlowInspectorAria": "Step inspector", + "productionFlowProtectedBadge": "Protected edit", + "productionFlowOpenReviewGate": "Review & confirm stage", + "productionFlowTabOutput": "Output", + "productionFlowTabPrompts": "Prompts", + "productionFlowTabInvocations": "Executions", + "productionFlowNoPromptForStep": "This step is completed by the author or system orchestration and does not use a standalone model prompt.", + "productionFlowPreviewPromptHint": "Live templates are omitted in preview mode. Linked template key: {{key}}.", + "productionFlowOpenPromptWorkbench": "Open in Prompt Workbench", + "productionFlowLoadingInvocationDetail": "Loading prompt messages and response…", + "productionFlowLoadInvocationFailed": "Failed to load invocation details.", + "productionFlowNoPayloadSaved": "No prompt/response snapshot was saved for this call.", + "productionFlowActualPromptMessages": "Sent prompt messages ({{count}})", + "productionFlowActualModelOutput": "Model response", + "productionFlowNoInvocationsYet": "No model invocations have been recorded for this step yet.", + "productionFlowOpenFullUsagePage": "Open full AI usage log", + "productionFlowMetricCalls": "Calls", + "productionFlowMetricTokens": "Tokens", + "productionFlowMetricDuration": "Total time", + "productionFlowBookTitle": "Title", + "productionFlowNoOutputYet": "No saved output for this step yet.", + "productionFlowOpenStoryAsset": "Open full story plan", + "productionFlowOpenWorldAsset": "Open full world settings", + "productionFlowOpenCastAsset": "Open full character cast", + "productionFlowOpenVolumesAsset": "Open full volume plan", + "productionFlowOpenChapterReader": "Open chapter reader", + "productionFlowOpenChapterPlan": "Open chapter plan", + "productionFlowNoChapterProseYet": "No manuscript prose has been generated for the selected chapter yet.", } as const; diff --git a/client/src/i18n/locales/zh-CN/features/directorNext/messages.ts b/client/src/i18n/locales/zh-CN/features/directorNext/messages.ts index 31a77aa2d4..f539ce7c66 100644 --- a/client/src/i18n/locales/zh-CN/features/directorNext/messages.ts +++ b/client/src/i18n/locales/zh-CN/features/directorNext/messages.ts @@ -1179,4 +1179,58 @@ export default { "worldMapEnrichMissingHint": "部分地点尚未保存空间方位或路线连接,可由 AI 根据已保存设定补齐相对坐标与关键通道。", "worldMapEnrichDone": "已更新 {{locations}} 个地点的地图方位,新增 {{connections}} 条路线。", "worldMapEnrichDoneWithForces": "已更新 {{locations}} 个地点的地图方位,新增 {{connections}} 条路线与 {{relations}} 条势力关系。", + "loadingProductionFlow": "正在读取创作流程图…", + "productionFlowTitle": "创作流程图", + "productionFlowDescription": "按创作阶段查看本书实时进度、每步产出、关联提示词与真实模型调用记录。点击任意节点展开详情,点击阶段标题可聚焦该阶段分支。", + "productionFlowLocateActive": "定位当前步骤", + "productionFlowRefresh": "刷新流程图", + "productionFlowLoadFailed": "创作流程图暂时无法读取。", + "productionFlowRetry": "重新加载", + "productionFlowSummarySteps": "核心进度", + "productionFlowSummaryChapters": "已完成章节", + "productionFlowSummaryCalls": "模型调用", + "productionFlowSummaryQualityDebts": "{{count}} 章待复核", + "productionFlowStageFilterAria": "按创作阶段筛选流程图", + "productionFlowOverviewTab": "全书总览", + "productionFlowToggleBranches": "显示分支步骤", + "productionFlowChapterScopeLabel": "查看章节", + "productionFlowStatusCompleted": "已完成", + "productionFlowStatusRunning": "进行中", + "productionFlowStatusWaitingGate": "待确认", + "productionFlowStatusAttention": "待复核", + "productionFlowStatusPaused": "已暂停", + "productionFlowStatusSkipped": "已跳过", + "productionFlowStatusPending": "未开始", + "productionFlowStageProgress": "已完成 {{done}} / {{total}}", + "productionFlowFocusStage": "聚焦", + "productionFlowHasPromptHint": "此步骤关联提示词模板", + "productionFlowSelectNodeHint": "点击左侧流程图中的任意步骤节点,查看对应的实际产出、提示词模板与执行记录。", + "productionFlowInspectorAria": "步骤详情", + "productionFlowProtectedBadge": "已保护手改", + "productionFlowOpenReviewGate": "前往确认本阶段", + "productionFlowTabOutput": "本步产出", + "productionFlowTabPrompts": "提示词", + "productionFlowTabInvocations": "执行记录", + "productionFlowNoPromptForStep": "此步骤由作者操作或系统编排完成,不需要独立的模型提示词。", + "productionFlowPreviewPromptHint": "示例预览模式下不请求真实模板,绑定模板键:{{key}}。", + "productionFlowOpenPromptWorkbench": "去提示词工作台", + "productionFlowLoadingInvocationDetail": "正在读取本次调用的输入与输出…", + "productionFlowLoadInvocationFailed": "本次调用详情读取失败。", + "productionFlowNoPayloadSaved": "本次调用未保存详细提示词快照。", + "productionFlowActualPromptMessages": "实际发送的提示词消息({{count}} 条)", + "productionFlowActualModelOutput": "模型实际返回内容", + "productionFlowNoInvocationsYet": "本书在该步骤暂无模型调用记录。", + "productionFlowOpenFullUsagePage": "查看本书完整 AI 用量", + "productionFlowMetricCalls": "调用次数", + "productionFlowMetricTokens": "Token 用量", + "productionFlowMetricDuration": "累计耗时", + "productionFlowBookTitle": "书名", + "productionFlowNoOutputYet": "这一步还没有保存的产出内容。", + "productionFlowOpenStoryAsset": "查看完整故事规划", + "productionFlowOpenWorldAsset": "查看完整世界设定", + "productionFlowOpenCastAsset": "查看完整角色阵容", + "productionFlowOpenVolumesAsset": "查看完整分卷规划", + "productionFlowOpenChapterReader": "打开本章阅读", + "productionFlowOpenChapterPlan": "查看本章规划", + "productionFlowNoChapterProseYet": "所选章节还没有生成正文。", } as const; diff --git a/client/src/pages/directorNext/workspace/NovelWorkspace.tsx b/client/src/pages/directorNext/workspace/NovelWorkspace.tsx index 8d1b409493..cff051dca8 100644 --- a/client/src/pages/directorNext/workspace/NovelWorkspace.tsx +++ b/client/src/pages/directorNext/workspace/NovelWorkspace.tsx @@ -28,6 +28,7 @@ import type { CharacterForwardPreview } from "@ai-novel/shared/types/characterFo import type { CharacterProfileImpactSuggestion } from "@ai-novel/shared/types/director/characterProfileImpact"; const WorldMapView = lazy(()=>import("./visualizations").then(module=>({default:module.WorldMapView}))); const CharacterGraphView = lazy(()=>import("./visualizations").then(module=>({default:module.CharacterGraphView}))); +const ProductionFlowView = lazy(()=>import("./visualizations").then(module=>({default:module.ProductionFlowView}))); const CHAPTER_REFERENCE_DOCK_MIN_WIDTH = 896; export function NovelWorkspace({ book, preview = false, review, onLeaveReview, onOpenChapterReview, followGeneration = false, generation = null, activity, onEditChapter, editedChapter, onInlineChapterSaved, onInlineEditingChange, onAdjustingCharacter, onOpenProseReview }: { book: WorkspaceBook; preview?: boolean; review?:URLSearchParams; onLeaveReview?:()=>void; onOpenChapterReview?:()=>void; followGeneration?:boolean; generation?:DirectorGenerationSnapshot|null; activity?:DirectorWorkspaceActivity; onEditChapter?:(chapterId:string)=>void; editedChapter?:{id:string;revision:number}|null; onInlineChapterSaved?:(chapterId:string)=>Promise|void; onInlineEditingChange?:(active:boolean)=>void; onAdjustingCharacter?:(active:boolean)=>void; onOpenProseReview?:(suggestions:CharacterProfileImpactSuggestion[])=>void }) { @@ -193,7 +194,8 @@ export function NovelWorkspace({ book, preview = false, review, onLeaveReview, o :
{followTarget && sameSelection(selected, followTarget.selection) && selected.kind !== "chapter" && activity?.focus ?

: null} - {selected.kind === "world_map" ? {uiI18n.t("loadingWorldMap", {ns: "directorNext"})}

}>select({kind:"world"})}/>
+ {selected.kind === "production_flow" ? {uiI18n.t("loadingProductionFlow", {ns: "directorNext"})}

}>
+ : selected.kind === "world_map" ? {uiI18n.t("loadingWorldMap", {ns: "directorNext"})}

}>select({kind:"world"})}/>
: selected.kind === "character_graph" ? {uiI18n.t("loadingCharacterGraph", {ns: "directorNext"})}

}>select({kind:"character",id})}/>
: selected.kind === "character_timeline" ? : selected.kind === "foreshadowing" || selected.kind === "resources" || selected.kind === "character_resources" ? diff --git a/client/src/pages/directorNext/workspace/ResourceDirectory.tsx b/client/src/pages/directorNext/workspace/ResourceDirectory.tsx index 26958b3987..5ebf34213e 100644 --- a/client/src/pages/directorNext/workspace/ResourceDirectory.tsx +++ b/client/src/pages/directorNext/workspace/ResourceDirectory.tsx @@ -3,7 +3,7 @@ import UiText from "@/components/i18n/LocalizedText"; import { i18n as uiI18n, useTranslation as useUiTranslation, toUiText as uiTextValue } from "@/i18n"; import { BookMarked, BookOpen, CalendarDays, FileText, Globe2, Layers, ListChecks, - Lock, Map, Network, Package, Route, Users, type LucideIcon, + Lock, Map, Network, Package, Route, Users, Workflow, type LucideIcon, } from "lucide-react"; import type { Selection, WorkspaceBook } from "./model"; import { buildStoryDirectory, beatSelection, chapterSelection, sameSelection, type PlannedChapter } from "./planning"; @@ -72,7 +72,10 @@ export function ResourceDirectory({ book, selected, onSelect }: { book: Workspac return