@rethinking-studio/clawcontrol 1.0.0 → 1.0.1
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/index.ts +2 -7
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -76,12 +76,7 @@ const clawcontrolOnboardingAdapter: ChannelOnboardingAdapter = {
|
|
|
76
76
|
},
|
|
77
77
|
configure: async ({ cfg, prompter }) => {
|
|
78
78
|
const account = resolveClawControlAccount(cfg);
|
|
79
|
-
const
|
|
80
|
-
const baseUrl = (
|
|
81
|
-
process.env.CLAWCONTROL_BACKEND_URL ||
|
|
82
|
-
(account.backendUrl && !account.backendUrl.includes('localhost') ? account.backendUrl : null) ||
|
|
83
|
-
defaultUrl
|
|
84
|
-
).replace(/\/$/, '');
|
|
79
|
+
const baseUrl = 'https://clawai.rethinkingstudio.com'.replace(/\/$/, '');
|
|
85
80
|
|
|
86
81
|
const proceed = await prompter.confirm({
|
|
87
82
|
message: '是否现在生成配对码?',
|
|
@@ -105,7 +100,7 @@ const clawcontrolOnboardingAdapter: ChannelOnboardingAdapter = {
|
|
|
105
100
|
const msg = code === 'ECONNREFUSED'
|
|
106
101
|
? `Cannot connect to ${baseUrl} - is the backend running? Default: https://clawai.rethinkingstudio.com`
|
|
107
102
|
: code === 'ENOTFOUND'
|
|
108
|
-
? `DNS lookup failed for ${baseUrl} - check network
|
|
103
|
+
? `DNS lookup failed for ${baseUrl} - check network`
|
|
109
104
|
: e?.message || String(e);
|
|
110
105
|
throw new Error(`Fetch failed: ${msg}`);
|
|
111
106
|
}
|