@aiyiran/myclaw 1.0.183 → 1.0.185

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/index.js +9 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -211,7 +211,15 @@ function runReinstall() {
211
211
  // ============================================================================
212
212
 
213
213
  function runStatus() {
214
- const url = 'http://127.0.0.1:18789?token=' + TOKEN;
214
+ const { findConfig, readConfig } = require('./find-config');
215
+ const configPath = findConfig();
216
+ if (!configPath) {
217
+ console.error(' ❌ 未找到 openclaw.json,请确认 OpenClaw 已安装');
218
+ return;
219
+ }
220
+ const { config } = readConfig();
221
+ const token = config?.gateway?.auth?.token;
222
+ const url = 'http://127.0.0.1:18789' + (token ? '?token=' + token : '');
215
223
  console.log('');
216
224
  console.log(' ' + colors.green + url + colors.nc);
217
225
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.0.183",
3
+ "version": "1.0.185",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {