Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: detect Cursor editor via appName instead of extension ID#662

Merged
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/cursor-detectionbreaking-brake/cc-wf-studio:fix/cursor-detectionCopy head branch name to clipboard
Mar 19, 2026
Merged

fix: detect Cursor editor via appName instead of extension ID#662
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/cursor-detectionbreaking-brake/cc-wf-studio:fix/cursor-detectionCopy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

@breaking-brake breaking-brake commented Mar 19, 2026

Problem

Clicking the "Run for Cursor" button in the Toolbar shows "Cursor extension is not installed" even when running inside Cursor.

Current Behavior

  1. Open CC Workflow Studio inside Cursor
  2. Click the Run (Cursor) button in the Toolbar
  3. ❌ Error: "Cursor extension is not installed."

Expected Behavior

  1. Open CC Workflow Studio inside Cursor
  2. Click the Run (Cursor) button in the Toolbar
  3. ✅ Cursor Agent opens with the workflow skill

Solution

The previous detection logic checked for a VSCode extension with ID anysphere.cursor-agent, but Cursor's Agent is a built-in feature of the Cursor editor (a VSCode fork), not a separately installed extension.

Changed detection to use vscode.env.appName and vscode.env.uriScheme to identify the Cursor environment.

Changes

File: src/extension/services/cursor-extension-service.ts

  • Replaced vscode.extensions.getExtension('anysphere.cursor-agent') with vscode.env.appName / vscode.env.uriScheme check
  • Simplified startCursorTask() to use isCursorInstalled() instead of direct extension lookup and activation

Impact

  • Fixes Cursor Run button for all users running inside Cursor editor
  • No impact on VSCode users (detection correctly returns false)

Testing

  • Manual testing completed (confirmed in Cursor)
  • Build passes (npm run format && npm run lint && npm run build)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Improved the Cursor extension detection mechanism to enhance reliability and reduce dependency on extension state queries.

- Cursor Agent is built-in, not a separate extension
- Use vscode.env.appName/uriScheme for detection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 19, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Refactored cursor installation detection in the extension service by replacing extension registry lookup with environment-based detection that checks VS Code's appName and uriScheme properties. Simplified startCursorTask control flow by removing extension activation logic.

Changes

Cohort / File(s) Summary
Cursor Detection Logic
src/extension/services/cursor-extension-service.ts
Removed CURSOR_EXTENSION_ID constant and replaced vscode.extensions.getExtension() calls with environment variable checks (vscode.env.appName, vscode.env.uriScheme) for cursor detection. Eliminated extension activation and active state queries from startCursorTask().

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A cursor hops where once extensions flew,
No activation needed, just a peek or two—
Environment whispers secrets clear and bright,
Simpler paths make bunny code take flight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: replacing extension ID-based Cursor detection with environment variable-based detection via appName.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cursor-detection
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@breaking-brake breaking-brake merged commit ffbb163 into main Mar 19, 2026
3 of 4 checks passed
@breaking-brake breaking-brake deleted the fix/cursor-detection branch March 19, 2026 05:41
@breaking-brake breaking-brake mentioned this pull request Mar 19, 2026
braking-brake-semantic-release Bot pushed a commit that referenced this pull request Mar 19, 2026
## [3.30.0](v3.29.2...v3.30.0) (2026-03-19)

### Features

* add group node highlight toggle, MCP improvements, and bug fixes ([#661](#661)) ([5158e37](5158e37))

### Bug Fixes

* detect Cursor editor via appName instead of extension ID ([#662](#662)) ([ffbb163](ffbb163))
* support plugin agents in workflow detection and export ([#651](#651)) ([#663](#663)) ([3aa2023](3aa2023))
@braking-brake-semantic-release
Copy link
Copy Markdown

🎉 This PR is included in version 3.30.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.