Skip to content

Adds Cursor as a supported AI agent for the "Send to Agent" feature so the extension works in Cursor IDE without "GitHub Copilot not found" when Copilot is not installed#1

Open
ozalexo wants to merge 5 commits into
brainfile:mainfrom
ozalexo:cursor-support

Conversation

@ozalexo
Copy link
Copy Markdown

@ozalexo ozalexo commented Feb 10, 2026

1. Cursor provider (src/board/agents/providers.ts)

  • New agent provider: id: "cursor", label: "Cursor", priority: 3.
  • Detection via appNameMatch: "cursor" (no extension ID; uses vscode.env.appName).
  • Same native chat commands as Copilot: workbench.action.chat.open, workbench.action.chat.newChat.
  • Optional icon (Codicon name) on AgentProvider; set for all providers so Quick Pick can show distinct icons (e.g. comment-discussion, terminal, hubot, clippy).

2. Default / last-used agent in Cursor (boardViewProvider.ts, boardEditorPanel.ts)

  • When sending the agent list to the webview, use the saved "last used" agent only if it is currently available.
  • If it is not (e.g. Copilot in Cursor), use the registry default and persist it to workspace state.
  • Fixes "Send to Agent" in Cursor defaulting to Copilot and showing "GitHub Copilot not found".

3. CodeLens "Send to Agent" (extension.ts)

  • CodeLens command uses the shared AgentRegistry: Quick Pick is built from getAvailableAgents(), then registry.sendToAgent(agentId, prompt) (so Cursor works from the lens in brainfile.md).
  • Claude Code: Kept original behavior by special-casing claude-code: send prompt to the terminal via claude "..." instead of the registry’s UI path.
  • Copy option label/description restored to "Copy Prompt" / "Copy to clipboard".

4. Per-agent icons (optional UX)

  • DetectedAgent and registry pass through optional icon from providers.
  • CodeLens and sidebar task Quick Pick use agent-specific Codicons when building labels (fallback: debug-start).

Testing

  • In Cursor: open a project with brainfile.md; use "Send to Agent" from the sidebar and from CodeLens. Cursor appears as an option and opens chat with the task prompt; no Copilot error when Copilot is not installed.
  • In VS Code: not tested

- Add Cursor provider in providers.ts (appNameMatch, native chat commands)
- Fix default agent in Cursor: do not use saved Copilot when unavailable (boardViewProvider, boardEditorPanel)
- CodeLens Send to Agent: use AgentRegistry instead of hardcoded switch so Cursor works from brainfile.md
When Claude Code is selected in the brainfile.md CodeLens menu, send the prompt to the terminal via 'claude "..."' again instead of using the registry's UI paste path.
- Add optional icon (Codicon name) to AgentProvider and set for copilot, claude-code, cursor, copy
   - Add icon to DetectedAgent and pass through in registry.detectAgents()
   - CodeLens and sidebar task Quick Pick now show agent-specific icons (comment-discussion, hubot, terminal, clippy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant