aws / aws/amazon-q-developer-cli
bug: Documentation mismatch
- Vorherrschende Sprache
- Rust
- Sterne
- 2k
- Forks
- 439
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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
```
Beitragsleitfaden
Rechercherichtung
Lies docs/agent-format.md im Abschnitt hooks-field und docs/hooks.md im Abschnitt preToolUse und vergleiche, wie die beiden Abschnitte die Hook-Eingabe und -Konfiguration beschreiben. Gleiche die beiden Abschnitte so an, dass command, matcher und event payload konsistent beschrieben werden und die Dokumentation keine widersprüchlichen Beispiele mehr enthält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- cli, documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100