# ==================== Python ====================
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
pip-log.txt
pip-delete-this-directory.txt

# Virtual environments
venv/
ENV/
env/
.venv
VENV/

# Python test files (temporary)
test_*.py
check_*.py
clear_*.py
convert_*.py
generate_*.py
create_*.py
test.py

# Python type checking
.mypy_cache/
.pytest_cache/
.ruff_cache/

# ==================== IDE ====================
.vscode/
.idea/
*.swp
*.swo
*~
.project
.pydevproject
.settings/
*.sublime-project
*.sublime-workspace
*.iml
.cursor/
.windsurfrules

# JetBrains IDEs
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries/
.idea/vcs.xml
.idea/jsLinters/
.idea/misc.xml
.idea/modules.xml

# ==================== OS ====================
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Desktop.ini
$RECYCLE.BIN/

# Windows thumbnails cache files
Thumbs.db:encryptable
dm thumbs.db

# Folder config file
[Dd]esktop.ini

# ==================== Node.js ====================
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
package-lock.json

# Frontend build
frontend/dist/
frontend/dist-ssr/
*.local

# ==================== Environment variables ====================
.env
.env.local
.env.*.local
!.env.example
!.env.development
!.env.production

# ⚠️ 敏感信息：API 配置文件（包含 API Keys）
data/apiconfig/*.json

# ==================== Logs ====================
logs/
*.log
log/

# ==================== Data files ====================
# ⚠️ 所有用户数据文件都不应该提交到版本控制

# 聊天记录（包含聊天历史和消息数据）
data/chat/
data/chat/**/*

# 角色卡数据（角色配置和头像）
data/characters/
data/characters/**/*
data/avatars/
data/avatars/**/*

# 预设文件（提示词配置）
data/preset/
data/preset/**/*

# 世界书（世界观设定）
data/worldbooks/
data/worldbooks/**/*

# API 配置（包含 API Keys，敏感信息）
data/apiconfig/
data/apiconfig/**/*

# 正则规则
data/regex/
data/regex/**/*

# ComfyUI 工作流
data/comfyui_workflows/
data/comfyui_workflows/**/*

# 图片资源
data/images/
data/images/**/*
data/image_metadata/
data/image_metadata/**/*

# 临时文件
data/temp/
data/temp/**/*

# 导入文件
data/imports/
data/imports/**/*

# Token 使用统计
data/token_usage/
data/token_usage/**/*

# 系统设置
data/system_settings.json

# 加密密钥（敏感信息）
data/encryption_key.txt

# 其他输出目录
outputs/
outputs/**/*
imports/
imports/**/*

# ==================== Docker ====================
.dockerignore
docker-compose.override.yml

# ==================== Temporary files ====================
*.tmp
*.temp
*.bak
*.backup
.cache/

# ==================== Test coverage ====================
coverage/
.nyc_output/
htmlcov/
.pytest_cache/
.tox/
.nox/

# Unit test / coverage reports
.coverage
.coverage.*
*.cover
*.cover.gz

# ==================== Misc ====================
.parcel-cache/
.next/
.nuxt/
.vuepress/dist/
.serverless/
.fusebox/
.dynamodb/
.tern-port

# Temporary documentation files
*_TEST_GUIDE.md
*_DEBUG_GUIDE.md
*_DEBUG.md
*_TEST.md
*_CHECK.md
*_FIX.md
*_IMPROVEMENT.md
*_EXAMPLE.md
*_COMPARISON.md
*_OPTIMIZATION.md
*_CONFIG.md

# ==================== Project specific ====================
# Backend output
backend/__pycache__/
backend/api/__pycache__/
backend/api/routes/__pycache__/
backend/core/__pycache__/
backend/services/__pycache__/
backend/utils/__pycache__/
backend/models/__pycache__/

# Claude settings
.claude/settings.local.json
.claude/

# Lingma cache
.lingma/

# Backup files
*.bak
*.backup
*~

# ComfyUI generated images
data/outputs/

# Token usage logs (can be large)
data/token_usage/*.jsonl
data/token_usage/**/*.jsonl

# Worldbooks backup
data/worldbooks/*.bak
data/worldbooks/*.bak.*
