openmagic 0.26.0 → 0.26.1

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/cli.js CHANGED
@@ -1447,7 +1447,7 @@ async function handleLlmChat(params, onChunk, onDone, onError) {
1447
1447
  }
1448
1448
 
1449
1449
  // src/server.ts
1450
- var VERSION = "0.26.0";
1450
+ var VERSION = "0.26.1";
1451
1451
  var __dirname = dirname2(fileURLToPath(import.meta.url));
1452
1452
  function attachOpenMagic(httpServer, roots) {
1453
1453
  function handleRequest(req, res) {
@@ -1981,7 +1981,7 @@ process.on("uncaughtException", (err) => {
1981
1981
  });
1982
1982
  var childProcesses = [];
1983
1983
  var lastDetectedPort = null;
1984
- var VERSION2 = "0.26.0";
1984
+ var VERSION2 = "0.26.1";
1985
1985
  function ask(question) {
1986
1986
  const rl = createInterface({ input: process.stdin, output: process.stdout });
1987
1987
  return new Promise((resolve3) => {
@@ -2312,7 +2312,8 @@ async function offerToStartDevServer(expectedPort) {
2312
2312
  let childExited = false;
2313
2313
  let detectedPort = null;
2314
2314
  function parsePortFromOutput(line) {
2315
- const portMatch = line.match(/https?:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)/);
2315
+ const clean = line.replace(/\x1b\[[0-9;]*m/g, "").replace(/\u001b\[[0-9;]*m/g, "");
2316
+ const portMatch = clean.match(/https?:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)/);
2316
2317
  if (portMatch && !detectedPort) {
2317
2318
  const p = parseInt(portMatch[1], 10);
2318
2319
  if (p > 0 && p < 65536 && p !== port) {