@kesarcloud/omega-plus-cli 2.0.6 → 2.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kesarcloud/omega-plus-cli",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Interactive Omega Plus setup wizard for coding CLI tools.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/constants.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = "2.0.6";
1
+ export const VERSION = "2.0.7";
2
2
  export const DEFAULT_ORIGIN = "https://omega.kesarcloud.in";
3
3
  export const DEFAULT_BASE_URL = `${DEFAULT_ORIGIN}/v1`;
4
4
  export const DEFAULT_ANTHROPIC_BASE_URL = `${DEFAULT_ORIGIN}/v1`;
package/src/wizard.mjs CHANGED
@@ -139,8 +139,8 @@ async function extractApiKeyFromConfig(toolId) {
139
139
  }
140
140
  }
141
141
 
142
- export async function runUpdateFlow(options = {}) {
143
- const rl = createPromptInterface();
142
+ export async function runUpdateFlow(options = {}, externalRl = null) {
143
+ const rl = externalRl || createPromptInterface();
144
144
  try {
145
145
  const allTools = await detectAllTools();
146
146
  const configured = allTools.filter((t) => t.configStatus === "configured" && t.installed);
@@ -200,7 +200,8 @@ export async function runUpdateFlow(options = {}) {
200
200
  console.log("\nYour models have been updated to the latest Omega Plus endpoints.");
201
201
  return result;
202
202
  } finally {
203
- rl.close();
203
+ // Only close if we created our own readline (not shared with caller)
204
+ if (!externalRl) rl.close();
204
205
  }
205
206
  }
206
207
 
@@ -242,7 +243,7 @@ export async function runWizard(options = {}) {
242
243
 
243
244
  // Option 2: Update
244
245
  if (menuChoice === 2) {
245
- return runUpdateFlow(options);
246
+ return runUpdateFlow(options, rl);
246
247
  }
247
248
 
248
249
  // Option 1 or invalid: New Setup (default)