feat(coding-agent): added retry logic with exponential backoff

- Added retry logic with exponential backoff and model fallback for auto-compaction failures.
- Added support for pi/<role> model aliases and automatic model inheritance for subtasks.
- Enhanced error messages with retry-after timing from rate limit headers across all providers.
- Fixed image attachments being dropped when steering messages are queued during streaming.
- Changed edit tool to merge call and result displays into single block.
- Changed model override behavior to persist in settings when explicitly set via CLI.
This commit is contained in:
can1357
2026-01-10 00:43:56 +01:00
parent 86ef2bd34b
commit 6e7ca2fc14
23 changed files with 471 additions and 70 deletions
@@ -1338,6 +1338,21 @@ export class SessionManager {
return this.leafId ? this.byId.get(this.leafId) : undefined;
}
/**
* Get the most recent model role from the current session path.
* Returns undefined if no model change has been recorded.
*/
getLastModelChangeRole(): string | undefined {
let current = this.getLeafEntry();
while (current) {
if (current.type === "model_change") {
return current.role ?? "default";
}
current = current.parentId ? this.byId.get(current.parentId) : undefined;
}
return undefined;
}
getEntry(id: string): SessionEntry | undefined {
return this.byId.get(id);
}