From 4ea07d629d50879c9fde8cd75777e7e5bcd02e9d Mon Sep 17 00:00:00 2001 From: linshen <32978552+linshenkx@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:16:42 +0800 Subject: [PATCH] build: prepare v2.9.3 release --- CHANGELOG.md | 4 +++ package.json | 2 +- packages/desktop/package.json | 2 +- packages/extension/public/manifest.json | 2 +- releases/v2.9.3.en.md | 48 +++++++++++++++++++++++++ releases/v2.9.3.zh-CN.md | 48 +++++++++++++++++++++++++ 6 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 releases/v2.9.3.en.md create mode 100644 releases/v2.9.3.zh-CN.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 87cda5fd..f8521022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Full release narratives now live in versioned files under `releases/`. This file stays as the index and summary entry point. +## [2.9.3] - 2026-04-10 +- EN: This release establishes an English-first locale baseline, restores localized user feedback across key UI workflows, hardens MCP and repository guardrails, and extracts evaluation prompt assets into maintainable modules. See [Release Notes (EN)](releases/v2.9.3.en.md). +- 中文:本次发布建立了 English-first locale 基线,补回关键 UI 流程的本地化反馈,并加固了 MCP、仓库守护校验与评估模板资产结构。参见 [版本说明(中文)](releases/v2.9.3.zh-CN.md)。 + ## [2.9.2] - 2026-04-07 - EN: This release fixes the desktop updater path for both stable and prerelease downloads, hardens invalid preference-key handling, and expands the bilingual image workflow documentation. See [Release Notes (EN)](releases/v2.9.2.en.md). - 中文:本次发布修复了桌面端正式版与预览版下载更新链路,强化了无效偏好键处理,并补充了双语图像工作流文档。参见 [版本说明(中文)](releases/v2.9.2.zh-CN.md)。 diff --git a/package.json b/package.json index 24be9c21..202573b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prompt-optimizer", - "version": "2.9.2", + "version": "2.9.3", "private": true, "packageManager": "pnpm@10.6.1", "engines": { diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 26c7c715..68071d18 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@prompt-optimizer/desktop", - "version": "2.9.2", + "version": "2.9.3", "description": "Desktop application for Prompt Optimizer", "main": "main.js", "repository": { diff --git a/packages/extension/public/manifest.json b/packages/extension/public/manifest.json index c8f4efa2..6d8c75e8 100644 --- a/packages/extension/public/manifest.json +++ b/packages/extension/public/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "default_locale": "zh_CN", "name": "__MSG_extName__", - "version": "2.9.2", + "version": "2.9.3", "description": "__MSG_extDesc__", "icons": { "16": "icons/icon16.png", diff --git a/releases/v2.9.3.en.md b/releases/v2.9.3.en.md new file mode 100644 index 00000000..86ceaa36 --- /dev/null +++ b/releases/v2.9.3.en.md @@ -0,0 +1,48 @@ +# Prompt Optimizer v2.9.3 + +## Summary +- Established an English-first runtime and documentation baseline while keeping `zh-CN` and `zh-TW` fully localized through the updated locale packs. +- Fixed localization regressions that surfaced English-only toasts in context editing, favorites, Prompt Garden imports, template loading, history saves, and model-management error paths. +- Hardened repository guardrails, MCP packaging/startup behavior, and cross-platform script checks so the rollout is safer on both developer machines and CI. +- Extracted evaluation prompt template assets into dedicated content/runtime modules to make template maintenance easier and keep guardrail coverage explicit. + +## Highlights +- The app now uses a more structured locale system: English is the baseline for shared runtime copy and docs, while Chinese users keep localized UI feedback instead of falling back to hardcoded English strings. + +## Product Updates +### UI / Localization +- Split the UI locale packs into modular `en-US`, `zh-CN`, and `zh-TW` sections so runtime copy, template labels, favorites messaging, testing strings, and image workflow text can stay aligned across languages. +- Restored localized feedback for context import/export, Prompt Garden partial-success warnings, template loading failures, history record errors, favorite save flows, tag/category management, and text model manager failure toasts. +- Added bootstrap and runtime guard tests to catch hardcoded runtime strings and locale drift before merge. + +### Core / Templates +- Moved evaluation, rewrite, and structured-compare prompt assets into dedicated content/runtime modules instead of keeping large inline blobs in the service layer. +- Added template guardrail tests so extracted prompt assets stay wired correctly as the evaluation stack evolves. + +### MCP / Repo Tooling +- Hardened MCP packaging and startup integration, including the installable CLI entrypoint and language/config validation used by the English-first rollout. +- Added repo-level locale parity and “no hardcoded Chinese runtime string” checks, then fixed the direct-execution path normalization so those checks behave correctly across Windows and Linux CI. + +## Fixes +- Fixed mixed-language error messages where `zh-CN` / `zh-TW` users could still see English fallback text such as `Unknown error` or raw English toast copy. +- Fixed MCP startup/default-language integration gaps so locale bootstrap behavior and tests stay consistent. +- Fixed cross-platform script execution detection for repo guardrails when CI compares Linux `import.meta.url` values against Windows-style script paths. + +## Breaking Changes / Upgrade Notes +- No breaking API or data-format changes. +- This release does tighten locale and runtime-copy guardrails. If you maintain downstream customizations, expect stricter checks against untranslated runtime strings. + +## Developer Notes +- The locale rollout is intentionally test-heavy: UI runtime guards, locale parity checks, no-hardcoded-runtime scans, MCP environment coverage, and package script validation all landed together so the baseline is enforceable instead of convention-only. +- The evaluation template refactor is primarily internal, but it substantially reduces the maintenance cost of large prompt assets and makes content reviews more targeted. + + diff --git a/releases/v2.9.3.zh-CN.md b/releases/v2.9.3.zh-CN.md new file mode 100644 index 00000000..36708a4d --- /dev/null +++ b/releases/v2.9.3.zh-CN.md @@ -0,0 +1,48 @@ +# Prompt Optimizer v2.9.3 + +## 概括 +- 建立了 English-first 的运行时与文档基线,同时继续通过新的 locale 模块保证 `zh-CN` 和 `zh-TW` 界面反馈完整本地化。 +- 修复了一批本地化回归,避免上下文编辑、收藏、Prompt Garden 导入、模板加载、历史保存和模型管理错误路径再次冒出英文 toast。 +- 加固了仓库级校验、MCP 打包与启动行为,以及跨平台脚本判断逻辑,让这轮国际化改造在开发机和 CI 上都更稳。 +- 将评估提示词模板资产拆分为独立内容/运行时模块,后续维护和守护测试都更清晰。 + +## 亮点 +- 应用现在采用更清晰的 locale 结构:英文作为共享运行时文案和文档基线,中文用户仍然会在失败路径和提示反馈里看到本地化内容,而不是硬编码英文。 + +## 产品更新 +### UI / 国际化 +- 将 UI locale 拆分为模块化的 `en-US`、`zh-CN`、`zh-TW`,让运行时文案、模板标签、收藏提示、测试字符串和图像工作流提示在三种语言中保持结构一致。 +- 恢复了上下文导入导出、Prompt Garden 部分成功 warning、模板加载失败、历史记录保存失败、收藏保存、标签/分类管理,以及文本模型管理错误提示的本地化反馈。 +- 新增启动与运行时守卫测试,在合并前就拦住硬编码运行时字符串和 locale 结构漂移。 + +### Core / 模板 +- 将评估、重写、结构化对比相关的提示词资产从服务层内联大段文本中抽离到独立 content/runtime 模块。 +- 为抽离后的模板补上守护测试,确保评估链路继续演进时不会把模板装配关系弄坏。 + +### MCP / 仓库工具链 +- 加固了 MCP 的打包与启动集成,包括可安装 CLI 入口,以及这轮 English-first 改造依赖的语言/配置校验。 +- 增加了仓库级 locale parity 与“禁止硬编码中文运行时字符串”检查,并修复了这些脚本在 Windows 路径与 Linux CI 混用场景下的直接执行判断问题。 + +## 修复 +- 修复了 `zh-CN` / `zh-TW` 用户在异常路径上仍可能看到 `Unknown error` 或原始英文 toast 的混合语言提示问题。 +- 修复了 MCP 启动默认语言与测试预期不一致的集成缺口,保证 locale bootstrap 行为和测试保持同步。 +- 修复了仓库守护脚本在 CI 中将 Windows 风格路径与 Linux `import.meta.url` 比较时失配的问题。 + +## 破坏性变更 / 升级说明 +- 没有 API 或数据格式层面的破坏性变更。 +- 这次发布会更严格地检查 locale 与运行时文案。如果你有下游自定义运行时字符串,需要注意新的校验门槛。 + +## 开发者说明 +- 这轮 locale 改造不是只改文案,还同时补上了 UI runtime guard、locale parity、禁止硬编码运行时字符串、MCP 环境覆盖和 package script 校验,尽量把约束固化成可执行检查。 +- 评估模板资产抽离主要是内部重构,但它显著降低了大块提示词内容的维护成本,也让后续 code review 更聚焦。 + +