Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle
This commit is contained in:
@@ -898,11 +898,7 @@ export class CommandController {
|
||||
}
|
||||
|
||||
async #runNewSessionFlow(options?: NewSessionOptions, label: string = "New session started"): Promise<void> {
|
||||
if (this.ctx.loadingAnimation) {
|
||||
this.ctx.loadingAnimation.stop();
|
||||
this.ctx.loadingAnimation = undefined;
|
||||
}
|
||||
this.ctx.statusContainer.clear();
|
||||
this.ctx.clearTransientSessionUi();
|
||||
|
||||
if (this.ctx.session.isCompacting) {
|
||||
this.ctx.session.abortCompaction();
|
||||
@@ -916,14 +912,9 @@ export class CommandController {
|
||||
|
||||
this.ctx.statusLine.invalidate();
|
||||
this.ctx.statusLine.resetActiveTime();
|
||||
this.ctx.ui.requestRender();
|
||||
this.ctx.updateEditorBorderColor();
|
||||
this.ctx.chatContainer.clear();
|
||||
this.ctx.pendingMessagesContainer.clear();
|
||||
this.ctx.compactionQueuedMessages = [];
|
||||
this.ctx.streamingComponent = undefined;
|
||||
this.ctx.streamingMessage = undefined;
|
||||
this.ctx.pendingTools.clear();
|
||||
this.ctx.clearTransientSessionUi();
|
||||
this.ctx.resetTranscript();
|
||||
|
||||
this.ctx.present([new Spacer(1), new Text(`${theme.fg("accent", `${theme.status.success} ${label}`)}`, 1, 1)]);
|
||||
await this.ctx.reloadTodos();
|
||||
@@ -963,7 +954,7 @@ export class CommandController {
|
||||
this.ctx.loadingAnimation.stop();
|
||||
this.ctx.loadingAnimation = undefined;
|
||||
}
|
||||
this.ctx.statusContainer.clear();
|
||||
this.ctx.statusContainer.disposeChildren();
|
||||
|
||||
const success = await this.ctx.session.fork();
|
||||
if (!success) {
|
||||
@@ -1226,7 +1217,7 @@ export class CommandController {
|
||||
this.ctx.loadingAnimation.stop();
|
||||
this.ctx.loadingAnimation = undefined;
|
||||
}
|
||||
this.ctx.statusContainer.clear();
|
||||
this.ctx.statusContainer.disposeChildren();
|
||||
|
||||
const label = isAuto ? "Auto-compacting context... (esc to cancel)" : "Compacting context... (esc to cancel)";
|
||||
const compactingLoader = new Loader(
|
||||
@@ -1256,7 +1247,7 @@ export class CommandController {
|
||||
await this.ctx.session.compact(instructions, options);
|
||||
|
||||
compactingLoader.stop();
|
||||
this.ctx.statusContainer.clear();
|
||||
this.ctx.statusContainer.disposeChildren();
|
||||
this.ctx.rebuildChatFromMessages();
|
||||
|
||||
this.ctx.statusLine.invalidate();
|
||||
@@ -1272,7 +1263,7 @@ export class CommandController {
|
||||
}
|
||||
} finally {
|
||||
compactingLoader.stop();
|
||||
this.ctx.statusContainer.clear();
|
||||
this.ctx.statusContainer.disposeChildren();
|
||||
}
|
||||
// Run the caller's pre-flush hook (e.g. the plan-approval model transition)
|
||||
// before queued user input is dispatched, so any turn queued during
|
||||
@@ -1301,7 +1292,7 @@ export class CommandController {
|
||||
this.ctx.loadingAnimation.stop();
|
||||
this.ctx.loadingAnimation = undefined;
|
||||
}
|
||||
this.ctx.statusContainer.clear();
|
||||
this.ctx.statusContainer.disposeChildren();
|
||||
|
||||
const handoffLoader = new Loader(
|
||||
this.ctx.ui,
|
||||
@@ -1322,11 +1313,10 @@ export class CommandController {
|
||||
return;
|
||||
}
|
||||
|
||||
// Rebuild chat from the new session (which now contains the handoff document)
|
||||
this.ctx.rebuildChatFromMessages();
|
||||
|
||||
// Rebuild chat from the new session (which now contains the handoff document).
|
||||
this.ctx.clearTransientSessionUi();
|
||||
this.ctx.renderInitialMessages();
|
||||
this.ctx.statusLine.invalidate();
|
||||
this.ctx.ui.requestRender();
|
||||
this.ctx.updateEditorBorderColor();
|
||||
await this.ctx.reloadTodos();
|
||||
|
||||
@@ -1346,9 +1336,9 @@ export class CommandController {
|
||||
}
|
||||
} finally {
|
||||
handoffLoader.stop();
|
||||
this.ctx.statusContainer.clear();
|
||||
this.ctx.statusContainer.disposeChildren();
|
||||
}
|
||||
this.ctx.ui.requestRender();
|
||||
this.ctx.ui.requestRender(true, { clearScrollback: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user