fix(driveragent): prevent duplicate thinking/output markers during token streaming and mark transitions

This commit is contained in:
2026-01-20 03:16:02 +00:00
parent 4e4d3c0e08
commit 73657be550
3 changed files with 39 additions and 3 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## 2026-01-20 - 1.5.4 - fix(driveragent)
prevent duplicate thinking/output markers during token streaming and mark transitions
- Add isInThinkingMode flag to track thinking vs output state
- Emit "\n[THINKING] " only when transitioning into thinking mode (avoids repeated thinking markers)
- Emit "\n[OUTPUT] " when transitioning out of thinking mode to mark content output
- Reset thinking state after response completes to ensure correct markers for subsequent responses
- Applied the same streaming marker logic to both response handling paths
## 2026-01-20 - 1.5.3 - fix(driveragent)
prefix thinking tokens with [THINKING] when forwarding streaming chunks to onToken