新增角色管理、世界观设定、章节管理和AI工具调用功能

- 角色管理:CRUD API + 卡片网格UI,每个角色约200字描述
- 世界观设定:单篇长文编辑器,建议500字以上
- 章节管理:CRUD + 排序 API,左右分栏编辑器,单章5000字上限
- AI工具调用:支持工具审批流程和结构化工具调用
- 小说详情页新增章节、角色、世界观入口按钮

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 13:58:17 +08:00
parent 580dc8be52
commit 20c759150a
34 changed files with 3495 additions and 127 deletions

View File

@@ -0,0 +1,14 @@
import { http } from './client'
import type { WorldSetting, WorldSettingUpdate } from '@/types/worldSetting'
const base = (novelId: number) => `/novels/${novelId}/world-setting`
export async function fetchWorldSetting(novelId: number): Promise<WorldSetting> {
const { data } = await http.get<WorldSetting>(base(novelId))
return data
}
export async function saveWorldSetting(novelId: number, payload: WorldSettingUpdate): Promise<WorldSetting> {
const { data } = await http.put<WorldSetting>(base(novelId), payload)
return data
}