Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Support completions for GH resources#450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge4 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-422

Conversation

Copilot
Copy link

@CopilotCopilotAI commentedMay 28, 2025
edited
Loading

  • Explore repository structure and understand current state
  • Understand MCP completion protocol requirements
  • Identify resource templates that need completion support
  • Verify build and test setup works
  • Add completion capability to server configuration
  • Implement CompletionHandlerFunc type and registration
  • Create repository_completions.go with GitHub API completion logic
  • Add completion handler to server registration
  • Write tests for completion functionality
  • Create completion-aware stdio server wrapper
  • Implement custom in-process transport for GitHubMCPServer
  • Test end-to-end completion behavior with working MCP client
  • Update library dependencies to latest version

Successfully implemented full completion support for GitHub MCP Server!

Core Completion Logic:

  • CompletionHandlerFunc type and registration inGitHubMCPServer
  • ComprehensiveRepositoryCompletionHandler that provides contextual completions for:
    • Repository owners/organizations (via GitHub search)
    • Repository names (via GitHub search with owner context)
    • Branch names (via GitHub API for specific repos)
    • Commit SHAs (via GitHub API for specific repos)
    • Tag names (via GitHub API for specific repos)
    • Pull request numbers (via GitHub API for specific repos)
    • File paths (via GitHub API directory listings)

Custom MCP Server & Transport:

  • ExtendedGitHubMCPServer that wraps base MCPServer and overridesHandleMessage
  • Custom completion handling that interceptscompletion/complete requests
  • GitHubInProcessTransport that routes requests through the custom server
  • Proper JSON-RPC error and response handling
  • Falls back to base server for all non-completion requests

Working Integration:

  • ✅ End-to-end completion tests passing using custom in-process client
  • ✅ Proper error handling for invalid requests and GitHub API failures
  • ✅ Empty completion results for non-repo URIs and unsupported arguments
  • ✅ Full test coverage including unit and integration tests
  • ✅ All existing tests continue to pass

Client Usage:

  • UseNewInProcessClientWithGitHubServer() for testing with completion support
  • Use custom stdio server wrapper for command-line completion support
  • Maintains backward compatibility with existing toolsets and resources

The completion feature now works end-to-end and provides intelligent GitHub resource completions based on context!

Fixes#422.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.

CopilotAIand others added3 commitsMay 28, 2025 20:54
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Support completions for GH resources
2 participants
@Copilot@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp