aws / aws/amazon-q-developer-cli

bug: Documentation mismatch

Aperta
#3,201 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
documentation q chat
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

Windows

### Expected behaviour

The documentation for [hooks-field](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-format.md#hooks-field) to match the documentation for [pretooluse](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/hooks.md#pretooluse)

### Actual behaviour

[hooks-field](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-format.md#hooks-field) states the `preToolUse` should look like

```json
"preToolUse": [
{
"matcher": "execute_bash",
"command": "{ echo \"$(date) - Bash command:\"; cat; echo; } >> /tmp/bash_audit_log"
},
{
"matcher": "use_aws",
"command": "{ echo \"$(date) - AWS CLI call:\"; cat; echo; } >> /tmp/aws_audit_log"
}
],
```

but the [pretooluse](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/hooks.md#pretooluse) shows

```json
{
"hook_event_name": "preToolUse",
"cwd": "/current/working/directory",
"tool_name": "fs_read",
"tool_input": {
"operations": [
{
"mode": "Line",
"path": "/current/working/directory/docs/hooks.md"
}
]
}
}
```

It's a bit confusing. Where is the "command" and the "matcher"?

### Steps to reproduce

_No response_

### Environment

```yaml

```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Leggi docs/agent-format.md nella sezione hooks-field e docs/hooks.md nella sezione preToolUse, quindi confronta il modo in cui ciascuna descrive l’input e la configurazione dell’hook. Allinea le due sezioni in modo che command, matcher ed event payload siano descritti in modo coerente e che la documentazione non presenti più esempi contraddittori.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
cli, documentation
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.