feat(coding-agent): add fork position and duplicate session option (#3431)

This commit is contained in:
Armin Ronacher
2026-04-20 14:13:34 +02:00
committed by GitHub
parent ebc60aa825
commit 23569e304b
10 changed files with 128 additions and 39 deletions

View File

@@ -143,7 +143,10 @@ export type NewSessionHandler = (options?: {
setup?: (sessionManager: SessionManager) => Promise<void>;
}) => Promise<{ cancelled: boolean }>;
export type ForkHandler = (entryId: string) => Promise<{ cancelled: boolean }>;
export type ForkHandler = (
entryId: string,
options?: { position?: "before" | "at" },
) => Promise<{ cancelled: boolean }>;
export type NavigateTreeHandler = (
targetId: string,
@@ -559,7 +562,7 @@ export class ExtensionRunner {
...this.createContext(),
waitForIdle: () => this.waitForIdleFn(),
newSession: (options) => this.newSessionHandler(options),
fork: (entryId) => this.forkHandler(entryId),
fork: (entryId, options) => this.forkHandler(entryId, options),
navigateTree: (targetId, options) => this.navigateTreeHandler(targetId, options),
switchSession: (sessionPath) => this.switchSessionHandler(sessionPath),
reload: () => this.reloadHandler(),