feat: unified image analysis pipeline, bot image support, and mobile-web enhancements#90
Merged
GCWing merged 5 commits intoGCWing:mainfrom Mar 9, 2026
Conversation
added 5 commits
March 9, 2026 00:19
…web enhancements ## Backend - Centralize vision pre-analysis in ConversationCoordinator for all platforms (desktop, mobile, bot) with automatic fallback to multimodal - Add ImageAnalysisStarted/Completed events and propagate through Tauri & WebSocket transports - Carry original_user_input and image metadata in DialogTurnStarted for correct UI display - Add SessionManager::fail_dialog_turn() for proper failed-turn persistence - Fix cancelled-turn handling: emit DialogTurnCancelled unconditionally, persist partial content - Route internal events sequentially to preserve text chunk ordering - Simplify image context references (remove AnalyzeImage tool hints) ## Feishu Bot - Support post (rich-text) and image message types, not just text - Download and compress user-sent images via Feishu message resources API (≤1MB) - Pass image contexts through command router to execution pipeline - Fix Unicode truncation boundary in bot response messages ## Relay Server - Increase command endpoint body limit to 10MB for image payloads - Simplify deploy script (remove --build-mobile option) ## Desktop Frontend - Display image thumbnails in UserMessageItem with lightbox preview - Add image-analyzing indicator in VirtualItemRenderer - Handle ImageAnalysisStarted/Completed events with temp turn management - Simplify useMessageSender by delegating vision strategy to backend - Persist and restore image metadata in dialog turns - NavBar menu auto-aligns left/right based on viewport position - QR code click-to-copy URL in RemoteConnectDialog - Fix Markdown code block styling for inline-code within pre tags - Add section descriptions to all settings panels (i18n en-US & zh-CN) ## Mobile Web - Overhaul ChatPage: theme-aware syntax highlighting, copy buttons, line numbers - Add TodoCard and TaskToolCard components for rich tool display - Add iOS-style push/pop navigation animations - Improve light/dark theme consistency and SCSS styling across all components Made-with: Cursor
…web UI - Coordinator: return user-friendly error (zh/en) when no vision model is configured instead of silently falling back to multimodal - Remote connect: downgrade stale-session decrypt warning to debug level - Mobile ChatPage: add error toast with auto-dismiss, truncate long git branch names in header - Mobile SessionListPage: truncate workspace/branch names, replace Switch text with icon, simplify session item layout and descriptions - RemoteConnectDialog: show ngrok usage link when connected via ngrok - Add ngrokUsageLink i18n keys (en-US, zh-CN) Made-with: Cursor
- coordinator.rs: keep both scheduler_notify_tx (upstream DialogScheduler) and workspace_turn_status tracking (our turn persistence) - NavBar.scss/tsx: accept upstream UI overhaul that removed logo menu from NavBar (moved elsewhere in the new scene-based layout) Made-with: Cursor
- AppState: set global workspace_path on startup for correct config resolution - Mobile ThemeProvider: rewrite theme application using injected <style> element + inline fallbacks for reliable mobile WebKit rendering; replace CSS transition with opacity crossfade on theme switch - Mobile index.html: use single theme-color meta, set color-scheme on html - Remove unused theme-transitioning CSS class from global.scss - Rename "vision model" to "image understanding model" in analyzing indicators (ChatPage + VirtualItemRenderer) Made-with: Cursor
…increase WS size - ChatInput: enforce max image count across all input paths (file picker, paste, drag-drop, MCP app message); show warning when limit reached - Remote server: compress data-URL images to ≤100KB JPEG thumbnails before sending to mobile clients for faster loading - Feishu bot: cap images at 5 per message, notify user when excess discarded - Relay server: increase WebSocket max message size to 64MB for image payloads Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ConversationCoordinatorfor all platforms (desktop, mobile, bot), with automatic fallback to multimodal when no vision model is configured. AddImageAnalysisStarted/Completedevents propagated through Tauri & WebSocket transports.post(rich-text) andimagemessage types; download and compress user-sent images via Feishu API (≤1MB); pass image contexts through the full execution pipeline.ChatPagewith theme-aware syntax highlighting, copy buttons, line numbers; addTodoCardandTaskToolCardcomponents; iOS-style push/pop navigation animations; light/dark theme polish.image-analyzingindicator, NavBar menu auto-alignment, QR click-to-copy, settings panel section descriptions (i18n).DialogTurnCancelledunconditionally, sequential event routing for correct text chunk ordering.Changes
Backend (Rust)
coordinator.rs: Addpre_analyze_images_if_needed(),finalize_turn_in_workspace(); carryoriginal_user_inputanduser_message_metadatainDialogTurnStartedsession_manager.rs: Addfail_dialog_turn()methodagentic.rs(events): AddImageAnalysisStarted,ImageAnalysisCompletedeventstauri.rs,websocket.rs: Emit new image analysis events and extended turn metadatafeishu.rs: Support post/image message types, download images, compressioncommand_router.rs: Passimage_contextsthrough forward pipelineremote_server.rs: Image attachment handling improvementslib.rs(desktop): Sequential event routing for ordering guaranteeslib.rs(relay-server): 10MB body limit for command endpointFrontend (TypeScript/React)
UserMessageItem: Image thumbnails + lightboxVirtualItemRenderer:image-analyzingvirtual item typeEventHandlerModule: HandleImageAnalysisStarted/Completed, temp turn managementuseMessageSender: Simplified (vision strategy delegated to backend)FlowChatStore,PersistenceModule: Image metadata persistenceAgentAPI,AgenticEventListener: New event listener APIsNavBar: Auto left/right menu alignmentRemoteConnectDialog: QR click-to-copyMobile Web
ChatPage: Code blocks with copy/line numbers,TodoCard,TaskToolCard, theme-aware markdownApp.tsx: iOS-style navigation transitionsTest Plan
Made with Cursor