Fix linux smart connections detection#23
Merged
jacksteamdev merged 4 commits intojacksteamdev:mainfrom Jul 13, 2025
Merged
Conversation
- Added fallback detection method using plugin system - Smart Connections doesn't always expose window.SmartSearch on Linux - Now checks app.plugins.plugins['smart-connections'].env as fallback - Caches the API reference in window.SmartSearch for consistency - Added proper TypeScript types for the smart-connections plugin Fixes issue where Smart Connections shows as not installed on Linux despite being fully functional.
- Removed duplicate App interface declaration from types.ts - Updated existing smart-connections type in mcp-server-install/types.ts - Added SmartConnections import for proper typing - Fixed type errors caught by bun run check
`versions.json` files to `0.2.24` to reflect the latest changes.
✅ Deploy Preview for superb-starlight-b5acb5 canceled.
|
|
I'm having a detection issue on macOS as well -- noting that this may help in that scenario as well. |
|
|
I am also encountering a detection issue for this on Windows as well. |
jacksteamdev
approved these changes
Jul 13, 2025
Owner
jacksteamdev
left a comment
There was a problem hiding this comment.
Nice work! Clean solution with proper fallback detection for Linux compatibility. Good catch on the caniuse-lite dependency resolution too.
The implementation maintains existing behavior while gracefully handling the platform difference. Ready to merge! 🚀
jacksteamdev
added a commit
that referenced
this pull request
Jul 13, 2025
- Integrates Smart Connections v3.0+ smart_sources.lookup() API - Maintains cross-platform detection fallback from PR #23 - Creates compatibility wrapper for v3.0 result format transformation - Preserves backwards compatibility with v2.x via window.SmartSearch - Fixes detection issues on Linux, macOS, and Windows
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.
Description
This PR fixes an issue where the Smart Connections plugin is not detected by MCP Tools on Linux systems, even though Smart Connections is installed and fully functional.
Problem
On Linux, Smart Connections doesn't consistently expose its API via
window.SmartSearch. Instead, it's accessible through Obsidian's plugin system atapp.plugins.plugins["smart-connections"].env.Solution
Added a fallback detection mechanism that:
window.SmartSearch(works on some platforms)app.plugins.plugins["smart-connections"].env(fixes Linux)window.SmartSearchfor consistencyChanges
loadSmartSearchAPIfunction inpackages/obsidian-plugin/src/shared/index.tsenvproperty on the smart-connections pluginTesting
Tested on Linux (Ubuntu) with:
Before fix: Smart Connections shows as ❌ not installed
After fix: Smart Connections shows as ✅ installed
✅ All TypeScript checks pass (
bun run check)Related Issues
Fixes detection issue on Linux systems where Smart Connections is functional but not detected.