Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
5d6d57e
更新 API 配置,添加 Google 提供者支持,优化代码格式,移除不必要的注释,新增图像生成工具。
vbarter Aug 30, 2025
7a50232
Merge pull request #1 from vbarter/add_banana
vbarter Aug 30, 2025
1f598ff
优化 Chat 组件代码格式,合并导入语句,简化状态管理逻辑,更新欢迎信息为中文。新增本地魔法生成服务,更新 API 配置,支持新的图像生…
vbarter Aug 30, 2025
59d5261
Merge pull request #2 from vbarter/magin_draw
vbarter Aug 30, 2025
5f35f0c
新增定价和模板页面,更新路由配置,优化顶部菜单,移除不必要的组件。定价页面包含多个方案及其特性,模板页面展示模板库及搜索功能。
vbarter Aug 30, 2025
396a4e8
新增支付订单创建功能,更新定价页面,调整方案名称和价格,优化按钮文本及加载状态处理。
vbarter Aug 30, 2025
96baa69
更新项目名称为 MagicArt,替换相关图标和文本。新增模板 API,支持模板搜索和下载功能,优化模板页面和路由配置,添加模板使用页面。…
vbarter Aug 30, 2025
2577648
优化顶部菜单样式,增加阴影和背景模糊效果,调整按钮间距和样式。更新模板页面标题,移除不必要的标签显示,简化模板信息展示。修复模板卡片样式,…
vbarter Aug 30, 2025
e32ce0f
新增模板 ID 支持,优化画布和魔法生成 API 错误处理,添加用户图片推送功能,更新 Chat 组件以处理用户上传的图片,改进消息格式和…
vbarter Aug 31, 2025
bf6c77a
优化静态文件处理逻辑,新增根路径静态文件服务,确保支持 PNG、SVG 等格式,调整模板图片目录挂载顺序,提升文件访问效率。
vbarter Aug 31, 2025
a137d1f
更新 Umami 网站 ID,确保数据追踪功能正常工作。
vbarter Aug 31, 2025
80d84f8
更新 API 配置,将 BASE_API_URL 修改为新的 MagicArt 地址;新增设备认证相关功能,包括完成认证和检查 URL 参…
vbarter Sep 1, 2025
0e6be89
fix: remove hardcoded Google OAuth secrets
vbarter Sep 1, 2025
004e2b2
fix: 修复 auth_router.py 文件中的空行问题
vbarter Sep 1, 2025
5bcb95f
feat: 动态获取重定向URI以支持不同环境
vbarter Sep 1, 2025
f8c749a
更新 BASE_API_URL 为新的 MagicArt 地址,并明确指定 CORS 允许的来源和 HTTP 方法,以增强安全性和灵活性。
vbarter Sep 1, 2025
aacc9ce
feat: 加载环境变量以支持 Google OAuth
vbarter Sep 1, 2025
ec8a7e4
fix: 修复 completeAuth 函数中的设备码参数名称
vbarter Sep 1, 2025
9d0a1c1
feat: 新增清理过期设备码功能
vbarter Sep 1, 2025
1b80a52
feat: 新增直接登录和直接认证功能
vbarter Sep 1, 2025
1487b75
fix: 修改 Toaster 组件位置
vbarter Sep 1, 2025
9bf0fc8
feat: 更新登录对话框组件
vbarter Sep 1, 2025
70a3db9
chore: 移除 PostHog 相关配置和依赖
vbarter Sep 1, 2025
ce70706
feat: 更新登录对话框组件样式和内容
vbarter Sep 1, 2025
bef5342
feat: 增强认证管理和跨标签页同步功能
vbarter Sep 1, 2025
ea5e9cd
feat: 简化Token管理和刷新逻辑
vbarter Sep 1, 2025
7f31329
feat: 优化canvas页面跳转和StreamProcessor事件处理
vbarter Sep 1, 2025
ed47103
feat: 增强用户认证和文件管理功能
vbarter Sep 2, 2025
ae265fc
Merge pull request #3 from vbarter/template
vbarter Sep 2, 2025
b0785c8
feat: 新增退出登录功能测试脚本
vbarter Sep 3, 2025
1868699
Merge pull request #4 from vbarter/add_database
vbarter Sep 3, 2025
871737a
feat: 更新API配置以支持生产环境和本地开发
vbarter Sep 3, 2025
453c90a
feat: 更新API配置以使用import.meta.env
vbarter Sep 3, 2025
e3d396e
feat: 优化聊天组件和界面
vbarter Sep 4, 2025
71dfde9
Merge pull request #5 from vbarter/optimze
vbarter Sep 4, 2025
6b30cc0
fix: 更新API地址为正式URL
vbarter Sep 4, 2025
9d7cac5
feat: 增强聊天服务和数据库操作
vbarter Sep 4, 2025
6e55b00
Merge pull request #6 from vbarter/fix_bug
vbarter Sep 4, 2025
b16021c
feat: 增强聊天和魔法服务的用户信息处理
vbarter Sep 4, 2025
25d446f
Merge pull request #7 from vbarter/fix_bug
vbarter Sep 4, 2025
8bc2ca0
feat: 增强会话ID验证和处理逻辑
vbarter Sep 4, 2025
a006b75
feat: 增强画布创建逻辑和错误处理
vbarter Sep 4, 2025
3a9bf2f
Merge pull request #8 from vbarter/fix_bug
vbarter Sep 4, 2025
1cddca5
feat: 更新模型选择和API配置
vbarter Sep 5, 2025
f432e82
feat: 更新聊天API和模型选择逻辑
vbarter Sep 6, 2025
2d2c9c7
feat: 修复消息去重和历史保留逻辑
vbarter Sep 6, 2025
9f73a9c
feat: 增强聊天消息处理和图像生成逻辑
vbarter Sep 6, 2025
135371b
fix: 更新Tuzi LLM服务配置获取逻辑
vbarter Sep 6, 2025
758a151
fix: 优化Tuzi LLM服务的返回结构和超时设置
vbarter Sep 6, 2025
81e1962
feat: 添加 BASE_URL 配置说明及相关代码更新
vbarter Sep 6, 2025
b383d50
feat: 更新 BASE_URL 配置和自动检测机制
vbarter Sep 6, 2025
69ebb7a
fix: 修复Tuzi LLM服务的超时设置
vbarter Sep 6, 2025
1e48a87
fix: 更新服务配置和日志信息
vbarter Sep 6, 2025
ea0e3e4
fix: 增加文件上传大小限制及相关错误处理
vbarter Sep 6, 2025
24bc2c3
fix: 修复前端HTTPS混合内容错误
vbarter Sep 6, 2025
f56086b
fix: 移除调试日志并优化代码结构
vbarter Sep 6, 2025
22a4998
feat: 重构Magic图片存储路径及用户信息传递
vbarter Sep 6, 2025
807d330
fix: 更新积分显示逻辑及API调用
vbarter Sep 6, 2025
31934c5
fix: 更新对话框标题组件及默认模型选择逻辑
vbarter Sep 6, 2025
6c2e286
fix: 更新模型选择逻辑及初始化状态管理
vbarter Sep 6, 2025
4d817b0
fix: 优化TopMenu和ChatTextarea组件的样式及逻辑
vbarter Sep 6, 2025
dcc984b
fix: 调整TopMenu和CanvasHeader组件的样式
vbarter Sep 6, 2025
0394f3c
Merge pull request #9 from vbarter/fix_ui
vbarter Sep 6, 2025
cb85b72
fix: 更新CanvasHeader组件的响应式样式
vbarter Sep 6, 2025
aa779f0
fix: 添加登录状态检查以提升用户体验
vbarter Sep 6, 2025
d0c8ed3
Merge pull request #10 from vbarter/login
vbarter Sep 6, 2025
b21eba1
fix: 更新聊天服务导入路径
vbarter Sep 6, 2025
03b5c4e
Merge pull request #11 from vbarter/fix_bug
vbarter Sep 6, 2025
e943cd5
feat: 添加腾讯云存储工具类
vbarter Sep 6, 2025
eb846d2
fix: 使用环境变量替换腾讯云存储工具中的硬编码密钥
vbarter Sep 6, 2025
ae20465
feat: 集成腾讯云图片上传服务
vbarter Sep 6, 2025
efaadc6
Merge pull request #12 from vbarter/image_db
vbarter Sep 6, 2025
aee2ddd
feat: 更新聊天功能以支持模型名称配置
vbarter Sep 6, 2025
0561678
Merge pull request #13 from vbarter/image_db
vbarter Sep 6, 2025
723218c
feat: 优化画布服务以支持用户邮箱验证
vbarter Sep 6, 2025
47cfa5c
Merge pull request #14 from vbarter/image_db
vbarter Sep 6, 2025
d7c9708
feat: 增强文本回复处理逻辑
vbarter Sep 6, 2025
0ce0655
fix: 注释掉不再使用的子模块配置
vbarter Sep 6, 2025
c659297
Merge branch 'change_model' of github.com:vbarter/open-jaaz into chan…
vbarter Sep 6, 2025
58f092d
feat: 更新组件和服务以增强用户体验
vbarter Sep 7, 2025
2f18fe3
feat: 添加快速图片上传功能
vbarter Sep 7, 2025
fa1570f
Merge pull request #15 from vbarter/fix_bug
vbarter Sep 7, 2025
54e7456
fix: 更新 ChatTextarea 组件的注释和下拉菜单状态
vbarter Sep 7, 2025
e29a30c
fix: 优化 ChatTextarea 组件和图片上传逻辑
vbarter Sep 7, 2025
bedeb26
Merge pull request #16 from vbarter/fix_bug
vbarter Sep 7, 2025
a236a46
feat: 增强聊天会话管理和状态处理
vbarter Sep 7, 2025
50f4275
Merge pull request #17 from vbarter/fix_bug
vbarter Sep 7, 2025
1329d68
feat: 更新模板和新增图片资源
vbarter Sep 7, 2025
31cbfca
Merge pull request #18 from vbarter/add_template
vbarter Sep 7, 2025
258f330
feat: 更新模板,新增Q版木雕人偶
vbarter Sep 7, 2025
43c405d
feat: 更新图像分析器的处理约定
vbarter Sep 7, 2025
b3a059e
Merge pull request #19 from vbarter/add_template
vbarter Sep 7, 2025
171f55f
feat: 更新图像分析器的处理约定
vbarter Sep 7, 2025
d27393f
Merge pull request #20 from vbarter/add_template
vbarter Sep 7, 2025
0ebf1c2
feat: 增强图像分析器的日志记录和处理约定
vbarter Sep 7, 2025
5a8800f
Merge pull request #21 from vbarter/add_template
vbarter Sep 7, 2025
aa83188
feat: 更新图像分析器的用户提示内容
vbarter Sep 7, 2025
874fb01
Merge pull request #22 from vbarter/add_template
vbarter Sep 7, 2025
736b31d
更新图像分析器的用户提示内容,新增用户需求提示词,明确最终生成结果图的要求
vbarter Sep 7, 2025
4fcfcc4
feat: 更新模板和图像生成服务
vbarter Sep 7, 2025
9424496
feat: 更新模板和图像链接
vbarter Sep 7, 2025
4e5e443
feat: 优化模板页面的图片上传和处理
vbarter Sep 7, 2025
044e272
feat: 增强魔法图像生成服务的会话支持
vbarter Sep 7, 2025
29aa3d8
feat: 新增Lovable风格渐变背景效果及示例页面
vbarter Sep 7, 2025
941442d
Merge pull request #23 from vbarter/fix_ui
vbarter Sep 7, 2025
711876c
feat: 新增一键九宫格大头帖模板及相关图片
vbarter Sep 7, 2025
60bf228
feat: 新增隐私政策页面及相关路由
vbarter Sep 7, 2025
54ced9c
feat: 增加国际化支持,更新定价和模板页面
vbarter Sep 7, 2025
678823d
Merge pull request #24 from vbarter/i18n
vbarter Sep 7, 2025
3144d02
feat: 更新用户菜单组件,增强国际化支持和用户体验
vbarter Sep 7, 2025
5553512
Merge pull request #25 from vbarter/i18n
vbarter Sep 7, 2025
07cc809
feat: 增强国际化支持,新增模板使用页面翻译
vbarter Sep 7, 2025
4d1b228
feat: 更新魔法图像生成服务,修复参数传递
vbarter Sep 7, 2025
288519e
feat: 更新 Google 提供者配置,新增文本模型支持
vbarter Sep 7, 2025
06735b9
Merge pull request #26 from vbarter/new_model
vbarter Sep 7, 2025
351632d
feat: 更新 TuziLLMService,支持 gemini-2.5-pro 模型
vbarter Sep 7, 2025
a5a13f8
Merge pull request #27 from vbarter/new_model
vbarter Sep 7, 2025
fcdc8be
feat: 更新 Google 提供者配置,修改文本模型名称
vbarter Sep 7, 2025
6fd2613
Merge pull request #28 from vbarter/new_model
vbarter Sep 7, 2025
7dc3891
feat: 更新 TuziLLMService,增强意图理解功能
vbarter Sep 7, 2025
888e6e3
Merge pull request #29 from vbarter/new_model
vbarter Sep 7, 2025
c28ca95
feat: 新增 Google 网站验证文件并更新静态文件处理逻辑
vbarter Sep 8, 2025
0b7fadc
feat: 更新中文翻译和模板图片链接
vbarter Sep 8, 2025
4c8ef95
fix: 更新模板图片链接,添加 AVIF 格式缩略图
vbarter Sep 8, 2025
811d16a
fix: 更新 COS 文件 URL,添加 AVIF 格式缩略图参数
vbarter Sep 8, 2025
c47b0a0
feat: 更新上传接口,支持腾讯云直链和重定向URL
vbarter Sep 8, 2025
653968b
fix: 更新图片保存逻辑,支持腾讯云URL传递和文件名提取
vbarter Sep 8, 2025
1179566
Merge pull request #30 from vbarter/fix_bug
vbarter Sep 8, 2025
0d8112f
feat: 新增邀请系统功能
vbarter Sep 8, 2025
6e480d3
feat: 新增生成状态管理功能
vbarter Sep 8, 2025
7704666
Merge pull request #31 from vbarter/invite
vbarter Sep 8, 2025
1ce6fe0
Merge pull request #32 from vbarter/invite
vbarter Sep 8, 2025
227605c
feat: 新增多种模板功能和图片
vbarter Sep 9, 2025
a8d5424
feat: 更新用户等级和定价计划
vbarter Sep 9, 2025
f76c2ba
feat: 新增支付成功处理和用户等级更新功能
vbarter Sep 10, 2025
4af4f80
feat: 新增调试回调和产品优化功能
vbarter Sep 10, 2025
1b7a120
feat: 新增用户订阅信息管理功能
vbarter Sep 10, 2025
fe5e180
feat: 新增取消订阅功能及相关测试
vbarter Sep 10, 2025
30f3e89
feat: 增强用户认证和国际化支持
vbarter Sep 10, 2025
53185bb
feat: 增强积分管理和错误处理
vbarter Sep 11, 2025
989ef30
feat: 集成环境变量支持和流式输出功能
vbarter Sep 11, 2025
8081725
feat: 增强支付成功处理和API调试功能
vbarter Sep 12, 2025
ced9d3a
feat: 更新配置和增强错误处理
vbarter Sep 12, 2025
ac3d4de
🔧 chore(config_service): 更新默认配置中的URL
vbarter Sep 12, 2025
367e91c
✨ feat(magic_draw_service): 添加从markdown提取JSON和后备prompt方法
vbarter Sep 12, 2025
30237f7
🔧 fix(image_analyser): 更新图像分析提示词
vbarter Sep 12, 2025
67aeb3e
✨ feat(CanvasMagicGenerator): 增强魔法生成流程和远程图片处理
vbarter Sep 12, 2025
4daed5e
✨ feat(template): 增加模板接口中的prompt字段并优化模板使用页面
vbarter Sep 12, 2025
2bc397f
🔧 fix(local_magic_agent): 优化模板字段处理和用户提示词逻辑
vbarter Sep 12, 2025
7f89f52
✨ feat(footer): 在多个页面添加“联系支持”和“返回首页”链接
vbarter Sep 12, 2025
8a59a61
🔧 fix(pricing): 临时隐藏所有支付按钮以等待支付认证通过
vbarter Sep 12, 2025
3ccfcbb
✨ feat(styles): 更新全局样式和组件背景
vbarter Sep 12, 2025
8912d24
✨ feat(privacy&terms): 更新隐私政策和服务条款页面样式
vbarter Sep 12, 2025
9830fb3
✨ feat(provider): 添加 Doubao 提供者及其图标支持
vbarter Sep 12, 2025
8f2281f
✨ feat(tuzi_llm_service): 更新模型名称映射以支持新模型
vbarter Sep 12, 2025
501506c
Merge pull request #33 from vbarter/pricing
vbarter Sep 12, 2025
e5dc946
Merge pull request #34 from vbarter/change_model
vbarter Sep 12, 2025
29417a8
✨ feat(CanvasMagicGenerator): 引入远程图片处理功能
vbarter Sep 13, 2025
e474c28
✨ feat(CanvasMagicGenerator): 优化远程图片处理逻辑
vbarter Sep 13, 2025
9e0ed70
✨ feat(i18n): 更新图像生成消息为英文并引入国际化支持
vbarter Sep 13, 2025
ed0e8b1
✨ feat(ChatTextarea): 添加动态输入占位符功能
vbarter Sep 13, 2025
495e4a2
✨ feat(canvas): 添加会话重命名功能
vbarter Sep 13, 2025
d45b6fa
✨ feat(canvas.css): 现代化左侧工具栏样式
vbarter Sep 13, 2025
dbed35e
✨ fix(TopMenu, FloatingLogo, FloatingProjectInfo): 优化组件样式
vbarter Sep 13, 2025
725907a
✨ feat(TopMenu, FloatingUserInfo, Pricing): 更新组件和样式
vbarter Sep 13, 2025
264bec4
✨ fix(TopMenu, FloatingLogo, FloatingProjectInfo, ChatTextarea, Invit…
vbarter Sep 13, 2025
fb59925
✨ feat(FloatingProjectInfo, ProjectDeleteDialog): 添加项目创建和删除功能
vbarter Sep 13, 2025
3e21b7d
✨ feat(FloatingProjectInfo, Canvas): 优化项目创建和画布切换逻辑
vbarter Sep 13, 2025
61760db
✨ feat(PricingPage, TemplateUsePage): 更新支付按钮和页面样式
vbarter Sep 13, 2025
9be8fbe
Merge pull request #35 from vbarter/fix_bug
vbarter Sep 13, 2025
3a78b83
🚨 fix(PricingPage): 临时隐藏支付按钮
vbarter Sep 13, 2025
561cd12
Merge pull request #36 from vbarter/fix_bug
vbarter Sep 13, 2025
a9cfea1
✨ feat(Canvas, i18n): 增加画布加载和新对话的多语言支持
vbarter Sep 13, 2025
691ac87
Merge pull request #37 from vbarter/fix_bug
vbarter Sep 13, 2025
44746a8
✨ feat(Invite, Routing): 新增邀请功能和路由支持
vbarter Sep 14, 2025
0032c80
Merge pull request #38 from vbarter/optimze_signup
vbarter Sep 14, 2025
fd7c38f
✨ feat(TopMenu, InviteButton, CanvasList, Home): 优化组件样式和逻辑
vbarter Sep 14, 2025
871048b
✨ feat(TopMenu, ChatPanelHeader, FloatingChatPanel, FloatingProjectIn…
vbarter Sep 14, 2025
fdfb366
✨ feat(Canvas): 自动创建默认会话并导航
vbarter Sep 14, 2025
55cfe59
✨ feat(ChatPanelHeader, FloatingChatPanel, FloatingProjectInfo, Float…
vbarter Sep 14, 2025
2926968
Merge pull request #39 from vbarter/mobile
vbarter Sep 14, 2025
620b562
✨ feat(TuziLLMService): 更新图像生成模型支持
vbarter Sep 14, 2025
a3e0c4f
Merge pull request #40 from vbarter/fix_bug
vbarter Sep 14, 2025
57b1616
✨ feat(TuziLLMService): 更新意图理解模型和参数
vbarter Sep 14, 2025
95af34c
Merge pull request #41 from vbarter/fix_bug
vbarter Sep 14, 2025
7722dbd
✨ feat(FloatingUserInfo, CanvasViewMenu): 优化组件样式和布局
vbarter Sep 14, 2025
72bd729
✨ feat(CanvasMagicGenerator, magic): 增加防重复请求机制
vbarter Sep 14, 2025
9182026
✨ feat(Chat): 增强生成状态管理和调试信息
vbarter Sep 14, 2025
920e316
✨ feat(Chat): 移除生成状态管理,优化思考状态显示
vbarter Sep 14, 2025
2231cbc
✨ feat(Chat): 增强初始消息显示逻辑和时间戳处理
vbarter Sep 14, 2025
4020e51
✨ feat(Chat): 优化混合内容显示逻辑,支持用户和AI消息的不同排列
vbarter Sep 14, 2025
97bce06
✨ feat(TypingPlaceholder): 更新占位符文本来源,优化国际化支持
vbarter Sep 14, 2025
bb98f20
Merge pull request #42 from vbarter/fix_bug
vbarter Sep 14, 2025
cf1e041
✨ feat(InviteModal, LoginDialog, EditableTitle, FloatingChatPanel, Fl…
vbarter Sep 14, 2025
03dd344
Merge pull request #43 from vbarter/fix_bug
vbarter Sep 14, 2025
dd86194
✨ feat(Development Guidelines): 添加开发指南文档和优化代码质量
vbarter Sep 15, 2025
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
158 changes: 158 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Development Guidelines

## Philosophy

### Core Beliefs

- **Incremental progress over big bangs** - Small changes that compile and pass tests
- **Learning from existing code** - Study and plan before implementing
- **Pragmatic over dogmatic** - Adapt to project reality
- **Clear intent over clever code** - Be boring and obvious

### Simplicity Means

- Single responsibility per function/class
- Avoid premature abstractions
- No clever tricks - choose the boring solution
- If you need to explain it, it's too complex

## Process

### 1. Planning & Staging

Break complex work into 3-5 stages. Document in `IMPLEMENTATION_PLAN.md`:

```markdown
## Stage N: [Name]

**Goal**: [Specific deliverable] **Success Criteria**: [Testable outcomes] **Tests**: [Specific test
cases] **Status**: [Not Started|In Progress|Complete]
```

- Update status as you progress
- Remove file when all stages are done

### 2. Implementation Flow

1. **Understand** - Study existing patterns in codebase
2. **Test** - Write test first (red)
3. **Implement** - Minimal code to pass (green)
4. **Refactor** - Clean up with tests passing
5. **Commit** - With clear message linking to plan

### 3. When Stuck (After 3 Attempts)

**CRITICAL**: Maximum 3 attempts per issue, then STOP.

1. **Document what failed**:

- What you tried
- Specific error messages
- Why you think it failed

2. **Research alternatives**:

- Find 2-3 similar implementations
- Note different approaches used

3. **Question fundamentals**:

- Is this the right abstraction level?
- Can this be split into smaller problems?
- Is there a simpler approach entirely?

4. **Try different angle**:
- Different library/framework feature?
- Different architectural pattern?
- Remove abstraction instead of adding?

## Technical Standards

### Architecture Principles

- **Composition over inheritance** - Use dependency injection
- **Interfaces over singletons** - Enable testing and flexibility
- **Explicit over implicit** - Clear data flow and dependencies
- **Test-driven when possible** - Never disable tests, fix them

### Code Quality

- **Every commit must**:

- Compile successfully
- Pass all existing tests
- Include tests for new functionality
- Follow project formatting/linting

- **Before committing**:
- Run formatters/linters
- Self-review changes
- Ensure commit message explains "why"

### Error Handling

- Fail fast with descriptive messages
- Include context for debugging
- Handle errors at appropriate level
- Never silently swallow exceptions

## Decision Framework

When multiple valid approaches exist, choose based on:

1. **Testability** - Can I easily test this?
2. **Readability** - Will someone understand this in 6 months?
3. **Consistency** - Does this match project patterns?
4. **Simplicity** - Is this the simplest solution that works?
5. **Reversibility** - How hard to change later?

## Project Integration

### Learning the Codebase

- Find 3 similar features/components
- Identify common patterns and conventions
- Use same libraries/utilities when possible
- Follow existing test patterns

### Tooling

- Use project's existing build system
- Use project's test framework
- Use project's formatter/linter settings
- Don't introduce new tools without strong justification

## Quality Gates

### Definition of Done

- [ ] Tests written and passing
- [ ] Code follows project conventions
- [ ] No linter/formatter warnings
- [ ] Commit messages are clear
- [ ] Implementation matches plan
- [ ] No TODOs without issue numbers

### Test Guidelines

- Test behavior, not implementation
- One assertion per test when possible
- Clear test names describing scenario
- Use existing test utilities/helpers
- Tests should be deterministic

## Important Reminders

**NEVER**:

- Use `--no-verify` to bypass commit hooks
- Disable tests instead of fixing them
- Commit code that doesn't compile
- Make assumptions - verify with existing code

**ALWAYS**:

- Commit working code incrementally
- Update plan documentation as you go
- Learn from existing implementations
- Stop after 3 failed attempts and reassess
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ jobs:
- name: Build React app
env:
VITE_UMAMI_WEBSITE_ID: ${{ secrets.UMAMI_WEBSITE_ID }}
VITE_PUBLIC_POSTHOG_KEY: ${{ secrets.VITE_PUBLIC_POSTHOG_KEY }}
VITE_PUBLIC_POSTHOG_HOST: ${{ secrets.VITE_PUBLIC_POSTHOG_HOST }}
run: |
cd react
npx vite build
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "server/openmanus"]
path = server/openmanus
url = https://github.com/mannaandpoem/OpenManus
##[submodule "server/openmanus"]
## path = server/openmanus
## url = https://github.com/mannaandpoem/OpenManus
165 changes: 165 additions & 0 deletions PRIVACY_PAGES_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Privacy Policy Page Implementation Guide

## 📋 Implementation Overview

I have successfully added a `/privacy` page to your project with complete privacy policy content in English.

## 🚀 New Features

### 1. Main Privacy Policy Page
- **Route**: `/privacy`
- **Content**: Complete privacy policy with original English text (no translation)
- **Style**: Professional responsive design with markdown-like rendering

### 2. Simplified Privacy Policy Page
- **Route**: `/privacy-simple`
- **Content**: Simplified version with core information
- **Purpose**: Suitable for mobile or quick browsing scenarios

## 📁 文件结构

```
server/
├── routers/
│ └── pages_router.py # 新增:页面路由处理器
├── templates/
│ └── privacy_simple.html # 简化版隐私政策模板
└── main.py # 已更新:注册新路由
```

## 🎨 页面特性

### 设计特点
- ✅ **响应式设计** - 适配桌面端和移动端
- ✅ **专业外观** - 清晰的层次结构和色彩搭配
- ✅ **易于阅读** - 合理的字体大小和行间距
- ✅ **导航友好** - 包含返回首页的链接

### 内容结构
- ✅ **最后更新时间** - August 26, 2025
- ✅ **完整定义说明** - 解释所有关键术语
- ✅ **数据收集说明** - 详细说明收集的信息类型
- ✅ **使用目的** - 明确数据使用方式
- ✅ **用户权利** - 说明用户的隐私权利
- ✅ **安全措施** - 数据保护说明
- ✅ **联系方式** - 提供联系渠道

## 🌐 访问方式

### 在浏览器中访问
```
http://localhost:8000/privacy # 完整版隐私政策
http://localhost:8000/privacy-simple # 简化版隐私政策
```

### 在生产环境中
```
https://yourdomain.com/privacy # 完整版
https://yourdomain.com/privacy-simple # 简化版
```

## 🔧 自定义指南

### 1. 修改内容
编辑 `/server/routers/pages_router.py` 文件中的 HTML 内容:

```python
# 在 privacy_policy() 函数中修改 privacy_html 变量
privacy_html = f"""
<!DOCTYPE html>
<html lang="zh-CN">
<!-- 在这里修改你的内容 -->
```

### 2. 修改样式
在 HTML 的 `<style>` 标签中修改 CSS:

```css
/* 修改主要颜色 */
h1 { color: #your-color; }

/* 修改背景色 */
body { background-color: #your-bg-color; }

/* 修改容器样式 */
.container {
padding: 40px;
background-color: white;
}
```

### 3. 添加新页面
在 `pages_router.py` 中添加新的路由:

```python
@router.get("/terms", response_class=HTMLResponse)
async def terms_of_service():
"""服务条款页面"""
# 在这里添加你的HTML内容
return your_html_content
```

## 📱 移动端适配

页面已经包含了完整的移动端适配:

```css
@media (max-width: 768px) {
body { padding: 10px; }
.container { padding: 20px; }
h1 { font-size: 1.8em; }
}
```

## 🔗 在网站中添加链接

在你的主页面中添加隐私政策链接:

```html
<!-- 在页脚或导航栏中添加 -->
<a href="/privacy">隐私政策</a>
<a href="/privacy-simple">隐私政策(简版)</a>
```

## 🎯 SEO 优化

页面已包含基本的 SEO 元素:

```html
<title>隐私政策 - MagicArt AI Image Generator</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
```

## 📝 法律合规建议

1. **定期更新** - 建议定期审查和更新隐私政策内容
2. **法律咨询** - 建议咨询专业法律人士确保合规
3. **通知用户** - 重大变更时及时通知用户
4. **备份记录** - 保留政策变更的历史记录

## 🚀 部署注意事项

1. **确保路由正确注册** - `main.py` 中已正确导入和注册
2. **检查模板目录** - 确保 `server/templates/` 目录存在
3. **测试访问** - 部署后测试所有链接是否正常工作

## 📧 技术支持

如果需要修改或有问题,可以:

1. 编辑 `pages_router.py` 文件
2. 修改模板文件 `privacy_simple.html`
3. 重启服务器使更改生效

---

## ✨ 完成状态

- ✅ 隐私政策页面已实现
- ✅ 响应式设计已完成
- ✅ 路由已正确注册
- ✅ 测试通过
- ✅ 文档已提供

你的 `/privacy` 页面现在已经可以正常访问了!🎉
Loading