Skip to content

Enhance DocumentIdentifier deserialization for Claude Code compatibility#17

Merged
linw1995 merged 3 commits intomainfrom
dev
Aug 12, 2025
Merged

Enhance DocumentIdentifier deserialization for Claude Code compatibility#17
linw1995 merged 3 commits intomainfrom
dev

Conversation

@linw1995
Copy link
Copy Markdown
Owner

resolve #16

- Upgrade rmcp from 0.3.0 to 0.5.0 for latest features
- Update all Cargo.lock dependencies to latest versions
- Fix CallToolResult content field access pattern in integration tests
- Handle optional content field with proper null checking
Add custom deserializer supporting both string and object formats.
Support JSON-embedded-as-string deserialization for Claude Code MCP usage patterns.
Add comprehensive test coverage for all deserialization scenarios.
@linw1995 linw1995 requested a review from Copilot August 12, 2025 04:48
@linw1995 linw1995 self-assigned this Aug 12, 2025
@linw1995 linw1995 added bug Something isn't working enhancement New feature or request labels Aug 12, 2025

This comment was marked as outdated.

- Enhanced JSON string parsing with detailed error messages
- Use serde::de::IgnoredAny for better forward compatibility
@linw1995 linw1995 requested a review from Copilot August 12, 2025 04:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances DocumentIdentifier deserialization to support Claude Code compatibility by implementing custom deserialization logic and updating the rmcp dependency. The changes enable handling of JSON strings embedded in API calls and provide better forward compatibility.

  • Implements custom deserialization visitor for DocumentIdentifier to handle both direct objects and JSON strings
  • Updates rmcp dependency from 0.3.0 to 0.5.0
  • Refactors integration test assertions to handle optional content fields safely

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/neovim/client.rs Adds custom DocumentIdentifier deserializer with comprehensive test coverage
src/server/integration_tests.rs Updates content field access patterns to use safe optional chaining
Cargo.toml Upgrades rmcp dependency to version 0.5.0

@linw1995 linw1995 merged commit a172d97 into main Aug 12, 2025
1 check passed
@linw1995 linw1995 deleted the dev branch August 12, 2025 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code with Subscription Fails to Handle Nested Object Parameters in Tools

2 participants