agens-studio 0.1.2 → 0.1.3
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/cli.js +6 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -11,11 +11,16 @@
|
|
|
11
11
|
|
|
12
12
|
import readline from 'node:readline';
|
|
13
13
|
import fs from 'node:fs/promises';
|
|
14
|
+
import fsSync from 'node:fs';
|
|
14
15
|
import path from 'node:path';
|
|
15
16
|
import { randomUUID } from 'node:crypto';
|
|
16
17
|
import { exec } from 'node:child_process';
|
|
17
18
|
import { fileURLToPath } from 'node:url';
|
|
18
19
|
import { config, USER_CONFIG_FILE, saveUserConfig, readUserConfig } from './config.js';
|
|
20
|
+
|
|
21
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
22
|
+
const __dirname = path.dirname(__filename);
|
|
23
|
+
const PKG_VERSION = JSON.parse(fsSync.readFileSync(path.join(__dirname, 'package.json'), 'utf8')).version;
|
|
19
24
|
import { generateImage, generateVideo, getTaskStatus } from './src/services/agensClient.js';
|
|
20
25
|
import { optimizePrompt, optimizeNegativePrompt, dimensionsToText } from './src/services/mimoClient.js';
|
|
21
26
|
import { describeImage, descriptionToText } from './src/services/mimoVision.js';
|
|
@@ -424,7 +429,7 @@ async function mainMenu() {
|
|
|
424
429
|
while (true) {
|
|
425
430
|
console.log('');
|
|
426
431
|
console.log(`${C.yellow}==================================================${C.reset}`);
|
|
427
|
-
console.log(`${C.yellow}${C.bold} Agens 创作工作台 CLI
|
|
432
|
+
console.log(`${C.yellow}${C.bold} Agens 创作工作台 CLI v${PKG_VERSION}${C.reset}`);
|
|
428
433
|
console.log(`${C.yellow} 图片 · 视频 · AI 提示词优化 · 素材库${C.reset}`);
|
|
429
434
|
console.log(`${C.yellow}==================================================${C.reset}`);
|
|
430
435
|
console.log(` API:${config.agens.image.apiKey ? C.green + '已配置' + C.reset : C.red + '未配置' + C.reset}`);
|