feat(coding-agent): added /fork command to duplicate current session
Creates a new session file with the exact same state as the current session, including all entries (messages, model changes, compactions, etc.) and artifacts. The new session's parentSession field links to the original. - Added fork() method to SessionManager that creates new session file with copied entries - Added fork() method to AgentSession that handles artifact directory copying - Added /fork command handler in input-controller and command-controller - Extended session switch event reason type to include 'fork'
This commit is contained in:
@@ -269,6 +269,11 @@ export class InputController {
|
||||
await this.ctx.handleClearCommand();
|
||||
return;
|
||||
}
|
||||
if (text === "/fork") {
|
||||
this.ctx.editor.setText("");
|
||||
await this.ctx.handleForkCommand();
|
||||
return;
|
||||
}
|
||||
if (text === "/compact" || text.startsWith("/compact ")) {
|
||||
const customInstructions = text.startsWith("/compact ") ? text.slice(9).trim() : undefined;
|
||||
this.ctx.editor.setText("");
|
||||
|
||||
Reference in New Issue
Block a user