@aiyiran/myclaw 1.0.215 → 1.0.217
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 +26 -6
- package/package.json +1 -1
|
@@ -312,8 +312,6 @@
|
|
|
312
312
|
var nameSpan = document.createElement('span');
|
|
313
313
|
nameSpan.textContent = pathParts[pathParts.length - 1] || asset.name || '未命名';
|
|
314
314
|
nameSpan.title = asset.path || '';
|
|
315
|
-
fname.appendChild(nameSpan);
|
|
316
|
-
|
|
317
315
|
// [最新] 优先于 [有更新]
|
|
318
316
|
if (isLatest && !isLatestSeen) {
|
|
319
317
|
var badge = document.createElement('span');
|
|
@@ -327,6 +325,8 @@
|
|
|
327
325
|
fname.appendChild(badge);
|
|
328
326
|
}
|
|
329
327
|
|
|
328
|
+
fname.appendChild(nameSpan);
|
|
329
|
+
|
|
330
330
|
row.appendChild(time);
|
|
331
331
|
row.appendChild(fname);
|
|
332
332
|
container.appendChild(row);
|
|
@@ -404,6 +404,7 @@
|
|
|
404
404
|
overlay.appendChild(box);
|
|
405
405
|
|
|
406
406
|
document.body.appendChild(overlay);
|
|
407
|
+
iframe.focus();
|
|
407
408
|
}
|
|
408
409
|
|
|
409
410
|
function closePreviewModal() {
|
|
@@ -565,14 +566,33 @@
|
|
|
565
566
|
titleInput.style.borderColor = '#ff4444';
|
|
566
567
|
return;
|
|
567
568
|
}
|
|
568
|
-
var
|
|
569
|
+
var agentName = getAgentName() || 'main';
|
|
570
|
+
var wsField = agentName === 'main' ? 'workspace' : 'workspace-' + agentName;
|
|
571
|
+
var clawVal = window.location.hostname.split('.')[0];
|
|
572
|
+
var payload = {
|
|
569
573
|
title: titleVal,
|
|
574
|
+
workspace: wsField,
|
|
570
575
|
cover_path: coverSelect.value || '',
|
|
571
576
|
entry_path: entrySelect.value || '',
|
|
572
|
-
|
|
577
|
+
claw: clawVal,
|
|
573
578
|
};
|
|
574
|
-
|
|
575
|
-
|
|
579
|
+
submitBtn.disabled = true;
|
|
580
|
+
submitBtn.textContent = '\u53D1\u5E03\u4E2D...';
|
|
581
|
+
fetch('https://www.yiranlaoshi.com/api/student_workspace_create', {
|
|
582
|
+
method: 'POST',
|
|
583
|
+
headers: { 'Content-Type': 'application/json' },
|
|
584
|
+
body: JSON.stringify(payload),
|
|
585
|
+
})
|
|
586
|
+
.then(function (res) { return res.json(); })
|
|
587
|
+
.then(function (data) {
|
|
588
|
+
console.log('[myclaw-artifacts-publish]', payload, data);
|
|
589
|
+
closePublishModal();
|
|
590
|
+
})
|
|
591
|
+
.catch(function (err) {
|
|
592
|
+
console.error('[myclaw-artifacts-publish] \u53D1\u5E03\u5931\u8D25:', err);
|
|
593
|
+
submitBtn.disabled = false;
|
|
594
|
+
submitBtn.textContent = '\u786E\u8BA4\u53D1\u5E03';
|
|
595
|
+
});
|
|
576
596
|
};
|
|
577
597
|
|
|
578
598
|
box.appendChild(header);
|