update change cli
This commit is contained in:
		| @@ -41,23 +41,23 @@ | ||||
|     } | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@kevisual/ai-center": "^0.0.3", | ||||
|     "@kevisual/ai-center": "^0.0.4", | ||||
|     "@kevisual/load": "^0.0.6", | ||||
|     "@kevisual/local-app-manager": "^0.1.18", | ||||
|     "@kevisual/logger": "^0.0.3", | ||||
|     "@kevisual/local-app-manager": "^0.1.20", | ||||
|     "@kevisual/logger": "^0.0.4", | ||||
|     "@kevisual/query": "0.0.18", | ||||
|     "@kevisual/query-login": "0.0.5", | ||||
|     "@kevisual/router": "^0.0.20", | ||||
|     "@kevisual/query-login": "0.0.6", | ||||
|     "@kevisual/router": "^0.0.21", | ||||
|     "@kevisual/task-command": "^0.0.7", | ||||
|     "@kevisual/types": "^0.0.10", | ||||
|     "@kevisual/use-config": "^1.0.17", | ||||
|     "@types/bun": "^1.2.13", | ||||
|     "@types/bun": "^1.2.14", | ||||
|     "@types/lodash-es": "^4.17.12", | ||||
|     "@types/node": "^22.15.18", | ||||
|     "@types/node": "^22.15.21", | ||||
|     "@types/send": "^0.17.4", | ||||
|     "@types/ws": "^8.18.1", | ||||
|     "chalk": "^5.4.1", | ||||
|     "commander": "^13.1.0", | ||||
|     "commander": "^14.0.0", | ||||
|     "cross-env": "^7.0.3", | ||||
|     "dayjs": "^1.11.13", | ||||
|     "dotenv": "^16.5.0", | ||||
|   | ||||
							
								
								
									
										420
									
								
								assistant/pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										420
									
								
								assistant/pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @@ -16,26 +16,26 @@ importers: | ||||
|         version: 6.0.6(supports-color@10.0.0) | ||||
|     devDependencies: | ||||
|       '@kevisual/ai-center': | ||||
|         specifier: ^0.0.3 | ||||
|         version: 0.0.3 | ||||
|         specifier: ^0.0.4 | ||||
|         version: 0.0.4 | ||||
|       '@kevisual/load': | ||||
|         specifier: ^0.0.6 | ||||
|         version: 0.0.6 | ||||
|       '@kevisual/local-app-manager': | ||||
|         specifier: ^0.1.18 | ||||
|         version: 0.1.18(@kevisual/router@0.0.20)(@kevisual/types@0.0.10)(@kevisual/use-config@1.0.17(dotenv@16.5.0))(pm2@6.0.6(supports-color@10.0.0)) | ||||
|         specifier: ^0.1.20 | ||||
|         version: 0.1.20(supports-color@10.0.0) | ||||
|       '@kevisual/logger': | ||||
|         specifier: ^0.0.3 | ||||
|         version: 0.0.3 | ||||
|         specifier: ^0.0.4 | ||||
|         version: 0.0.4 | ||||
|       '@kevisual/query': | ||||
|         specifier: 0.0.18 | ||||
|         version: 0.0.18(@kevisual/ws@8.0.0) | ||||
|       '@kevisual/query-login': | ||||
|         specifier: 0.0.5 | ||||
|         version: 0.0.5(@kevisual/query@0.0.18(@kevisual/ws@8.0.0))(rollup@4.40.0)(tslib@2.8.1)(typescript@5.8.3) | ||||
|         specifier: 0.0.6 | ||||
|         version: 0.0.6(@kevisual/query@0.0.18(@kevisual/ws@8.0.0))(rollup@4.40.0)(tslib@2.8.1)(typescript@5.8.3) | ||||
|       '@kevisual/router': | ||||
|         specifier: ^0.0.20 | ||||
|         version: 0.0.20 | ||||
|         specifier: ^0.0.21 | ||||
|         version: 0.0.21 | ||||
|       '@kevisual/task-command': | ||||
|         specifier: ^0.0.7 | ||||
|         version: 0.0.7 | ||||
| @@ -46,14 +46,14 @@ importers: | ||||
|         specifier: ^1.0.17 | ||||
|         version: 1.0.17(dotenv@16.5.0) | ||||
|       '@types/bun': | ||||
|         specifier: ^1.2.13 | ||||
|         version: 1.2.13 | ||||
|         specifier: ^1.2.14 | ||||
|         version: 1.2.14 | ||||
|       '@types/lodash-es': | ||||
|         specifier: ^4.17.12 | ||||
|         version: 4.17.12 | ||||
|       '@types/node': | ||||
|         specifier: ^22.15.18 | ||||
|         version: 22.15.18 | ||||
|         specifier: ^22.15.21 | ||||
|         version: 22.15.21 | ||||
|       '@types/send': | ||||
|         specifier: ^0.17.4 | ||||
|         version: 0.17.4 | ||||
| @@ -64,8 +64,8 @@ importers: | ||||
|         specifier: ^5.4.1 | ||||
|         version: 5.4.1 | ||||
|       commander: | ||||
|         specifier: ^13.1.0 | ||||
|         version: 13.1.0 | ||||
|         specifier: ^14.0.0 | ||||
|         version: 14.0.0 | ||||
|       cross-env: | ||||
|         specifier: ^7.0.3 | ||||
|         version: 7.0.3 | ||||
| @@ -80,7 +80,7 @@ importers: | ||||
|         version: 7.1.0 | ||||
|       inquirer: | ||||
|         specifier: ^12.6.1 | ||||
|         version: 12.6.1(@types/node@22.15.18) | ||||
|         version: 12.6.1(@types/node@22.15.21) | ||||
|       lodash-es: | ||||
|         specifier: ^4.17.21 | ||||
|         version: 4.17.21 | ||||
| @@ -101,7 +101,7 @@ importers: | ||||
|     dependencies: | ||||
|       pm2: | ||||
|         specifier: ^6.0.5 | ||||
|         version: 6.0.6 | ||||
|         version: 6.0.6(supports-color@10.0.0) | ||||
|     devDependencies: | ||||
|       '@kevisual/assistant-cli': | ||||
|         specifier: workspace:* | ||||
| @@ -126,7 +126,7 @@ importers: | ||||
|         version: 16.5.0 | ||||
|       inquirer: | ||||
|         specifier: ^12.6.0 | ||||
|         version: 12.6.1(@types/node@22.15.18) | ||||
|         version: 12.6.1(@types/node@22.15.21) | ||||
|       lodash-es: | ||||
|         specifier: ^4.17.21 | ||||
|         version: 4.17.21 | ||||
| @@ -268,8 +268,8 @@ packages: | ||||
|   '@jridgewell/sourcemap-codec@1.5.0': | ||||
|     resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} | ||||
|  | ||||
|   '@kevisual/ai-center@0.0.3': | ||||
|     resolution: {integrity: sha512-GYY8PyOxh8G9VYkm5rBCmOabrdIdN5b5kyx15OaX0fZEi1rG5bzDTL4BTqx5KhurG01HHbXiq32BbCv4ZaSMVA==} | ||||
|   '@kevisual/ai-center@0.0.4': | ||||
|     resolution: {integrity: sha512-pZw8sH7G0JjknHBHERV71INvmgyDS2JWyI2kb1a9FFHfRKg4TCv+RJIE505vKoAPjUd6+h6FHVHXvPXBdeTdxg==} | ||||
|  | ||||
|   '@kevisual/cache@0.0.2': | ||||
|     resolution: {integrity: sha512-2Cl5KF2Gi27uLfhO6CdTMFnRzx9vYnqevAo7d9ab3rOaqTgF8tLeAXglXyRbaWW3WUbHU2XaOb4r98uUsqIQQw==} | ||||
| @@ -277,27 +277,25 @@ packages: | ||||
|   '@kevisual/load@0.0.6': | ||||
|     resolution: {integrity: sha512-+3YTFehRcZ1haGel5DKYMUwmi5i6f2psyaPZlfkKU/cOXgkpwoG9/BEqPCnPjicKqqnksEpixVRkyHJ+5bjLVA==} | ||||
|  | ||||
|   '@kevisual/local-app-manager@0.1.18': | ||||
|     resolution: {integrity: sha512-uJbob3/iaqzPWTNMZ2VjOlSTIZNEmN3MXdqtXwR+BAMIMQdsBllueZNGWlqnUyOXdHk09Y8dQU38u7QGsIYkeA==} | ||||
|     peerDependencies: | ||||
|       '@kevisual/router': ^0.0.6 | ||||
|       '@kevisual/types': ^0.0.1 | ||||
|       '@kevisual/use-config': ^1.0.11 | ||||
|       pm2: ^5.4.3 | ||||
|   '@kevisual/local-app-manager@0.1.20': | ||||
|     resolution: {integrity: sha512-PQf1wL9vQazTYvxhTqnhno3ZYccFGmgjkPEqKUY9IUpc2vP7srX73TGn/3e7S5dysO1urzgif4dciGe0yPbxAg==} | ||||
|  | ||||
|   '@kevisual/logger@0.0.3': | ||||
|     resolution: {integrity: sha512-8emqxg+ab62WAK6VY4FQqetXPSSVKFAjGctD1NDbdnxt7YWuI/PyuDltCpsVz+uvWpV1dO5OKZOoHU7ow59Omw==} | ||||
|  | ||||
|   '@kevisual/query-login@0.0.5': | ||||
|     resolution: {integrity: sha512-389cMMWAisjQoafxX+cUEa2z41S5koDjiyHkucfCkhRoP4M6g0iqbBMavLKmLOWSKx3R8e3ZmXT6RfsYGBb8Ww==} | ||||
|   '@kevisual/logger@0.0.4': | ||||
|     resolution: {integrity: sha512-+fpr92eokSxoGOW1SIRl/27lPuO+zyY+feR5o2Q4YCNlAdt2x64NwC/w8r/3NEC5QenLgd4K0azyKTI2mHbARw==} | ||||
|  | ||||
|   '@kevisual/query-login@0.0.6': | ||||
|     resolution: {integrity: sha512-ZdX+sxeQaM3PV9fZXofMlxFz1RmpYIkoi47exzUgw6DADjEryBAQKRXe2/oL20NsBTV8owqaagRqffAVjq5c5g==} | ||||
|     peerDependencies: | ||||
|       '@kevisual/query': ^0.0.17 | ||||
|  | ||||
|   '@kevisual/query@0.0.18': | ||||
|     resolution: {integrity: sha512-I2vHTu0I6AyD9PJyr+vxyp9jIJ6rd2EZqLVHTv/+zrVKVc2SS76Tg7aGNkmAFqqLSCB8kLLsmMGtSJU1Qb8VVg==} | ||||
|  | ||||
|   '@kevisual/router@0.0.20': | ||||
|     resolution: {integrity: sha512-uSwDYWh+kvAu6i0m0SJVgcLR/CYz7WvIWGz0nSF8Vg6smJuAgI+laHR4ESO8Fbz+Xn8bPHuSwmM//HHLMLx2FA==} | ||||
|   '@kevisual/router@0.0.21': | ||||
|     resolution: {integrity: sha512-XKTxbNO924cT18UOAGplWErZ+hMze8Y53F2jYCk18v4jsdsvjRho5uXXjJb6HSVsuITMtQR4R3rG0IcM3jkDKQ==} | ||||
|  | ||||
|   '@kevisual/task-command@0.0.7': | ||||
|     resolution: {integrity: sha512-2vkKJVgjCQEeewKeCU7+U5K4mU6by2rWTDEsUrCbZ6K0fgg4QpfvrtXK1YGVNbywKIXuT95ol7QQS+gMN7hgcA==} | ||||
| @@ -471,8 +469,8 @@ packages: | ||||
|   '@tootallnate/quickjs-emscripten@0.23.0': | ||||
|     resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} | ||||
|  | ||||
|   '@types/bun@1.2.13': | ||||
|     resolution: {integrity: sha512-u6vXep/i9VBxoJl3GjZsl/BFIsvML8DfVDO0RYLEwtSZSp981kEO1V5NwRcO1CPJ7AmvpbnDCiMKo3JvbDEjAg==} | ||||
|   '@types/bun@1.2.14': | ||||
|     resolution: {integrity: sha512-VsFZKs8oKHzI7zwvECiAJ5oSorWndIWEVhfbYqZd4HI/45kzW7PN2Rr5biAzvGvRuNmYLSANY+H59ubHq8xw7Q==} | ||||
|  | ||||
|   '@types/estree@1.0.7': | ||||
|     resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} | ||||
| @@ -495,8 +493,8 @@ packages: | ||||
|   '@types/node@18.19.87': | ||||
|     resolution: {integrity: sha512-OIAAu6ypnVZHmsHCeJ+7CCSub38QNBS9uceMQeg7K5Ur0Jr+wG9wEOEvvMbhp09pxD5czIUy/jND7s7Tb6Nw7A==} | ||||
|  | ||||
|   '@types/node@22.15.18': | ||||
|     resolution: {integrity: sha512-v1DKRfUdyW+jJhZNEI1PYy29S2YRxMV5AOO/x/SjKmW0acCIOqmbj6Haf9eHAhsPmrhlHSxEhv/1WszcLWV4cg==} | ||||
|   '@types/node@22.15.21': | ||||
|     resolution: {integrity: sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==} | ||||
|  | ||||
|   '@types/resolve@1.20.2': | ||||
|     resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} | ||||
| @@ -588,8 +586,8 @@ packages: | ||||
|   buffer-from@1.1.2: | ||||
|     resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} | ||||
|  | ||||
|   bun-types@1.2.13: | ||||
|     resolution: {integrity: sha512-rRjA1T6n7wto4gxhAO/ErZEtOXyEZEmnIHQfl0Dt1QQSB4QV0iP6BZ9/YB5fZaHFQ2dwHFrmPaRQ9GGMX01k9Q==} | ||||
|   bun-types@1.2.14: | ||||
|     resolution: {integrity: sha512-Kuh4Ub28ucMRWeiUUWMHsT9Wcbr4H3kLIO72RZZElSDxSu7vpetRvxIUDUaW6QtaIeixIpm7OXtNnZPf82EzwA==} | ||||
|  | ||||
|   call-bind-apply-helpers@1.0.2: | ||||
|     resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} | ||||
| @@ -636,6 +634,10 @@ packages: | ||||
|     resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} | ||||
|     engines: {node: '>=18'} | ||||
|  | ||||
|   commander@14.0.0: | ||||
|     resolution: {integrity: sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==} | ||||
|     engines: {node: '>=20'} | ||||
|  | ||||
|   commander@2.15.1: | ||||
|     resolution: {integrity: sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==} | ||||
|  | ||||
| @@ -1417,27 +1419,27 @@ snapshots: | ||||
|   '@babel/helper-validator-identifier@7.25.9': | ||||
|     optional: true | ||||
|  | ||||
|   '@inquirer/checkbox@4.1.6(@types/node@22.15.18)': | ||||
|   '@inquirer/checkbox@4.1.6(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/figures': 1.0.11 | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       ansi-escapes: 4.3.2 | ||||
|       yoctocolors-cjs: 2.1.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/confirm@5.1.10(@types/node@22.15.18)': | ||||
|   '@inquirer/confirm@5.1.10(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/core@10.1.11(@types/node@22.15.18)': | ||||
|   '@inquirer/core@10.1.11(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/figures': 1.0.11 | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       ansi-escapes: 4.3.2 | ||||
|       cli-width: 4.1.0 | ||||
|       mute-stream: 2.0.0 | ||||
| @@ -1445,97 +1447,99 @@ snapshots: | ||||
|       wrap-ansi: 6.2.0 | ||||
|       yoctocolors-cjs: 2.1.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/editor@4.2.11(@types/node@22.15.18)': | ||||
|   '@inquirer/editor@4.2.11(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       external-editor: 3.1.0 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/expand@4.0.13(@types/node@22.15.18)': | ||||
|   '@inquirer/expand@4.0.13(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       yoctocolors-cjs: 2.1.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/figures@1.0.11': {} | ||||
|  | ||||
|   '@inquirer/input@4.1.10(@types/node@22.15.18)': | ||||
|   '@inquirer/input@4.1.10(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/number@3.0.13(@types/node@22.15.18)': | ||||
|   '@inquirer/number@3.0.13(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/password@4.0.13(@types/node@22.15.18)': | ||||
|   '@inquirer/password@4.0.13(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       ansi-escapes: 4.3.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/prompts@7.5.1(@types/node@22.15.18)': | ||||
|   '@inquirer/prompts@7.5.1(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/checkbox': 4.1.6(@types/node@22.15.18) | ||||
|       '@inquirer/confirm': 5.1.10(@types/node@22.15.18) | ||||
|       '@inquirer/editor': 4.2.11(@types/node@22.15.18) | ||||
|       '@inquirer/expand': 4.0.13(@types/node@22.15.18) | ||||
|       '@inquirer/input': 4.1.10(@types/node@22.15.18) | ||||
|       '@inquirer/number': 3.0.13(@types/node@22.15.18) | ||||
|       '@inquirer/password': 4.0.13(@types/node@22.15.18) | ||||
|       '@inquirer/rawlist': 4.1.1(@types/node@22.15.18) | ||||
|       '@inquirer/search': 3.0.13(@types/node@22.15.18) | ||||
|       '@inquirer/select': 4.2.1(@types/node@22.15.18) | ||||
|       '@inquirer/checkbox': 4.1.6(@types/node@22.15.21) | ||||
|       '@inquirer/confirm': 5.1.10(@types/node@22.15.21) | ||||
|       '@inquirer/editor': 4.2.11(@types/node@22.15.21) | ||||
|       '@inquirer/expand': 4.0.13(@types/node@22.15.21) | ||||
|       '@inquirer/input': 4.1.10(@types/node@22.15.21) | ||||
|       '@inquirer/number': 3.0.13(@types/node@22.15.21) | ||||
|       '@inquirer/password': 4.0.13(@types/node@22.15.21) | ||||
|       '@inquirer/rawlist': 4.1.1(@types/node@22.15.21) | ||||
|       '@inquirer/search': 3.0.13(@types/node@22.15.21) | ||||
|       '@inquirer/select': 4.2.1(@types/node@22.15.21) | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/rawlist@4.1.1(@types/node@22.15.18)': | ||||
|   '@inquirer/rawlist@4.1.1(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       yoctocolors-cjs: 2.1.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/search@3.0.13(@types/node@22.15.18)': | ||||
|   '@inquirer/search@3.0.13(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/figures': 1.0.11 | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       yoctocolors-cjs: 2.1.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/select@4.2.1(@types/node@22.15.18)': | ||||
|   '@inquirer/select@4.2.1(@types/node@22.15.21)': | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/figures': 1.0.11 | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       ansi-escapes: 4.3.2 | ||||
|       yoctocolors-cjs: 2.1.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@inquirer/type@3.0.6(@types/node@22.15.18)': | ||||
|   '@inquirer/type@3.0.6(@types/node@22.15.21)': | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@jridgewell/sourcemap-codec@1.5.0': {} | ||||
|  | ||||
|   '@kevisual/ai-center@0.0.3': {} | ||||
|   '@kevisual/ai-center@0.0.4': | ||||
|     dependencies: | ||||
|       '@kevisual/logger': 0.0.3 | ||||
|  | ||||
|   '@kevisual/cache@0.0.2(rollup@4.40.0)(tslib@2.8.1)(typescript@5.8.3)': | ||||
|     dependencies: | ||||
| @@ -1553,16 +1557,19 @@ snapshots: | ||||
|     dependencies: | ||||
|       eventemitter3: 5.0.1 | ||||
|  | ||||
|   '@kevisual/local-app-manager@0.1.18(@kevisual/router@0.0.20)(@kevisual/types@0.0.10)(@kevisual/use-config@1.0.17(dotenv@16.5.0))(pm2@6.0.6(supports-color@10.0.0))': | ||||
|   '@kevisual/local-app-manager@0.1.20(supports-color@10.0.0)': | ||||
|     dependencies: | ||||
|       '@kevisual/router': 0.0.20 | ||||
|       '@kevisual/types': 0.0.10 | ||||
|       '@kevisual/use-config': 1.0.17(dotenv@16.5.0) | ||||
|       pm2: 6.0.6(supports-color@10.0.0) | ||||
|     transitivePeerDependencies: | ||||
|       - bufferutil | ||||
|       - supports-color | ||||
|       - utf-8-validate | ||||
|  | ||||
|   '@kevisual/logger@0.0.3': {} | ||||
|  | ||||
|   '@kevisual/query-login@0.0.5(@kevisual/query@0.0.18(@kevisual/ws@8.0.0))(rollup@4.40.0)(tslib@2.8.1)(typescript@5.8.3)': | ||||
|   '@kevisual/logger@0.0.4': {} | ||||
|  | ||||
|   '@kevisual/query-login@0.0.6(@kevisual/query@0.0.18(@kevisual/ws@8.0.0))(rollup@4.40.0)(tslib@2.8.1)(typescript@5.8.3)': | ||||
|     dependencies: | ||||
|       '@kevisual/cache': 0.0.2(rollup@4.40.0)(tslib@2.8.1)(typescript@5.8.3) | ||||
|       '@kevisual/query': 0.0.18(@kevisual/ws@8.0.0) | ||||
| @@ -1580,7 +1587,7 @@ snapshots: | ||||
|       - ws | ||||
|       - zod | ||||
|  | ||||
|   '@kevisual/router@0.0.20': | ||||
|   '@kevisual/router@0.0.21': | ||||
|     dependencies: | ||||
|       path-to-regexp: 8.2.0 | ||||
|       selfsigned: 2.4.1 | ||||
| @@ -1596,24 +1603,6 @@ snapshots: | ||||
|  | ||||
|   '@kevisual/ws@8.0.0': {} | ||||
|  | ||||
|   '@pm2/agent@2.1.1': | ||||
|     dependencies: | ||||
|       async: 3.2.6 | ||||
|       chalk: 3.0.0 | ||||
|       dayjs: 1.8.36 | ||||
|       debug: 4.3.7 | ||||
|       eventemitter2: 5.0.1 | ||||
|       fast-json-patch: 3.1.1 | ||||
|       fclone: 1.0.11 | ||||
|       pm2-axon: 4.0.1 | ||||
|       pm2-axon-rpc: 0.7.1 | ||||
|       proxy-agent: 6.4.0 | ||||
|       semver: 7.5.4 | ||||
|       ws: 7.5.10 | ||||
|     transitivePeerDependencies: | ||||
|       - bufferutil | ||||
|       - utf-8-validate | ||||
|  | ||||
|   '@pm2/agent@2.1.1(supports-color@10.0.0)': | ||||
|     dependencies: | ||||
|       async: 3.2.6 | ||||
| @@ -1633,17 +1622,6 @@ snapshots: | ||||
|       - supports-color | ||||
|       - utf-8-validate | ||||
|  | ||||
|   '@pm2/io@6.1.0': | ||||
|     dependencies: | ||||
|       async: 2.6.4 | ||||
|       debug: 4.3.7 | ||||
|       eventemitter2: 6.4.9 | ||||
|       require-in-the-middle: 5.2.0 | ||||
|       semver: 7.5.4 | ||||
|       shimmer: 1.2.1 | ||||
|       signal-exit: 3.0.7 | ||||
|       tslib: 1.9.3 | ||||
|  | ||||
|   '@pm2/io@6.1.0(supports-color@10.0.0)': | ||||
|     dependencies: | ||||
|       async: 2.6.4 | ||||
| @@ -1657,17 +1635,6 @@ snapshots: | ||||
|     transitivePeerDependencies: | ||||
|       - supports-color | ||||
|  | ||||
|   '@pm2/js-api@0.8.0': | ||||
|     dependencies: | ||||
|       async: 2.6.4 | ||||
|       debug: 4.3.7 | ||||
|       eventemitter2: 6.4.9 | ||||
|       extrareqp2: 1.0.0(debug@4.3.7) | ||||
|       ws: 7.5.10 | ||||
|     transitivePeerDependencies: | ||||
|       - bufferutil | ||||
|       - utf-8-validate | ||||
|  | ||||
|   '@pm2/js-api@0.8.0(supports-color@10.0.0)': | ||||
|     dependencies: | ||||
|       async: 2.6.4 | ||||
| @@ -1680,10 +1647,6 @@ snapshots: | ||||
|       - supports-color | ||||
|       - utf-8-validate | ||||
|  | ||||
|   '@pm2/pm2-version-check@1.0.4': | ||||
|     dependencies: | ||||
|       debug: 4.4.0 | ||||
|  | ||||
|   '@pm2/pm2-version-check@1.0.4(supports-color@10.0.0)': | ||||
|     dependencies: | ||||
|       debug: 4.4.0(supports-color@10.0.0) | ||||
| @@ -1791,9 +1754,9 @@ snapshots: | ||||
|  | ||||
|   '@tootallnate/quickjs-emscripten@0.23.0': {} | ||||
|  | ||||
|   '@types/bun@1.2.13': | ||||
|   '@types/bun@1.2.14': | ||||
|     dependencies: | ||||
|       bun-types: 1.2.13 | ||||
|       bun-types: 1.2.14 | ||||
|  | ||||
|   '@types/estree@1.0.7': {} | ||||
|  | ||||
| @@ -1807,18 +1770,18 @@ snapshots: | ||||
|  | ||||
|   '@types/node-fetch@2.6.12': | ||||
|     dependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|       form-data: 4.0.2 | ||||
|  | ||||
|   '@types/node-forge@1.3.11': | ||||
|     dependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@types/node@18.19.87': | ||||
|     dependencies: | ||||
|       undici-types: 5.26.5 | ||||
|  | ||||
|   '@types/node@22.15.18': | ||||
|   '@types/node@22.15.21': | ||||
|     dependencies: | ||||
|       undici-types: 6.21.0 | ||||
|  | ||||
| @@ -1827,11 +1790,11 @@ snapshots: | ||||
|   '@types/send@0.17.4': | ||||
|     dependencies: | ||||
|       '@types/mime': 1.3.5 | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   '@types/ws@8.18.1': | ||||
|     dependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   abort-controller@3.0.0: | ||||
|     dependencies: | ||||
| @@ -1896,9 +1859,9 @@ snapshots: | ||||
|  | ||||
|   buffer-from@1.1.2: {} | ||||
|  | ||||
|   bun-types@1.2.13: | ||||
|   bun-types@1.2.14: | ||||
|     dependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   call-bind-apply-helpers@1.0.2: | ||||
|     dependencies: | ||||
| @@ -1946,6 +1909,8 @@ snapshots: | ||||
|  | ||||
|   commander@13.1.0: {} | ||||
|  | ||||
|   commander@14.0.0: {} | ||||
|  | ||||
|   commander@2.15.1: {} | ||||
|  | ||||
|   commondir@1.0.1: {} | ||||
| @@ -1970,30 +1935,18 @@ snapshots: | ||||
|  | ||||
|   dayjs@1.8.36: {} | ||||
|  | ||||
|   debug@3.2.7: | ||||
|     dependencies: | ||||
|       ms: 2.1.3 | ||||
|  | ||||
|   debug@3.2.7(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       ms: 2.1.3 | ||||
|     optionalDependencies: | ||||
|       supports-color: 10.0.0 | ||||
|  | ||||
|   debug@4.3.7: | ||||
|     dependencies: | ||||
|       ms: 2.1.3 | ||||
|  | ||||
|   debug@4.3.7(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       ms: 2.1.3 | ||||
|     optionalDependencies: | ||||
|       supports-color: 10.0.0 | ||||
|  | ||||
|   debug@4.4.0: | ||||
|     dependencies: | ||||
|       ms: 2.1.3 | ||||
|  | ||||
|   debug@4.4.0(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       ms: 2.1.3 | ||||
| @@ -2087,12 +2040,6 @@ snapshots: | ||||
|     transitivePeerDependencies: | ||||
|       - debug | ||||
|  | ||||
|   extrareqp2@1.0.0(debug@4.3.7): | ||||
|     dependencies: | ||||
|       follow-redirects: 1.15.9(debug@4.3.7) | ||||
|     transitivePeerDependencies: | ||||
|       - debug | ||||
|  | ||||
|   fast-json-patch@3.1.1: {} | ||||
|  | ||||
|   fclone@1.0.11: {} | ||||
| @@ -2109,10 +2056,6 @@ snapshots: | ||||
|     optionalDependencies: | ||||
|       debug: 4.3.7(supports-color@10.0.0) | ||||
|  | ||||
|   follow-redirects@1.15.9(debug@4.3.7): | ||||
|     optionalDependencies: | ||||
|       debug: 4.3.7 | ||||
|  | ||||
|   form-data-encoder@1.7.2: {} | ||||
|  | ||||
|   form-data@4.0.2: | ||||
| @@ -2154,12 +2097,6 @@ snapshots: | ||||
|       dunder-proto: 1.0.1 | ||||
|       es-object-atoms: 1.1.1 | ||||
|  | ||||
|   get-uri@6.0.4: | ||||
|     dependencies: | ||||
|       basic-ftp: 5.0.5 | ||||
|       data-uri-to-buffer: 6.0.2 | ||||
|       debug: 4.4.0 | ||||
|  | ||||
|   get-uri@6.0.4(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       basic-ftp: 5.0.5 | ||||
| @@ -2200,11 +2137,6 @@ snapshots: | ||||
|       statuses: 2.0.1 | ||||
|       toidentifier: 1.0.1 | ||||
|  | ||||
|   http-proxy-agent@7.0.2: | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
|       debug: 4.4.0 | ||||
|  | ||||
|   http-proxy-agent@7.0.2(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
| @@ -2212,11 +2144,6 @@ snapshots: | ||||
|     transitivePeerDependencies: | ||||
|       - supports-color | ||||
|  | ||||
|   https-proxy-agent@7.0.6: | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
|       debug: 4.4.0 | ||||
|  | ||||
|   https-proxy-agent@7.0.6(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
| @@ -2238,17 +2165,17 @@ snapshots: | ||||
|  | ||||
|   ini@1.3.8: {} | ||||
|  | ||||
|   inquirer@12.6.1(@types/node@22.15.18): | ||||
|   inquirer@12.6.1(@types/node@22.15.21): | ||||
|     dependencies: | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.18) | ||||
|       '@inquirer/prompts': 7.5.1(@types/node@22.15.18) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.18) | ||||
|       '@inquirer/core': 10.1.11(@types/node@22.15.21) | ||||
|       '@inquirer/prompts': 7.5.1(@types/node@22.15.21) | ||||
|       '@inquirer/type': 3.0.6(@types/node@22.15.21) | ||||
|       ansi-escapes: 4.3.2 | ||||
|       mute-stream: 2.0.0 | ||||
|       run-async: 3.0.0 | ||||
|       rxjs: 7.8.2 | ||||
|     optionalDependencies: | ||||
|       '@types/node': 22.15.18 | ||||
|       '@types/node': 22.15.21 | ||||
|  | ||||
|   ip-address@9.0.5: | ||||
|     dependencies: | ||||
| @@ -2340,12 +2267,6 @@ snapshots: | ||||
|  | ||||
|   nanoid@5.1.5: {} | ||||
|  | ||||
|   needle@2.4.0: | ||||
|     dependencies: | ||||
|       debug: 3.2.7 | ||||
|       iconv-lite: 0.4.24 | ||||
|       sax: 1.4.1 | ||||
|  | ||||
|   needle@2.4.0(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       debug: 3.2.7(supports-color@10.0.0) | ||||
| @@ -2386,17 +2307,6 @@ snapshots: | ||||
|  | ||||
|   os-tmpdir@1.0.2: {} | ||||
|  | ||||
|   pac-proxy-agent@7.2.0: | ||||
|     dependencies: | ||||
|       '@tootallnate/quickjs-emscripten': 0.23.0 | ||||
|       agent-base: 7.1.3 | ||||
|       debug: 4.4.0 | ||||
|       get-uri: 6.0.4 | ||||
|       http-proxy-agent: 7.0.2 | ||||
|       https-proxy-agent: 7.0.6 | ||||
|       pac-resolver: 7.0.1 | ||||
|       socks-proxy-agent: 8.0.5 | ||||
|  | ||||
|   pac-proxy-agent@7.2.0(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       '@tootallnate/quickjs-emscripten': 0.23.0 | ||||
| @@ -2439,23 +2349,12 @@ snapshots: | ||||
|     dependencies: | ||||
|       safe-buffer: 5.2.1 | ||||
|  | ||||
|   pm2-axon-rpc@0.7.1: | ||||
|     dependencies: | ||||
|       debug: 4.4.0 | ||||
|  | ||||
|   pm2-axon-rpc@0.7.1(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       debug: 4.4.0(supports-color@10.0.0) | ||||
|     transitivePeerDependencies: | ||||
|       - supports-color | ||||
|  | ||||
|   pm2-axon@4.0.1: | ||||
|     dependencies: | ||||
|       amp: 0.3.1 | ||||
|       amp-message: 0.1.2 | ||||
|       debug: 4.4.0 | ||||
|       escape-string-regexp: 4.0.0 | ||||
|  | ||||
|   pm2-axon@4.0.1(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       amp: 0.3.1 | ||||
| @@ -2474,15 +2373,6 @@ snapshots: | ||||
|     dependencies: | ||||
|       charm: 0.1.2 | ||||
|  | ||||
|   pm2-sysmonit@1.2.8: | ||||
|     dependencies: | ||||
|       async: 3.2.6 | ||||
|       debug: 4.4.0 | ||||
|       pidusage: 2.0.21 | ||||
|       systeminformation: 5.25.11 | ||||
|       tx2: 1.0.5 | ||||
|     optional: true | ||||
|  | ||||
|   pm2-sysmonit@1.2.8(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       async: 3.2.6 | ||||
| @@ -2494,43 +2384,6 @@ snapshots: | ||||
|       - supports-color | ||||
|     optional: true | ||||
|  | ||||
|   pm2@6.0.6: | ||||
|     dependencies: | ||||
|       '@pm2/agent': 2.1.1 | ||||
|       '@pm2/io': 6.1.0 | ||||
|       '@pm2/js-api': 0.8.0 | ||||
|       '@pm2/pm2-version-check': 1.0.4 | ||||
|       ansis: 4.0.0 | ||||
|       async: 3.2.6 | ||||
|       blessed: 0.1.81 | ||||
|       chokidar: 3.6.0 | ||||
|       cli-tableau: 2.0.1 | ||||
|       commander: 2.15.1 | ||||
|       croner: 4.1.97 | ||||
|       dayjs: 1.11.13 | ||||
|       debug: 4.4.0 | ||||
|       enquirer: 2.3.6 | ||||
|       eventemitter2: 5.0.1 | ||||
|       fclone: 1.0.11 | ||||
|       js-yaml: 4.1.0 | ||||
|       mkdirp: 1.0.4 | ||||
|       needle: 2.4.0 | ||||
|       pidusage: 3.0.2 | ||||
|       pm2-axon: 4.0.1 | ||||
|       pm2-axon-rpc: 0.7.1 | ||||
|       pm2-deploy: 1.0.2 | ||||
|       pm2-multimeter: 0.1.2 | ||||
|       promptly: 2.2.0 | ||||
|       semver: 7.7.1 | ||||
|       source-map-support: 0.5.21 | ||||
|       sprintf-js: 1.1.2 | ||||
|       vizion: 2.2.1 | ||||
|     optionalDependencies: | ||||
|       pm2-sysmonit: 1.2.8 | ||||
|     transitivePeerDependencies: | ||||
|       - bufferutil | ||||
|       - utf-8-validate | ||||
|  | ||||
|   pm2@6.0.6(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       '@pm2/agent': 2.1.1(supports-color@10.0.0) | ||||
| @@ -2573,17 +2426,6 @@ snapshots: | ||||
|     dependencies: | ||||
|       read: 1.0.7 | ||||
|  | ||||
|   proxy-agent@6.4.0: | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
|       debug: 4.4.0 | ||||
|       http-proxy-agent: 7.0.2 | ||||
|       https-proxy-agent: 7.0.6 | ||||
|       lru-cache: 7.18.3 | ||||
|       pac-proxy-agent: 7.2.0 | ||||
|       proxy-from-env: 1.1.0 | ||||
|       socks-proxy-agent: 8.0.5 | ||||
|  | ||||
|   proxy-agent@6.4.0(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
| @@ -2609,12 +2451,6 @@ snapshots: | ||||
|     dependencies: | ||||
|       picomatch: 2.3.1 | ||||
|  | ||||
|   require-in-the-middle@5.2.0: | ||||
|     dependencies: | ||||
|       debug: 4.4.0 | ||||
|       module-details-from-path: 1.0.3 | ||||
|       resolve: 1.22.10 | ||||
|  | ||||
|   require-in-the-middle@5.2.0(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       debug: 4.4.0(supports-color@10.0.0) | ||||
| @@ -2720,12 +2556,6 @@ snapshots: | ||||
|  | ||||
|   smart-buffer@4.2.0: {} | ||||
|  | ||||
|   socks-proxy-agent@8.0.5: | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
|       debug: 4.4.0 | ||||
|       socks: 2.8.4 | ||||
|  | ||||
|   socks-proxy-agent@8.0.5(supports-color@10.0.0): | ||||
|     dependencies: | ||||
|       agent-base: 7.1.3 | ||||
|   | ||||
							
								
								
									
										39
									
								
								assistant/src/command/ai/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								assistant/src/command/ai/index.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| import { logger } from '@/module/logger.ts'; | ||||
| import { program, Command, assistantConfig } from '@/program.ts'; | ||||
| import { ProviderManager, ProviderMap } from '@kevisual/ai-center'; | ||||
| const runAiCommand = new Command('ai') | ||||
|   .description('AI 对话助手') | ||||
|   .option('-t, --text <text>', '应用类型', '') | ||||
|   .action(async (options) => { | ||||
|     assistantConfig.checkMounted(); | ||||
|     const config = assistantConfig.getCacheAssistantConfig(); | ||||
|     const ai = config.ai || {}; | ||||
|     if (!ai.enabled) { | ||||
|       logger.error('AI 功能未启用,请在助手配置文件中启用 AI 功能'); | ||||
|       return; | ||||
|     } | ||||
|     if (!options.text) { | ||||
|       logger.error('请输入要发送给 AI 的文本'); | ||||
|       return; | ||||
|     } | ||||
|     if (!ProviderMap[ai.provider]) { | ||||
|       logger.error('不支持的 AI 提供商,请检查配置文件中的提供商名称'); | ||||
|       const supportedProviders = Object.keys(ProviderMap).join(', '); | ||||
|       logger.error(`支持的提供商有:${supportedProviders}`); | ||||
|       return; | ||||
|     } | ||||
|     const provider = new ProviderManager({ | ||||
|       provider: ai.provider, | ||||
|       apiKey: ai.apiKey, | ||||
|       model: ai.model, | ||||
|     }); | ||||
|     const result = await provider.chat([ | ||||
|       { | ||||
|         role: 'user', | ||||
|         content: options.text, | ||||
|       }, | ||||
|     ]); | ||||
|     logger.info(result.choices[0].message.content); | ||||
|   }); | ||||
|  | ||||
| program.addCommand(runAiCommand); | ||||
| @@ -2,13 +2,16 @@ import { logger } from '@/module/logger.ts'; | ||||
| import { program, Command, assistantConfig } from '@/program.ts'; | ||||
| import { AppDownload } from '@/services/app/index.ts'; | ||||
|  | ||||
| const appManagerCommand = new Command('app').description('本地的应用模块的安装和下载, 分为 app 和 web 两种类型'); | ||||
| program.addCommand(appManagerCommand); | ||||
| const commdands = ['app', 'page']; | ||||
| const addOneCommand = (name: string) => { | ||||
|  | ||||
| const downloadCommand = new Command('download') | ||||
|   const appManagerCommand = new Command(name).description(`本地的应用模块的安装和下载, 分为 app 和 web 两种类型. 默认类型为${name}`); | ||||
|   program.addCommand(appManagerCommand); | ||||
|  | ||||
|   const downloadCommand = new Command('download') | ||||
|     .description('下载应用') | ||||
|     .option('-i, --id <id>', '应用名称') | ||||
|   .option('-t, --type <type>', '应用类型', 'web') | ||||
|     .option('-t, --type <type>', '应用类型', name) | ||||
|     .option('-r, --registry <registry>', '应用源 https://kevisual.cn') | ||||
|     .option('-f --force', '强制覆盖') | ||||
|     .option('-y --yes', '覆盖的时候不提示') | ||||
| @@ -26,12 +29,12 @@ const downloadCommand = new Command('download') | ||||
|       logger.debug(info); | ||||
|     }); | ||||
|  | ||||
| appManagerCommand.addCommand(downloadCommand); | ||||
|   appManagerCommand.addCommand(downloadCommand); | ||||
|  | ||||
| const deleteCommand = new Command('delete') | ||||
|   const deleteCommand = new Command('delete') | ||||
|     .description('删除应用') | ||||
|     .option('-i, --id <id>', '应用名称') | ||||
|   .option('-t, --type <type>', '应用类型', 'web') | ||||
|     .option('-t, --type <type>', '应用类型', name) | ||||
|     .action(async (options) => { | ||||
|       const { id, type } = options; | ||||
|       const app = new AppDownload(assistantConfig); | ||||
| @@ -42,12 +45,17 @@ const deleteCommand = new Command('delete') | ||||
|       } | ||||
|       logger.debug(info); | ||||
|     }); | ||||
| appManagerCommand.addCommand(deleteCommand); | ||||
|   appManagerCommand.addCommand(deleteCommand); | ||||
|  | ||||
| const uploadCommand = new Command('upload') | ||||
|   const uploadCommand = new Command('upload') | ||||
|     .description('上传应用') | ||||
|     .option('-i, --id <id>', '应用名称 root/app-name 的格式,如果是后端,会自动解析为 app-name') | ||||
|   .option('-t, --type <type>', '应用类型', 'web') | ||||
|     .option('-t, --type <type>', '应用类型', 'app') | ||||
|     .action(async (options) => { | ||||
|       // | ||||
|     }); | ||||
| }; | ||||
|  | ||||
| commdands.forEach((name) => { | ||||
|   addOneCommand(name); | ||||
| }); | ||||
| @@ -4,6 +4,7 @@ import './command/app-manager/index.ts'; | ||||
| import './command/asst-server/index.ts'; | ||||
| import './command/app/index.ts'; | ||||
| import './command/run-scripts/index.ts'; | ||||
| import './command/ai/index.ts'; | ||||
|  | ||||
| /** | ||||
|  * 通过命令行解析器解析参数 | ||||
|   | ||||
| @@ -90,6 +90,7 @@ export type AssistantConfigData = { | ||||
|    */ | ||||
|   home?: string; | ||||
|   ai?: { | ||||
|     enabled?: boolean; | ||||
|     provider?: string | 'DeepSeek' | 'SiliconFlow'; | ||||
|     apiKey?: string; | ||||
|     model?: string; | ||||
|   | ||||
| @@ -79,8 +79,9 @@ program | ||||
|       console.log('以守护进程方式运行'); | ||||
|     } else if (options.start) { | ||||
|       console.log('启动服务', chalk.green(assistantConfig.configDir)); | ||||
|       const listenPort = options.port || assistantConfig.config?.server?.port; | ||||
|       const listenPath = assistantConfig.config?.server?.path || '127.0.0.1'; | ||||
|       const config = assistantConfig.getCacheAssistantConfig(); | ||||
|       const listenPort = options.port || config?.server?.port; | ||||
|       const listenPath = config?.server?.path || '127.0.0.1'; | ||||
|       const server = await runServer(listenPort, listenPath); | ||||
|     } | ||||
|   }); | ||||
|   | ||||
| @@ -6,7 +6,10 @@ | ||||
|   "checkDir": { | ||||
|     "./build/tools/kevisual-sync": { | ||||
|       "url": "https://kevisual.xiongxiao.me/root/ai/kevisual/tools/kevisual-sync/", | ||||
|       "enabled": true | ||||
|       "enabled": true, | ||||
|       "meta": { | ||||
|         "share": "private" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   "syncDirectory": [ | ||||
| @@ -24,6 +27,11 @@ | ||||
|     } | ||||
|   ], | ||||
|   "sync": { | ||||
|     "./build/01-summary.md": "https://kevisual.xiongxiao.me/root/ai/kevisual/01-summary.md" | ||||
|     "./build/01-summary.md": { | ||||
|       "url": "https://kevisual.xiongxiao.me/root/ai/kevisual/01-summary.md", | ||||
|       "meta": { | ||||
|         "share": "public" | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@kevisual/envision-cli", | ||||
|   "version": "0.0.53", | ||||
|   "name": "@kevisual/cli", | ||||
|   "version": "0.0.54", | ||||
|   "description": "envision command tools", | ||||
|   "main": "dist/app.mjs", | ||||
|   "type": "module", | ||||
| @@ -9,7 +9,10 @@ | ||||
|   "app": { | ||||
|     "key": "envision-cli", | ||||
|     "entry": "dist/app.mjs", | ||||
|     "type": "pm2-system-app" | ||||
|     "type": "pm2-system-app", | ||||
|     "runtime": [ | ||||
|       "cli" | ||||
|     ] | ||||
|   }, | ||||
|   "bin": { | ||||
|     "envision": "bin/envision.js", | ||||
|   | ||||
| @@ -152,10 +152,10 @@ export class SyncBase { | ||||
|   async getSyncDirectoryList() { | ||||
|     const config = this.config; | ||||
|     const syncDirectory = config?.syncDirectory || []; | ||||
|     let obj: Record<string, string> = {}; | ||||
|     let obj: Record<string, any> = {}; | ||||
|     const keys: string[] = []; | ||||
|     for (let item of syncDirectory) { | ||||
|       const { registry, ignore = [], files = [], replace = {} } = item; | ||||
|       const { registry, ignore = [], files = [], replace = {}, meta } = item; | ||||
|       const cwd = this.#dir; | ||||
|       const glob_files = await glob(files, { | ||||
|         ignore: this.getIngore(ignore), | ||||
| @@ -182,7 +182,10 @@ export class SyncBase { | ||||
|         const pathname = path.join(_registryURL.pathname, newKey); | ||||
|         _registryURL.pathname = pathname; | ||||
|         keys.push(key); | ||||
|         obj[key] = _registryURL.toString(); | ||||
|         obj[key] = { url: _registryURL.toString() }; | ||||
|         if (meta) { | ||||
|           obj[key] = { ...obj[key], meta }; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     return { sync: obj, keys }; | ||||
|   | ||||
| @@ -2,6 +2,7 @@ export type SyncConfigType = 'sync' | 'download' | 'upload' | 'none'; | ||||
| export type SyncConfig = { | ||||
|   type?: SyncConfigType; // 是否可以同步 | ||||
|   url: string; // 文件具体的 url 的地址 | ||||
|   meta?: Record<string, any>; // 元数据 | ||||
| }; | ||||
| export type SyncDirectory = { | ||||
|   /** | ||||
| @@ -15,6 +16,7 @@ export type SyncDirectory = { | ||||
|   registry?: string; | ||||
|   files?: string[]; | ||||
|   replace?: Record<string, string>; | ||||
|   meta?: Record<string, any>; | ||||
| }; | ||||
| export interface Config { | ||||
|   name?: string; // 项目名称 | ||||
|   | ||||
| @@ -6,7 +6,7 @@ import fs from 'node:fs'; | ||||
| import { upload } from '@/module/download/upload.ts'; | ||||
| import { logger } from '@/module/logger.ts'; | ||||
| import { chalk } from '@/module/chalk.ts'; | ||||
| import path, { relative } from 'node:path'; | ||||
| import path from 'node:path'; | ||||
| import { fileIsExist } from '@/uitls/file.ts'; | ||||
|  | ||||
| const command = new Command('sync') | ||||
| @@ -18,7 +18,6 @@ const command = new Command('sync') | ||||
|  | ||||
| const syncUpload = new Command('upload') | ||||
|   .option('-d --dir <dir>', '配置目录') | ||||
|   .option('-s --share <share>', '共享设置') | ||||
|   .option('-c --config <config>', '配置文件的名字', 'kevisual.json') | ||||
|   .option('-f --file <file>', '操作的对应的文件名') | ||||
|   .description('上传项目') | ||||
| @@ -32,9 +31,6 @@ const syncUpload = new Command('upload') | ||||
|     const meta: Record<string, string> = { | ||||
|       ...sync.config.metadata, | ||||
|     }; | ||||
|     if (opts.share) { | ||||
|       meta.share = opts.share; | ||||
|     } | ||||
|     const filepath = sync.getRelativePath(opts.file); | ||||
|     for (const item of syncList) { | ||||
|       if (!item.auth || !item.exist) { | ||||
| @@ -54,7 +50,7 @@ const syncUpload = new Command('upload') | ||||
|         url: item.url, | ||||
|         needHash: true, | ||||
|         hash: item.hash, | ||||
|         meta, | ||||
|         meta: item.meta ?? meta, | ||||
|       }); | ||||
|       if (res.code === 200) { | ||||
|         if (res.data?.isNew) { | ||||
| @@ -109,6 +105,7 @@ const syncDownload = new Command('download') | ||||
| const syncList = new Command('list') | ||||
|   .option('-d --dir <dir>', '配置目录') | ||||
|   .option('-c --config <config>', '配置文件的名字', 'kevisual.json') | ||||
|   .option('-a --all', '显示所有的文件') | ||||
|   .description('列出同步列表') | ||||
|   .action(async (opts) => { | ||||
|     const sync = new SyncBase({ dir: opts.dir, baseURL: baseURL, configFilename: opts.config }); | ||||
| @@ -116,14 +113,16 @@ const syncList = new Command('list') | ||||
|     logger.debug(syncList); | ||||
|     logger.info('同步列表\n'); | ||||
|     syncList.forEach((item) => { | ||||
|       logger.info(chalk.blue(item.key), chalk.gray(item.type), chalk.green(item.url)); | ||||
|       if (opts.all) { | ||||
|         logger.info(item); | ||||
|       } else logger.info(chalk.blue(item.key), chalk.gray(item.type), chalk.green(item.url)); | ||||
|     }); | ||||
|   }); | ||||
| const syncCreateList = new Command('create') | ||||
|   .option('-d --dir <dir>', '配置目录') | ||||
|   .option('-c --config <config>', '配置文件的名字', 'kevisual.json') | ||||
|   .option('-o --output <output>', '输出文件') | ||||
|   .description('创建文件') | ||||
|   .description('创建文件, 获取远程的目录列表,然后创建新的配置文件') | ||||
|   .action(async (opts) => { | ||||
|     const sync = new SyncBase({ dir: opts.dir, baseURL: baseURL, configFilename: opts.config }); | ||||
|     const syncList = await sync.getSyncList(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user