Skip to content

Conversation

@steveluc
Copy link
Contributor

@steveluc steveluc commented Jan 19, 2026

Summary

This PR builds on the command executor MCP server by adding VSCode automation support and enhancing the split editor functionality in the Coda extension with more flexible editor selection and improved TypeAgent schema disambiguation.

Part 1: VSCode Support for MCP Server

Added VSCode automation capabilities to the command executor MCP server:

  • ✅ Updated MCP tool description to advertise VSCode capabilities
  • ✅ Updated README with VSCode automation examples
  • ✅ Added comprehensive VSCODE_CAPABILITIES.md documentation
  • ✅ MCP server can now control VSCode through Coda extension (theme, editor layout, files, terminal, etc.)

Part 2: Enhanced Split Editor Functionality

Bug Fixes

  • ✅ Fix off-by-one error when selecting "first" or "last" editor by sorting by viewColumn
  • ✅ Fix multiple split issue by adding conditionals to focus changes
  • ✅ Remove unnecessary focus restoration logic

Features

  • ✅ Add support for splitting editors by position: "first", "last", "active", or numeric index
  • ✅ Add support for splitting editors by file name: "split app.tsx to the right"
  • ✅ Search all open tabs using tabGroups API, not just visible editors
  • ✅ Automatically open and focus files found in background tabs before splitting

Schema Improvements

  • ✅ Add clear disambiguation between splitEditor and moveCursorInFile actions
  • ✅ Add "USE THIS for" and "DO NOT USE for" guidance in schema comments
  • ✅ Add concrete examples to help LLM choose correct action
  • ✅ Remove moveCursorInFile reference from main code schema

Test Plan

Tested the following commands through the MCP server:

  • "split editor to the right" - splits active editor
  • "split the first editor to the right" - splits leftmost editor
  • "split the last editor" - splits rightmost editor
  • "split codeActionHandler.ts to the right" - splits editor by file name
  • "split the editor with speechToken to the right" - finds file in background tab and splits it
  • "split codeActionHandler to the right" - correctly maps to splitEditor (not moveCursorInFile)

All tests passed with no multiple splits and correct editor targeting.

Files Changed

Part 1 - VSCode MCP Support:

  • packages/commandExecutor/README.md - Updated documentation with VSCode capabilities
  • packages/commandExecutor/src/commandServer.ts - Updated tool description
  • packages/commandExecutor/VSCODE_CAPABILITIES.md - New comprehensive documentation file

Part 2 - Enhanced Split Editor:

  • packages/agents/code/src/codeActionsSchema.ts - Enhanced split editor schema
  • packages/agents/code/src/vscode/editorCodeActionsSchema.ts - Added disambiguation guidance
  • packages/coda/src/handleVSCodeActions.ts - Implemented enhanced split editor handler

🤖 Generated with Claude Code

steveluc and others added 5 commits January 16, 2026 23:19
Introduces a new MCP (Model Context Protocol) server that enables Claude Code to execute TypeAgent commands for music playback, list management, calendar operations, and other natural language tasks.

Key features:
- Connects Claude Code to TypeAgent dispatcher via WebSocket
- Automatic reconnection with 5-second retry interval
- Comprehensive logging to temp files for debugging
- Supports natural language commands (e.g., "play bohemian rhapsody", "add milk to grocery list")
- Clean output formatting with HTML image tags stripped

Includes example configuration for .mcp.json and detailed installation instructions in README.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add trademark section to README
- Remove dist-test build outputs from git
- Fix package.json field ordering (use exports instead of main)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use exact trademark text format with proper line breaks
- Sort package.json scripts alphabetically

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit enhances the split editor command in the Coda extension to support more flexible editor selection and improves TypeAgent schema disambiguation.

**Bug Fixes:**
- Fix off-by-one error when selecting "first" or "last" editor by sorting by viewColumn
- Fix multiple split issue by adding conditionals to focus changes
- Remove unnecessary focus restoration logic for voice command scenarios

**Features:**
- Add support for splitting editors by position: "first", "last", "active", or numeric index
- Add support for splitting editors by file name: "split app.tsx to the right"
- Search all open tabs using tabGroups API, not just visible editors
- Automatically open and focus files found in background tabs before splitting

**Schema Improvements:**
- Add clear disambiguation between splitEditor and moveCursorInFile actions
- Add "USE THIS for" and "DO NOT USE for" guidance in schema comments
- Add concrete examples to help LLM choose correct action
- Remove moveCursorInFile reference from main code schema (not useful for voice)

**Documentation:**
- Add VSCODE_CAPABILITIES.md documenting all VSCode automation features
- Update split editor examples to show new position and file-based splitting

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@steveluc steveluc force-pushed the add-command-executor-mcp-server branch from 2bb397b to e4672de Compare January 19, 2026 05:27
@steveluc steveluc changed the title Enhance VSCode split editor functionality VS Code support for MCP Server + VS Code extension improvements Jan 19, 2026
@steveluc steveluc temporarily deployed to development-fork January 19, 2026 05:36 — with GitHub Actions Inactive
@steveluc steveluc temporarily deployed to development-fork January 19, 2026 05:36 — with GitHub Actions Inactive
@steveluc steveluc added this pull request to the merge queue Jan 19, 2026
Merged via the queue into main with commit e430314 Jan 19, 2026
21 checks passed
@steveluc steveluc deleted the add-command-executor-mcp-server branch January 19, 2026 07:15
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.

2 participants