yuangs 1.2.2 → 1.3.0

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.
Files changed (2) hide show
  1. package/cli.js +16 -16
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -92,22 +92,22 @@ async function handleAICommand() {
92
92
  });
93
93
 
94
94
  const askLoop = () => {
95
- rl.question(chalk.green('你:'), async (q) => {
96
- const trimmed = q.trim();
97
-
98
- // ✨ 新增:优雅退出
99
- if (['exit', 'quit', 'bye'].includes(trimmed.toLowerCase())) {
100
- console.log(chalk.cyan('👋 再见!'));
101
- rl.close();
102
- process.exit(0);
103
- }
104
-
105
- if (!trimmed) {
106
- return askLoop();
107
- }
108
- await askOnce(trimmed, model);
109
- askLoop();
110
- });
95
+ rl.question(chalk.green('你:'), async (q) => {
96
+ const trimmed = q.trim();
97
+
98
+ // ✨ 新增:优雅退出
99
+ if (['exit', 'quit', 'bye'].includes(trimmed.toLowerCase())) {
100
+ console.log(chalk.cyan('👋 再见!'));
101
+ rl.close();
102
+ process.exit(0);
103
+ }
104
+
105
+ if (!trimmed) {
106
+ return askLoop();
107
+ }
108
+ await askOnce(trimmed , model);
109
+ askLoop();
110
+ });
111
111
  return;
112
112
  }
113
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuangs",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "苑广山的个人应用集合 CLI(彩色版)",
5
5
  "main": "index.js",
6
6
  "bin": {