feat: enhance MCP folder picker functionality#61
Conversation
- Introduced a new permission for the MCP folder picker in the Tauri application, allowing users to open the native folder picker for filesystem paths. - Updated error handling in the `McpServerCard` component to provide more specific error messages when folder selection fails. - Refactored the `pick_mcp_filesystem_folder` command to use a non-blocking callback API, preventing deadlocks in the async runtime on macOS.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe changes implement a new MCP folder picker permission system and convert the folder picker functionality from blocking to async callback-based operations. Permission definitions are added to Tauri capabilities, the desktop command handler is updated to use async channels, error handling is consolidated with a helper function, and weather skill documentation is refined. Changes
Sequence DiagramsequenceDiagram
participant UI as Frontend UI
participant Handler as Tauri Command Handler
participant Picker as Folder Picker Callback
participant Channel as Tokio Oneshot Channel
UI->>Handler: invoke("pick_mcp_filesystem_folder")
Handler->>Channel: create_oneshot_channel()
Handler->>Picker: call async pick_folder(callback)
Picker->>Picker: user selects folder (or cancels)
Picker->>Callback: callback(path or error)
Callback->>Channel: send through oneshot
Handler->>Channel: await receiver
Channel-->>Handler: result or closed error
Handler->>UI: return Result<Option<String>>
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
McpServerCardcomponent to provide more specific error messages when folder selection fails.pick_mcp_filesystem_foldercommand to use a non-blocking callback API, preventing deadlocks in the async runtime on macOS.Summary by CodeRabbit
Release Notes
Improvements
Documentation