aws / aws/amazon-q-developer-cli

Allow postToolUse Hook to run after the Agent is finished (instead of after all usages)

Offen
#3,034 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
2k
Forks
439
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello,

I've been playing with the postToolUse (introduced in #2875) hook a bit, I think it's a good place for us to automatically run linters/tests, but as it sits, it will run every single time the Agent writes something. As you know, sometimes the Agent writes the whole file in a single shot, sometimes it just adds an import statement. Running linter/test every single time we write one line is going to take longer than what we'd save with a "run linter/test" prompt after it's done.

My proposal would be to allow us to run postToolUse when the Agent is ready to hand over the control to us. This would allow it to do everything it wants, and then we'd run the linter/tests, feeding the output (if wrong) back to the LLM.

Let me know your thoughts on it

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Lies die in #2875 eingeführte postToolUse-Implementierung und verfolge, wann Tool-Nutzungen und der Abschluss des Agent behandelt werden. Ermittle, wie der hook ausgelöst werden kann, wenn der Agent bereit ist, die Kontrolle zurückzugeben, statt nach jedem Schreibvorgang; erledigt ist die Aufgabe, wenn er ausgeführt wird, nachdem der Agent seine Arbeit beendet hat, und die Ausgabe von linter oder Tests an den LLM zurückgeben kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
ai, cli
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.