Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: coder/claudecode.nvim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: coder/claudecode.nvim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feat/complete-mcp-tools-compliance
Choose a head ref
  • 3 commits
  • 21 files changed
  • 1 contributor

Commits on Jun 20, 2025

  1. feat: implement complete MCP tools compliance with VS Code extension …

    …specs
    
    Complete implementation of MCP (Model Context Protocol) tool compliance by:
    - Adding 2 missing tools from VS Code extension
    - Converting all tool outputs to MCP-compliant format
    - Exposing internal tools via MCP while preserving existing functionality
    - Comprehensive test suite updates with robust JSON handling
    - Updated documentation to reflect 100% VS Code compatibility
    
    - **getLatestSelection**: Get most recent text selection (different from getCurrentSelection)
    - **closeAllDiffTabs**: Close all diff-related tabs/windows with VS Code-compatible output format
    
    All tools now return MCP-compliant format: `{content: [{type: "text", text: "JSON-stringified-data"}]}`
    
    - **checkDocumentDirty**: Added schema for MCP exposure, success/failure JSON responses
    - **saveDocument**: Added schema for MCP exposure, detailed success information
    - **getWorkspaceFolders**: Added schema for MCP exposure, VS Code-compatible structure
    - **getOpenEditors**: Restructured from `{editors: [...]}` to `{tabs: [...]}` with all VS Code fields
    - **getCurrentSelection**: Enhanced with proper fallback behavior and MCP format
    - **openFile**: Added missing parameters (preview, selectToEndOfLine, makeFrontmost, text selection)
    - **closeTab**: Updated format while keeping internal-only (per Claude Code requirement)
    
    - **Text Selection in openFile**: Full implementation of startText/endText pattern matching
    - **Conditional Output**: openFile returns simple vs detailed responses based on makeFrontmost
    - **Language Detection**: getOpenEditors includes proper languageId field mapping
    - **Error Handling**: Comprehensive JSON-RPC error responses throughout
    
    - **Robust JSON encoder/decoder**: Custom implementation supporting nested objects and special keys
    - **Comprehensive test coverage**: All new tools with unit tests
    - **Updated test expectations**: All existing tests adapted to MCP format
    - **Format validation**: Tests verify exact VS Code extension compatibility
    
    - **CLAUDE.md**: Complete rewrite of MCP tools section with 100% compliance status
    - **Development Guidelines**: Added MCP tool development patterns and troubleshooting
    - **Quality Standards**: Updated to reflect 320+ tests with 100% success rate
    - **Protocol Compliance**: New section documenting VS Code extension feature parity
    
    - **Backward compatibility**: No breaking changes to existing API
    - **VS Code alignment**: Output formats match official VS Code extension exactly
    - **Internal tools preserved**: close_tab remains internal as required by Claude Code architecture
    
    - ✅ 320 tests passing (0 failures, 0 errors)
    - ✅ All linting checks passing (0 warnings, 0 errors)
    - ✅ Full MCP protocol compliance
    - ✅ VS Code extension feature parity achieved
    
    Change-Id: Ic1bd33aadb7fa45d64d4aba208acf37b2c9779cb
    Signed-off-by: Thomas Kosiewski <[email protected]>
    ThomasK33 committed Jun 20, 2025
    Configuration menu
    Copy the full SHA
    63066c2 View commit details
    Browse the repository at this point in the history
  2. fix: address PR review comments for MCP tools compliance

    - Fix closeAllDiffTabs potential duplicate window closing by using set-based approach instead of array
    - Add comprehensive test coverage for openFile parameters (makeFrontmost, preview mode, line/text selection)
    - Update CLAUDE.md documentation to mention endLine parameter for openFile tool
    - Enhance JSON encoder/decoder in test suite with proper escape sequence handling
    - Add missing vim API mocks for complex openFile functionality testing
    
    All 325 tests now pass with complete coverage of new MCP tool features.
    
    Change-Id: I15bceb2bb44552205ea63c5ef1cb83722f7b5893
    Signed-off-by: Thomas Kosiewski <[email protected]>
    ThomasK33 committed Jun 20, 2025
    Configuration menu
    Copy the full SHA
    d0f1f73 View commit details
    Browse the repository at this point in the history
  3. fix: correct off-by-one indexing error in openFile text pattern search

    Address Copilot review comment: when searching for endText pattern,
    line_idx is already the correct 1-based index for the lines array,
    so accessing lines[line_idx + 1] was incorrect.
    
    Changed to lines[line_idx] to access the current line directly.
    
    Change-Id: I05853ff183ef8f3e5df2863d2184a0cb58cb7e65
    Signed-off-by: Thomas Kosiewski <[email protected]>
    ThomasK33 committed Jun 20, 2025
    Configuration menu
    Copy the full SHA
    bebc36a View commit details
    Browse the repository at this point in the history
Loading