@aiyiran/myclaw 1.0.241 → 1.0.242
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/assets/myclaw-artifacts.js +1 -13
- package/package.json +1 -1
|
@@ -197,22 +197,10 @@
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
// ═══ 请求数据 ═══
|
|
200
|
-
var CLAW_STORAGE_KEY = 'myclaw-claw-name';
|
|
201
|
-
|
|
202
200
|
function getArtifactsUrl() {
|
|
203
|
-
var claw = window.location.hostname.split('.')[0];
|
|
204
|
-
// 如果 hostname 不含 claw,从 localStorage 读取
|
|
205
|
-
if (!claw.includes('claw')) {
|
|
206
|
-
claw = localStorage.getItem(CLAW_STORAGE_KEY);
|
|
207
|
-
if (!claw) {
|
|
208
|
-
console.log('[myclaw-artifacts] ❌ 未配置 claw 名称');
|
|
209
|
-
console.log('[myclaw-artifacts] 请在控制台执行: localStorage.setItem("myclaw-claw-name", "你的claw名称")');
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
201
|
var agentName = getAgentName() || 'main';
|
|
214
202
|
var wsPrefix = agentName === 'main' ? 'workspace' : 'workspace-' + agentName;
|
|
215
|
-
return
|
|
203
|
+
return window.location.origin + '/cmd/api/preview?path=' + wsPrefix + '/.myclaw/__MY_ARTIFACTS__.json';
|
|
216
204
|
}
|
|
217
205
|
|
|
218
206
|
function fetchArtifacts(contentEl) {
|