Skip to content

fix(cli): fix prompt issue in mcp configure claude-code #17599

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 29, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Apr 29, 2025

  • Updates default Coder prompt.
  • Skips the directions to report tasks if the pre-requisites are not available (agent token and app slug).
  • Adds the capability to override the default Coder prompt via CODER_MCP_CLAUDE_CODER_PROMPT.

@johnstcn johnstcn self-assigned this Apr 29, 2025
@johnstcn johnstcn requested a review from Copilot April 29, 2025 10:55
Copy link
Contributor

@Copilot 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 fixes the prompt generation issue in the “mcp configure claude‐code” CLI command. It updates the default coder prompt text, introduces a new report task prompt that is conditionally included, and revises the associated tests to verify the new behaviors.

  • Updated expected prompt contents in tests based on agent token and app slug availability.
  • Introduced a new variable (reportTaskPrompt) and updated function signatures/calls (injectClaudeMD and promptsBlock) to incorporate the report task prompt.

Reviewed Changes

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

File Description
cli/exp_mcp_test.go Adjusted test cases with revised expected MD content and string fixes
cli/exp_mcp.go Updated prompt generation logic to conditionally include the report task prompt

@johnstcn johnstcn merged commit 22b932a into main Apr 29, 2025
36 checks passed
@johnstcn johnstcn deleted the cj/exp-mcp-update-prompt branch April 29, 2025 14:23
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants