@cannbot-ai/install-helper 1.1.6-beta.10 → 1.1.6-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5008,6 +5008,8 @@ init_manifest();
5008
5008
  init_theme();
5009
5009
  init_wizard();
5010
5010
  async function uninstallCommand(names, options) {
5011
+ const userSpecifiedTool = !!options.tool;
5012
+ const userSpecifiedLevel = !!options.level;
5011
5013
  const tool = options.tool ? validateTool(options.tool) : "opencode";
5012
5014
  const level = options.level ? validateLevel(options.level) : "project";
5013
5015
  if (options.all) {
@@ -5019,7 +5021,7 @@ async function uninstallCommand(names, options) {
5019
5021
  return;
5020
5022
  }
5021
5023
  if (names.length === 0) {
5022
- await uninstallInteractive(tool, level);
5024
+ await uninstallInteractive(tool, level, userSpecifiedTool, userSpecifiedLevel);
5023
5025
  return;
5024
5026
  }
5025
5027
  const plugins = [];
@@ -5111,7 +5113,7 @@ async function uninstallRecent(tool, level, yes) {
5111
5113
  logger.success(t("skill_uninstall_done"));
5112
5114
  logger.blank();
5113
5115
  }
5114
- async function uninstallInteractive(defaultTool, defaultLevel) {
5116
+ async function uninstallInteractive(defaultTool, defaultLevel, userSpecifiedTool, userSpecifiedLevel) {
5115
5117
  let tool = defaultTool;
5116
5118
  let level = defaultLevel;
5117
5119
  const allInstalledPlugins = scanInstalled();
@@ -5171,7 +5173,7 @@ async function uninstallInteractive(defaultTool, defaultLevel) {
5171
5173
  }
5172
5174
  if (toolsWithContent.size === 1) {
5173
5175
  tool = [...toolsWithContent][0];
5174
- } else if (toolsWithContent.has(defaultTool)) {
5176
+ } else if (userSpecifiedTool && toolsWithContent.has(defaultTool)) {
5175
5177
  tool = defaultTool;
5176
5178
  } else {
5177
5179
  const detected = await selectToolWithDetection();
@@ -5190,7 +5192,7 @@ async function uninstallInteractive(defaultTool, defaultLevel) {
5190
5192
  }
5191
5193
  if (levelsWithContent.size === 1) {
5192
5194
  level = [...levelsWithContent][0];
5193
- } else if (levelsWithContent.has(defaultLevel)) {
5195
+ } else if (userSpecifiedLevel && levelsWithContent.has(defaultLevel)) {
5194
5196
  level = defaultLevel;
5195
5197
  } else {
5196
5198
  const { stepLevel: stepLevel2 } = await Promise.resolve().then(() => (init_wizard(), wizard_exports));