aico-cli 0.3.8 → 0.3.9

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.
@@ -13,7 +13,7 @@ import { join as join$1 } from 'node:path';
13
13
  import { join, dirname, basename } from 'pathe';
14
14
  import { fileURLToPath } from 'node:url';
15
15
 
16
- const version = "0.3.8";
16
+ const version = "0.3.9";
17
17
 
18
18
  function displayBanner(subtitle) {
19
19
  const defaultSubtitle = "\u4E00\u952E\u914D\u7F6E\u4F60\u7684\u5F00\u53D1\u73AF\u5883";
package/dist/cli.mjs CHANGED
@@ -222,26 +222,16 @@ async function launchCodeEditor() {
222
222
  return startClaudeCodeEditor();
223
223
  }
224
224
  async function launchCUI() {
225
- const { spawn } = await import('child_process');
226
- const { promisify } = await import('util');
227
- const exec = promisify(require("child_process").exec);
228
225
  try {
229
- console.log("\u6B63\u5728\u5B89\u88C5 pm2...");
230
- await exec("npm install -g pm2");
231
- console.log("pm2 \u5B89\u88C5\u6210\u529F");
232
- console.log("\u6B63\u5728\u5B89\u88C5 aico-cui...");
233
- await exec("npm install -g aico-cui");
234
- console.log("aico-cui \u5B89\u88C5\u6210\u529F");
235
- console.log("\u542F\u52A8 AICO CUI \u53EF\u89C6\u5316\u754C\u9762...");
236
- const cuiProcess = spawn("aico-cui", [], { stdio: "inherit" });
237
- cuiProcess.on("close", (code) => {
238
- console.log(`AICO CUI \u5DF2\u9000\u51FA\uFF0C\u9000\u51FA\u7801: ${code}`);
239
- });
240
- cuiProcess.on("error", (err) => {
241
- console.error("\u542F\u52A8 AICO CUI \u5931\u8D25:", err);
242
- });
226
+ const { run } = await Promise.resolve().then(function () { return runCommand; });
227
+ console.log("\x1B[36m\u6B63\u5728\u5B89\u88C5PM2...\x1B[0m");
228
+ await run("npm install -g pm2");
229
+ console.log("\x1B[36m\u6B63\u5728\u5B89\u88C5AICO\u53EF\u89C6\u5316\u754C\u9762...\x1B[0m");
230
+ await run("npm install -g aico-cui");
231
+ console.log("\x1B[36m\u542F\u52A8AICO\u53EF\u89C6\u5316\u754C\u9762...\x1B[0m");
232
+ await run("aico-cui");
243
233
  } catch (error) {
244
- console.error("\u542F\u52A8\u53EF\u89C6\u5316\u754C\u9762\u5931\u8D25:", error);
234
+ console.error("\x1B[31m\u542F\u52A8\u53EF\u89C6\u5316\u754C\u9762\u5931\u8D25:\x1B[0m", error);
245
235
  throw error;
246
236
  }
247
237
  }
@@ -554,11 +544,10 @@ function customizeHelp(sections) {
554
544
  async function startUI() {
555
545
  try {
556
546
  const { run } = await Promise.resolve().then(function () { return runCommand; });
557
- console.log("\x1B[36m\u6B63\u5728\u5B89\u88C5PM2...\x1B[0m");
547
+ console.log("\x1B[36m\u6B63\u5728\u5B89\u88C5\u667A\u80FD\u8F6F\u4EF6\u661F\u5DE5\u5382\u53EF\u89C6\u5316\u754C\u9762...\x1B[0m");
558
548
  await run("npm install -g pm2");
559
- console.log("\x1B[36m\u6B63\u5728\u5B89\u88C5AICO\u53EF\u89C6\u5316\u754C\u9762...\x1B[0m");
560
549
  await run("npm install -g aico-cui");
561
- console.log("\x1B[36m\u542F\u52A8AICO\u53EF\u89C6\u5316\u754C\u9762...\x1B[0m");
550
+ console.log("\x1B[36m\u542F\u52A8\u667A\u80FD\u8F6F\u4EF6\u661F\u5DE5\u5382\u53EF\u89C6\u5316\u754C\u9762...\x1B[0m");
562
551
  await run("aico-cui");
563
552
  } catch (error) {
564
553
  console.error("\x1B[31m\u542F\u52A8\u53EF\u89C6\u5316\u754C\u9762\u5931\u8D25:\x1B[0m", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aico-cli",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "packageManager": "pnpm@9.15.9",
5
5
  "description": "AI CLI",
6
6
  "repository": {