9 Commits

Author SHA1 Message Date
MikiVL
aa1430d4bf feat(M4): 细节打磨——可拖拽/缩放 AI 浮窗、弹窗动画、全局快捷键、翻译功能
- AI 助手改为可自由拖拽移动的浮窗(position: fixed,默认右下角)
- 支持 8 方向拖拽缩放(N/S/E/W + 四角),尺寸 280–720 × 320–900px
- 弹窗(ModelSettingsModal、AiResultModal)加入 framer-motion 缩放动画
- App.tsx 注册全局快捷键:Cmd+\ 专注模式、Cmd+Shift+J AI 面板、Cmd+N 新建笔记
- 浮动工具栏新增"翻译成英文"按钮(Languages 图标),流式预览后可替换
- 服务端 buildMessages 增加 translate 分支
- AI 面板 textarea 随输入自动扩展高度(最多 5 行)
- 欢迎页功能一览补充 AI 续写/润色/摘要/问答四卡片及三条快捷键

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 00:28:01 +08:00
MikiVL
d632e9f6f7 feat(M3): AI 续写/润色/摘要/问答、Hono 代理、模型管理窗口
- 新增 Hono 代理服务(server/index.ts,端口 3001),SSE 流式转发 Claude API
- 新增 src/lib/ai.ts:streamAI() 封装 fetch + ReadableStream + AbortController
- 新增 AI 面板(AiPanel.tsx):流式聊天问答、全文摘要、停止按钮
- 新增模型管理弹窗(ModelSettingsModal.tsx):增删模型、切换激活模型
- 编辑器新增 AI 续写()和面板切换()按钮
- 浮动工具栏新增润色(Wand2)和摘要(FileText)按钮,结果预览 Modal 支持一键替换
- appStore 新增 aiPanelOpen + toggleAiPanel
- vite.config.ts 添加 /api 代理到 localhost:3001
- index.css 添加 .ai-cursor 光标动画

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 00:03:50 +08:00
MikiVL
56b59269f4 feat(M2): 全文搜索、标签编辑/过滤、排序、笔记重命名、拖拽移动、子文件夹显示
- 新增 extractTextFromJSON,搜索框支持正文全文检索
- 编辑器标题下方新增标签编辑区(添加/删除 chip)
- 侧边栏标签 chip 可点击过滤笔记,头部显示激活标签及清除入口
- 笔记列表支持四种排序:最近修改、最近创建、标题 A-Z/Z-A
- 右键菜单新增笔记重命名(行内编辑)
- @dnd-kit 拖拽笔记到目标文件夹,MouseSensor distance=6 防误触
- 文件夹区改为递归渲染,支持多级嵌套展示与拖拽放入
- updateNote 新增 silent 模式,标签/收藏操作不再更新 updatedAt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 20:07:31 +08:00
MikiVL
7c1f8f8726 feat: add Windows shortcuts and OS toggle to WelcomeView
- Define mac/win key variants for all 8 shortcuts (⌘→Ctrl, ⌘⇧Z→Ctrl+Y)
- Auto-detect OS on mount via navigator.platform
- Add macOS/Windows pill toggle above shortcuts table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 19:35:24 +08:00
MikiVL
999d5e1b82 feat: add Windows shortcuts to WelcomeView shortcut table
Show macOS and Windows shortcuts side-by-side in a three-column table.
Windows uses Ctrl instead of ⌘, Ctrl+Y for redo (vs ⌘⇧Z on Mac).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 19:29:56 +08:00
MikiVL
ac18756797 docs: update WelcomeView feature list and shortcuts
- Add 5 missing features: syntax highlighting, image insertion, word count/reading time, focus mode, star/favorite
- Fix inaccurate "drag to organize" description (not implemented)
- Add ⌘E (inline code), ⌘⇧Z (redo), Esc (exit focus mode) to shortcuts table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 19:27:25 +08:00
MikiVL
54366cb60c feat(M1): complete remaining editor features
- Replace StarterKit codeBlock with CodeBlockLowlight (lowlight/common) for syntax highlighting
- Add Image extension with URL slash command, drag-and-drop and paste support
- Show reading time estimate in editor footer (wordCount / 250 min)
- Implement focus mode: sidebar collapses with CSS transition, toggle button in title bar, Esc to exit
- Add focusMode state + toggleFocusMode action to Zustand store
- Add highlight.js CSS theme (light/dark) and image/sidebar-transition styles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 19:24:34 +08:00
MikiVL
bf2b16c78c feat: add welcome view, fix duplicate seeding, add star/delete UI
- Replace editable intro note with a static read-only WelcomeView component
- Add "使用指南" sidebar nav item always pointing to WelcomeView
- Fix React StrictMode double-seed race condition via module-level Promise singleton
- Add deduplicateDB() to clean up already-inserted duplicates on startup
- Add star button in editor title bar and sidebar note hover row
- Add visible delete button on note item hover in sidebar
- Default activeNoteId to '__welcome__' sentinel; deleted notes return to WelcomeView

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 19:16:50 +08:00
MikiVL
45871ac481 Initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 14:36:32 +08:00