@agentscope-ai/chat 1.1.35 → 1.1.37-beta.1764141419164

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/bin/cli.js +10 -9
  2. package/package.json +4 -5
package/bin/cli.js CHANGED
@@ -1,16 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // const { program } = require('commander');
3
+ const { program } = require('commander');
4
4
  const { execSync } = require('child_process');
5
5
 
6
- // program
7
- // .name('agentscope-runtime-webui')
8
- // .description('启动 AgentScope Runtime WebUI 服务')
9
- // .option('-u, --url <url>', '指定后端 API 地址')
10
- // .option('-t, --token <token>', '指定认证 token')
11
- // .parse(process.argv);
6
+ program
7
+ .name('agentscope-runtime-webui')
8
+ .description('启动 AgentScope Runtime WebUI 服务')
9
+ .option('-u, --url <url>', '指定后端 API 地址')
10
+ .option('-t, --token <token>', '指定认证 token')
11
+ .parse(process.argv);
12
+
13
+ const options = program.opts();
12
14
 
13
- // const options = program.opts();
14
15
 
15
16
  async function startServer() {
16
17
  console.log('\n🚀 Starting AgentScope Runtime WebUI...\n');
@@ -24,7 +25,7 @@ async function startServer() {
24
25
  })
25
26
 
26
27
  execSync(
27
- 'cd agentscope-runtime/web/starter_webui && npm install && BASE_URL=http://localhost:3000 TOKEN=123456 npm run dev',
28
+ `cd agentscope-runtime/web/starter_webui && npm install && BASE_URL=${options.url || 'BASE_URL'} TOKEN=${options.token || 'TOKEN'} npm run dev`,
28
29
  {
29
30
  stdio: 'inherit',
30
31
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentscope-ai/chat",
3
- "version": "1.1.35",
3
+ "version": "1.1.37-beta.1764141419164",
4
4
  "description": "a free and open-source chat framework for building excellent LLM-powered chat experiences",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": [
@@ -21,7 +21,6 @@
21
21
  "scripts": {
22
22
  "build": "npm run src:build && npm run docs:build",
23
23
  "build:doc-api": "rm -rf node_modules && tnpm i && npm run start",
24
- "build:publish": "NPM_PUBLISH=1 npm run build:cli && npm run src:build",
25
24
  "build:watch": "father dev",
26
25
  "dev": "dumi dev",
27
26
  "docs:build": "dumi build",
@@ -31,7 +30,7 @@
31
30
  "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
32
31
  "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
33
32
  "llms:build": "LLM=true dumi build",
34
- "prepare": "husky install && dumi setup",
33
+ "prepare": "dumi setup",
35
34
  "src:build": "father build",
36
35
  "start": "npm run dev"
37
36
  },
@@ -104,7 +103,8 @@
104
103
  "xstate": "^5.19.4",
105
104
  "zustand": "^5.0.3",
106
105
  "vite": "^5.4.11",
107
- "antd": "^5.18.0"
106
+ "antd": "^5.18.0",
107
+ "commander": "^12.1.0"
108
108
  },
109
109
  "devDependencies": {
110
110
  "@agentscope-ai/dumi-theme-spark": "0.0.98",
@@ -118,7 +118,6 @@
118
118
  "@types/react-dom": "^18.0.0",
119
119
  "@umijs/lint": "^4.0.0",
120
120
  "@umijs/plugins": "^4.4.11",
121
- "commander": "^12.1.0",
122
121
  "dumi": "^2.4.13",
123
122
  "esbuild": "^0.19.12",
124
123
  "eslint": "^8.23.0",