- Notifications
You must be signed in to change notification settings - Fork1.2k
Add in an assign copilot prompt#572
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
Conversation
There was a problem hiding this 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 adds support for registering and handling a new “AssignCodingAgent” prompt alongside existing tools, enabling users to assign multiple GitHub issues to the Copilot Coding Agent in bulk.
- Introduces
ServerPrompt
type and prompt registration methods in the toolset. - Registers the new prompt in the default GitHub “issues” toolset.
- Implements the
AssignCodingAgentPrompt
function and its handler inissues.go
.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
pkg/toolsets/toolsets.go | AddedServerPrompt ,NewServerPrompt , prompt storage, and registration methods. |
pkg/github/tools.go | ChainedAddPrompts to include the newAssignCodingAgentPrompt . |
pkg/github/issues.go | DefinedAssignCodingAgentPrompt with messages and handler logic. |
Comments suppressed due to low confidence (6)
pkg/toolsets/toolsets.go:43
- Add a Go doc comment above
NewServerPrompt
to describe its purpose and usage.
func NewServerPrompt(prompt mcp.Prompt, handler server.PromptHandlerFunc) ServerPrompt {
pkg/toolsets/toolsets.go:56
- Add a Go doc comment for the
ServerPrompt
type to explain its fields and intended use.
// ServerPrompt represents a prompt that can be registered with the MCP server.
pkg/toolsets/toolsets.go:113
- Add a Go doc comment for
AddPrompts
to clarify that it registers one or more prompts on the toolset.
func (t *Toolset) AddPrompts(prompts ...ServerPrompt) *Toolset {
pkg/toolsets/toolsets.go:138
- Document
RegisterPrompts
, noting that it registers all added prompts on the MCP server when the toolset is enabled.
func (t *Toolset) RegisterPrompts(s *server.MCPServer) {
pkg/github/issues.go:936
- [nitpick] The prompt ID
AssignCodingAgent
uses PascalCase; for consistency with snake_case tool IDs (e.g.,assign_copilot_to_issue
), consider usingassign_coding_agent
.
return mcp.NewPrompt("AssignCodingAgent",
pkg/github/issues.go:935
- There are no unit tests for the new
AssignCodingAgentPrompt
function or its handler; consider adding tests to verify the generated message sequence and parameter validation.
func AssignCodingAgentPrompt(t translations.TranslationHelperFunc) (tool mcp.Prompt, handler server.PromptHandlerFunc) {
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ce77820
toa00617b
Compare21389a4
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR adds a prompt that assigns the Coding Agent to multiple tasks in a specified GitHub repository, validating first if they are clear enough to assign.
Example
Rendered prompt
After listing issues, it proceeds to do exactly as hoped