|
|
@@ -43,7 +43,11 @@ type FolderNode = {
|
|
|
|
|
|
function buildTree(entries: ArtifactEntry[]): FolderNode {
|
|
|
const root: FolderNode = { name: "", path: "", folders: new Map(), files: [] }
|
|
|
+ const seen = new Set<string>()
|
|
|
for (const entry of entries) {
|
|
|
+ const key = (entry.path || entry.name).trim().toLocaleLowerCase()
|
|
|
+ if (seen.has(key)) continue
|
|
|
+ seen.add(key)
|
|
|
const segments = (entry.path || "").split(/[\\/]+/).filter(Boolean)
|
|
|
segments.pop()
|
|
|
let node = root
|
|
|
@@ -421,6 +425,7 @@ export function PaasArtifacts(props: {
|
|
|
when={filters.view === "session"}
|
|
|
fallback={
|
|
|
<div class="paas-artifact-tree">
|
|
|
+ <p class="paas-muted paas-artifact-tree-note">目录视图按工作区路径合并同名文件。</p>
|
|
|
<Show when={tree().files.length}>
|
|
|
<p class="paas-artifact-tree-label">根目录 · {tree().files.length} 个文件</p>
|
|
|
{fileList(sortedFiles(tree().files))}
|