MCPcopy Create free account
hub / github.com/IAmUnbounded/devctx / handoffCommand

Function handoffCommand

devctx/src/commands/handoff.ts:15–179  ·  view source on GitHub ↗
(
    assignee?: string,
    message?: string
)

Source from the content-addressed store, hash-verified

13import { ContextEntry } from "../core/types";
14
15export async function handoffCommand(
16 assignee?: string,
17 message?: string
18) {
19 if (!(await isInitialized())) {
20 console.log(chalk.red("✗ DevContext not initialized. Run `devctx init` first."));
21 return;
22 }
23
24 try {
25 // Clean up @ prefix if present
26 let targetAssignee = assignee?.replace(/^@/, "") || "";
27 let handoffNote = message || "";
28
29 if (!targetAssignee || !handoffNote) {
30 const answers = await inquirer.prompt([
31 ...(!targetAssignee
32 ? [
33 {
34 type: "input" as const,
35 name: "assignee",
36 message: "Who are you handing off to?",
37 validate: (input: string) =>
38 input.length > 0 || "Assignee is required",
39 },
40 ]
41 : []),
42 ...(!handoffNote
43 ? [
44 {
45 type: "input" as const,
46 name: "handoffNote",
47 message: "Handoff note (what they need to know):",
48 validate: (input: string) =>
49 input.length > 0 || "Handoff note is required",
50 },
51 ]
52 : []),
53 {
54 type: "input",
55 name: "task",
56 message: "What were you working on?",
57 validate: (input: string) =>
58 input.length > 0 || "Task description is required",
59 },
60 {
61 type: "input",
62 name: "currentState",
63 message: "Where did you leave off?",
64 validate: (input: string) =>
65 input.length > 0 || "Current state is required",
66 },
67 {
68 type: "input",
69 name: "nextSteps",
70 message: "What comes next? (comma-separated)",
71 default: "",
72 },

Callers

nothing calls this directly

Calls 8

isInitializedFunction · 0.90
getCurrentBranchFunction · 0.90
getRepoNameFunction · 0.90
getChangedFilesFunction · 0.90
getStagedFilesFunction · 0.90
getRecentCommitsFunction · 0.90
getAuthorFunction · 0.90
saveContextFunction · 0.90

Tested by

no test coverage detected