Skip to content

修复笔记编辑器:添加访客登录、优化 Markdown 解析和笔记编辑功能#9

Open
Huangdingcheng wants to merge 12 commits intoOpenDCAI:mainfrom
Huangdingcheng:fix/note-editor-improvements
Open

修复笔记编辑器:添加访客登录、优化 Markdown 解析和笔记编辑功能#9
Huangdingcheng wants to merge 12 commits intoOpenDCAI:mainfrom
Huangdingcheng:fix/note-editor-improvements

Conversation

@Huangdingcheng
Copy link
Contributor

修复内容

1. 认证功能改进

  • 添加"访客模式"登录功能,允许用户在未配置 Supabase 时继续使用应用
  • 在登录/注册页面添加"以访客身份继续"按钮

2. 编号列表修复

  • 修复编号列表显示问题,现在能正确保留 AI 生成的原始数字(1. 2. 3.)
  • 在Block数据结构中添加 number 字段存储原始编号
  • 更新渲染逻辑以使用保存的编号

3. Markdown 解析优化

  • 添加 cleanMarkdown 函数,自动清理格式符号(**粗体***斜体*__粗体___斜体_
  • 支持缩进的项目符号列表解析(- 缩进项
  • 改进 Markdown 到 Block 的转换逻辑

4. 笔记编辑功能

  • 在输出列表中为笔记添加"编辑"和"删除"按钮
  • 点击"编辑"可加载原笔记内容并继续编辑
  • 支持从Markdown 文件恢复标题和内容块

5. 文件管理改进

  • 保存笔记时自动添加时间戳到文件名(标题_时间戳.md),防止同名文件冲突
  • 保存后延迟 1 秒刷新文件列表,确保新文件正确显示

测试情况

  • ✅ 访客登录功能正常
  • ✅ 编号列表正确显示原始数字
  • ✅ Markdown 格式符号正确清理
  • ✅缩进列表正确解析
  • ✅ 笔记编辑和删除功能正常
  • ✅ 同名文件不再冲突
  • ✅ 文件列表正确刷新

相关文件

  • frontend_en/src/stores/authStore.ts - 添加访客登录
  • frontend_en/src/pages/AuthPage.tsx - 添加访客按钮
  • frontend_en/src/components/notes/types.ts - 扩展 Block 类型
  • frontend_en/src/components/notes/NotionEditor.tsx - Markdown 解析优化
  • frontend_en/src/components/notes/BlockEditor.tsx - 编号渲染修复
  • frontend_en/src/pages/NotebookView.tsx - 笔记编辑功能

Huangdingcheng and others added 12 commits February 24, 2026 16:21
- ppt_tool.py: 在 ocr_images_to_ppt 和 convert_images_dir_to_pdf_and_ppt_api
  两处文本框写入逻辑中,复用已有 is_cjk() 函数,对含中文的文本自动设置
  Microsoft YaHei 字体,英文内容保持 Arial
- ppt_text_fit.py: TextFitStyle 默认字体从 Arial 改为 Microsoft YaHei,
  避免字体拟合时使用不含中文字形的字体

Co-Authored-By: Huangdingcheng <Apollo2023666@outlook.com>
…ana 2 support

- Embedding server: auto-pick free GPU via nvidia-smi, fallback to CPU
- Main app: skip re-launching embedding subprocess on --reload if already running
- DeepResearch: add missing deps (qwen-agent, alibabacloud-docmind, sandbox-fusion, etc.)
- DeepResearch: set API_KEY/API_BASE/SUMMARY_MODEL_NAME env vars for visit tool
- Frontend: always send search_api_key for all providers (including Serper)
- Frontend: show Search API Key input for Serper provider in settings
- PPT generation: add Nano Banana 2 image model option
- Docs: remove invalid `pip install -e .`, add changelog

Co-Authored-By: Claude <noreply@anthropic.com>
- Implement block-based editor with drag-and-drop support
- Add slash command menu with multiple block types (text, headings, lists, code, etc.)
- Integrate AI chat feature for in-note assistance
- Support text auto-wrap and Enter key text splitting
- Add block operations (add, delete, type conversion)
- Implement both English and Chinese versions

Co-Authored-By: Huangdingcheng <Apollo6662023@outlook.com>
… features

- Add guest login functionality to bypass Supabase authentication
- Fix numbered lists to preserve original AI-generated numbers (1. 2. 3.)
- Clean markdown format symbols (**bold**, *italic*) while preserving content
- Support indented bullet list parsing
- Add note editing capability with Edit/Delete buttons in output list
- Add timestamp to filenames to prevent same-name file conflicts
- Add 1-second delay for file list refresh after saving

Co-Authored-By: Huangdingcheng <Apollo6662023@outlook.com>
- Add guest login functionality to Chinese frontend
- Add Edit/Delete buttons for notes in Chinese version
- Add note icon display in output feed
- Support note editing with markdown loading

Co-Authored-By: Huangdingcheng <Apollo6662023@outlook.com>
- Fix provider detection for Gemini TTS models
- Update frontend voice defaults from 'vivian' to 'Kore'
- Add voice name validation in ApiYiGeminiProvider
- Fix file_ids attribute error in podcast workflow
- Improve mindmap generation error handling

Co-Authored-By: Huangdingcheng <Apollo6662023@outlook.com>
- Accept main's note editor improvements
- Keep TTS voice validation fixes from this branch
Major Features:
- AI-assisted note editing: polish, rewrite, and source-based AI generation
- AI Panel: organize content with presets (summarize, outline, FAQ, etc.)
- Text Selection Toolbar: quick AI actions on selected text with diff preview
- Memory context: maintain conversation history for better AI responses

Bug Fixes:
- Fix reversed input issue by replacing contentEditable with textarea
- Fix first character deletion issue by consolidating event handling
- Fix numbered list indexing for mixed block types
- Simplify Backspace logic to avoid conflicts

Technical Improvements:
- Consolidate onChange/onInput handling to prevent event conflicts
- Use textarea.value consistently instead of mixed value/textContent
- Support both English and Chinese versions

Co-Authored-By: Hunagdingcheng <Apollo6662023@outlook.com>
… features

- Add guest login functionality to bypass Supabase authentication
- Fix numbered lists to preserve original AI-generated numbers (1. 2. 3.)
- Clean markdown format symbols (**bold**, *italic*) while preserving content
- Support indented bullet list parsing
- Add note editing capability with Edit/Delete buttons in output list
- Add timestamp to filenames to prevent same-name file conflicts
- Add 1-second delay for file list refresh after saving

Co-Authored-By: Huangdingcheng <Apollo6662023@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants