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
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ build/

# Node
node_modules/
**/node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down Expand Up @@ -78,4 +79,4 @@ backend/.instance_id
# Docker相关
Dockerfile
.dockerignore
docker-compose*.yml
docker-compose*.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ env/
*~
.DS_Store
.kilocode/
.playwright-cli/

# Environment variables
.env
Expand Down
2 changes: 2 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ CORS_ORIGINS=["http://localhost:8000","http://127.0.0.1:8000"]
# HTTP_PROXY=http://your-proxy:port
# HTTPS_PROXY=http://your-proxy:port
# NO_PROXY=localhost,127.0.0.1
# 仅本地 Clash fake-ip DNS 场景需要开启;生产环境建议保持 false
ALLOW_DNS_PROXY_FAKE_IP=false

# ==========================================
# AI 服务配置(至少配置一个)
Expand Down
6 changes: 6 additions & 0 deletions backend/app/api/careers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
)
from app.services.ai_service import AIService
from app.services.json_helper import loads_json
from app.services.project_story_context import build_project_story_context
from app.logger import get_logger
from app.api.settings import get_user_ai_service
from app.api.common import verify_project_access
Expand Down Expand Up @@ -214,6 +215,7 @@ async def generate() -> AsyncGenerator[str, None]:
# 构建项目上下文
yield await tracker.loading("分析项目世界观...", 0.6)

story_context = await build_project_story_context(db, project_id)
project_context = f"""
项目信息:
- 书名:{project.title}
Expand All @@ -223,6 +225,8 @@ async def generate() -> AsyncGenerator[str, None]:
- 地理位置:{project.world_location or '未设定'}
- 氛围基调:{project.world_atmosphere or '未设定'}
- 世界规则:{project.world_rules or '未设定'}

{story_context}
"""

sanitized_user_requirements = user_requirements.strip()
Expand All @@ -245,6 +249,8 @@ async def generate() -> AsyncGenerator[str, None]:
- 本次新增主职业:{main_career_count}个
- 本次新增副职业:{sub_career_count}个
- ⚠️ 重要:请生成与已有职业**不重复**的新职业,形成互补体系
- 必须结合已有大纲和章节中实际出现的时代、身份、阵营、技术/能力限制来设计职业
- 优先补足已有剧情已经暗示但尚未入库的职业或能力路径
- 新职业应填补已有职业体系的空缺,丰富职业多样性
- 主职业必须严格符合世界观规则,体现核心能力体系
- 副职业可以更加自由灵活,包含生产、辅助、特殊类型
Expand Down
Loading
Loading