Skip to content

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. 提示词导演

Preserve author and original work links in curated submission exports

MigenAIce560bd7439f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5e63c2..3d24c02 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
了解每个版本带来的功能变化与使用改善。下载请前往 [GitHub Releases](https://github.com/wchao6891/PromptDirector/releases/latest)。
+## 1.22.2
+
+- 修复精选投稿导出遗漏原作者署名与原作品链接的问题,保留姓名中的空格和特殊符号。
+- 现有案例无需重新采集;更新后重新导出投稿包即可保留已存储的来源信息。
+
## 1.22.1
- GitHub 安装包统一为 `PromptDirector-版本号.zip`,本地更新直接使用同一安装包。
diff --git a/extension/curated-submission.js b/extension/curated-submission.js
index 70649f7..ac15321 100644
--- a/extension/curated-submission.js
+++ b/extension/curated-submission.js
@@ -115,6 +115,8 @@ function sanitizeMediaAsset(asset) {
storageMode: "managed",
sourceUrl,
sourceTitle: clean(asset.sourceTitle),
+ sourceAuthor: clean(asset.sourceAuthor),
+ originalWorkUrl: firstHttpsUrl([asset.originalWorkUrl]),
capturedAt: validIso(asset.capturedAt),
mimeType: clean(asset.mimeType),
width: positiveInteger(asset.width),
diff --git a/extension/manifest.json b/extension/manifest.json
index e6fc0a7..65eb019 100644
--- a/extension/manifest.json
+++ b/extension/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "__MSG_extensionName__",
- "version": "1.22.1",
+ "version": "1.22.2",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq2m8W9ACXJTkJqPAd36sPrtzonmHhOYU34uS7c+D7DXX6ggWNMwB4xZapGFJ4ScBQJv71PeG9KfsEnhcXFZ9RoX/X3wY+57evL19hf6woNX1xxhKOe1rtx5QmzWCEYIr99TzW50k/N9U6tS9Ri+2DHKYA85ssXTC8B2yRQ5zUXhsAWZe/HDU18UFuvUKXYt3ZdIUi31c2vIlgFFBfsyKbIUMny9LlxL/smb4vJzU/+A3LwJDjjvOtS/lmQ2vHoQGjHJItO18bYI6h67fIEvmWk+HJKtO08Ca+5RLS8TYhI+K7l7S0RyDVNujyVWtvhAULot1H0BvteYL87fKu3SNywIDAQAB",
"homepage_url": "https://github.com/wchao6891/PromptDirector",
"default_locale": "zh_CN",
diff --git a/package-lock.json b/package-lock.json
index 4e72e01..0d604b0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "prompt-case-collector",
- "version": "1.22.1",
+ "version": "1.22.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prompt-case-collector",
- "version": "1.22.1",
+ "version": "1.22.2",
"license": "Apache-2.0",
"dependencies": {
"@jonahschulte/rtf-toolkit": "0.5.0",
diff --git a/package.json b/package.json
index 8135aad..f70fc70 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "prompt-case-collector",
- "version": "1.22.1",
+ "version": "1.22.2",
"private": false,
"license": "Apache-2.0",
"repository": "https://github.com/wchao6891/PromptDirector",
diff --git a/store/DISTRIBUTION.md b/store/DISTRIBUTION.md
index 6fbd92f..10c1f68 100644
--- a/store/DISTRIBUTION.md
+++ b/store/DISTRIBUTION.md
@@ -6,7 +6,7 @@ Public distribution formats and the permissions used by PromptDirector.
- Chrome Web Store item public key: stored in the source `manifest.json` for local identity verification only; `package:release` removes `key` from the upload manifest.
- Expected extension ID: `iahakaahijddcjjldidbclicedibgpjm`.
-- Current upload artifact: `dist/store/PromptDirector-1.22.1-Chrome-Web-Store.zip`. Keep this artifact local for Web Store submission. The sole GitHub extension installation package is `PromptDirector-1.22.1.zip`, with stable identity and the local updater.
+- Current upload artifact: `dist/store/PromptDirector-1.22.2-Chrome-Web-Store.zip`. Keep this artifact local for Web Store submission. The sole GitHub extension installation package is `PromptDirector-1.22.2.zip`, with stable identity and the local updater.
- Generate a candidate only with `npm run package:release`; the command verifies the source public key against the expected identity, then removes `key` from the Web Store upload manifest and excludes the local program installer.
## Store listing
diff --git a/test/curated-submission.test.js b/test/curated-submission.test.js
index dcb4e7e..a1c719d 100644
--- a/test/curated-submission.test.js
+++ b/test/curated-submission.test.js
@@ -84,6 +84,15 @@ test("投稿清单和分卷清单使用完整 SHA-256 身份", () => {
}), /摘要无效/);
});
+test("投稿保留媒体原作者和原作品链接,避免审核时丢失来源", () => {
+ const entry = fixtureState().entries[0];
+ entry.mediaAssets[0].sourceAuthor = "沛棠° · A B | © ✨";
+ entry.mediaAssets[0].originalWorkUrl = "https://example.com/original-work";
+ const result = sanitizeCuratedSubmissionEntry(entry);
+ assert.equal(result.mediaAssets[0].sourceAuthor, "沛棠° · A B | © ✨");
+ assert.equal(result.mediaAssets[0].originalWorkUrl, "https://example.com/original-work");
+});
+
function fixtureState() {
return {
entries: [{
diff --git a/test/page-capture-site-adapters.test.js b/test/page-capture-site-adapters.test.js
index c72fd7c..cd8f208 100644
--- a/test/page-capture-site-adapters.test.js
+++ b/test/page-capture-site-adapters.test.js
@@ -15,7 +15,7 @@ test("Jimeng structured payload restores author, prompt, model, time, metrics an
modelNames: { jimeng_v40: "即梦 4.0" },
item: {
common_attr: { id: "7490123456789012345", title: "孟菲斯光线4", create_time: 1786000000 },
- author: { name: "金戈米良", uid: "creator-7" },
+ author: { name: "金戈 米良° · A | © ✨", uid: "creator-7" },
aigc_image_params: { text2image_params: { prompt: "平面影像,低饱和度,动态模糊的光线。" } },
aigc_draft: { content: JSON.stringify({ component_list: [{ abilities: { generate: { core_param: { model: "jimeng_v40" } } } }] }) },
statistic: { favorite_num: 103, usage_num: 12 },
@@ -24,7 +24,7 @@ test("Jimeng structured payload restores author, prompt, model, time, metrics an
}, "https://jimeng.jianying.com/ai-tool/work-detail/7490123456789012345");
assert.equal(normalized.contentText, "平面影像,低饱和度,动态模糊的光线。");
- assert.equal(normalized.sourceFacts.author, "金戈米良");
+ assert.equal(normalized.sourceFacts.author, "金戈 米良° · A | © ✨");
assert.equal(normalized.sourceFacts.model, "即梦 4.0");
assert.equal(normalized.sourceFacts.itemId, "7490123456789012345");
assert.equal(normalized.sourceFacts.dimensions, "2160×3840");
diff --git a/test/sharing_and_data_safety_e2e.py b/test/sharing_and_data_safety_e2e.py
index 155f1d6..1db54bd 100644
--- a/test/sharing_and_data_safety_e2e.py
+++ b/test/sharing_and_data_safety_e2e.py
@@ -30,6 +30,8 @@ def main() -> None:
{"id": "share-image-two", "kind": "image", "storageMode": "managed", "mimeType": "image/png", "width": 1, "height": 1, "palette": {"colors": ["#123456", "#345678"]}}
]
entries[1]["primaryMediaId"] = "share-image-two"
+ entries[1]["mediaAssets"][0]["sourceAuthor"] = "沛棠° · A B | © ✨"
+ entries[1]["mediaAssets"][0]["originalWorkUrl"] = "https://example.com/original-work"
entries[1]["note"] = "不应公开的私人笔记"
entries[1]["metadataLabels"] = ["作者:测试作者", "权利:本人原创", "秘密:sk-private"]
trashed_entry = base_entry("trash-one", "回收站案例", "需要跨电脑恢复。", "content:prompt:image", 3)
@@ -230,6 +232,9 @@ def main() -> None:
submission_library = json.loads(payload.read("library.json"))
assert len(submission_library["entries"]) == 1
assert submission_library["entries"][0]["title"] == "分享案例二"
+ asset = submission_library["entries"][0]["mediaAssets"][0]
+ assert asset["sourceAuthor"] == "沛棠° · A B | © ✨"
+ assert asset["originalWorkUrl"] == "https://example.com/original-work"
serialized = json.dumps(submission_library, ensure_ascii=False)
assert "不应公开的私人笔记" not in serialized
assert "sk-private" not in serialized