(options: {
readonly applyStartupModes: boolean;
readonly closeOnCancel: boolean;
readonly forwardEditorExit: boolean;
})
| 2682 | } |
| 2683 | |
| 2684 | private async openSessionPicker(options: { |
| 2685 | readonly applyStartupModes: boolean; |
| 2686 | readonly closeOnCancel: boolean; |
| 2687 | readonly forwardEditorExit: boolean; |
| 2688 | }): Promise<void> { |
| 2689 | this.sessionPickerOptions = options; |
| 2690 | await this.fetchSessions('cwd'); |
| 2691 | this.mountSessionPicker({ |
| 2692 | applyStartupModes: options.applyStartupModes, |
| 2693 | onCancel: () => { |
| 2694 | this.hideSessionPicker(); |
| 2695 | if (options.closeOnCancel) void this.stop(); |
| 2696 | }, |
| 2697 | onCtrlC: options.forwardEditorExit |
| 2698 | ? () => { |
| 2699 | this.state.editor.onCtrlC?.(); |
| 2700 | } |
| 2701 | : undefined, |
| 2702 | onCtrlD: options.forwardEditorExit |
| 2703 | ? () => { |
| 2704 | this.state.editor.onCtrlD?.(); |
| 2705 | } |
| 2706 | : undefined, |
| 2707 | }); |
| 2708 | } |
| 2709 | |
| 2710 | private async toggleSessionPickerScope(selectedSessionId: string): Promise<void> { |
| 2711 | const requestToken = ++this.sessionPickerScopeRequestToken; |
no test coverage detected