fix: show retry attempt count when aborting during retry

When aborting a retry attempt, surface the retry-aware abort message
in the assistant output and tool results instead of a generic "Aborted".

- Set errorMessage for aborted streaming messages
- Render abort message without forcing a leading newline when no content
This commit is contained in:
Thomas Mustier 2026-01-08 11:23:48 +00:00
parent a65da1c14b
commit 01f15fcbd2
3 changed files with 38 additions and 13 deletions

View file

@ -435,6 +435,11 @@ export class AgentSession {
return this.agent.state.isStreaming;
}
/** Current retry attempt (0 if not retrying) */
get retryAttempt(): number {
return this._retryAttempt;
}
/**
* Get the names of currently active tools.
* Returns the names of tools currently set on the agent.