fix(coding-agent): preserve startup extension UI

closes #5943
This commit is contained in:
Armin Ronacher
2026-06-21 23:17:13 +02:00
parent 542683b29a
commit 2417adb46a
5 changed files with 463 additions and 25 deletions
@@ -2443,7 +2443,7 @@ export class AgentSession {
});
}
async reload(): Promise<void> {
async reload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void> {
const previousFlagValues = this._extensionRunner.getFlagValues();
await emitSessionShutdownEvent(this._extensionRunner, { type: "session_shutdown", reason: "reload" });
await this.settingsManager.reload();
@@ -2462,6 +2462,7 @@ export class AgentSession {
this._extensionShutdownHandler ||
this._extensionErrorListener;
if (hasBindings) {
await options?.beforeSessionStart?.();
await this._extensionRunner.emit({ type: "session_start", reason: "reload" });
await this.extendResourcesFromExtensions("reload");
}