How talbarina/claude-editor-context works
editor-context is a Claude desktop plugin that shares live Cursor or VS Code context with Claude. Its main workflow is: the plugin starts a Node helper, the helper connects to the editor extension, and the plugin attaches the current selection to user messages while presenting a control band. The README documents pinning, explain, recent files, pause, unsaved-change warnings, and connection notices. Most behavior is implemented in register.tsx; the excerpts show only portions of it, so feature-level links rely on README descriptions where needed.
Main entry points: register.tsx Plugin hooks · controls.tsx Custom controls · index.d.ts Plugin state
Components 14
Editor bridge
- Claude Code extension
- Node helper
plugins/editor-context/hooks/register.tsx - Local socket relay
plugins/editor-context/hooks/register.tsx
Plugin runtime
- Plugin hooks
plugins/editor-context/hooks/register.tsx - Plugin state
plugins/editor-context/types/index.d.ts
Context features
- Message context
plugins/editor-context/hooks/register.tsx - Pinned selections
plugins/editor-context/hooks/register.tsx - Explain action
plugins/editor-context/hooks/register.tsx - Recent files
plugins/editor-context/hooks/register.tsx - Connection and save notices
plugins/editor-context/hooks/register.tsx
Band interface
- Context band
plugins/editor-context/hooks/register.tsx - Custom controls
plugins/editor-context/hooks/controls.tsx
Other components
- User
- Claude desktop
Connections 15
- Claude desktop → Plugin hooks: starts session
README.md - Plugin hooks → Node helper: launches
README.md - Node helper → Claude Code extension: reads editor context
README.md - Node helper → Local socket relay: shares connection
README.md - Local socket relay → Plugin hooks: streams events
plugins/editor-context/hooks/register.tsx - Plugin hooks → Plugin state: updates
plugins/editor-context/hooks/register.tsx - Plugin hooks → Message context: attaches to messages
README.md - Plugin hooks → Pinned selections: manages
README.md - Plugin hooks → Explain action: submits prompt
plugins/editor-context/hooks/register.tsx - Plugin hooks → Recent files: manages
README.md - Plugin hooks → Connection and save notices: shows notices
README.md - Plugin hooks → Context band: renders
plugins/editor-context/hooks/register.tsx - Context band → Custom controls: uses
plugins/editor-context/hooks/controls.tsx - Custom controls → Plugin hooks: posts presses
plugins/editor-context/hooks/controls.tsx - User → Context band: uses controls