diff --git a/packages/output-strategy/package.json b/packages/output-strategy/package.json index 30e9cd2..4260b31 100644 --- a/packages/output-strategy/package.json +++ b/packages/output-strategy/package.json @@ -1,10 +1,9 @@ { "name": "@magpie-community/middleware-output-strategy", - "version": "0.2.2", + "version": "0.2.3", "description": "Composable output-style instructions injected before the model call, with a small selection panel", "type": "module", "license": "MIT", - "author": "manjughosa (https://github.com/manjughosa)", "repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", diff --git a/packages/output-strategy/page/i18n.js b/packages/output-strategy/page/i18n.js index 1cdf1d5..6e10dba 100644 --- a/packages/output-strategy/page/i18n.js +++ b/packages/output-strategy/page/i18n.js @@ -6,7 +6,6 @@ var ZH = { "Output Strategy": "输出策略", "Inject selected writing rules into model requests. Combine freely; all off by default.": "把选中的写作规则注入模型请求。可自由组合,全部默认关闭。", - "An (unofficial) output-style plugin for magpie, developed and maintained by manjughosa.": "本插件由 manjughosa 独立开发并维护,非官方出品。", "Saving does not rewrite conversation history. Existing conversations may retain previously injected rules; start a new conversation to fully switch or turn off styles.": "保存不会改写会话历史。已有会话可能保留先前注入的规则;要完整切换或关闭样式,请新建会话。", "selected": "已选择", "Style combinations": "样式组合", diff --git a/packages/output-strategy/page/index.html b/packages/output-strategy/page/index.html index b205138..9bf1a76 100644 --- a/packages/output-strategy/page/index.html +++ b/packages/output-strategy/page/index.html @@ -12,7 +12,6 @@
Inject selected writing rules into model requests. Combine freely; all off by default.
-An (unofficial) output-style plugin for magpie, developed and maintained by manjughosa.
0 / 7 diff --git a/packages/output-strategy/page/style.css b/packages/output-strategy/page/style.css index 885586c..de8bc79 100644 --- a/packages/output-strategy/page/style.css +++ b/packages/output-strategy/page/style.css @@ -66,12 +66,6 @@ h1 { font-size: 15px; } -.attribution { - margin: 10px 0 0; - color: var(--muted); - font-size: 12px; -} - #conversationNote { margin-bottom: 14px; } .selection-count { diff --git a/packages/output-strategy/test/page.test.mjs b/packages/output-strategy/test/page.test.mjs index 50d43b8..d5a74c1 100644 --- a/packages/output-strategy/test/page.test.mjs +++ b/packages/output-strategy/test/page.test.mjs @@ -245,7 +245,7 @@ describe("host language", () => { const closes = (css.match(/}/g) || []).length expect(closes).toBe(opens) expect(css).toContain("padding-top: 28px;\n }\n}\n\n@media (max-width: 460px)") - expect(JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version).toBe("0.2.2") + expect(JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version).toBe("0.2.3") }) test("falls back safely when host theme is missing", () => { @@ -255,17 +255,16 @@ describe("host language", () => { expect(sandbox.document.documentElement.lang).toBe("en") }) - test("shows author attribution and conversation guidance in both languages", () => { + test("shows conversation guidance in both languages without a panel byline", () => { const html = readFileSync(new URL("../page/index.html", import.meta.url), "utf8") - const author = "An (unofficial) output-style plugin for magpie, developed and maintained by manjughosa." const note = "Saving does not rewrite conversation history. Existing conversations may retain previously injected rules; start a new conversation to fully switch or turn off styles." - expect(html).toContain(author) expect(html).toContain(note) + expect(html.toLowerCase()).not.toContain("manjughosa") const sandbox = { document: { documentElement: {}, body: null }, magpie: { theme: { lang: "zh-CN" } } } vm.createContext(sandbox) vm.runInContext(i18nSource, sandbox) - expect(sandbox.OutputStrategyI18n.t(author)).toBe("本插件由 manjughosa 独立开发并维护,非官方出品。") expect(sandbox.OutputStrategyI18n.t(note)).toBe("保存不会改写会话历史。已有会话可能保留先前注入的规则;要完整切换或关闭样式,请新建会话。") + expect(i18nSource.toLowerCase()).not.toContain("manjughosa") }) test("ships English HTML and no private stats or local language switch", () => {