diff --git a/app.py b/app.py index 89763cd..2b3634f 100644 --- a/app.py +++ b/app.py @@ -167,18 +167,9 @@ def api_update_note(note_id): now = datetime.now().strftime('%Y-%m-%d %H:%M:%S') - # 判断是否需要生成新标题 - old_content = note.get('content', '') - need_new_title = (not note['title'] or note['title'] == '新记录' or - len(old_content) < 50 and len(content) >= 50) - note['content'] = content note['updated_at'] = now - # 如果内容变化较大,异步生成新标题 - if need_new_title and len(content) >= 20: - threading.Thread(target=generate_title_async, args=(note_id, content)).start() - save_notes(notes) return jsonify(note)