Commit Graph

22 Commits

Author SHA1 Message Date
838eec30a8 feat: add theme management with light and dark modes
- Implemented a new composable `useTheme` for managing theme state.
- Added functions to read and write theme preference to local storage.
- Applied theme styles to the DOM based on user preference.
- Introduced a toggle function to switch between light and dark themes.

refactor: enhance copilot plugin functionality

- Improved request handling with sequence and document versioning.
- Refactored ghost text handling to improve clarity and efficiency.
- Updated markdown insertion logic to handle parsed content more robustly.
- Enhanced error handling and logging for better debugging.

style: update global styles for light and dark themes

- Defined CSS variables for light and dark themes to streamline styling.
- Improved overall styling consistency and responsiveness.
- Added transitions for smoother theme changes and interactions.
2026-02-15 15:44:09 +08:00
03bb21d5c6 feat(copilot): enhance OCR handling with inline tags and document serializer
- Replace HTML comment OCR metadata with inline `<OCR:...>` tags
- Implement serializer-based markdown conversion for prefix/suffix content
- Add extractTextFromOCR utility function for text extraction
- Enable Table, Diagram, and ListCheck features in MilkdownEditor
- Add periodic debug logging for document state analysis
2026-02-14 23:53:26 +08:00
“ydy0615”
794fbf8493 feat(config): add OCR URL configuration and improve image node handling
- Add VITE_OCR_URL environment variable with fallback URL construction
- Define IMAGE_NODE_TYPES constant to support 'image', 'image-block', and 'imageBlock' node types
- Add helper functions for safer image attribute access (getImageSrc, isImageNodeWithSrc, getImageLabel)
- Improve OCR error handling with HTTP status checking and error details
- Wrap OCR context in HTML comments to prevent prompt injection issues
- Update MilkdownEditor to use centralized OCR_URL configuration
2026-02-14 21:21:06 +08:00
“ydy0615”
64cfa58376 feat(editor): add image insertion with OCR support and size limit handling
Add image button with dropdown menu for uploading local images or inserting from URL.
Integrate VLM-based OCR to extract text context from images and include in AI suggestions.
Implement document size limits to disable AI when exceeding threshold.
Refactor copilot plugin with per-view runtime state and OCR context injection.
Add OCR cache utility for managing image metadata.
Add code splitting configuration for optimized bundle size.
2026-02-14 18:28:37 +08:00
“ydy0615”
c64ff7be45 feat(copilot): enhance prompt system and add Markdown rendering for ghost text
- Rewrite prompt builder with comprehensive rules for seamless text completion
- Implement Markdown parsing for ghost text with proper mark handling
- Update LLM parameters (temperature 0.7, repeat_penalty, think mode)
- Add CSS styles for formatted ghost text elements
- Add planning documentation for Copilot prompt system analysis
2026-02-13 22:00:26 +08:00
“ydy0615”
7cddfaba30 feat(editor): add Markdown rendering for ghost text and optimize prompt system
- Implement Markdown parsing for ghost text using Milkdown parser
- Add support for both block and inline content in ghost text
- Refactor prompt system with comprehensive rules and examples
- Adjust LLM parameters: increase temperature to 0.7, add repeat_penalty
- Add CSS styles for formatted ghost text (bold, italic, code, links)
- Add documentation for Copilot prompt system and ghost text rendering
2026-02-13 21:17:45 +08:00
“ydy0615”
65d4a57d33 refactor(editor): migrate to ProseMirror Mark-based ghost text system
- Replace overlay-based GhostTextOverlay.vue with ProseMirror Mark system
- Add AI toggle button with enable/disable functionality
- Implement new copilotPlugin.ts using copilotGhostMark for inline suggestions
- Fix cursor position offset in prompt.py by moving first suffix char to prefix
- Improve API error handling with abort signal support and debug logging
- Update model configuration from gpt-oss:120b to gpt-oss:20b
- Add button tooltips and improve editor styling
- Remove deprecated inlineSuggestionPlugin.ts
- Update README with new architecture diagram and feature documentation
2026-02-13 09:24:50 +08:00
“ydy0615”
16e76e1e90 refactor(editor): migrate to Milkdown with LaTeX support and clean up legacy code
- Removed old contenteditable-based MarkdownEditor component
- Integrated Milkdown Crepe with LaTeX (KaTeX) rendering support
- Simplified inline suggestion plugin using ProseMirror decorations
- Removed debug logging and unused components (HelloWorld, plan files)
- Increased debounce from 150ms to 500ms for better performance
- Fixed SSE JSON serialization in backend main.py
2026-02-12 18:52:16 +08:00
“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
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
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
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
5f00e71ceb feat: enhance logging and error handling in backend and editor components 2026-01-25 13:29:11 +08:00
bf7dec86ab modified: .kilocode/rules/rules.md 2026-01-18 22:11:00 +08:00
f35049ac0b modified: backend/.env
modified:   src/components/MilkdownEditor.vue
2026-01-18 21:31:27 +08:00
6102f905ee feat: implement inline autocomplete suggestions with FastAPI backend and Milkdown editor integration 2026-01-18 19:42:58 +08:00
ba49f82953 Add tokenization and context provider API types
- Implemented window delineation tests for indentation-based tokenization.
- Created tokenizer module with various tokenization strategies including TTokenizer and ApproximateTokenizer.
- Added type definitions for authentication parameters and code citation notifications.
- Introduced context provider API for extensions to supply additional context items to Copilot.
- Defined core types and schemas for position and range.
- Established status types for agent status management in IDEs.
2026-01-18 10:24:32 +08:00
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
d9ab341223 Add documentation for using Milkdown with various frameworks
- Created a new document for using components in Milkdown.
- Added a guide for using plugins in Milkdown, including toggling plugins programmatically and listing official plugins.
- Introduced a recipe for integrating Milkdown with Angular, including installation steps and component creation.
- Added a recipe for using Milkdown with Next.js, detailing installation and component setup.
- Created a guide for integrating Milkdown with NuxtJS, including installation and component creation.
- Added a comprehensive guide for using Milkdown with React, covering both Crepe and core Milkdown usage.
- Introduced a recipe for SolidJS integration with Milkdown, including installation and component creation.
- Added a guide for using Milkdown with Svelte, detailing installation and component setup.
- Created a comprehensive guide for integrating Milkdown with Vue, covering both Crepe and core Milkdown usage.
- Added a recipe for using Milkdown with Vue2, including installation and component creation.
2026-01-17 14:18:08 +08:00
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
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
2517aa27d5 Initial commit 2026-01-11 14:11:14 +00:00