fix(coding-agent): add settled agent lifecycle event

closes #6363
This commit is contained in:
Mario Zechner
2026-07-09 12:40:52 +02:00
parent 050b8176bf
commit e9fa5a68a1
14 changed files with 272 additions and 32 deletions
@@ -1624,7 +1624,7 @@ export class InteractiveMode {
this.restoreQueuedMessagesToEditor({ abort: true });
},
commandContextActions: {
waitForIdle: () => this.session.agent.waitForIdle(),
waitForIdle: () => this.session.waitForIdle(),
newSession: async (options) => {
this.clearStatusIndicator();
try {
@@ -1674,7 +1674,7 @@ export class InteractiveMode {
},
shutdownHandler: () => {
this.shutdownRequested = true;
if (!this.session.isStreaming) {
if (this.session.isIdle) {
void this.shutdown();
}
},
@@ -1774,7 +1774,7 @@ export class InteractiveMode {
sessionManager: this.sessionManager,
modelRegistry: this.session.modelRegistry,
model: this.session.model,
isIdle: () => !this.session.isStreaming,
isIdle: () => this.session.isIdle,
isProjectTrusted: () => this.settingsManager.isProjectTrusted(),
signal: this.session.agent.signal,
abort: () => {
@@ -3024,11 +3024,13 @@ export class InteractiveMode {
}
this.pendingTools.clear();
await this.checkShutdownRequested();
this.ui.requestRender();
break;
case "agent_settled":
await this.checkShutdownRequested();
break;
case "compaction_start": {
if (this.settingsManager.getShowTerminalProgress()) {
this.ui.terminal.setProgress(true);