Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 7 additions & 0 deletions client/src/api/directorNext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ export async function getDirectorLedgers(novelId:string):Promise<ApiResponse<Dir
return (await apiClient.get<ApiResponse<DirectorWorkspaceLedgers>>(`/director-next/novels/${encodeURIComponent(novelId)}/ledgers`)).data;
}

export async function getDirectorProductionFlow(novelId: string, chapterId?: string): Promise<ApiResponse<import("@ai-novel/shared/types/director/productionFlow").DirectorProductionFlowProjection>> {
return (await apiClient.get<ApiResponse<import("@ai-novel/shared/types/director/productionFlow").DirectorProductionFlowProjection>>(
`/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<ApiResponse<import("@ai-novel/shared/types/director/volumeEmphasis").AnchoredVolumeEmphasis[]>>(
`/director-next/novels/${encodeURIComponent(novelId)}/volume-summary-emphasis`, {volumeIds}, {errorPresentation:"inline"},
Expand Down
54 changes: 54 additions & 0 deletions client/src/i18n/locales/en/features/directorNext/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
54 changes: 54 additions & 0 deletions client/src/i18n/locales/zh-CN/features/directorNext/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 3 additions & 1 deletion client/src/pages/directorNext/workspace/NovelWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>|void; onInlineEditingChange?:(active:boolean)=>void; onAdjustingCharacter?:(active:boolean)=>void; onOpenProseReview?:(suggestions:CharacterProfileImpactSuggestion[])=>void }) {
Expand Down Expand Up @@ -193,7 +194,8 @@ export function NovelWorkspace({ book, preview = false, review, onLeaveReview, o
: <section ref={contentViewport} data-chapter-scroll-viewport key={selected.kind + (selected.kind === "beat" ? selected.volumeId : "") + ("id" in selected ? selected.id : "")} className="h-full max-h-[75dvh] min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain pb-6 md:max-h-none">
{followTarget && sameSelection(selected, followTarget.selection) && selected.kind !== "chapter" && activity?.focus ? <p role="status" className="mb-4 px-2 text-xs leading-6 text-muted-foreground sm:px-6"><UiText namespace="directorNext" messageKey="viewingGeneratedMaterialsNotice" values={{label: (activity.focus.label)}} /></p> : null}
<PlanningDetail book={book} selected={selected} onSelect={select} onOpenChapterReview={onOpenChapterReview} />
{selected.kind === "world_map" ? <Suspense fallback={<p className="px-6 text-sm text-muted-foreground">{uiI18n.t("loadingWorldMap", {ns: "directorNext"})}</p>}><WorldMapView book={book} preview={preview} onOpenWorld={()=>select({kind:"world"})}/></Suspense>
{selected.kind === "production_flow" ? <Suspense fallback={<p className="px-6 text-sm text-muted-foreground">{uiI18n.t("loadingProductionFlow", {ns: "directorNext"})}</p>}><ProductionFlowView book={book} preview={preview} onSelectAsset={select} onEditChapter={editChapter}/></Suspense>
: selected.kind === "world_map" ? <Suspense fallback={<p className="px-6 text-sm text-muted-foreground">{uiI18n.t("loadingWorldMap", {ns: "directorNext"})}</p>}><WorldMapView book={book} preview={preview} onOpenWorld={()=>select({kind:"world"})}/></Suspense>
: selected.kind === "character_graph" ? <Suspense fallback={<p className="px-6 text-sm text-muted-foreground">{uiI18n.t("loadingCharacterGraph", {ns: "directorNext"})}</p>}><CharacterGraphView book={book} preview={preview} onOpenCharacter={id=>select({kind:"character",id})}/></Suspense>
: selected.kind === "character_timeline" ? <CastTimeline book={book} onSelect={select} preview={preview}/>
: selected.kind === "foreshadowing" || selected.kind === "resources" || selected.kind === "character_resources" ? <LedgerView book={book} selection={selected} onSelect={select} preview={preview}/>
Expand Down
7 changes: 5 additions & 2 deletions client/src/pages/directorNext/workspace/ResourceDirectory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -72,7 +72,10 @@ export function ResourceDirectory({ book, selected, onSelect }: { book: Workspac

return <nav aria-label={uiI18n.t("novelResourceDirectory", {ns: "directorNext"})} className="director-directory max-h-[70dvh] min-h-0 flex-1 overflow-y-auto overscroll-contain px-1 pb-4 md:max-h-none">
<section aria-label={uiI18n.t("storyDirectory", {ns: "directorNext"})}>
{row({kind: "volumes"}, uiI18n.t("volumeChapterPlan", {ns:"directorNext"}), Layers)}
<div className="mb-1 space-y-0.5">
{row({kind: "production_flow"}, uiI18n.t("productionFlowTitle", {ns:"directorNext"}), Workflow)}
{row({kind: "volumes"}, uiI18n.t("volumeChapterPlan", {ns:"directorNext"}), Layers)}
</div>
<div className="mt-2 space-y-1">
{tree.volumes.map(({ volume, beats, chapters, unassigned }) => {
const active = contains(chapters) || sameSelection(selected, {kind: "volume", id: volume.id})
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/directorNext/workspace/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {DirectorWorkspace} from "@/api/directorNext";
export type WorkspaceBook = DirectorWorkspace;
export type WorkspaceChapter = WorkspaceBook["chapters"][number];
export type WorkspaceCharacter = WorkspaceBook["materials"]["characters"][number];
export type Selection = { kind: "story" | "world" | "world_map" | "character_graph" | "character_timeline" | "characters" | "volumes" | "foreshadowing" | "resources" } | { kind: "chapter" | "character" | "character_resources" | "volume" | "plan"; id: string } | { kind: "beat"; id: string; volumeId: string };
export type Selection = { kind: "story" | "world" | "world_map" | "character_graph" | "character_timeline" | "production_flow" | "characters" | "volumes" | "foreshadowing" | "resources" } | { kind: "chapter" | "character" | "character_resources" | "volume" | "plan"; id: string } | { kind: "beat"; id: string; volumeId: string };
export type HistoryBoundary = number | null | "latest";

export function readableChapter(chapter: { content: string | null }) {
Expand All @@ -14,7 +14,7 @@ export function readableChapter(chapter: { content: string | null }) {

export function resolveSelection(selection: Selection | null, book: WorkspaceBook): Selection {
if (selection) {
if (selection.kind === "story" || selection.kind === "world" || selection.kind === "world_map" || selection.kind === "character_graph" || selection.kind === "character_timeline" || selection.kind === "characters" || selection.kind === "volumes" || selection.kind === "foreshadowing" || selection.kind === "resources") return selection;
if (selection.kind === "story" || selection.kind === "world" || selection.kind === "world_map" || selection.kind === "character_graph" || selection.kind === "character_timeline" || selection.kind === "production_flow" || selection.kind === "characters" || selection.kind === "volumes" || selection.kind === "foreshadowing" || selection.kind === "resources") return selection;
if (selection.kind === "beat") {
if (book.planning?.beatSheets.some(sheet => sheet.volumeId === selection.volumeId && sheet.beats.some(beat => beat.key === selection.id))) return selection;
} else if (selection.kind === "plan") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export {WorldMapView} from "./WorldMapView";
export {CharacterGraphView} from "./CharacterGraphView";
export {ProductionFlowView} from "./productionFlow";
Loading