MCPcopy Index your code
hub / github.com/continuedev/continue / handleFork

Function handleFork

extensions/cli/src/slashCommands.ts:57–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57async function handleFork() {
58 try {
59 const currentSession = getCurrentSession();
60 const forkCommand = `cn --fork ${currentSession.sessionId}`;
61 // Try to copy to clipboard dynamically to avoid hard dependency in tests
62 try {
63 const clipboardy = await import("clipboardy");
64 await clipboardy.default.write(forkCommand);
65 return {
66 exit: false,
67 output: chalk.gray(`${forkCommand} (copied to clipboard)`),
68 };
69 } catch {
70 return {
71 exit: false,
72 output: chalk.gray(`${forkCommand}`),
73 };
74 }
75 } catch (error: any) {
76 return {
77 exit: false,
78 output: chalk.red(`Failed to create fork command: ${error.message}`),
79 };
80 }
81}
82
83function handleTitle(args: string[]) {
84 const title = args.join(" ").trim();

Callers

nothing calls this directly

Calls 1

getCurrentSessionFunction · 0.85

Tested by

no test coverage detected