feat(coding-agent): add resume scope toggle

refactor(coding-agent): refine session listing helpers
This commit is contained in:
Thomas Mustier 2026-01-10 20:33:05 +00:00
parent f1e225d9e7
commit e8d91f2bd4
6 changed files with 219 additions and 106 deletions

View file

@ -7,13 +7,17 @@ import type { SessionInfo } from "../core/session-manager.js";
import { SessionSelectorComponent } from "../modes/interactive/components/session-selector.js";
/** Show TUI session selector and return selected session path or null if cancelled */
export async function selectSession(sessions: SessionInfo[]): Promise<string | null> {
export async function selectSession(
currentSessions: SessionInfo[],
allSessions: SessionInfo[],
): Promise<string | null> {
return new Promise((resolve) => {
const ui = new TUI(new ProcessTerminal());
let resolved = false;
const selector = new SessionSelectorComponent(
sessions,
currentSessions,
allSessions,
(path: string) => {
if (!resolved) {
resolved = true;