Skip to content

feat: ✨ MCP Prompts now display when inserted #6932

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 1 commit into from
Aug 5, 2025

Conversation

chezsmithy
Copy link
Contributor

@chezsmithy chezsmithy commented Aug 2, 2025

Description

Using /slash commands to insert MCP prompts now displays the prompt content consistent with other prompts like /init

MCP prompt content is loaded at config change at the same time we are loading the MCP prompt definition and are cached.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screen recording or screenshot

image

Tests

Manual verification performed.

@chezsmithy chezsmithy requested a review from a team as a code owner August 2, 2025 00:41
@chezsmithy chezsmithy requested review from Patrick-Erichsen and removed request for a team August 2, 2025 00:41
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 2, 2025
Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen left a comment

Choose a reason for hiding this comment

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

This is great! I haven't used MCP prompts much but very nice to have an actual UI here.

mcpServerName: server.name, // Used in client to retrieve prompt
mcpArgs: prompt.arguments,
}));
await Promise.all(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only concern is this might take longer than we anticipate. Mind throwing a timer + console log for observability purposes?

@Patrick-Erichsen
Copy link
Collaborator

Merging main should hopefully resolve the errors here!

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@chezsmithy might be simpler and better to use ideMessenger.request("mcp/getPrompt"... at the time the slash command is entered, thoughts?

Advantages:

  • won't load prompts unless used
  • will show most up to date (although edge case that it would change server side)
  • potentially simpler code

Disadvantages: slight UI lag when using /

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Aug 5, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 5, 2025
@RomneyDa
Copy link
Collaborator

RomneyDa commented Aug 5, 2025

On second thought since it's such an edge case that mcp prompts will change between config loads I think I prefer your original approach so that there's no UI lag

@RomneyDa RomneyDa merged commit d4ed9a4 into continuedev:main Aug 5, 2025
37 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Aug 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants