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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user