Fix MCP prompt slash commands not appearing.#8290
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request correctly identifies the need to reload slash commands after the configuration is initialized, ensuring that MCP-based prompts are available. The change adds isConfigInitialized to the dependency array of the effect that loads commands, which triggers a reload when the configuration is ready. I've provided one high-severity suggestion to improve this logic by preventing the initial command load that occurs before initialization. This will make the process more efficient and robust.
|
Size Change: +65 B (0%) Total Size: 13.2 MB ℹ️ View Unchanged
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
/patch stable |
1 similar comment
|
/patch stable |
|
❌ The |
|
/patch stable |
2 similar comments
|
/patch stable |
|
/patch stable |
|
👋 Patch command received! Processing... You can track the progress here: https://github.com/google-gemini/gemini-cli/actions/runs/17835339268 |
|
👋 Patch command received! Processing... You can track the progress here: https://github.com/google-gemini/gemini-cli/actions/runs/17845766400 |
# Conflicts: # packages/cli/src/ui/AppContainer.tsx # packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
again |
|
/patch preview |
|
👋 Patch command received! Processing... You can track the progress here: https://github.com/google-gemini/gemini-cli/actions/runs/17846267487 |
|
✅ Patch workflow dispatched successfully! 📋 Details:
🔗 Track Progress: |
|
🤞 |
|
/patch preview |
|
👋 Patch command received! Processing... You can track the progress here: https://github.com/google-gemini/gemini-cli/actions/runs/17846570952 |
|
✅ Patch workflow dispatched successfully! 📋 Details:
🔗 Track Progress: |
# Conflicts: # packages/cli/src/ui/AppContainer.tsx # packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
|
repeat |
|
/patch preview |
|
repeat |
|
/patch preview |
|
✅ Patch workflow dispatched successfully! 📋 Details:
🔗 Track Progress: |
# Conflicts: # packages/cli/src/ui/AppContainer.tsx # packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
|
That totally worked! ❤️ closing the pr though so i can test more |
|
/patch |
|
✅ Patch workflow(s) dispatched successfully! 📋 Details:
🔗 Track Progress: |
|
❌ Patch creation failed! There was an error creating the patch release. 🔍 Troubleshooting:
🔗 Links: |
# Conflicts: # packages/cli/src/ui/AppContainer.tsx # packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
|
/patch preview |
|
✅ Patch workflow(s) dispatched successfully! 📋 Details:
🔗 Track Progress: |
# Conflicts: # packages/cli/src/ui/AppContainer.tsx # packages/cli/src/ui/hooks/slashCommandProcessor.ts
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |

TLDR
MCP servers aren't ready till the config is initalized so we need to reload the slashcommands to find the ones based on mcp prompts.
Deeper Dive
We could just not load the slash commands at all until the config is initialized but I decided it would be better to load them before before and after since that makes most slash commands available to the user right away.
Reviewer Test Plan
Connect to a MCP server that supports prompts and verify that they appear in the slash commands after MCP servers finish loading.
Testing Matrix
Linked issues / bugs
Fixes #8283