feat(assets): 素材选择器 - 支持按媒体类型筛选并覆盖远程项目资产

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ddCat
2026-09-09 10:34:10 +08:00
parent 7336945623
commit 9acac6cbbe
6 changed files with 92 additions and 7 deletions

View File

@@ -442,6 +442,7 @@ export default function ProjectAssetsView({ detail, refreshProject }: ProjectDet
<AssetLibraryPickerModal
open={addOpen}
remoteLibrary
mediaKinds={["image", "video", "audio", "text"]}
items={availablePickerItems}
categoryLabels={{ ...pickerCategoryLabels, ...externalAssetSources.categoryLabels }}
folders={externalAssetSources.folders}

View File

@@ -166,6 +166,7 @@ export default function ProjectSettingsView({ detail, refreshProject }: ProjectD
<AssetLibraryPickerModal
open={coverPickerOpen}
items={coverPickerItems}
mediaKinds={["image"]}
categoryLabels={{ all: "全部图片", image: "图片" }}
initialCategory="image"
initialSelectedIds={currentCoverItemId ? [currentCoverItemId] : []}