aws / aws/amazon-q-developer-cli

bug: /prompts crashes if an MCP server provides prompts with names more than 16 characters

Aperta
#1,746 0 commenti 0 reazioni 1 assegnatario Rivendicata da @dingfeli Vedi su GitHub
Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

MacOS

### Expected behaviour

An MCP server can provide prompts with names longer than 16 characters without the process crashing.

### Actual behaviour

When running `/prompts`, Q crashes with:

```
!> /prompts

Prompt Arguments (* = required)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
my_mcp (MCP):
- superlongpromptnThe application panicked (crashed).
Message: capacity overflow
Location: /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/alloc/src/slice.rs:566
```

### Steps to reproduce

_No response_

### Environment

```yaml

```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.