Spot it. Save it. Free, local-first Chrome extension for images, videos and prompts. Explore 2,000+ curated cases and connect your library to AI Agents via MCP. 提示词导演
JavaScript ai-artai-videochrome-extensionclaude-codecodexhiggsfieldjimenglocal-firstmcpmidjourneymoodboardprompt-engineeringprompt-libraryprompt-managerreference-libraryseedancevisual-bookmarksweb-clipper
Restore complete curated selections inside the extension
MigenAI9773b9c37a21
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a8f8695..ce32182 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,8 @@## 1.20.6+- 插件精选页接入恢复后的完整公共目录,支持浏览和保存 10 包、467 条案例;未核验授权的来源案例如实标注,保存后保留来源权利状态。+- 采集、保存及补充素材均为纯程序处理;保留预览确认流程,文章与媒体提示词按内容用途呈现,逐素材提示词随分享导入保留。- 修复部分媒体下载失败时案例已保存、侧栏却未清空的问题;真正未保存的内容继续保留,媒体问题可在来源信息中检查。- X 视频按当前帖匹配正常页面加载的媒体地址,优先保存完整 MP4;移除整帖网页嵌入,支持独立视频与 HLS 播放、时间定位和关闭回收。diff --git a/curated-catalog.js b/curated-catalog.jsindex 2e913d2..8ae6ddd 100644--- a/curated-catalog.js+++ b/curated-catalog.js@@ -10,7 +10,7 @@ export const CURATED_METRICS_FORMAT = "prompt-director-curated-metrics";export const CURATED_METRICS_VERSION = 1;const TYPES = new Set(["editorial", "image_prompt", "video_prompt"]);-const VERIFIED_RIGHTS_STATUSES = new Set(["verified_original", "verified_authorized"]);+const PUBLISHED_RIGHTS_STATUSES = new Set(["verified_original", "verified_authorized", "source_unverified"]);const COVER_HOSTS = new Set(["wchao6891.github.io"]);const DOWNLOAD_HOSTS = new Set(["github.com",@@ -334,7 +334,7 @@ function normalizeItem(value = {}) {const previewUrl = trustedUrl(value.previewUrl, COVER_HOSTS, "精选预览地址不受信任");const downloadUrl = trustedUrl(value.downloadUrl, DOWNLOAD_HOSTS, "精选下载地址不受信任");const sha256 = String(value.sha256 ?? "").toLocaleLowerCase("en-US");- if (!id || !title || !type || !packageId || !packageVersion || !authorId || !author || !license || !VERIFIED_RIGHTS_STATUSES.has(rightsStatus) || !updatedAt ||+ if (!id || !title || !type || !packageId || !packageVersion || !authorId || !author || !license || !PUBLISHED_RIGHTS_STATUSES.has(rightsStatus) || !updatedAt ||!/^[a-f0-9]{64}$/.test(sha256)) {throw new Error("精选目录条目缺少必填字段或校验值");}diff --git a/curated-config.js b/curated-config.jsindex 49b64d2..dc3a20e 100644--- a/curated-config.js+++ b/curated-config.js@@ -1,5 +1,5 @@export const CURATED_CATALOG_URL =- "https://wchao6891.github.io/PromptDirector-Curated/catalog.json";+ "https://wchao6891.github.io/PromptDirector-Curated/public-catalog.json";export const CURATED_METRICS_URL ="https://wchao6891.github.io/PromptDirector-Curated/metrics.json";diff --git a/curated-page.js b/curated-page.jsindex d0bd27b..dd270a3 100644--- a/curated-page.js+++ b/curated-page.js@@ -320,7 +320,7 @@ function renderDetail(item, preview, failed = false) {const info = element("div", "detail-info");info.append(element("h1", "", item.title));const meta = element("div", "detail-meta");- meta.append(element("span", "", item.author), element("span", "", `${item.caseCount} ${t("个案例")}`), element("span", "", rightsLabel(item.license)));+ meta.append(element("span", "", item.author), element("span", "", `${item.caseCount} ${t("个案例")}`), element("span", "", rightsLabel(item)));info.append(meta);const actions = element("div", "detail-actions");const download = actionButton("download-action", "save", t("保存整包"));@@ -493,7 +493,7 @@ function renderCaseDetail(item, entry) {promptSection.append(element("h3", "", t("完整提示词")), element("pre", "case-detail-prompt", entry.text));body.append(promptSection);const source = element("div", "case-detail-source");- source.append(element("span", "", entry.rights || rightsLabel(item.license)));+ source.append(element("span", "", rightsLabel(item, entry.rights)));if (entry.sourceUrl) {const link = element("a", "", t("查看来源"));link.href = entry.sourceUrl;@@ -948,7 +948,10 @@ function publicPackUrl(id) {return url.href;}-function rightsLabel(license = "") {+function rightsLabel(item, entryRights = "") {+ if (item.rightsStatus === "source_unverified") return t("权利归原作者 · 授权未核验");+ if (entryRights) return entryRights;+ const license = item.license || "";if (license.includes("PromptDirector 原创")) return t("PromptDirector 原创");if (license.includes("权利归原作者")) return t("权利归原作者");return license || t("权利未标注");diff --git a/i18n.js b/i18n.jsindex 1b4bf5f..3040023 100644--- a/i18n.js+++ b/i18n.js@@ -2225,6 +2225,7 @@ const EN = Object.freeze({"暂无提示词": "No prompt available","以此创作": "Create from this","权利归原作者": "Rights belong to the original creator",+ "权利归原作者 · 授权未核验": "Rights belong to the original creator · Permission unverified","无法创建批量任务": "The batch could not be created","无法更新批量任务": "The batch could not be updated","无法领取批量任务": "Batch work could not be claimed",diff --git a/migration.js b/migration.jsindex c287c40..cf39cda 100644--- a/migration.js+++ b/migration.js@@ -303,10 +303,12 @@ function normalizeCuratedOrigin(value) {const normalized = Object.fromEntries(required.map((key) => [key, String(value[key] ?? "").trim()]));if (required.some((key) => !normalized[key])) return undefined;const installedAt = String(value.installedAt ?? "").trim();- const sourceEntryId = String(value.sourceEntryId ?? "").trim();+ const optional = Object.fromEntries(["sourceEntryId", "rightsStatus", "rightsReviewUrl"]+ .map((key) => [key, String(value[key] ?? "").trim()])+ .filter(([, text]) => text));return {...normalized,- ...(sourceEntryId ? { sourceEntryId } : {}),+ ...optional,...(installedAt && !Number.isNaN(Date.parse(installedAt))? { installedAt: new Date(installedAt).toISOString() }: {})diff --git a/test/curated-catalog.test.js b/test/curated-catalog.test.jsindex 6db139d..f0ba310 100644--- a/test/curated-catalog.test.js+++ b/test/curated-catalog.test.js@@ -355,3 +355,17 @@ test("a curated package index validates every reviewed media path before extract}, names), /无效或重复/);assert.throws(() => validateCuratedPackageIndex(catalogItem({ imageCount: 1, videoCount: 1 }), library, names), /图片数量与目录不一致/);});+++test("source selections can be browsed and saved without inventing authorization", () => {+ const item = catalogItem({ rightsStatus: "source_unverified", license: "权利归原作者 · 授权未核验" });+ const catalog = normalizeCuratedCatalog({+ format: "prompt-director-curated", version: 2,+ updatedAt: item.updatedAt, themes: [item]+ });+ assert.equal(catalog.themes[0].rightsStatus, "source_unverified");+ const saved = applyCuratedOrigin({ id: "source-case", title: "来源案例" }, catalog.themes[0]);+ assert.equal(saved.curatedOrigin.rightsStatus, "source_unverified");+ assert.equal(saved.curatedOrigin.license, item.license);+ assert.equal(saved.curatedOrigin.rightsReviewUrl, item.rightsReviewUrl);+});diff --git a/test/curated_live_release_e2e.py b/test/curated_live_release_e2e.pyindex 49e0d01..0119173 100644--- a/test/curated_live_release_e2e.py+++ b/test/curated_live_release_e2e.py@@ -8,7 +8,7 @@ from playwright.sync_api import TimeoutError as PlaywrightTimeoutError, expectfrom e2e_support import extension_session-CATALOG_URL = "https://wchao6891.github.io/PromptDirector-Curated/catalog.json"+CATALOG_URL = "https://wchao6891.github.io/PromptDirector-Curated/public-catalog.json"def main() -> None:@@ -22,19 +22,20 @@ def main() -> None:"async (url) => (await fetch(url, {cache: 'no-store', credentials: 'omit'})).json()",CATALOG_URL,)- assert len(catalog["themes"]) == 1, catalog- item = catalog["themes"][0]- assert item["id"] == "featured:vol-1", item- assert item["caseCount"] == 20, item- assert item["rightsStatus"] == "verified_original", item- assert item["rightsReviewUrl"].endswith("/reviews/featured-cases-vol-1.json"), item+ expect(curated.locator(".pack-card")).to_have_count(len(catalog["themes"]), timeout=30_000)+ assert any(theme["rightsStatus"] == "verified_original" for theme in catalog["themes"])+ source_items = [theme for theme in catalog["themes"] if theme["rightsStatus"] == "source_unverified" and theme["type"] == "image_prompt"]+ assert source_items, "公开目录没有已恢复的第三方来源精选"+ item = min(source_items, key=lambda theme: theme["archiveBytes"])card = curated.locator(f'.pack-card[data-pack-id="{item["id"]}"]')expect(card).to_be_visible(timeout=30_000)card.click()expect(curated.locator(".case-card").first).to_be_visible(timeout=30_000)expect(curated.locator(".case-video-badge")).to_have_count(0)+ expect(curated.locator(".detail-meta")).to_contain_text("授权未核验")curated.locator(".case-card").first.click()expect(curated.locator(".case-detail-figure img")).to_have_count(1)+ expect(curated.locator(".case-detail-source")).to_contain_text("授权未核验")save = curated.locator(".case-save-action")expect(save).to_have_text("保存到案例库")curated.evaluate(@@ -70,6 +71,7 @@ def main() -> None:expect(curated.locator(".detail-image")).to_have_count(1)local_state = curated.evaluate("async () => chrome.runtime.sendMessage({type: 'GET_STATE'})")assert len(local_state["entries"]) == 1, local_state+ assert local_state["entries"][0]["curatedOrigin"]["rightsStatus"] == "source_unverified"labels = curated.evaluate("async () => (await chrome.storage.local.get('__curatedLiveLabels')).__curatedLiveLabels || []")assert not page_errors, page_errorsassert not console_errors, console_errors@@ -90,6 +92,8 @@ def main() -> None:assert len(project["entryIds"]) == item["caseCount"], projectprint({+ "visible_packages": len(catalog["themes"]),+ "available_cases": sum(theme["caseCount"] for theme in catalog["themes"]),"package": item["id"],"case_count": item["caseCount"],"rights_status": item["rightsStatus"],diff --git a/test/curated_video_workflow_e2e.py b/test/curated_video_workflow_e2e.pyindex 148d5ea..68128a5 100644--- a/test/curated_video_workflow_e2e.py+++ b/test/curated_video_workflow_e2e.py@@ -13,7 +13,7 @@ from e2e_support import base_entry, extension_sessionPNG_BYTES = base64.b64decode("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=")-CATALOG_URL = "https://wchao6891.github.io/PromptDirector-Curated/catalog.json"+CATALOG_URL = "https://wchao6891.github.io/PromptDirector-Curated/public-catalog.json"METRICS_URL = "https://wchao6891.github.io/PromptDirector-Curated/metrics.json"COVER_URL = "https://wchao6891.github.io/PromptDirector-Curated/covers/video-workflow.png"PREVIEW_URL = "https://wchao6891.github.io/PromptDirector-Curated/previews/video-workflow/preview.json"diff --git a/test/curated_workflow_e2e.py b/test/curated_workflow_e2e.pyindex 6782c0d..24a44e7 100644--- a/test/curated_workflow_e2e.py+++ b/test/curated_workflow_e2e.py@@ -17,7 +17,7 @@ from e2e_support import base_entry, extension_sessionPNG_BYTES = base64.b64decode("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=")-CATALOG_URL = "https://wchao6891.github.io/PromptDirector-Curated/catalog.json"+CATALOG_URL = "https://wchao6891.github.io/PromptDirector-Curated/public-catalog.json"METRICS_URL = "https://wchao6891.github.io/PromptDirector-Curated/metrics.json"COVER_URL = "https://wchao6891.github.io/PromptDirector-Curated/covers/workflow.png"PREVIEW_URL = "https://wchao6891.github.io/PromptDirector-Curated/previews/workflow/preview.json"@@ -71,7 +71,7 @@ def main() -> None:"authorId": "author-editorial","author": "PromptDirector 编辑精选","license": "权利归原作者",- "rightsStatus": "verified_authorized",+ "rightsStatus": "source_unverified","rightsReviewUrl": "https://wchao6891.github.io/PromptDirector-Curated/reviews/workflow.json","updatedAt": "2026-08-08T00:00:00.000Z","coverUrl": COVER_URL,@@ -190,6 +190,7 @@ def main() -> None:expect(curated.locator(".detail-meta")).to_contain_text("2 个案例")expect(curated.locator(".detail-actions button")).to_have_count(3)expect(curated.locator(".download-action")).to_have_text("保存整包")+ expect(curated.locator(".detail-meta")).to_contain_text("授权未核验")expect(curated.locator(".follow-action")).to_have_text("关注")expect(curated.locator(".detail-actions button").nth(2)).to_have_text("复制链接")expect(curated.locator(".case-list .case-card")).to_have_count(2)@@ -223,6 +224,7 @@ def main() -> None:expect(curated.locator("#case-detail-drawer")).to_have_class("case-detail-drawer open")expect(curated.locator(".case-detail-heading h2")).to_have_text("精选工作流案例")expect(curated.locator(".case-detail-heading p")).to_have_text("原作者")+ expect(curated.locator(".case-detail-source")).to_contain_text("授权未核验")expect(curated.locator(".case-detail-prompt")).to_have_text("统一层级并保留清晰主体。")expect(curated.locator(".case-detail-source a")).to_have_attribute("href", "https://example.com/workflow-case")assert curated.locator("#detail-content").get_attribute("inert") == ""diff --git a/test/migration.test.js b/test/migration.test.jsindex 9ab8060..ddfe97f 100644--- a/test/migration.test.js+++ b/test/migration.test.js@@ -4,6 +4,21 @@ import assert from "node:assert/strict";import { migrateLibraryState, needsMigration } from "../migration.js";import { CONTENT_IDS, SCHEMA_VERSION, createDefaultTaxonomy } from "../taxonomy.js";+test("saving and reloading a source selection retains its stated rights without inventing permission", () => {+ const origin = {+ catalogId: "featured:source", packageId: "source-pack", packageVersion: "1.0.0",+ author: "原作者", license: "权利归原作者 · 授权未核验", sourceEntryId: "source-case",+ rightsStatus: "source_unverified",+ rightsReviewUrl: "https://wchao6891.github.io/PromptDirector-Curated/reviews/source-pack.json"+ };+ const first = migrateLibraryState({ entries: [{ id: "saved-source", title: "收藏的案例", curatedOrigin: origin }] }).state;+ const reloaded = migrateLibraryState(first).state;+ assert.deepEqual(reloaded.entries[0].curatedOrigin, origin);+ const { rightsStatus, rightsReviewUrl, ...withoutRightsRecord } = origin;+ const historical = migrateLibraryState({ entries: [{ id: "previous-save", curatedOrigin: withoutRightsRecord }] }).state;+ assert.deepEqual(historical.entries[0].curatedOrigin, withoutRightsRecord);+});+test("older schemas upgrade without changing entry content", () => {const entry = {id: "case-a", schemaVersion: 16, title: "原案例", text: "原文", url: "https://example.com",