Commit 0d6d1ed
committed
feat: 红墨 v1.4.1 更新日志 2025-12-29
【本次更新摘要】
- 新增文案生成功能(标题、正文、标签)
- 新增一键启动脚本(macOS/Linux/Windows)
- 修复历史记录保存机制
- 更新品牌 Logo
- 代码质量优化
一、新功能
----------
1. 文案生成功能
- 新增 /api/content 接口,自动生成小红书标题、正文和标签
- 新增 ContentDisplay 组件,支持一键复制
- 新增 content_prompt.txt 提示词模板
新增文件:
- backend/routes/content_routes.py
- backend/services/content.py
- backend/prompts/content_prompt.txt
- frontend/src/components/result/ContentDisplay.vue
2. 一键启动脚本
- 支持 macOS、Linux、Windows 三平台
- 自动检测并安装依赖(uv、pnpm)
- 自动启动前后端服务
- 自动打开浏览器
新增文件:
- start.sh (macOS/Linux 入口)
- start.bat (Windows 入口)
- scripts/start-macos.command
- scripts/start-linux.sh
- scripts/start-windows.bat
3. 品牌 Logo 更新
- 全新设计的红墨 Logo(红色圆形 R + Redink)
- 带 Slogan 横幅版本
新增文件:
- images/1.png (Logo 标准版)
- images/2.png (Logo + Slogan 横幅)
- images/3.png (Logo 大图版)
- frontend/public/logo-banner.png
二、Bug 修复
------------
1. 历史记录保存机制修复
- 大纲生成后立即创建历史记录(HomeView.vue)
- 编辑大纲时自动保存,300ms 防抖(OutlineView.vue)
- 跳转前强制保存未保存的修改(OutlineView.vue)
- 统一使用 setRecordId() 方法赋值(4个 Vue 文件)
2. 端口配置统一
- 启动脚本端口显示从 5001 修正为 12398
- 修复文件: scripts/*.sh, scripts/*.bat
3. CSS 变量修复
- 修复 --text-secondary 未定义问题,改为 --text-sub
- 修复文件: frontend/src/components/result/ContentDisplay.vue
4. API 性能优化
- checkHistoryExists 改用专用 /exists 端点
- 修复文件: frontend/src/api/index.ts
三、代码优化
------------
1. 清理未使用的代码
- 删除 3 个生成器文件中未使用的 retry_on_error 装饰器
- 清理相关的 import(time, random, wraps)
- 修复文件:
- backend/generators/google_genai.py
- backend/generators/image_api.py
- backend/generators/openai_compatible.py
2. 前端状态管理增强
- 新增 outlineStatus、lastSavedAt 字段
- 新增 setRecordId()、markSaved()、hasUnsavedChanges() 方法
- 修复文件: frontend/src/stores/generator.ts
3. 后端历史服务增强
- 新增 RecordStatus 状态常量
- 新增 record_exists() 方法
- 新增 /api/history/<id>/exists 端点
- 修复文件:
- backend/services/history.py
- backend/routes/history_routes.py
四、UI 更新
-----------
1. 侧边栏 Logo
- 更换为带 Slogan 的横幅 Logo
- 作者头像改为红色渐变圆形 + "墨"字
- 修复文件:
- frontend/src/App.vue
- frontend/src/assets/css/base.css
2. README 更新
- 使用新 Logo 横幅
- 新增一键启动脚本说明
- 新增 v1.4.1 更新日志
================================================================================
文件变更统计
================================================================================
修改文件 (19个):
- README.md
- backend/generators/google_genai.py
- backend/generators/image_api.py
- backend/generators/openai_compatible.py
- backend/routes/__init__.py
- backend/routes/history_routes.py
- backend/services/history.py
- backend/services/image.py
- frontend/public/logo.png
- frontend/src/App.vue
- frontend/src/api/index.ts
- frontend/src/assets/css/base.css
- frontend/src/stores/generator.ts
- frontend/src/views/GenerateView.vue
- frontend/src/views/HistoryView.vue
- frontend/src/views/HomeView.vue
- frontend/src/views/OutlineView.vue
- frontend/src/views/ResultView.vue
- images/logo.png
新增文件 (11个):
- backend/prompts/content_prompt.txt
- backend/routes/content_routes.py
- backend/services/content.py
- frontend/public/logo-banner.png
- frontend/src/components/result/ContentDisplay.vue
- images/1.png
- images/2.png
- images/3.png
- scripts/start-macos.command
- scripts/start-linux.sh
- scripts/start-windows.bat
- start.bat
- start.sh
代码变更: +1417 行, -447 行
================================================================================
建议的 Commit Message
================================================================================
feat: v1.4.1 新增文案生成、一键启动脚本、Logo更新
- 新增文案生成功能(标题、正文、标签自动生成)
- 新增一键启动脚本,支持 macOS/Linux/Windows
- 更新品牌 Logo,新增带 Slogan 横幅版本
- 修复历史记录保存机制,大纲生成后立即保存
- 修复端口配置统一为 12398
- 清理后端生成器未使用的重试装饰器代码
- 优化 checkHistoryExists 接口性能1 parent 72540cc commit 0d6d1ed
33 files changed
Lines changed: 2821 additions & 447 deletions
File tree
- backend
- generators
- prompts
- routes
- services
- frontend
- public
- src
- api
- assets/css
- components/result
- stores
- views
- images
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | | - | |
| 3 | + | |
6 | 4 | | |
7 | | - | |
| 5 | + | |
8 | 6 | | |
9 | | - | |
| 7 | + | |
10 | 8 | | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 19 | | |
36 | 20 | | |
37 | 21 | | |
| |||
40 | 24 | | |
41 | 25 | | |
42 | 26 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 27 | | |
54 | 28 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 29 | + | |
92 | 30 | | |
93 | 31 | | |
94 | | - | |
| 32 | + | |
95 | 33 | | |
96 | 34 | | |
97 | 35 | | |
| |||
233 | 171 | | |
234 | 172 | | |
235 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
236 | 186 | | |
237 | 187 | | |
238 | 188 | | |
| |||
248 | 198 | | |
249 | 199 | | |
250 | 200 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | 201 | | |
268 | 202 | | |
269 | 203 | | |
| |||
347 | 281 | | |
348 | 282 | | |
349 | 283 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | 284 | | |
355 | 285 | | |
356 | 286 | | |
357 | 287 | | |
358 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
359 | 300 | | |
360 | 301 | | |
361 | 302 | | |
| |||
463 | 404 | | |
464 | 405 | | |
465 | 406 | | |
466 | | - | |
| 407 | + | |
467 | 408 | | |
468 | 409 | | |
469 | 410 | | |
470 | | - | |
471 | 411 | | |
472 | | - | |
| 412 | + | |
473 | 413 | | |
| 414 | + | |
474 | 415 | | |
475 | 416 | | |
476 | 417 | | |
477 | 418 | | |
478 | 419 | | |
479 | 420 | | |
480 | 421 | | |
481 | | - | |
| 422 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | | - | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
279 | 276 | | |
280 | 277 | | |
281 | 278 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | 279 | | |
335 | 280 | | |
336 | 281 | | |
| |||
381 | 326 | | |
382 | 327 | | |
383 | 328 | | |
384 | | - | |
385 | 329 | | |
386 | 330 | | |
387 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
| |||
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 12 | | |
34 | 13 | | |
35 | 14 | | |
| |||
73 | 52 | | |
74 | 53 | | |
75 | 54 | | |
76 | | - | |
77 | 55 | | |
78 | 56 | | |
79 | 57 | | |
| |||
0 commit comments