{"record":{"id":"26b6c7f8816d9aa5","repo":"upstash/context7","slug":"cancelled","errorCode":null,"errorMessage":"Cancelled","messagePattern":"Cancelled","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/cli/src/commands/skill.ts","lineNumber":755,"sourceCode":"    return;\n  }\n\n  log.blank();\n\n  for (const { label, displayPath, skills } of results) {\n    log.plain(`${pc.bold(label)} ${pc.dim(displayPath)}`);\n    for (const skill of skills) {\n      log.plain(`  ${pc.green(skill)}`);\n    }\n    log.blank();\n  }\n}\n\nasync function removeCommand(name: string, options: RemoveOptions): Promise<void> {\n  trackEvent(\"command\", { name: \"remove\" });\n  const target = await promptForSingleTarget(options);\n  if (!target) {\n    log.warn(\"Cancelled\");\n    return;\n  }\n\n  const skillsDir = getTargetDirFromSelection(target.ide, target.scope);\n  let skillPath: string;\n  try {\n    skillPath = assertSkillNameInRoot(skillsDir, name);\n  } catch {\n    log.error(`Invalid skill name: ${name}`);\n    return;\n  }\n\n  try {\n    await rm(skillPath, { recursive: true });\n    log.success(`Removed skill: ${name}`);\n  } catch (err) {\n    const error = err as NodeJS.ErrnoException;\n    if (error.code === \"ENOENT\") {","sourceCodeStart":737,"sourceCodeEnd":773,"githubUrl":"https://github.com/upstash/context7/blob/4416fb855b8f752be735e34f943b5d0762701aad/packages/cli/src/commands/skill.ts#L737-L773","documentation":"In `ctx7 skill remove <name>`, promptForSingleTarget asks the user which IDE/scope to remove the skill from. If the user aborts the prompt (Ctrl-C, Esc, or selecting cancel), the command prints this warning and returns without modifying anything. It is an intentional user-cancel exit, not a failure.","triggerScenarios":"Running `ctx7 skill remove <name>` and aborting the interactive target-selection prompt (promptForSingleTarget returns null/undefined because the user cancelled).","commonSituations":"User changes their mind mid-prompt; presses Ctrl-C/Ctrl-D or Esc in the interactive selector; running in a non-interactive terminal where the prompt cannot be answered.","solutions":["Re-run the command and complete the target selection prompt","Pass the target explicitly via --ide/--scope flags to skip the interactive prompt","Run in an interactive TTY so prompts can be answered"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Skip interactive prompt by resolving target first\nconst isTTY = process.stdout.isTTY;\nif (!isTTY) console.log('Non-interactive shell: pass --ide <ide> --scope <scope> to skip prompts');","typeGuard":"const target = await promptForSingleTarget(options);\nif (!target) return; // treat as user-cancel, not error\nif (typeof target?.ide !== 'string') return;","tryCatchPattern":null,"preventionTips":["Pass explicit --ide/--scope flags to avoid interactive prompts in scripts/CI","Don't Ctrl-C through prompts; use the cancel option so intent is clear","Run commands from an interactive TTY"],"tags":["cli","user-cancel","interactive-prompt"],"backgroundTag":"user-cancelled-operation","analyzedSha":"4416fb855b8f752be735e34f943b5d0762701aad","analyzedAt":"2026-09-16T20:28:07.148Z","contentChangedAt":"2026-09-16T20:28:07.148Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}