feat(coding-agent): add --fork session flag closes #2290

This commit is contained in:
Mario Zechner
2026-03-18 01:09:23 +01:00
parent fa877de1fb
commit 1a9185d3cb
4 changed files with 58 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ export interface Args {
mode?: Mode;
noSession?: boolean;
session?: string;
fork?: string;
sessionDir?: string;
models?: string[];
tools?: ToolName[];
@@ -89,6 +90,8 @@ export function parseArgs(args: string[], extensionFlags?: Map<string, { type: "
result.noSession = true;
} else if (arg === "--session" && i + 1 < args.length) {
result.session = args[++i];
} else if (arg === "--fork" && i + 1 < args.length) {
result.fork = args[++i];
} else if (arg === "--session-dir" && i + 1 < args.length) {
result.sessionDir = args[++i];
} else if (arg === "--models" && i + 1 < args.length) {
@@ -202,6 +205,7 @@ ${chalk.bold("Options:")}
--continue, -c Continue previous session
--resume, -r Select a session to resume
--session <path> Use specific session file
--fork <path> Fork specific session file or partial UUID into a new session
--session-dir <dir> Directory for session storage and lookup
--no-session Don't save session (ephemeral)
--models <patterns> Comma-separated model patterns for Ctrl+P cycling