Commit Graph

10 Commits

Author SHA1 Message Date
“ydy0615” 2432e78fe1 feat(editor): add file upload and fix critical bugs
- Add markdown file upload functionality with upload button
- Fix error handling to throw errors instead of silently returning empty strings
- Fix memory leak by cleaning up debounceTimer in onUnmounted
- Update debounce timing from 150ms to 500ms for stability
- Enhance UI with floating action buttons and extensive style refinements
- Hide toolbar, menu, and line number elements for cleaner interface
2026-02-12 08:55:37 +08:00
ydy0615 c2c87d24bf style(editor): remove max-width limit on editor content
Allows the markdown editor to expand to full width instead of being constrained
to 900px, providing better use of available screen real estate.
2026-02-07 13:00:24 +08:00
ydy0615 370510cc50 feat(editor): add inline autocomplete suggestions
Add GhostTextOverlay component for displaying AI-powered completion
suggestions while typing. Includes accept and dismiss actions triggered
by API calls to /v1/completions endpoint with prefix/suffix context.
2026-02-07 11:46:03 +08:00
ydy0615 2abf276d10 feat: switch from OpenAI API to native Ollama Python client
This commit refactors the LLM integration to use Ollama's native Python client instead of OpenAI-compatible API, while fixing critical template syntax errors and improving project structure.

Key changes:
- Replace openai package with ollama package in backend requirements
- Rewrite llm.py to use ollama.AsyncClient for direct Ollama API calls
- Update main.py to use non-streaming Ollama responses with thinking extraction
- Fix template syntax error in MilkdownEditor.vue (GhostTextOverlay component tags)
- Fix string截取错误 by using slice() instead of substring()
- Add src/utils/api.js and src/utils/config.js for shared configuration
- Add CORS middleware to FastAPI backend
- Update prompt.py with clearer instructions for continuation generation
- Add comprehensive README.md documentation

BREAKING CHANGE: Environment variables OLLAMA_BASE_URL changed to OLLAMA_HOST (remove /v1/ suffix)
2026-02-07 09:10:26 +08:00
ydy0615 5f00e71ceb feat: enhance logging and error handling in backend and editor components 2026-01-25 13:29:11 +08:00
ydy0615 f35049ac0b modified: backend/.env
modified:   src/components/MilkdownEditor.vue
2026-01-18 21:31:27 +08:00
ydy0615 6102f905ee feat: implement inline autocomplete suggestions with FastAPI backend and Milkdown editor integration 2026-01-18 19:42:58 +08:00
ydy0615 55c1b180f7 feat(editor): implement WYSIWYG Markdown editor using Milkdown Crepe
Replace the existing contenteditable-based markdown editor with a full-featured WYSIWYG editor using @milkdown/crepe. The new implementation provides:
- True WYSIWYG editing experience with instant Markdown syntax rendering
- Slash command menu support for quick formatting
- Code block highlighting and image paste support
- Built-in export to markdown file functionality

Changes include new MilkdownEditor component, updated App.vue integration, theme styling imports, and optimized Vite configuration for the new dependencies.
2026-01-18 09:08:38 +08:00
ydy0615 4de3dfdd8d feat(editor): enhance markdown editor with contenteditable interface and modals
- Replace textarea with contenteditable div for WYSIWYG-like editing experience
- Add code block editing modal for inline code editing functionality
- Add image preview modal for zoom functionality on clicked images
- Implement keyboard shortcuts (Ctrl+1-6 for headings, Ctrl+B bold, Ctrl+I italic, Ctrl+K links)
- Improve syntax highlighting with Prism.js integration and language detection
- Add debounced rendering to optimize performance during typing
- Enhance styling with hover effects and improved code block indicators
2026-01-12 13:23:55 +08:00
ydy0615 49f264b53b feat(project): scaffold Vue 3 + Vite markdown editor
Add initial project structure including:
- .gitignore and VSCode settings
- Vite configuration and package.json with Vue 3 dependencies
- Basic HTML entry point and README update
- Core source files: App.vue, main.js, style.css
- Markdown editor component with plugin system and related types
- Sample HelloWorld component, router, and Pinia store
- Assets and SVG icons

This commit establishes the foundation for the Vue 3 application.
2026-01-12 12:23:44 +08:00