diff --git a/Makefile b/Makefile index 39b1d2c..abca5fa 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # Compatible with Windows PowerShell and Unix systems # 兼容 Windows PowerShell 和 Unix 系統 -.PHONY: help install install-dev install-hooks lint format type-check test clean pre-commit-run pre-commit-all update-deps check-rust build-desktop build-desktop-release test-desktop clean-desktop build-all test-all +.PHONY: help install install-dev install-hooks lint format type-check test clean pre-commit-run pre-commit-all update-deps check-rust build-desktop build-desktop-release test-desktop clean-desktop build-all test-all test-func test-web test-desktop-func # 預設目標 - 顯示幫助訊息 help: ## Show this help message @@ -26,6 +26,9 @@ help: ## Show this help message @echo " test Run tests" @echo " test-cov Run tests with coverage" @echo " test-fast Run tests without slow tests" + @echo " test-func Run functional tests (standard)" + @echo " test-web Run Web UI tests (continuous)" + @echo " test-desktop-func Run desktop application functional tests" @echo " clean Clean up cache and temporary files" @echo " ps-clean PowerShell version of clean (Windows)" @echo " update-deps Update dependencies" @@ -96,6 +99,16 @@ test-cov: ## Run tests with coverage test-fast: ## Run tests without slow tests uv run pytest -m "not slow" +# 功能測試命令 +test-func: ## Run functional tests (standard) + uv run python -m mcp_feedback_enhanced test + +test-web: ## Run Web UI tests (continuous) + uvx --no-cache --with-editable . mcp-feedback-enhanced test --web + +test-desktop-func: ## Run desktop application functional tests + uvx --no-cache --with-editable . mcp-feedback-enhanced test --desktop + # 維護相關命令 clean: ## Clean up cache and temporary files @echo "Cleaning up..." @@ -179,5 +192,5 @@ build-all: clean build-desktop-release build ## Build complete package with desk @echo "🎉 Complete build finished!" # 測試所有功能 -test-all: test test-desktop ## Run all tests including desktop +test-all: test test-func test-desktop ## Run all tests including desktop and functional tests @echo "✅ All tests completed!" diff --git a/README.md b/README.md index 39c0db7..aeafea0 100644 --- a/README.md +++ b/README.md @@ -8,21 +8,21 @@ ## 🎯 Core Concept -This is an [MCP server](https://modelcontextprotocol.io/) that establishes **feedback-oriented development workflows**, adopting a **pure Web UI architecture**, perfectly adapting to local, **SSH Remote environments** (Cursor SSH Remote, VS Code Remote SSH), and **WSL (Windows Subsystem for Linux) environments**. By guiding AI to confirm with users rather than making speculative operations, it can consolidate multiple tool calls into a single feedback-oriented request, dramatically reducing platform costs and improving development efficiency. +This is an [MCP server](https://modelcontextprotocol.io/) that establishes **feedback-oriented development workflows**, providing **Web UI and Desktop Application** dual interface options, perfectly adapting to local, **SSH Remote environments** (Cursor SSH Remote, VS Code Remote SSH), and **WSL (Windows Subsystem for Linux) environments**. By guiding AI to confirm with users rather than making speculative operations, it can consolidate multiple tool calls into a single feedback-oriented request, dramatically reducing platform costs and improving development efficiency. -**🌐 Web-Only Architecture Advantages:** -- 🚀 **Simplified Deployment**: No GUI dependencies, lighter installation -- 🌍 **Cross-Platform Compatibility**: Supports all operating systems and environments -- 🔧 **Easy Maintenance**: Unified Web interface, reduced complexity -- 📦 **Compact Size**: Removed heavy GUI libraries, significantly smaller installation package +**🌐 Dual Interface Architecture Advantages:** +- 🖥️ **Desktop Application**: Native cross-platform desktop experience, supporting Windows, macOS, Linux +- 🌐 **Web UI Interface**: No GUI dependencies required, suitable for remote and WSL environments +- 🔧 **Flexible Deployment**: Choose the most suitable interface mode based on environment requirements +- 📦 **Unified Functionality**: Both interfaces provide exactly the same functional experience -**🔮 Future Plans:** We plan to reintroduce desktop applications after feature stabilization, currently focusing on Web UI feature enhancement and optimization. +**🖥️ Desktop Application:** v2.5.0 introduces cross-platform desktop application support based on Tauri framework, supporting Windows, macOS, and Linux platforms with native desktop experience. **Supported Platforms:** [Cursor](https://www.cursor.com) | [Cline](https://cline.bot) | [Windsurf](https://windsurf.com) | [Augment](https://www.augmentcode.com) | [Trae](https://www.trae.ai) ### 🔄 Workflow 1. **AI Call** → `mcp-feedback-enhanced` tool -2. **Web UI Launch** → Auto-open browser interface (pure Web architecture) +2. **Interface Launch** → Auto-open desktop application or browser interface (based on configuration) 3. **Smart Interaction** → Prompt selection, text input, image upload, auto-submit 4. **Real-time Feedback** → WebSocket connection delivers information to AI instantly 5. **Session Tracking** → Auto-record session history and statistics @@ -30,85 +30,36 @@ This is an [MCP server](https://modelcontextprotocol.io/) that establishes **fee ## 🌟 Key Features -### 🌐 Pure Web UI Architecture System -- **Web-Only Design**: Completely removed desktop GUI dependencies, adopting pure Web interface -- **Universal Compatibility**: Supports local, SSH Remote, and WSL environments -- **Auto Adaptation**: Intelligent environment detection and optimal configuration -- **Lightweight Deployment**: No complex GUI environment configuration required +### 🖥️ Dual Interface Support +- **Desktop Application**: Cross-platform native application based on Tauri, supporting Windows, macOS, Linux +- **Web UI Interface**: Lightweight browser interface suitable for remote and WSL environments +- **Automatic Environment Detection**: Intelligently recognizes SSH Remote, WSL and other special environments +- **Unified Feature Experience**: Both interfaces provide exactly the same functionality -### 📝 Smart Prompt Management System (v2.4.0 New Feature) -- **CRUD Operations**: Create, edit, delete, and use common prompts -- **Usage Statistics**: Track usage frequency with intelligent sorting -- **Quick Application**: One-click selection and application of prompts -- **Auto-Submit Integration**: Support auto-submit marking and priority display +### 📝 Smart Workflow +- **Prompt Management**: CRUD operations for common prompts, usage statistics, intelligent sorting +- **Auto-Timed Submit**: 1-86400 second flexible timer, supports pause, resume, cancel +- **Session Management & Tracking**: Local file storage, privacy controls, history export, real-time statistics +- **Connection Monitoring**: WebSocket status monitoring, auto-reconnection, quality indicators +- **AI Work Summary Markdown Display**: Support for rich Markdown syntax rendering including headers, bold text, code blocks, lists, links and other formats for enhanced content readability -### ⏰ Auto-Timed Submit Feature (v2.4.0 New Feature) -- **Flexible Timing**: Configurable countdown timer from 1-86400 seconds -- **Visual Display**: Real-time countdown display and status indicators -- **Deep Integration**: Seamless integration with prompt management system -- **Complete Control**: Support pause, resume, and cancel operations +### 🎨 Modern Experience +- **Responsive Design**: Adapts to different screen sizes, modular JavaScript architecture +- **Audio Notifications**: Built-in multiple sound effects, custom audio upload support, volume control +- **Smart Memory**: Input box height memory, one-click copy, persistent settings +- **Multi-language Support**: Traditional Chinese, English, Simplified Chinese, instant switching -### 📊 Session Management & Tracking (v2.4.3 Refactored & Enhanced) -- **Dedicated Tab Design**: Migrated from sidebar to dedicated tab, resolving browser compatibility issues -- **Local History Storage**: Support for local session record storage with configurable retention periods -- **Privacy Control**: User message recording with three privacy level settings -- **Data Management**: Support for session history export and cleanup functionality -- **Real-time Statistics**: Today's session count and average duration statistics - -### 🔗 Connection Monitoring System (v2.4.0 New Feature) -- **Real-time Monitoring**: WebSocket connection status monitoring in real-time -- **Quality Indicators**: Latency measurement and connection quality indicators -- **Auto Reconnection**: Smart reconnection mechanism and error handling -- **Detailed Statistics**: Complete connection statistical information - -### 🔊 Audio Notification System (v2.4.3 New Feature) -- **Smart Alerts**: Automatically play audio notifications when sessions update -- **Multiple Audio Options**: Built-in classic beep, notification ding, soft chime -- **Custom Audio**: Support uploading custom audio files (MP3, WAV, OGG formats) -- **Full Control**: Volume adjustment, test playback, and audio management features - -### 🎨 Modern Interface Design -- **Modular Architecture**: JavaScript completely modularized refactoring -- **Responsive Design**: Adapts to different screen sizes and window dimensions -- **Unified Style**: Consistent design language and visual experience -- **Smart Layout**: AI summary auto-expansion, optimized submit button positioning - -### 🖼️ Image Support -- **Format Support**: PNG, JPG, JPEG, GIF, BMP, WebP -- **Upload Methods**: Drag & drop files + clipboard paste (Ctrl+V) -- **Unlimited Upload**: Support image files of any size with automatic smart processing - -### 💾 Smart Memory Features (v2.4.3 New Feature) -- **Input Height Memory**: Automatically save and restore textarea input height settings -- **One-Click Copy**: Project path and session ID support click-to-copy to clipboard -- **Settings Persistence**: All user preference settings automatically saved - -### 🌏 Multi-language -- **Three Languages**: English, Traditional Chinese, Simplified Chinese -- **Smart Detection**: Auto-select based on system language -- **Live Switching**: Change language directly within interface -- **Complete Internationalization**: Includes multilingual support for tooltips and button hints - -### ✨ WSL Environment Support (v2.2.5) -- **Auto Detection**: Intelligently identifies WSL (Windows Subsystem for Linux) environments -- **Browser Integration**: Automatically launches Windows browser in WSL environments -- **Multiple Launch Methods**: Supports `cmd.exe`, `powershell.exe`, `wslview` and other browser launch methods -- **Seamless Experience**: WSL users can directly use Web UI without additional configuration - -### 🌐 SSH Remote Environment Support (v2.3.0 New Feature) -- **Smart Detection**: Automatically identifies SSH Remote environments (Cursor SSH Remote, VS Code Remote SSH, etc.) -- **Browser Launch Guidance**: Provides clear solutions when browser cannot launch automatically -- **Port Forwarding Support**: Complete port forwarding setup guidance and troubleshooting -- **MCP Integration Optimization**: Improved integration with MCP system for more stable connection experience -- **Detailed Documentation**: [SSH Remote Environment Usage Guide](docs/en/ssh-remote/browser-launch-issues.md) -- 🎯 **Auto-focus Input Box**: Automatically focus on feedback input box when window opens, improving user experience (Thanks @penn201500) +### 🖼️ Images & Media +- **Full Format Support**: PNG, JPG, JPEG, GIF, BMP, WebP +- **Convenient Upload**: Drag & drop files, clipboard paste (Ctrl+V) +- **Unlimited Processing**: Support for any size images, automatic intelligent processing ## 🌐 Interface Preview -### Web UI Interface (v2.4.0 - Web-Only Architecture) +### Web UI Interface (v2.5.0 - Desktop Application Support)
- Web UI Main Interface - Prompt Management & Auto-Submit + Web UI Main Interface - Prompt Management & Auto Submit
@@ -120,12 +71,20 @@ This is an [MCP server](https://modelcontextprotocol.io/) that establishes **fee
-*Web UI Interface - Pure Web architecture, supporting prompt management, auto-submit, session tracking and other smart features* +*Web UI Interface - Supports desktop application and Web interface, providing prompt management, auto-submit, session tracking and other smart features* -**Keyboard Shortcuts** -- `Ctrl+Enter` (Windows/Linux) / `Cmd+Enter` (macOS): Submit feedback (supports both main keyboard and numpad) -- `Ctrl+V` (Windows/Linux) / `Cmd+V` (macOS): Directly paste clipboard images -- `Ctrl+I` (Windows/Linux) / `Cmd+I` (macOS): Quick focus input box (Thanks @penn201500) +### Desktop Application Interface (v2.5.0 New Feature) + +
+ Desktop Application - Native Cross-platform Desktop Experience +
+ +*Desktop Application - Native cross-platform desktop application based on Tauri framework, supporting Windows, macOS, Linux with exactly the same functionality as Web UI* + +**Shortcut Support** +- `Ctrl+Enter`(Windows/Linux)/ `Cmd+Enter`(macOS):Submit feedback (both main keyboard and numeric keypad supported) +- `Ctrl+V`(Windows/Linux)/ `Cmd+V`(macOS):Direct paste clipboard images +- `Ctrl+I`(Windows/Linux)/ `Cmd+I`(macOS):Quick focus input box (Thanks @penn201500) ## 🚀 Quick Start @@ -138,7 +97,7 @@ pip install uv uvx mcp-feedback-enhanced@latest test ``` -### 2. MCP Configuration +### 2. Configure MCP **Basic Configuration** (suitable for most users): ```json { @@ -153,7 +112,7 @@ uvx mcp-feedback-enhanced@latest test } ``` -**Advanced Configuration** (custom environment needed): +**Advanced Configuration** (requires custom environment): ```json { "mcpServers": { @@ -171,17 +130,40 @@ uvx mcp-feedback-enhanced@latest test } ``` +**Desktop Application Configuration** (v2.5.0 new feature - using native desktop application): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "env": { + "MCP_DESKTOP_MODE": "true", + "MCP_WEB_PORT": "8765", + "MCP_DEBUG": "false" + }, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +**Configuration File Examples**: +- Desktop Mode: [examples/mcp-config-desktop.json](examples/mcp-config-desktop.json) +- Web Mode: [examples/mcp-config-web.json](examples/mcp-config-web.json) + ### 3. Prompt Engineering Setup -For best results, add these rules to your AI assistant: +For optimal results, add the following rules to your AI assistant: ``` # MCP Interactive Feedback Rules -1. During any process, task, or conversation, whether asking, responding, or completing stage tasks, must call MCP mcp-feedback-enhanced. -2. When receiving user feedback, if feedback content is not empty, must call MCP mcp-feedback-enhanced again and adjust behavior based on feedback. -3. Only when user explicitly indicates "end" or "no more interaction needed" can you stop calling MCP mcp-feedback-enhanced, then the process is complete. -4. Unless receiving end command, all steps must repeatedly call MCP mcp-feedback-enhanced. -5. Before completing the task, use the MCP mcp-feedback-enhanced to ask the user for feedback. +1. During any process, task, or conversation, whether asking, replying, or completing phased tasks, you must call MCP mcp-feedback-enhanced. +2. Whenever user feedback is received, if the feedback content is not empty, you must call MCP mcp-feedback-enhanced again and adjust behavior based on the feedback content. +3. Only when the user explicitly indicates "end" or "no more interaction needed" can you stop calling MCP mcp-feedback-enhanced, and the process is considered complete. +4. Unless receiving termination instructions, all steps must repeatedly call MCP mcp-feedback-enhanced. +5. Before completing tasks, you must use the MCP mcp-feedback-enhanced tool to ask users for feedback. ``` ## ⚙️ Advanced Settings @@ -191,6 +173,7 @@ For best results, add these rules to your AI assistant: |----------|---------|--------|---------| | `MCP_DEBUG` | Debug mode | `true`/`false` | `false` | | `MCP_WEB_PORT` | Web UI port | `1024-65535` | `8765` | +| `MCP_DESKTOP_MODE` | Desktop application mode | `true`/`false` | `false` | ### Testing Options ```bash @@ -199,7 +182,7 @@ uvx mcp-feedback-enhanced@latest version # Check version # Interface testing uvx mcp-feedback-enhanced@latest test --web # Test Web UI (auto continuous running) -uvx mcp-feedback-enhanced@latest test --enhanced # Enhanced test suite +uvx mcp-feedback-enhanced@latest test --desktop # Test desktop application (v2.5.0 new feature) # Debug mode MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test @@ -214,18 +197,30 @@ uv sync **Local Testing Methods** ```bash -# Functional Testing -uv run python -m mcp_feedback_enhanced test # Standard functional testing -uvx --with-editable . mcp-feedback-enhanced test --web # Web UI testing (continuous running) +# Functional testing +make test-func # Standard functional testing +make test-web # Web UI testing (continuous running) +make test-desktop-func # Desktop application functional testing -# Unit Testing +# Or use direct commands +uv run python -m mcp_feedback_enhanced test # Standard functional testing +uvx --no-cache --with-editable . mcp-feedback-enhanced test --web # Web UI testing (continuous running) +uvx --no-cache --with-editable . mcp-feedback-enhanced test --desktop # Desktop application testing + +# Desktop application build (v2.5.0 new feature) +make build-desktop # Build desktop application (debug mode) +make build-desktop-release # Build desktop application (release mode) +make test-desktop # Test desktop application +make clean-desktop # Clean desktop build artifacts + +# Unit testing make test # Run all unit tests make test-fast # Fast testing (skip slow tests) -make test-cov # Testing with coverage report +make test-cov # Test and generate coverage report -# Code Quality Checks -make check # Complete code quality checks -make quick-check # Quick check with auto-fix +# Code quality checks +make check # Complete code quality check +make quick-check # Quick check and auto-fix ``` **Testing Descriptions** @@ -236,91 +231,95 @@ make quick-check # Quick check with auto- ## 🆕 Version History -📋 **Complete Version History:** [RELEASE_NOTES/CHANGELOG.en.md](RELEASE_NOTES/CHANGELOG.en.md) +📋 **Complete Version History:** [RELEASE_NOTES/CHANGELOG.md](RELEASE_NOTES/CHANGELOG.md) -### Latest Version Highlights (v2.4.3) -- 📋 **Session Management Refactoring**: Migrated from sidebar to dedicated tab, resolving browser compatibility issues -- 🔊 **Audio Notification System**: Session update audio alerts with built-in and custom audio support -- 📚 **Enhanced Session History**: Local storage, privacy control, export and cleanup functionality -- 💾 **Smart Memory Features**: Input height memory, one-click copy, and other convenience features -- 🎨 **Interface Layout Optimization**: AI summary auto-expansion, button repositioning, simplified design -- 🌐 **Multilingual Enhancement**: Complete internationalization support for tooltips and button hints -- 🐛 **Bug Fixes**: Fixed session details button, modal close delay, and other user experience issues -- 🛠️ **Technical Architecture Upgrade**: JavaScript modular refactoring, adopting modern development patterns +### Latest Version Highlights (v2.5.0) +- 🖥️ **Desktop Application**: Brand new cross-platform desktop application supporting Windows, macOS, Linux +- 📋 **AI Work Summary Markdown Display**: Support for Markdown syntax rendering including headers, bold text, code blocks, lists, links and other formats +- ⚡ **Significant Performance Enhancement**: Introduced debounce/throttle mechanisms to reduce unnecessary rendering and network requests +- 📊 **Session History Storage Improvement**: Migrated from localStorage to server-side local file storage +- 🌐 **Network Connection Stability**: Improved WebSocket reconnection mechanism with network status detection +- 🎨 **UI Rendering Optimization**: Optimized rendering performance for session management, statistics, and status indicators +- 🛠️ **Build Process Optimization**: Added Makefile desktop application build commands and development tools +- 📚 **Documentation Enhancement**: Added desktop application build guide and workflow documentation ## 🐛 Common Issues ### 🌐 SSH Remote Environment Issues **Q: Browser cannot launch in SSH Remote environment** -A: This is normal behavior. SSH Remote environments have no graphical interface, requiring manual opening in local browser. For detailed solutions, see: [SSH Remote Environment Usage Guide](docs/en/ssh-remote/browser-launch-issues.md) +A: This is normal. SSH Remote environments have no graphical interface, requiring manual opening in local browser. For detailed solutions, refer to: [SSH Remote Environment Usage Guide](docs/en/ssh-remote/browser-launch-issues.md) **Q: Why am I not receiving new MCP feedback?** -A: There might be a WebSocket connection issue. **Solution**: Simply refresh the browser page. +A: Likely a WebSocket connection issue. **Solution**: Directly refresh the browser page. **Q: Why isn't MCP being called?** -A: Please confirm the MCP tool status shows green light. **Solution**: Toggle the MCP tool on/off repeatedly, wait a few seconds for system reconnection. +A: Please confirm MCP tool status shows green light. **Solution**: Repeatedly toggle MCP tool on/off, wait a few seconds for system reconnection. **Q: Augment cannot start MCP** -A: **Solution**: Completely close and restart VS Code or Cursor, then reopen the project. +A: **Solution**: Completely close and restart VS Code or Cursor, reopen the project. ### 🔧 General Issues -**Q: How to use the legacy GUI interface?** -A: v2.4.0 has completely removed PyQt6 GUI dependencies and transitioned to a pure Web UI architecture. To use the legacy GUI, please specify v2.3.0 or earlier versions: -```bash -# Use v2.3.0 (last version supporting GUI) -uvx mcp-feedback-enhanced@2.3.0 - -# Or specify version in MCP configuration +**Q: How to use desktop application?** +A: v2.5.0 introduces cross-platform desktop application support. Set `"MCP_DESKTOP_MODE": "true"` in MCP configuration to enable: +```json { "mcpServers": { "mcp-feedback-enhanced": { "command": "uvx", - "args": ["mcp-feedback-enhanced@2.3.0"], + "args": ["mcp-feedback-enhanced@latest"], "timeout": 600, + "env": { + "MCP_DESKTOP_MODE": "true", + "MCP_WEB_PORT": "8765" + }, "autoApprove": ["interactive_feedback"] } } } ``` -**Note**: Legacy versions do not include v2.4.0 new features (prompt management, auto-submit, session management, etc.). +**Configuration File Example**: [examples/mcp-config-desktop.json](examples/mcp-config-desktop.json) -**Q: Getting "Unexpected token 'D'" error** +**Q: How to use legacy PyQt6 GUI interface?** +A: v2.4.0 completely removed PyQt6 GUI dependencies. To use legacy GUI, specify v2.3.0 or earlier: `uvx mcp-feedback-enhanced@2.3.0` +**Note**: Legacy versions don't include new features (prompt management, auto-submit, session management, desktop application, etc.). + +**Q: "Unexpected token 'D'" error appears** A: Debug output interference. Set `MCP_DEBUG=false` or remove the environment variable. **Q: Chinese character garbled text** A: Fixed in v2.0.3. Update to latest version: `uvx mcp-feedback-enhanced@latest` -**Q: Multi-screen window disappearing or positioning errors** -A: Fixed in v2.1.1. Go to "⚙️ Settings" tab, check "Always show window at primary screen center" to resolve. Especially useful for T-shaped screen arrangements and other complex multi-monitor configurations. +**Q: Window disappears or positioning errors in multi-screen environment** +A: Fixed in v2.1.1. Go to "⚙️ Settings" tab, check "Always show window at primary screen center" to resolve. Especially suitable for T-shaped screen arrangements and other complex multi-screen configurations. -**Q: Image upload fails** -A: Check file format (PNG/JPG/JPEG/GIF/BMP/WebP). System supports image files of any size. +**Q: Image upload failure** +A: Check file format (PNG/JPG/JPEG/GIF/BMP/WebP). System supports any size image files. -**Q: Web UI won't start** -A: Check firewall settings or try using a different port. +**Q: Web UI cannot start** +A: Check firewall settings or try using different ports. -**Q: UV Cache taking up too much disk space** -A: Due to frequent use of `uvx` commands, cache may accumulate to tens of GB. Regular cleanup is recommended: +**Q: UV Cache occupies too much disk space** +A: Due to frequent use of `uvx` commands, cache may accumulate to tens of GB. Regular cleanup recommended: ```bash -# Check cache size and detailed information +# View cache size and detailed information python scripts/cleanup_cache.py --size -# Preview cleanup content (without actually cleaning) +# Preview cleanup content (no actual cleanup) python scripts/cleanup_cache.py --dry-run # Execute standard cleanup python scripts/cleanup_cache.py --clean -# Force cleanup (attempts to close related processes, solves Windows file lock issues) +# Force cleanup (attempts to close related programs, solving Windows file occupation issues) python scripts/cleanup_cache.py --force -# Or use uv command directly +# Or directly use uv command uv cache clean ``` -For detailed instructions, see: [Cache Management Guide](docs/en/cache-management.md) +For detailed instructions, refer to: [Cache Management Guide](docs/en/cache-management.md) **Q: AI models cannot parse images** -A: Various AI models (including Gemini Pro 2.5, Claude, etc.) may have instability in image parsing, sometimes correctly identifying and sometimes unable to parse uploaded image content. This is a known limitation of AI visual understanding technology. Recommendations: +A: Various AI models (including Gemini Pro 2.5, Claude, etc.) may have instability in image parsing, sometimes correctly recognizing and sometimes unable to parse uploaded image content. This is a known limitation of AI visual understanding technology. Recommendations: 1. Ensure good image quality (high contrast, clear text) 2. Try uploading multiple times, retries usually succeed 3. If parsing continues to fail, try adjusting image size or format @@ -331,7 +330,7 @@ A: Various AI models (including Gemini Pro 2.5, Claude, etc.) may have instabili **Fábio Ferreira** - [X @fabiomlferreira](https://x.com/fabiomlferreira) **Original Project:** [noopstudios/interactive-feedback-mcp](https://github.com/noopstudios/interactive-feedback-mcp) -If you find this useful, please: +If you find it useful, please: - ⭐ [Star the original project](https://github.com/noopstudios/interactive-feedback-mcp) - 📱 [Follow the original author](https://x.com/fabiomlferreira) @@ -348,7 +347,7 @@ If you find this useful, please: ## 📄 License -MIT License - see [LICENSE](LICENSE) file for details +MIT License - See [LICENSE](LICENSE) file for details --- **🌟 Welcome to Star and share with more developers!** diff --git a/README.zh-CN.md b/README.zh-CN.md index d0103f8..6e1d985 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -8,21 +8,21 @@ ## 🎯 核心概念 -这是一个 [MCP 服务器](https://modelcontextprotocol.io/),建立**反馈导向的开发工作流程**,采用**纯 Web UI 架构**,完美适配本地、**SSH Remote 环境**(Cursor SSH Remote、VS Code Remote SSH)与 **WSL (Windows Subsystem for Linux) 环境**。通过引导 AI 与用户确认而非进行推测性操作,可将多次工具调用合并为单次反馈导向请求,大幅节省平台成本并提升开发效率。 +这是一个 [MCP 服务器](https://modelcontextprotocol.io/),建立**反馈导向的开发工作流程**,提供**Web UI 和桌面应用程序**双重选择,完美适配本地、**SSH Remote 环境**(Cursor SSH Remote、VS Code Remote SSH)与 **WSL (Windows Subsystem for Linux) 环境**。通过引导 AI 与用户确认而非进行推测性操作,可将多次工具调用合并为单次反馈导向请求,大幅节省平台成本并提升开发效率。 -**🌐 Web-Only 架构优势:** -- 🚀 **简化部署**:无需 GUI 依赖,安装更轻量 -- 🌍 **跨平台兼容**:支持所有操作系统和环境 -- 🔧 **维护简单**:统一的 Web 界面,降低复杂度 -- 📦 **体积精简**:移除重型 GUI 库,安装包大幅缩小 +**🌐 双重界面架构优势:** +- 🖥️ **桌面应用程序**:原生跨平台桌面体验,支持 Windows、macOS、Linux +- 🌐 **Web UI 界面**:无需 GUI 依赖,适合远程和 WSL 环境 +- 🔧 **灵活部署**:根据环境需求选择最适合的界面模式 +- 📦 **统一功能**:两种界面提供完全相同的功能体验 -**🔮 未来计划:** 我们计划在功能稳定后重新引入桌面版应用程序,目前专注于 Web UI 功能的完善和优化。 +**🖥️ 桌面应用程序:** v2.5.0 新增跨平台桌面应用程序支持,基于 Tauri 框架,支持 Windows、macOS、Linux 三大平台,提供原生桌面体验。 **支持平台:** [Cursor](https://www.cursor.com) | [Cline](https://cline.bot) | [Windsurf](https://windsurf.com) | [Augment](https://www.augmentcode.com) | [Trae](https://www.trae.ai) ### 🔄 工作流程 1. **AI 调用** → `mcp-feedback-enhanced` 工具 -2. **Web UI 启动** → 自动打开浏览器界面(纯 Web 架构) +2. **界面启动** → 自动打开桌面应用程序或浏览器界面(根据配置) 3. **智能交互** → 提示词选择、文字输入、图片上传、自动提交 4. **即时反馈** → WebSocket 连接即时传递信息给 AI 5. **会话追踪** → 自动记录会话历史与统计 @@ -30,81 +30,33 @@ ## 🌟 主要功能 -### 🌐 纯 Web UI 架构系统 -- **Web-Only 设计**:完全移除桌面 GUI 依赖,采用纯 Web 界面 -- **通用兼容性**:支持本地、SSH Remote 和 WSL 环境 -- **自动适配**:智能环境检测与最佳配置 -- **轻量部署**:无需复杂的 GUI 环境配置 +### 🖥️ 双重界面支持 +- **桌面应用程序**:基于 Tauri 的跨平台原生应用,支持 Windows、macOS、Linux +- **Web UI 界面**:轻量级浏览器界面,适合远程和 WSL 环境 +- **环境自动检测**:智能识别 SSH Remote、WSL 等特殊环境 +- **统一功能体验**:两种界面提供完全相同的功能 -### 📝 智能提示词管理系统(v2.4.0 新功能) -- **CRUD 操作**:新增、编辑、删除、使用常用提示词 -- **使用统计**:追踪使用频率并智能排序 -- **快速应用**:一键选择和应用提示词 -- **自动提交整合**:支持自动提交标记和优先显示 +### 📝 智能工作流程 +- **提示词管理**:常用提示词的 CRUD 操作、使用统计、智能排序 +- **自动定时提交**:1-86400 秒弹性计时器,支持暂停、恢复、取消 +- **会话管理追踪**:本地文件存储、隐私控制、历史导出、即时统计 +- **连接监控**:WebSocket 状态监控、自动重连、品质指示 +- **AI 工作摘要 Markdown 显示**:支持丰富的 Markdown 语法渲染,包含标题、粗体、代码区块、列表、链接等格式,提升内容可读性 -### ⏰ 自动定时提交功能(v2.4.0 新功能) -- **弹性计时**:可设定 1-86400 秒的倒数计时器 -- **视觉化显示**:即时倒数显示和状态指示 -- **深度整合**:与提示词管理系统无缝配合 -- **完整控制**:支持暂停、恢复、取消操作 +### 🎨 现代化体验 +- **响应式设计**:适配不同屏幕尺寸,模块化 JavaScript 架构 +- **音效通知**:内建多种音效、支持自定义音效上传、音量控制 +- **智能记忆**:输入框高度记忆、一键复制、设定持久化 +- **多语言支持**:简体中文、英文、繁体中文,即时切换 -### 📊 会话管理与追踪(v2.4.3 重构增强) -- **独立页签设计**:从左侧边栏迁移到专属页签,解决浏览器兼容性问题 -- **本地历史保存**:支持会话记录本地保存,可设定保存期限 -- **隐私控制**:用户消息记录支持三种隐私等级设定 -- **数据管理**:支持会话历史导出和清理功能 -- **实时统计**:今日会话数量和平均时长统计 - -### 🔗 连接监控系统(v2.4.0 新功能) -- **即时监控**:WebSocket 连接状态即时监控 -- **品质指示**:延迟测量和连接品质指示 -- **自动重连**:智能重连机制和错误处理 -- **详细统计**:完整的连接统计信息 - -### 🔊 音效通知系统(v2.4.3 新功能) -- **智能提醒**:会话更新时自动播放音效通知 -- **多种音效**:内建经典提示音、通知铃声、轻柔钟声 -- **自定义音效**:支持上传 MP3、WAV、OGG 格式的自定义音效 -- **完整控制**:音量调节、测试播放、音效管理功能 - -### 🎨 现代化界面设计 -- **模块化架构**:JavaScript 完全模块化重构 -- **响应式设计**:适配不同屏幕尺寸和窗口大小 -- **统一风格**:一致的设计语言和视觉体验 -- **智能布局**:AI 摘要区域自动扩展,提交按钮位置优化 - -### 🖼️ 图片支持 -- **格式支持**:PNG、JPG、JPEG、GIF、BMP、WebP -- **上传方式**:拖拽文件 + 剪贴板粘贴(Ctrl+V) -- **无限制上传**:支持任意大小的图片文件,自动智能处理 - -### 💾 智能记忆功能(v2.4.3 新功能) -- **输入框高度记忆**:自动保存和恢复文字输入框的高度设定 -- **一键复制**:项目路径和会话ID支持点击复制到剪贴板 -- **设定持久化**:所有用户偏好设定自动保存 - -### 🌏 多语言 -- **三语支持**:简体中文、英文、繁体中文 -- **智能检测**:根据系统语言自动选择 -- **即时切换**:界面内可直接切换语言 -- **完整国际化**:包含 tooltip 和按钮提示的多语言支持 - -### ✨ WSL 环境支持(v2.2.5) -- **自动检测**:智能识别 WSL (Windows Subsystem for Linux) 环境 -- **浏览器整合**:WSL 环境下自动启动 Windows 浏览器 -- **多种启动方式**:支持 `cmd.exe`、`powershell.exe`、`wslview` 等多种浏览器启动方法 -- **无缝体验**:WSL 用户可直接使用 Web UI,无需额外配置 - -### 🌐 SSH Remote 环境支持(v2.3.0 新功能) -- **智能检测**:自动识别 SSH Remote 环境(Cursor SSH Remote、VS Code Remote SSH 等) -- **浏览器启动指引**:当无法自动启动浏览器时,提供清晰的解决方案 -- **端口转发支持**:完整的端口转发设置指引和故障排除 -- **MCP 整合优化**:改善与 MCP 系统的整合,提供更稳定的连接体验 -- **详细文档**:[SSH Remote 环境使用指南](docs/zh-CN/ssh-remote/browser-launch-issues.md) +### 🖼️ 图片与媒体 +- **全格式支持**:PNG、JPG、JPEG、GIF、BMP、WebP +- **便捷上传**:拖拽文件、剪贴板粘贴(Ctrl+V) +- **无限制处理**:支持任意大小图片,自动智能处理 ## 🌐 界面预览 -### Web UI 界面(v2.4.0 - Web-Only 架构) +### Web UI 界面(v2.5.0 - 支持桌面应用程序)
Web UI 主界面 - 提示词管理与自动提交 @@ -119,7 +71,15 @@ -*Web UI 界面 - 纯 Web 架构,支持提示词管理、自动提交、会话追踪等智能功能* +*Web UI 界面 - 支持桌面应用程序和 Web 界面,提供提示词管理、自动提交、会话追踪等智能功能* + +### 桌面应用程序界面(v2.5.0 新功能) + +
+ 桌面应用程序 - 原生跨平台桌面体验 +
+ +*桌面应用程序 - 基于 Tauri 框架的原生跨平台桌面应用,支持 Windows、macOS、Linux,提供与 Web UI 完全相同的功能* **快捷键支持** - `Ctrl+Enter`(Windows/Linux)/ `Cmd+Enter`(macOS):提交反馈(主键盘与数字键盘皆支持) @@ -170,6 +130,29 @@ uvx mcp-feedback-enhanced@latest test } ``` +**桌面应用程序配置**(v2.5.0 新功能 - 使用原生桌面应用程序): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "env": { + "MCP_DESKTOP_MODE": "true", + "MCP_WEB_PORT": "8765", + "MCP_DEBUG": "false" + }, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +**配置文件示例**: +- 桌面模式:[examples/mcp-config-desktop.json](examples/mcp-config-desktop.json) +- Web 模式:[examples/mcp-config-web.json](examples/mcp-config-web.json) + ### 3. 设定提示工程 为了获得最佳效果,请在 AI 助手中添加以下规则: @@ -190,6 +173,7 @@ uvx mcp-feedback-enhanced@latest test |------|------|-----|------| | `MCP_DEBUG` | 调试模式 | `true`/`false` | `false` | | `MCP_WEB_PORT` | Web UI 端口 | `1024-65535` | `8765` | +| `MCP_DESKTOP_MODE` | 桌面应用程序模式 | `true`/`false` | `false` | ### 测试选项 ```bash @@ -198,6 +182,7 @@ uvx mcp-feedback-enhanced@latest version # 检查版本 # 界面测试 uvx mcp-feedback-enhanced@latest test --web # 测试 Web UI (自动持续运行) +uvx mcp-feedback-enhanced@latest test --desktop # 测试桌面应用程序 (v2.5.0 新功能) # 调试模式 MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test @@ -213,8 +198,20 @@ uv sync **本地测试方式** ```bash # 功能测试 +make test-func # 标准功能测试 +make test-web # Web UI 测试 (持续运行) +make test-desktop-func # 桌面应用功能测试 + +# 或直接使用指令 uv run python -m mcp_feedback_enhanced test # 标准功能测试 -uvx --with-editable . mcp-feedback-enhanced test --web # Web UI 测试 (持续运行) +uvx --no-cache --with-editable . mcp-feedback-enhanced test --web # Web UI 测试 (持续运行) +uvx --no-cache --with-editable . mcp-feedback-enhanced test --desktop # 桌面应用测试 + +# 桌面应用构建 (v2.5.0 新功能) +make build-desktop # 构建桌面应用 (debug 模式) +make build-desktop-release # 构建桌面应用 (release 模式) +make test-desktop # 测试桌面应用 +make clean-desktop # 清理桌面构建产物 # 单元测试 make test # 运行所有单元测试 @@ -236,14 +233,15 @@ make quick-check # 快速检查并自动 📋 **完整版本更新记录:** [RELEASE_NOTES/CHANGELOG.zh-CN.md](RELEASE_NOTES/CHANGELOG.zh-CN.md) -### 最新版本亮点(v2.4.3) -- 📋 **会话管理重构**: 从左侧边栏迁移到独立页签,解决浏览器兼容性问题 -- 🔊 **音效通知系统**: 会话更新音效提醒,支持内建和自定义音效 -- 📚 **会话历史增强**: 本地保存、隐私控制、导出清理功能 -- 💾 **智能记忆功能**: 输入框高度记忆、一键复制等便利功能 -- 🎨 **界面布局优化**: AI 摘要自动扩展、按钮位置调整、简化设计 -- 🌐 **多语言完善**: tooltip 和按钮提示的完整国际化支持 -- 🐛 **问题修复**: 修复会话详情按钮、弹窗关闭延迟等用户体验问题 +### 最新版本亮点(v2.5.0) +- 🖥️ **桌面应用程序**: 全新跨平台桌面应用,支持 Windows、macOS、Linux +- 📋 **AI 工作摘要 Markdown 显示**: 支持 Markdown 语法渲染,包含标题、粗体、代码区块、列表、链接等格式 +- ⚡ **性能大幅提升**: 引入防抖/节流机制,减少不必要的渲染和网络请求 +- 📊 **会话历史存储改进**: 从 localStorage 改为服务器端本地文件存储 +- 🌐 **网络连接稳定性**: 改进 WebSocket 重连机制,支持网络状态检测 +- 🎨 **UI 渲染优化**: 优化会话管理、统计信息、状态指示器的渲染性能 +- 🛠️ **构建流程优化**: 新增 Makefile 桌面应用构建命令和开发工具 +- 📚 **文档完善**: 新增桌面应用构建指南和工作流程说明 ## 🐛 常见问题 @@ -261,25 +259,29 @@ A: 请确认 MCP 工具状态为绿灯。**解决方法**:反复开关 MCP 工 A: **解决方法**:完全关闭并重新启动 VS Code 或 Cursor,重新打开项目。 ### 🔧 一般问题 -**Q: 如何使用旧版 GUI 界面?** -A: v2.4.0 版本已完全移除 PyQt6 GUI 依赖,转为纯 Web UI 架构。如需使用旧版 GUI,请指定 v2.3.0 或更早版本: -```bash -# 使用 v2.3.0(最后支持 GUI 的版本) -uvx mcp-feedback-enhanced@2.3.0 - -# 或在 MCP 配置中指定版本 +**Q: 如何使用桌面应用程序?** +A: v2.5.0 新增跨平台桌面应用程序支持。在 MCP 配置中设定 `"MCP_DESKTOP_MODE": "true"` 即可启用: +```json { "mcpServers": { "mcp-feedback-enhanced": { "command": "uvx", - "args": ["mcp-feedback-enhanced@2.3.0"], + "args": ["mcp-feedback-enhanced@latest"], "timeout": 600, + "env": { + "MCP_DESKTOP_MODE": "true", + "MCP_WEB_PORT": "8765" + }, "autoApprove": ["interactive_feedback"] } } } ``` -**注意**:旧版本不包含 v2.4.0 的新功能(提示词管理、自动提交、会话管理等)。 +**配置文件示例**:[examples/mcp-config-desktop.json](examples/mcp-config-desktop.json) + +**Q: 如何使用旧版 PyQt6 GUI 界面?** +A: v2.4.0 版本已完全移除 PyQt6 GUI 依赖。如需使用旧版 GUI,请指定 v2.3.0 或更早版本:`uvx mcp-feedback-enhanced@2.3.0` +**注意**:旧版本不包含新功能(提示词管理、自动提交、会话管理、桌面应用程序等)。 **Q: 出现 "Unexpected token 'D'" 错误** A: 调试输出干扰。设置 `MCP_DEBUG=false` 或移除该环境变量。 diff --git a/README.zh-TW.md b/README.zh-TW.md index ba012cc..18c96e6 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -8,21 +8,21 @@ ## 🎯 核心概念 -這是一個 [MCP 伺服器](https://modelcontextprotocol.io/),建立**回饋導向的開發工作流程**,採用**純 Web UI 架構**,完美適配本地、**SSH 遠端開發環境**與 **WSL (Windows Subsystem for Linux) 環境**。透過引導 AI 與用戶確認而非進行推測性操作,可將多次工具調用合併為單次回饋導向請求,大幅節省平台成本並提升開發效率。 +這是一個 [MCP 伺服器](https://modelcontextprotocol.io/),建立**回饋導向的開發工作流程**,提供**Web UI 和桌面應用程式**雙重選擇,完美適配本地、**SSH 遠端開發環境**與 **WSL (Windows Subsystem for Linux) 環境**。透過引導 AI 與用戶確認而非進行推測性操作,可將多次工具調用合併為單次回饋導向請求,大幅節省平台成本並提升開發效率。 -**🌐 Web-Only 架構優勢:** -- 🚀 **簡化部署**:無需 GUI 依賴,安裝更輕量 -- 🌍 **跨平台相容**:支援所有作業系統和環境 -- 🔧 **維護簡單**:統一的 Web 介面,降低複雜度 -- 📦 **體積精簡**:移除重型 GUI 庫,安裝包大幅縮小 +**🌐 雙重介面架構優勢:** +- 🖥️ **桌面應用程式**:原生跨平台桌面體驗,支援 Windows、macOS、Linux +- 🌐 **Web UI 介面**:無需 GUI 依賴,適合遠端和 WSL 環境 +- 🔧 **靈活部署**:根據環境需求選擇最適合的介面模式 +- 📦 **統一功能**:兩種介面提供完全相同的功能體驗 -**🔮 未來計劃:** 我們計劃在功能穩定後重新引入桌面版應用程式,目前專注於 Web UI 功能的完善和優化。 +**🖥️ 桌面應用程式:** v2.5.0 新增跨平台桌面應用程式支援,基於 Tauri 框架,支援 Windows、macOS、Linux 三大平台,提供原生桌面體驗。 **支援平台:** [Cursor](https://www.cursor.com) | [Cline](https://cline.bot) | [Windsurf](https://windsurf.com) | [Augment](https://www.augmentcode.com) | [Trae](https://www.trae.ai) ### 🔄 工作流程 1. **AI 調用** → `mcp-feedback-enhanced` 工具 -2. **Web UI 啟動** → 自動開啟瀏覽器介面(純 Web 架構) +2. **介面啟動** → 自動開啟桌面應用程式或瀏覽器介面(根據配置) 3. **智能互動** → 提示詞選擇、文字輸入、圖片上傳、自動提交 4. **即時回饋** → WebSocket 連線即時傳遞資訊給 AI 5. **會話追蹤** → 自動記錄會話歷史與統計 @@ -30,81 +30,33 @@ ## 🌟 主要功能 -### 🌐 純 Web UI 架構系統 -- **Web-Only 設計**:完全移除桌面 GUI 依賴,採用純 Web 介面 -- **通用相容性**:支援本地、SSH Remote 和 WSL 環境 -- **自動適配**:智能環境檢測與最佳配置 -- **輕量部署**:無需複雜的 GUI 環境配置 +### 🖥️ 雙重介面支援 +- **桌面應用程式**:基於 Tauri 的跨平台原生應用,支援 Windows、macOS、Linux +- **Web UI 介面**:輕量級瀏覽器介面,適合遠端和 WSL 環境 +- **環境自動檢測**:智能識別 SSH Remote、WSL 等特殊環境 +- **統一功能體驗**:兩種介面提供完全相同的功能 -### 📝 智能提示詞管理系統(v2.4.0 新功能) -- **CRUD 操作**:新增、編輯、刪除、使用常用提示詞 -- **使用統計**:追蹤使用頻率並智能排序 -- **快速應用**:一鍵選擇和應用提示詞 -- **自動提交整合**:支援自動提交標記和優先顯示 +### 📝 智能工作流程 +- **提示詞管理**:常用提示詞的 CRUD 操作、使用統計、智能排序 +- **自動定時提交**:1-86400 秒彈性計時器,支援暫停、恢復、取消 +- **會話管理追蹤**:本地檔案存儲、隱私控制、歷史匯出、即時統計 +- **連線監控**:WebSocket 狀態監控、自動重連、品質指示 +- **AI 工作摘要 Markdown 顯示**:支援豐富的 Markdown 語法渲染,包含標題、粗體、程式碼區塊、列表、連結等格式,提升內容可讀性 -### ⏰ 自動定時提交功能(v2.4.0 新功能) -- **彈性計時**:可設定 1-86400 秒的倒數計時器 -- **視覺化顯示**:即時倒數顯示和狀態指示 -- **深度整合**:與提示詞管理系統無縫配合 -- **完整控制**:支援暫停、恢復、取消操作 +### 🎨 現代化體驗 +- **響應式設計**:適配不同螢幕尺寸,模組化 JavaScript 架構 +- **音效通知**:內建多種音效、支援自訂音效上傳、音量控制 +- **智能記憶**:輸入框高度記憶、一鍵複製、設定持久化 +- **多語言支援**:繁體中文、英文、簡體中文,即時切換 -### 📊 會話管理與追蹤(v2.4.3 重構增強) -- **獨立頁籤設計**:從左側邊欄遷移到專屬頁籤,解決瀏覽器相容性問題 -- **本地歷史保存**:支援會話記錄本地保存,可設定保存期限 -- **隱私控制**:用戶訊息記錄支援三種隱私等級設定 -- **數據管理**:支援會話歷史匯出和清理功能 -- **即時統計**:今日會話數量和平均時長統計 - -### 🔗 連線監控系統(v2.4.0 新功能) -- **即時監控**:WebSocket 連線狀態即時監控 -- **品質指示**:延遲測量和連線品質指示 -- **自動重連**:智能重連機制和錯誤處理 -- **詳細統計**:完整的連線統計資訊 - -### 🔊 音效通知系統(v2.4.3 新功能) -- **智能提醒**:會話更新時自動播放音效通知 -- **多種音效**:內建經典提示音、通知鈴聲、輕柔鐘聲 -- **自訂音效**:支援上傳 MP3、WAV、OGG 格式的自訂音效 -- **完整控制**:音量調節、測試播放、音效管理功能 - -### 🎨 現代化界面設計 -- **模組化架構**:JavaScript 完全模組化重構 -- **響應式設計**:適配不同螢幕尺寸和視窗大小 -- **統一風格**:一致的設計語言和視覺體驗 -- **智能佈局**:AI 摘要區域自動擴展,提交按鈕位置優化 - -### 🖼️ 圖片支援 -- **格式支援**:PNG、JPG、JPEG、GIF、BMP、WebP -- **上傳方式**:拖拽檔案 + 剪貼板粘貼(Ctrl+V) -- **無限制上傳**:支援任意大小的圖片檔案,自動智能處理 - -### 💾 智能記憶功能(v2.4.3 新功能) -- **輸入框高度記憶**:自動保存和恢復文字輸入框的高度設定 -- **一鍵複製**:專案路徑和會話ID支援點擊複製到剪貼板 -- **設定持久化**:所有用戶偏好設定自動保存 - -### 🌏 多語言 -- **三語支援**:繁體中文、英文、簡體中文 -- **智能偵測**:根據系統語言自動選擇 -- **即時切換**:介面內可直接切換語言 -- **完整國際化**:包含 tooltip 和按鈕提示的多語言支援 - -### ✨ WSL 環境支援(v2.2.5) -- **自動檢測**:智能識別 WSL (Windows Subsystem for Linux) 環境 -- **瀏覽器整合**:WSL 環境下自動啟動 Windows 瀏覽器 -- **多種啟動方式**:支援 `cmd.exe`、`powershell.exe`、`wslview` 等多種瀏覽器啟動方法 -- **無縫體驗**:WSL 用戶可直接使用 Web UI,無需額外配置 - -### 🌐 SSH Remote 環境支援(v2.3.0 新功能) -- **智能檢測**:自動識別 SSH Remote 環境(Cursor SSH Remote、VS Code Remote SSH 等) -- **瀏覽器啟動指引**:當無法自動啟動瀏覽器時,提供清晰的解決方案 -- **端口轉發支援**:完整的端口轉發設定指引和故障排除 -- **MCP 整合優化**:改善與 MCP 系統的整合,提供更穩定的連接體驗 -- **詳細文檔**:[SSH Remote 環境使用指南](docs/zh-TW/ssh-remote/browser-launch-issues.md) +### 🖼️ 圖片與媒體 +- **全格式支援**:PNG、JPG、JPEG、GIF、BMP、WebP +- **便捷上傳**:拖拽檔案、剪貼板粘貼(Ctrl+V) +- **無限制處理**:支援任意大小圖片,自動智能處理 ## 🌐 介面預覽 -### Web UI 介面(v2.4.0 - Web-Only 架構) +### Web UI 介面(v2.5.0 - 支援桌面應用程式)
Web UI 主介面 - 提示詞管理與自動提交 @@ -119,7 +71,15 @@ -*Web UI 介面 - 純 Web 架構,支援提示詞管理、自動提交、會話追蹤等智能功能* +*Web UI 介面 - 支援桌面應用程式和 Web 介面,提供提示詞管理、自動提交、會話追蹤等智能功能* + +### 桌面應用程式介面(v2.5.0 新功能) + +
+ 桌面應用程式 - 原生跨平台桌面體驗 +
+ +*桌面應用程式 - 基於 Tauri 框架的原生跨平台桌面應用,支援 Windows、macOS、Linux,提供與 Web UI 完全相同的功能* **快捷鍵支援** - `Ctrl+Enter`(Windows/Linux)/ `Cmd+Enter`(macOS):提交回饋(主鍵盤與數字鍵盤皆支援) @@ -170,6 +130,29 @@ uvx mcp-feedback-enhanced@latest test } ``` +**桌面應用程式配置**(v2.5.0 新功能 - 使用原生桌面應用程式): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "env": { + "MCP_DESKTOP_MODE": "true", + "MCP_WEB_PORT": "8765", + "MCP_DEBUG": "false" + }, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +**配置檔案範例**: +- 桌面模式:[examples/mcp-config-desktop.json](examples/mcp-config-desktop.json) +- Web 模式:[examples/mcp-config-web.json](examples/mcp-config-web.json) + ### 3. 設定提示工程 為了獲得最佳效果,請在 AI 助手中添加以下規則: @@ -190,6 +173,7 @@ uvx mcp-feedback-enhanced@latest test |------|------|-----|------| | `MCP_DEBUG` | 調試模式 | `true`/`false` | `false` | | `MCP_WEB_PORT` | Web UI 端口 | `1024-65535` | `8765` | +| `MCP_DESKTOP_MODE` | 桌面應用程式模式 | `true`/`false` | `false` | ### 測試選項 ```bash @@ -198,6 +182,7 @@ uvx mcp-feedback-enhanced@latest version # 檢查版本 # 介面測試 uvx mcp-feedback-enhanced@latest test --web # 測試 Web UI (自動持續運行) +uvx mcp-feedback-enhanced@latest test --desktop # 測試桌面應用程式 (v2.5.0 新功能) # 調試模式 MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test @@ -213,8 +198,20 @@ uv sync **本地測試方式** ```bash # 功能測試 +make test-func # 標準功能測試 +make test-web # Web UI 測試 (持續運行) +make test-desktop-func # 桌面應用功能測試 + +# 或直接使用指令 uv run python -m mcp_feedback_enhanced test # 標準功能測試 -uvx --with-editable . mcp-feedback-enhanced test --web # Web UI 測試 (持續運行) +uvx --no-cache --with-editable . mcp-feedback-enhanced test --web # Web UI 測試 (持續運行) +uvx --no-cache --with-editable . mcp-feedback-enhanced test --desktop # 桌面應用測試 + +# 桌面應用構建 (v2.5.0 新功能) +make build-desktop # 構建桌面應用 (debug 模式) +make build-desktop-release # 構建桌面應用 (release 模式) +make test-desktop # 測試桌面應用 +make clean-desktop # 清理桌面構建產物 # 單元測試 make test # 運行所有單元測試 @@ -237,14 +234,15 @@ make quick-check # 快速檢查並自動 📋 **完整版本更新記錄:** [RELEASE_NOTES/CHANGELOG.zh-TW.md](RELEASE_NOTES/CHANGELOG.zh-TW.md) -### 最新版本亮點(v2.4.3) -- 📋 **會話管理重構**: 從左側邊欄遷移到獨立頁籤,解決瀏覽器相容性問題 -- 🔊 **音效通知系統**: 會話更新音效提醒,支援內建和自訂音效 -- 📚 **會話歷史增強**: 本地保存、隱私控制、匯出清理功能 -- 💾 **智能記憶功能**: 輸入框高度記憶、一鍵複製等便利功能 -- 🎨 **介面佈局優化**: AI 摘要自動擴展、按鈕位置調整、簡化設計 -- 🌐 **多語言完善**: tooltip 和按鈕提示的完整國際化支援 -- 🐛 **問題修復**: 修復會話詳情按鈕、彈窗關閉延遲等用戶體驗問題 +### 最新版本亮點(v2.5.0) +- 🖥️ **桌面應用程式**: 全新跨平台桌面應用,支援 Windows、macOS、Linux +- 📋 **AI 工作摘要 Markdown 顯示**: 支援 Markdown 語法渲染,包含標題、粗體、程式碼區塊、列表、連結等格式 +- ⚡ **效能大幅提升**: 引入防抖/節流機制,減少不必要的渲染和網路請求 +- 📊 **會話歷史存儲改進**: 從 localStorage 改為伺服器端本地檔案存儲 +- 🌐 **網路連接穩定性**: 改進 WebSocket 重連機制,支援網路狀態檢測 +- 🎨 **UI 渲染優化**: 優化會話管理、統計資訊、狀態指示器的渲染效能 +- 🛠️ **構建流程優化**: 新增 Makefile 桌面應用構建命令和開發工具 +- 📚 **文檔完善**: 新增桌面應用構建指南和工作流程說明 ## 🐛 常見問題 @@ -262,25 +260,29 @@ A: 請確認 MCP 工具狀態為綠燈。**解決方法**:反覆開關 MCP 工 A: **解決方法**:完全關閉並重新啟動 VS Code 或 Cursor,重新開啟專案。 ### 🔧 一般問題 -**Q: 如何使用舊版 GUI 介面?** -A: v2.4.0 版本已完全移除 PyQt6 GUI 依賴,轉為純 Web UI 架構。如需使用舊版 GUI,請指定 v2.3.0 或更早版本: -```bash -# 使用 v2.3.0(最後支援 GUI 的版本) -uvx mcp-feedback-enhanced@2.3.0 - -# 或在 MCP 配置中指定版本 +**Q: 如何使用桌面應用程式?** +A: v2.5.0 新增跨平台桌面應用程式支援。在 MCP 配置中設定 `"MCP_DESKTOP_MODE": "true"` 即可啟用: +```json { "mcpServers": { "mcp-feedback-enhanced": { "command": "uvx", - "args": ["mcp-feedback-enhanced@2.3.0"], + "args": ["mcp-feedback-enhanced@latest"], "timeout": 600, + "env": { + "MCP_DESKTOP_MODE": "true", + "MCP_WEB_PORT": "8765" + }, "autoApprove": ["interactive_feedback"] } } } ``` -**注意**:舊版本不包含 v2.4.0 的新功能(提示詞管理、自動提交、會話管理等)。 +**配置檔案範例**:[examples/mcp-config-desktop.json](examples/mcp-config-desktop.json) + +**Q: 如何使用舊版 PyQt6 GUI 介面?** +A: v2.4.0 版本已完全移除 PyQt6 GUI 依賴。如需使用舊版 GUI,請指定 v2.3.0 或更早版本:`uvx mcp-feedback-enhanced@2.3.0` +**注意**:舊版本不包含新功能(提示詞管理、自動提交、會話管理、桌面應用程式等)。 **Q: 出現 "Unexpected token 'D'" 錯誤** A: 調試輸出干擾。設置 `MCP_DEBUG=false` 或移除該環境變數。 diff --git a/RELEASE_NOTES/CHANGELOG.en.md b/RELEASE_NOTES/CHANGELOG.en.md index cb8b1cb..4d88858 100644 --- a/RELEASE_NOTES/CHANGELOG.en.md +++ b/RELEASE_NOTES/CHANGELOG.en.md @@ -2,6 +2,45 @@ This document records all version updates for **MCP Feedback Enhanced**. +## [v2.5.0] - 2025-06-15 - Desktop Application & Performance Optimization + +### 🌟 Version Highlights +Introducing cross-platform desktop application supporting Windows, macOS, and Linux. Significant performance improvements with debounce/throttle mechanisms and enhanced system stability. + +### ✨ New Features +- 🖥️ **Desktop Application**: Native cross-platform desktop app based on Tauri framework, supporting Windows x64, macOS (Intel/Apple Silicon), Linux x64 +- 📊 **Server-side Session History Storage**: Session records migrated from localStorage to server-side local file storage for improved data consistency and reliability +- 🔧 **Multi-platform Build Support**: Complete CI/CD pipeline supporting automated multi-platform desktop application builds +- 📝 **Desktop Mode Configuration**: Added `MCP_DESKTOP_MODE` environment variable for desktop/web mode switching +- 📋 **AI Work Summary Markdown Display**: Support for Markdown syntax rendering including headers, bold text, code blocks, lists, links and other formats + +### 🚀 Improvements +- ⚡ **Significant Performance Enhancement**: Introduced debounce/throttle mechanisms to reduce unnecessary rendering and network requests +- 🌐 **Network Connection Stability**: Improved WebSocket reconnection mechanism with network status detection and intelligent reconnection +- 🎨 **UI Rendering Optimization**: Optimized rendering performance for session management, statistics, and status indicators +- 📱 **Responsive Improvements**: Adjusted heartbeat frequency and timeout thresholds to reduce system load +- 🔄 **Enhanced Modularity**: Optimized JavaScript module structure with better logging management + +### 🐛 Bug Fixes +- 🌐 **Network Reconnection Improvements**: Optimized reconnection algorithm with exponential backoff strategy and random jitter +- 🖥️ **Desktop Mode Adaptation**: Fixed browser auto-launch issues in desktop mode +- 📊 **Rendering Performance Fixes**: Resolved duplicate rendering and unnecessary state update issues + +### 🛠️ Technical Improvements +- 🏗️ **Build Process Optimization**: Added Makefile desktop application build commands supporting debug/release modes +- 📦 **Dependency Management**: Integrated Rust toolchain supporting cross-platform compilation and packaging +- 🔍 **Enhanced Development Tools**: Added environment checks, build validation, and cleanup tools +- 📚 **Documentation Enhancement**: Added desktop application build guide and workflow documentation +- 🔒 **Security Enhancement**: Introduced DOMPurify for XSS protection ensuring content security + +### 📋 Usage Instructions +- **Desktop Mode**: Set `"MCP_DESKTOP_MODE": "true"` in MCP configuration (refer to `examples/mcp-config-desktop.json`) +- **Web Mode**: Set `"MCP_DESKTOP_MODE": "false"` in MCP configuration (default, refer to `examples/mcp-config-web.json`) +- **Test Desktop Mode**: `uvx mcp-feedback-enhanced@latest test --desktop` +- **Build Desktop Application**: `make build-desktop-release` + +--- + ## [v2.4.3] - 2025-06-14 - Session Management Refactoring & Audio Notifications ### 🌟 Version Highlights diff --git a/RELEASE_NOTES/CHANGELOG.md b/RELEASE_NOTES/CHANGELOG.md new file mode 100644 index 0000000..4d88858 --- /dev/null +++ b/RELEASE_NOTES/CHANGELOG.md @@ -0,0 +1,344 @@ +# Changelog (English) + +This document records all version updates for **MCP Feedback Enhanced**. + +## [v2.5.0] - 2025-06-15 - Desktop Application & Performance Optimization + +### 🌟 Version Highlights +Introducing cross-platform desktop application supporting Windows, macOS, and Linux. Significant performance improvements with debounce/throttle mechanisms and enhanced system stability. + +### ✨ New Features +- 🖥️ **Desktop Application**: Native cross-platform desktop app based on Tauri framework, supporting Windows x64, macOS (Intel/Apple Silicon), Linux x64 +- 📊 **Server-side Session History Storage**: Session records migrated from localStorage to server-side local file storage for improved data consistency and reliability +- 🔧 **Multi-platform Build Support**: Complete CI/CD pipeline supporting automated multi-platform desktop application builds +- 📝 **Desktop Mode Configuration**: Added `MCP_DESKTOP_MODE` environment variable for desktop/web mode switching +- 📋 **AI Work Summary Markdown Display**: Support for Markdown syntax rendering including headers, bold text, code blocks, lists, links and other formats + +### 🚀 Improvements +- ⚡ **Significant Performance Enhancement**: Introduced debounce/throttle mechanisms to reduce unnecessary rendering and network requests +- 🌐 **Network Connection Stability**: Improved WebSocket reconnection mechanism with network status detection and intelligent reconnection +- 🎨 **UI Rendering Optimization**: Optimized rendering performance for session management, statistics, and status indicators +- 📱 **Responsive Improvements**: Adjusted heartbeat frequency and timeout thresholds to reduce system load +- 🔄 **Enhanced Modularity**: Optimized JavaScript module structure with better logging management + +### 🐛 Bug Fixes +- 🌐 **Network Reconnection Improvements**: Optimized reconnection algorithm with exponential backoff strategy and random jitter +- 🖥️ **Desktop Mode Adaptation**: Fixed browser auto-launch issues in desktop mode +- 📊 **Rendering Performance Fixes**: Resolved duplicate rendering and unnecessary state update issues + +### 🛠️ Technical Improvements +- 🏗️ **Build Process Optimization**: Added Makefile desktop application build commands supporting debug/release modes +- 📦 **Dependency Management**: Integrated Rust toolchain supporting cross-platform compilation and packaging +- 🔍 **Enhanced Development Tools**: Added environment checks, build validation, and cleanup tools +- 📚 **Documentation Enhancement**: Added desktop application build guide and workflow documentation +- 🔒 **Security Enhancement**: Introduced DOMPurify for XSS protection ensuring content security + +### 📋 Usage Instructions +- **Desktop Mode**: Set `"MCP_DESKTOP_MODE": "true"` in MCP configuration (refer to `examples/mcp-config-desktop.json`) +- **Web Mode**: Set `"MCP_DESKTOP_MODE": "false"` in MCP configuration (default, refer to `examples/mcp-config-web.json`) +- **Test Desktop Mode**: `uvx mcp-feedback-enhanced@latest test --desktop` +- **Build Desktop Application**: `make build-desktop-release` + +--- + +## [v2.4.3] - 2025-06-14 - Session Management Refactoring & Audio Notifications + +### 🌟 Version Highlights +Migrated session management from sidebar to dedicated tab, resolving browser compatibility issues. Added audio notification system with custom audio support. + +### ✨ New Features +- 🔊 **Audio Notification System**: Play audio alerts for session updates, supports built-in and custom audio uploads +- 📚 **Session History Management**: Local session record storage with export and cleanup functionality +- 💾 **Input Height Memory**: Automatically save and restore textarea input height settings +- 📋 **One-Click Copy**: Project path and session ID support click-to-copy + +### 🚀 Improvements +- 📋 **Session Management Refactoring**: Migrated from sidebar to "Session Management" tab, fixing button click issues in small windows +- 🎨 **Interface Layout Optimization**: AI summary auto-expansion, submit button repositioning, removed redundant descriptions +- 🌐 **Multilingual Enhancement**: Added tooltip and button multilingual support + +### 🐛 Bug Fixes +- Fixed current session details button unresponsive issue +- Fixed session details modal close delay issue +- Fixed audio notification language initialization issue +- Corrected auto-submit processing logic + +--- + +## [v2.4.2] - Web-Only Architecture Refactoring & Smart Feature Enhancement + +### 🌟 Version Highlights +This version underwent major architectural refactoring, **completely removing PyQt6 GUI dependencies** and transitioning to a pure Web UI architecture, dramatically simplifying deployment and maintenance. Additionally, multiple smart features were added, including prompt management, auto-submit, session management, and more, comprehensively enhancing user experience and work efficiency. + +### 🔄 Major Architectural Changes +- 🏗️ **Complete PyQt6 GUI Removal**: Thoroughly removed desktop application dependencies, simplifying installation and deployment processes +- 🌐 **Pure Web UI Architecture**: Unified use of Web interface, supporting all platforms and environments +- 📦 **Dramatically Simplified Dependencies**: Removed PyQt6, related GUI libraries and other heavy dependencies, significantly reducing installation package size +- 🚀 **Simpler Deployment**: No need to consider GUI environment configuration, suitable for all development environments + +### ✨ Brand New Features +- 📝 **Smart Prompt Management System**: + - CRUD operations for common prompts (Create, Edit, Delete, Use) + - Usage frequency statistics and intelligent sorting + - Quick selection and one-click application functionality + - Support for auto-submit marking and priority display +- ⏰ **Auto-Timed Submit Feature**: + - Configurable countdown timer from 1-86400 seconds + - Visual countdown display and status indicators + - Deep integration with prompt management system + - Support for pause, resume, and cancel operations +- 📊 **Session Management & Tracking**: + - Real-time current session status display + - Session history records and statistical analysis + - Today's session count and average duration statistics + - Session detail viewing and management functions +- 🔗 **Connection Monitoring System**: + - Real-time WebSocket connection status monitoring + - Latency measurement and connection quality indicators + - Auto-reconnection mechanism and error handling + - Detailed connection statistical information +- ⌨️ **Enhanced Shortcuts**: Added Ctrl+I quick focus input box feature (Thanks @penn201500) + +### 🚀 Feature Improvements +- 🎨 **Comprehensive UI/UX Optimization**: + - Added left session management panel with collapse/expand support + - Top connection status bar with real-time system status display + - Responsive design adapting to different screen sizes + - Unified design language and visual style +- 🌐 **Enhanced Multi-language System**: + - Optimized language switching mechanism with instant switching support + - Added extensive translation text, improving localization coverage + - Improved language selector UI with dropdown design + - Fixed display issues during language switching +- 🖼️ **Image Settings Integration**: + - Moved image settings from workspace to settings tab + - Unified settings management interface + - Improved organization and layout of setting items +- 📱 **Interface Layout Optimization**: + - Adjusted layout to accommodate multi-language display requirements + - Optimized button styles and spacing + - Improved visual design of form elements + - Enhanced accessibility and usability + +### 🐛 Bug Fixes +- 🔧 **Session Management Fixes**: + - Fixed session statistics information not updating correctly + - Fixed session count calculation errors + - Improved session state tracking mechanism +- 🎯 **Prompt Feature Fixes**: + - Fixed common prompt management unable to correctly set auto-submit + - Improved prompt selection and application logic +- 🌐 **Localization Switch Fixes**: + - Fixed partial text not updating during language switching + - Improved multi-language text loading mechanism +- 🏗️ **Architecture Stability Fixes**: + - Fixed session management initialization issues + - Improved error handling and resource cleanup + - Optimized module loading order and dependencies + +### 🛠️ Technical Improvements +- 📦 **Modular Architecture**: + - Complete JavaScript code modular refactoring + - Adopted ES6+ syntax and modern development patterns + - Clear module separation and responsibility division +- 📊 **Performance Enhancement**: + - Optimized WebSocket communication efficiency + - Improved frontend resource loading speed + - Reduced memory usage and CPU load + +### 📚 Documentation Updates +- 📖 **Architecture Documentation Update**: Updated system architecture description to reflect Web-Only design +- 🔧 **Installation Guide Simplification**: Removed GUI-related installation steps and dependency descriptions +- 🖼️ **Screenshot Updates**: Updated all interface screenshots to showcase new Web UI design +- 📋 **Enhanced API Documentation**: Added API descriptions for new features like prompt management and auto-submit + +--- + +## [v2.3.0] - System Stability & Resource Management Enhancement + +### 🌟 Highlights +This version focuses on improving system stability and user experience, particularly solving the browser launch issue in Cursor SSH Remote environments. + +### ✨ New Features +- 🌐 **SSH Remote Environment Support**: Solved Cursor SSH Remote browser launch issues with clear usage guidance +- 🛡️ **Error Message Improvements**: Provides more user-friendly error messages and solution suggestions when errors occur +- 🧹 **Auto-cleanup Features**: Automatically cleans temporary files and expired sessions to keep the system tidy +- 📊 **Memory Monitoring**: Monitors memory usage to prevent system resource shortage + +### 🚀 Improvements +- 💾 **Resource Management Optimization**: Better system resource management for improved performance +- 🔧 **Enhanced Error Handling**: Provides clearer explanations and solutions when problems occur +- 🌐 **Connection Stability**: Improved Web UI connection stability +- 🖼️ **Image Upload Optimization**: Enhanced stability of image upload functionality +- 🎯 **Auto-focus Input Box**: Automatically focus on feedback input box when window opens, improving user experience (Thanks @penn201500) + +### 🐛 Bug Fixes +- 🌐 **Connection Issues**: Fixed WebSocket connection related problems +- 🔄 **Session Management**: Fixed session state tracking issues +- 🖼️ **Image Processing**: Fixed event handling issues during image upload + +--- + +## [v2.2.5] - WSL Environment Support & Cross-Platform Enhancement + +### ✨ New Features +- 🐧 **WSL Environment Detection**: Automatically identifies WSL environments and provides specialized support logic +- 🌐 **Smart Browser Launching**: Automatically invokes Windows browser in WSL environments with multiple launch methods +- 🔧 **Cross-Platform Testing Enhancement**: Test functionality integrates WSL detection for improved test coverage + +### 🚀 Improvements +- 🎯 **Environment Detection Optimization**: Improved remote environment detection logic, WSL no longer misidentified as remote environment +- 📊 **System Information Enhancement**: System information tool now displays WSL environment status +- 🧪 **Testing Experience Improvement**: Test mode automatically attempts browser launching for better testing experience + +--- + +## [v2.2.4] - GUI Experience Optimization & Bug Fixes + +### 🐛 Bug Fixes +- 🖼️ **Image Duplicate Paste Fix**: Fixed the issue where Ctrl+V image pasting in GUI would create duplicate images +- 🌐 **Localization Switch Fix**: Fixed image settings area text not translating correctly when switching languages +- 📝 **Font Readability Improvement**: Adjusted font sizes in image settings area for better readability + +--- + +## [v2.2.3] - Timeout Control & Image Settings Enhancement + +### ✨ New Features +- ⏰ **User Timeout Control**: Added customizable timeout settings with flexible range from 30 seconds to 2 hours +- ⏱️ **Countdown Timer**: Real-time countdown timer display at the top of the interface for visual time reminders +- 🖼️ **Image Size Limits**: Added image upload size limit settings (unlimited/1MB/3MB/5MB) +- 🔧 **Base64 Compatibility Mode**: Added Base64 detail mode to improve image recognition compatibility with AI models +- 🧹 **UV Cache Management Tool**: Added `cleanup_cache.py` script to help manage and clean UV cache space + +### 🚀 Improvements +- 📚 **Documentation Structure Optimization**: Reorganized documentation directory structure, moved images to `docs/{language}/images/` paths +- 📖 **Cache Management Guide**: Added detailed UV Cache management guide with automated cleanup solutions +- 🎯 **Smart Compatibility Hints**: Automatically display Base64 compatibility mode suggestions when image upload fails + +### 🐛 Bug Fixes +- 🛡️ **Timeout Handling Optimization**: Improved coordination between user-defined timeout and MCP system timeout +- 🖥️ **Interface Auto-close**: Fixed interface auto-close and resource cleanup logic after timeout +- 📱 **Responsive Layout**: Optimized timeout control component display on small screen devices + +--- + +## [v2.2.2] - Timeout Auto-cleanup Fix + +### 🐛 Bug Fixes +- 🔄 **Timeout Auto-cleanup**: Fixed GUI/Web UI not automatically closing after MCP session timeout (default 600 seconds) +- 🛡️ **Resource Management Optimization**: Improved timeout handling mechanism to ensure proper cleanup and closure of all UI resources on timeout +- ⚡ **Enhanced Timeout Detection**: Strengthened timeout detection logic to correctly handle timeout events in various scenarios + +--- + +## [v2.2.1] - Window Optimization & Unified Settings Interface + +### 🚀 Improvements +- 🖥️ **Window Size Constraint Removal**: Removed GUI main window minimum size limit from 1000×800 to 400×300 +- 💾 **Real-time Window State Saving**: Implemented real-time saving mechanism for window size and position changes +- ⚙️ **Unified Settings Interface Optimization**: Improved GUI settings page configuration saving logic to avoid setting conflicts + +### 🐛 Bug Fixes +- 🔧 **Window Size Constraint**: Fixed GUI window unable to resize to small dimensions issue +- 🛡️ **Setting Conflicts**: Fixed potential configuration conflicts during settings save operations + +--- + +## [v2.2.0] - Layout & Settings UI Enhancements + +### ✨ New Features +- 🎨 **Horizontal Layout Mode**: GUI & Web UI combined mode adds left-right layout option for summary and feedback + +### 🚀 Improvements +- 🎨 **Improved Settings Interface**: Optimized the settings page for both GUI and Web UI +- ⌨️ **GUI Shortcut Enhancement**: Submit feedback shortcut now fully supports numeric keypad Enter key + +### 🐛 Bug Fixes +- 🔧 **Image Duplication Fix**: Resolved Web UI image pasting duplication issue + +--- + +## [v2.1.1] - Window Positioning Optimization + +### ✨ New Features +- 🖥️ **Smart Window Positioning**: Added "Always show window at primary screen center" setting option +- 🌐 **Multi-Monitor Support**: Perfect solution for complex multi-monitor setups like T-shaped screen arrangements +- 💾 **Position Memory**: Auto-save and restore window position with intelligent visibility detection + +--- + +## [v2.1.0] - Complete Refactored Version + +### 🎨 Major Refactoring +- 🏗️ **Complete Refactoring**: GUI and Web UI adopt modular architecture +- 📁 **Centralized Management**: Reorganized folder structure, improved maintainability +- 🖥️ **Interface Optimization**: Modern design and improved user experience + +### ✨ New Features +- 🍎 **macOS Interface Optimization**: Specialized improvements for macOS user experience +- ⚙️ **Feature Enhancement**: New settings options and auto-close page functionality +- ℹ️ **About Page**: Added about page with version info, project links, and acknowledgments + +--- + +## [v2.0.14] - Shortcut & Image Feature Enhancement + +### 🚀 Improvements +- ⌨️ **Enhanced Shortcuts**: Ctrl+Enter supports numeric keypad +- 🖼️ **Smart Image Pasting**: Ctrl+V directly pastes clipboard images + +--- + +## [v2.0.9] - Multi-language Architecture Refactor + +### 🔄 Refactoring +- 🌏 **Multi-language Architecture Refactor**: Support for dynamic loading +- 📁 **Modularized Language Files**: Modular organization of language files + +--- + +## [v2.0.3] - Encoding Issues Fix + +### 🐛 Critical Fixes +- 🛡️ **Complete Chinese Character Encoding Fix**: Resolved all Chinese display related issues +- 🔧 **JSON Parsing Error Fix**: Fixed data parsing errors + +--- + +## [v2.0.0] - Web UI Support + +### 🌟 Major Features +- ✅ **Added Web UI Support**: Support for remote environments +- ✅ **Auto Environment Detection**: Automatically choose appropriate interface +- ✅ **WebSocket Real-time Communication**: Real-time bidirectional communication + +--- + +## Legend + +| Icon | Meaning | +|------|---------| +| 🌟 | Version Highlights | +| ✨ | New Features | +| 🚀 | Improvements | +| 🐛 | Bug Fixes | +| 🔄 | Refactoring Changes | +| 🎨 | UI Optimization | +| ⚙️ | Settings Related | +| 🖥️ | Window Related | +| 🌐 | Multi-language/Network Related | +| 📁 | File Structure | +| ⌨️ | Shortcuts | +| 🖼️ | Image Features | +| 📝 | Prompt Management | +| ⏰ | Auto-Submit | +| 📊 | Session Management | +| 🔗 | Connection Monitoring | +| 🏗️ | Architecture Changes | +| 🛠️ | Technical Improvements | +| 📚 | Documentation Updates | + +--- + +**Full Project Info:** [GitHub - mcp-feedback-enhanced](https://github.com/Minidoracat/mcp-feedback-enhanced) diff --git a/RELEASE_NOTES/CHANGELOG.zh-CN.md b/RELEASE_NOTES/CHANGELOG.zh-CN.md index 0627c9c..3120a4d 100644 --- a/RELEASE_NOTES/CHANGELOG.zh-CN.md +++ b/RELEASE_NOTES/CHANGELOG.zh-CN.md @@ -2,6 +2,46 @@ 本文件记录了 **MCP Feedback Enhanced** 的所有版本更新内容。 +## [v2.5.0] - 2025-06-15 - 桌面应用程序与性能优化 + +### 🌟 版本亮点 +全新推出跨平台桌面应用程序,支持 Windows、macOS、Linux 三大平台。同时大幅提升系统性能与稳定性,引入防抖/节流机制优化用户体验。 + +### ✨ 新功能 +- 🖥️ **桌面应用程序**: 基于 Tauri 框架的原生桌面应用,支持 Windows x64、macOS (Intel/Apple Silicon)、Linux x64 +- 📊 **会话历史本地文件存储**: 会话记录从 localStorage 改为服务器端本地文件保存,支持跨环境数据一致性 +- 🔧 **多平台构建支持**: 完整的 CI/CD 流程,支持自动化多平台桌面应用构建 +- 📝 **桌面模式配置**: 新增 `MCP_DESKTOP_MODE` 环境变量,支持桌面/Web 模式切换 +- 📋 **AI 工作摘要 Markdown 显示**: 支持 Markdown 语法渲染,包含标题、粗体、代码区块、列表、链接等格式 + +### 🚀 改进功能 +- ⚡ **性能大幅提升**: 引入防抖/节流机制,减少不必要的渲染和网络请求 +- 🌐 **网络连接稳定性**: 改进 WebSocket 重连机制,支持网络状态检测和智能重连 +- 📊 **会话历史存储改进**: 从 localStorage 改为服务器端本地文件存储,提升跨环境一致性 +- 🎨 **UI 渲染优化**: 优化会话管理、统计信息、状态指示器的渲染性能 +- 📱 **响应式改进**: 调整心跳频率和超时阈值,减少系统负载 +- 🔄 **模块化增强**: JavaScript 模块结构优化,支持更好的日志管理 + +### 🐛 问题修复 +- 🌐 **网络重连改进**: 优化重连算法,采用指数退避策略和随机抖动 +- 🖥️ **桌面模式适配**: 修复桌面模式下浏览器自动开启的问题 +- 📊 **渲染性能修复**: 解决重复渲染和不必要的状态更新问题 + +### 🛠️ 技术改进 +- 🏗️ **构建流程优化**: 新增 Makefile 桌面应用构建命令,支持 debug/release 模式 +- 📦 **依赖管理**: 整合 Rust 工具链,支持跨平台编译和打包 +- 🔍 **开发工具增强**: 新增环境检查、构建验证、清理工具 +- 📚 **文档完善**: 新增桌面应用构建指南和工作流程说明 +- 🔒 **安全性增强**: 引入 DOMPurify 进行 XSS 防护,确保内容安全 + +### 📋 使用说明 +- **桌面模式**: 在 MCP 配置中设定 `"MCP_DESKTOP_MODE": "true"` (参考 `examples/mcp-config-desktop.json`) +- **Web 模式**: 在 MCP 配置中设定 `"MCP_DESKTOP_MODE": "false"` (默认,参考 `examples/mcp-config-web.json`) +- **测试桌面模式**: `uvx mcp-feedback-enhanced@latest test --desktop` +- **构建桌面应用**: `make build-desktop-release` + +--- + ## [v2.4.3] - 2025-06-14 - 会话管理重构与音效通知 ### 🌟 版本亮点 diff --git a/RELEASE_NOTES/CHANGELOG.zh-TW.md b/RELEASE_NOTES/CHANGELOG.zh-TW.md index 5c37f26..bdbb811 100644 --- a/RELEASE_NOTES/CHANGELOG.zh-TW.md +++ b/RELEASE_NOTES/CHANGELOG.zh-TW.md @@ -2,6 +2,46 @@ 本文件記錄了 **MCP Feedback Enhanced** 的所有版本更新內容。 +## [v2.5.0] - 2025-06-15 - 桌面應用程式與效能優化 + +### 🌟 版本亮點 +全新推出跨平台桌面應用程式,支援 Windows、macOS、Linux 三大平台。同時大幅提升系統效能與穩定性,引入防抖/節流機制優化用戶體驗。 + +### ✨ 新功能 +- 🖥️ **桌面應用程式**: 基於 Tauri 框架的原生桌面應用,支援 Windows x64、macOS (Intel/Apple Silicon)、Linux x64 +- 📊 **會話歷史本地檔案存儲**: 會話記錄從 localStorage 改為伺服器端本地檔案保存,支援跨環境數據一致性 +- 🔧 **多平台構建支援**: 完整的 CI/CD 流程,支援自動化多平台桌面應用構建 +- 📝 **桌面模式配置**: 新增 `MCP_DESKTOP_MODE` 環境變數,支援桌面/Web 模式切換 +- 📋 **AI 工作摘要 Markdown 顯示**: 支援 Markdown 語法渲染,包含標題、粗體、程式碼區塊、列表、連結等格式 + +### 🚀 改進功能 +- ⚡ **效能大幅提升**: 引入防抖/節流機制,減少不必要的渲染和網路請求 +- 🌐 **網路連接穩定性**: 改進 WebSocket 重連機制,支援網路狀態檢測和智能重連 +- 📊 **會話歷史存儲改進**: 從 localStorage 改為伺服器端本地檔案存儲,提升跨環境一致性 +- 🎨 **UI 渲染優化**: 優化會話管理、統計資訊、狀態指示器的渲染效能 +- 📱 **響應式改進**: 調整心跳頻率和超時閾值,減少系統負載 +- 🔄 **模組化增強**: JavaScript 模組結構優化,支援更好的日誌管理 + +### 🐛 問題修復 +- 🌐 **網路重連改進**: 優化重連算法,採用指數退避策略和隨機抖動 +- 🖥️ **桌面模式適配**: 修復桌面模式下瀏覽器自動開啟的問題 +- 📊 **渲染效能修復**: 解決重複渲染和不必要的狀態更新問題 + +### 🛠️ 技術改進 +- 🏗️ **構建流程優化**: 新增 Makefile 桌面應用構建命令,支援 debug/release 模式 +- 📦 **依賴管理**: 整合 Rust 工具鏈,支援跨平台編譯和打包 +- 🔍 **開發工具增強**: 新增環境檢查、構建驗證、清理工具 +- 📚 **文檔完善**: 新增桌面應用構建指南和工作流程說明 +- 🔒 **安全性增強**: 引入 DOMPurify 進行 XSS 防護,確保內容安全 + +### 📋 使用說明 +- **桌面模式**: 在 MCP 配置中設定 `"MCP_DESKTOP_MODE": "true"` (參考 `examples/mcp-config-desktop.json`) +- **Web 模式**: 在 MCP 配置中設定 `"MCP_DESKTOP_MODE": "false"` (預設,參考 `examples/mcp-config-web.json`) +- **測試桌面模式**: `uvx mcp-feedback-enhanced@latest test --desktop` +- **構建桌面應用**: `make build-desktop-release` + +--- + ## [v2.4.3] - 2025-06-14 - 會話管理重構與音效通知 ### 🌟 版本亮點 diff --git a/docs/en/images/desktop1.png b/docs/en/images/desktop1.png new file mode 100644 index 0000000..7f620c7 Binary files /dev/null and b/docs/en/images/desktop1.png differ diff --git a/docs/en/images/web1.jpeg b/docs/en/images/web1.jpeg index 381d26c..0a5e120 100644 Binary files a/docs/en/images/web1.jpeg and b/docs/en/images/web1.jpeg differ diff --git a/docs/zh-CN/images/desktop1.png b/docs/zh-CN/images/desktop1.png new file mode 100644 index 0000000..35ce7f2 Binary files /dev/null and b/docs/zh-CN/images/desktop1.png differ diff --git a/docs/zh-CN/images/web1.jpeg b/docs/zh-CN/images/web1.jpeg index 1ef5c6b..4b0e4af 100644 Binary files a/docs/zh-CN/images/web1.jpeg and b/docs/zh-CN/images/web1.jpeg differ diff --git a/docs/zh-TW/images/desktop1.png b/docs/zh-TW/images/desktop1.png new file mode 100644 index 0000000..30f09e5 Binary files /dev/null and b/docs/zh-TW/images/desktop1.png differ diff --git a/docs/zh-TW/images/web1.jpeg b/docs/zh-TW/images/web1.jpeg index 6c812b8..79e0134 100644 Binary files a/docs/zh-TW/images/web1.jpeg and b/docs/zh-TW/images/web1.jpeg differ diff --git a/issues/combinedSummaryContent-markdown-support.md b/issues/combinedSummaryContent-markdown-support.md new file mode 100644 index 0000000..c50c405 --- /dev/null +++ b/issues/combinedSummaryContent-markdown-support.md @@ -0,0 +1,54 @@ +# combinedSummaryContent Markdown 語法顯示功能實作 + +## 任務概述 +為 mcp-feedback-enhanced 專案中的 combinedSummaryContent 區域實現 Markdown 語法顯示功能,將純文字顯示改為支援 Markdown 渲染。 + +## 技術方案 +- **選用庫**:marked.js(輕量級、高性能) +- **引入方式**:CDN 直接引用 +- **安全處理**:配合 DOMPurify 進行 HTML 清理 +- **樣式策略**:保持原生 Markdown 樣式 + +## 實作計劃 + +### 階段 1:環境準備和依賴引入 ✅ +- 修改 feedback.html 模板添加 marked.js CDN 引用 +- 驗證庫載入 + +### 階段 2:核心功能實作 +- 修改 ui-manager.js 中的 updateAISummaryContent 函數 +- 實現 Markdown 解析和渲染 +- 添加安全性處理 + +### 階段 3:樣式優化 +- 調整 CSS 樣式確保 Markdown 內容正確顯示 +- 優化行間距和視覺效果 + +### 階段 4:測試內容和功能驗證 +- 建立包含多種 Markdown 語法的測試內容 +- 驗證功能正確性 + +### 階段 5:相容性確保 +- 確保向後相容性 +- 添加錯誤處理機制 + +## 目標元素 +```html +
+``` + +## 測試內容範例 +將包含以下 Markdown 語法: +- 標題(# ## ###) +- 粗體和斜體(**bold** *italic*) +- 程式碼區塊(```code```) +- 列表(- 項目) +- 連結([text](url)) + +## 預期結果 +- 保持現有 CSS 樣式和響應式設計 +- 與現有 data-dynamic-content="aiSummary" 機制相容 +- 使用原生 Markdown 樣式渲染 +- 不影響現有功能