Skip to content

Commit 86afffe

Browse files
authored
fix fork menu allowing user to double select an entry (#6430)
in cases where forking a session was not immediate due to extensions slowing down teardown, it's possible for the user to select the message to fork more than once and then create multiple session forks. in this fix we close the forking menu before starting the fork process to not allow such behavior. fixes #6321
1 parent dd1c690 commit 86afffe

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

packages/coding-agent/src/modes/interactive/interactive-mode.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4493,19 +4493,17 @@ export class InteractiveMode {
44934493
const selector = new UserMessageSelectorComponent(
44944494
userMessages.map((m) => ({ id: m.entryId, text: m.text })),
44954495
async (entryId) => {
4496+
done();
44964497
try {
44974498
const result = await this.runtimeHost.fork(entryId);
44984499
if (result.cancelled) {
4499-
done();
45004500
this.ui.requestRender();
45014501
return;
45024502
}
45034503

45044504
this.editor.setText(result.selectedText ?? "");
4505-
done();
45064505
this.showStatus("Forked to new session");
45074506
} catch (error: unknown) {
4508-
done();
45094507
this.showError(error instanceof Error ? error.message : String(error));
45104508
}
45114509
},

0 commit comments

Comments
 (0)