Support multiple prompt arguments #21944
Labels
admin read
Pending admin review
enhancement
[core label]
triage
Maintainer needs to classify the issue
Check for existing issues
Describe the feature
MCP prompts could take more than one argument.
Zed filters out those here:
zed/crates/assistant/src/context_store.rs
Line 830 in 9143fd2
zed/crates/assistant/src/slash_command/context_server_command.rs
Lines 240 to 249 in 9143fd2
This creates a certain confusion for anyone who tries to work with this system. There is no indication in system whatsoever that prompts were removed (not even in debug log), nor there exits any documentation explaining that behavior.
More than that, this design would result in strange incompatibilities, when MCP server has updated and added new functionality by taking more optional arguments, and cause functionality for Zed users to break.
The best thing to do seems to support more than one parameter for prompts. Since prompts appear to me sort of like command lines in shells, there does not seem to be any necessity to only take one argument. Certain confusion could appear over that in which order arguments follow each other (i.e which it is that user has started typing), but since arguments at least in MCP are defined as an array (from promts/list), the order of things in it could be assumed to be the order in which arguments are most sensibly entered. Additional hint as to name of entered argument could also be inserted in chat after prompt is resolved (f.e after user typed it completely and entered space or Tabbed it in).
Any necessary spaces could be passed same way they are escaped in shells - by using quotes or backslash.
Environment
Zed: v0.164.2 (Zed)
OS: Linux X11 ubuntu 24.04
Memory: 60.6 GiB
Architecture: x86_64
GPU: AMD Radeon Graphics (RADV GFX1103_R1) || radv || Mesa 24.0.9-0ubuntu0.2
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: