- {filtered.length ? filtered.map((artifact) => (
-
{
- event.dataTransfer.effectAllowed = "copy";
- event.dataTransfer.setData(
- "application/x-model-platform-version",
- artifact.versions_id,
- );
- event.dataTransfer.setData("text/plain", artifact.versions_id);
- }}
- onContextMenu={(event) => onContextMenu(event, artifact)}
- onDoubleClick={() => onDoubleClick(artifact)}
- >
-
-
-
-
- {artifact.script_name}
-
- {artifact.version_label} · {shortHash(artifact.content_hash)}
-
-
-
- )) : (
+ {groups.length === 0 ? (
暂无稳定版本,请先在"构建脚本"中发布
+ ) : (
+ groups.map(([scriptName, items]) => {
+ const isExpanded = expandedScriptNames.has(scriptName);
+ const scriptType = items[0].script_type;
+ const iconName = scriptType === "notebook" ? "notebook" : "python";
+ return (
+
+
+ {isExpanded && (
+
+ {items.map((artifact) => (
+
{
+ event.dataTransfer.effectAllowed = "copy";
+ event.dataTransfer.setData(
+ "application/x-model-platform-version",
+ artifact.versions_id,
+ );
+ event.dataTransfer.setData("text/plain", artifact.versions_id);
+ }}
+ onContextMenu={(event) => onContextMenu(event, artifact)}
+ onDoubleClick={() => onDoubleClick(artifact)}
+ >
+
+
+
+
+
+ {artifact.version_label}
+
+
+ {shortHash(artifact.content_hash)}
+
+
+
+
+
+
+ ))}
+
+ )}
+
+ );
+ })
)}
+