github linshenkx/prompt-optimizer v2.11.4

6 hours ago

English

Summary

  • Adds Grok text and image provider support through the xAI API, including shared key handling, built-in model defaults, image-generation routing, localized copy, and documentation updates.
  • Adds Chrome built-in AI provider support for browser runtimes with availability checks, model download feedback, guarded auto-enable behavior, and language options for the Chrome Prompt API.
  • Keeps local/no-key providers opt-in by default while preserving env-based enablement for configured online providers.
  • Hardens release/runtime configuration by isolating extension release env loading, restoring web root .env loading, adding a repository gate workflow, and softening themed tooltip surfaces.

Highlights

  • Prompt Optimizer can now cover two new provider paths: Grok for hosted text and image workflows, and Chrome built-in AI for eligible Chrome browser environments without requiring a remote API key.

Product Updates

Desktop

  • Desktop inherits the shared Grok text/image model presets, safer default-enable rules, and softer themed tooltip styling.
  • Local providers such as Ollama remain disabled until the user explicitly configures or enables them, avoiding surprising startup defaults.

Web

  • Added Grok to the text and image provider lists, including xAI API key aliases, default image model metadata, provider errors, and model documentation.
  • Added Chrome built-in AI as a browser-native text provider with Prompt API availability checks, download progress, recheck actions, and guarded startup auto-enable when the browser reports support.
  • Chrome built-in Prompt API calls now pass the expected input/output language options so availability and session creation stay aligned.
  • Restored web root .env loading so web builds can still read root-level Vite environment variables after extension env isolation.
  • Themed tooltips now use lighter compact padding for short labels and richer bordered content only when the tooltip carries longer slot content.

Extension

  • Extension version metadata is synchronized to v2.11.4 and inherits the shared provider metadata updates.
  • Extension release builds now use an isolated env path and a dedicated secret check so root/web .env values cannot leak into the packaged extension release.

Core/Infra

  • Added Grok LLM and image adapters with registry coverage, default model wiring, compatibility conversion, and unit tests.
  • Added the Chrome built-in AI adapter, provider metadata, model defaults, availability helpers, and UI onboarding utilities with regression coverage.
  • Updated default model enablement so providers with no required connection fields do not auto-enable unless explicitly intended.
  • Moved the repository test gate into the develop branch workflow and added package-script coverage for release env checks.

Fixes

  • Fixed local providers being enabled by default even when no user configuration existed.
  • Fixed extension release builds accidentally inheriting web/root environment values.
  • Fixed web builds losing root env loading while separating extension release behavior.
  • Fixed Chrome built-in AI availability/session calls by forwarding the language options expected by the browser API.
  • Fixed visually heavy tooltip surfaces for short hints.

Breaking Changes / Upgrade Notes

  • None.

Developer Notes

  • The release range is v2.11.3..HEAD.
  • Version sync updated the root package, desktop package, and extension manifest to 2.11.4.
  • Verification covered pnpm test:gate, node scripts/release-notes.js check v2.11.4, and git diff --check.

Installation guide: English | 中文
Source release notes (EN)


中文

概括

  • 新增 Grok 文本与图像 provider 支持,接入 xAI API、共享 API Key、内置模型默认项、图像生成链路、本地化文案和文档。
  • 新增 Chrome built-in AI provider,在支持的 Chrome 浏览器环境中提供可用性检测、模型下载反馈、受控自动启用和 Prompt API 语言选项。
  • 保持本地 / 无 key provider 默认显式启用,避免 Ollama 等本地模型在没有用户意图时自动打开。
  • 强化发布与运行时配置:隔离扩展发布环境变量、恢复 Web 根 .env 加载、加入仓库门禁 workflow,并减轻主题化 tooltip 的视觉重量。

亮点

  • Prompt Optimizer 现在同时扩展了两条 provider 路径:Grok 覆盖托管文本与图像工作流,Chrome built-in AI 则让符合条件的 Chrome 浏览器环境可以不依赖远程 API Key 使用本地浏览器内置模型。

产品更新

Desktop

  • 桌面端继承共享的 Grok 文本 / 图像模型预设、更安全的默认启用规则,以及更轻量的主题化 tooltip 样式。
  • Ollama 等本地 provider 会保持关闭,直到用户明确配置或启用,避免启动时出现意外默认项。

Web

  • 文本和图像 provider 列表新增 Grok,包含 xAI API Key 兼容环境变量、默认图像模型元数据、provider 错误提示和模型文档。
  • 新增 Chrome built-in AI 浏览器原生文本 provider,支持 Prompt API 可用性检测、下载进度、重新检测动作,以及浏览器确认可用后的受控自动启用。
  • Chrome built-in Prompt API 调用现在会传入 expected input/output language options,让可用性检测和 session 创建保持一致。
  • 恢复 Web 根 .env 加载,让 Web 构建在扩展发布环境隔离后仍能读取根目录 Vite 环境变量。
  • 主题化 tooltip 对短标签使用更轻的 compact padding,只有较长的 slot 内容才使用更丰富的带边框样式。

Extension

  • 扩展版本元数据同步到 v2.11.4,并继承共享 provider 元数据更新。
  • 扩展发布构建现在使用隔离的环境变量路径和专用 secret 检查,避免 root / web .env 值泄漏进扩展发布包。

Core/Infra

  • 新增 Grok LLM 与图像 adapter,补充 registry 覆盖、默认模型接线、兼容转换和单元测试。
  • 新增 Chrome built-in AI adapter、provider 元数据、模型默认项、可用性 helper 和 UI 引导工具,并补齐回归测试。
  • 调整默认模型启用逻辑:没有必填连接字段的 provider 不再在缺少明确意图时自动启用。
  • 将 repository test gate 接入 develop 分支 workflow,并为发布环境检查补充 package-script 覆盖。

修复

  • 修复本地 provider 在没有用户配置时默认启用的问题。
  • 修复扩展发布构建可能继承 Web / 根目录环境变量的问题。
  • 修复扩展环境隔离后 Web 构建丢失根 .env 加载的问题。
  • 修复 Chrome built-in AI 可用性检测和 session 创建时没有传入浏览器 API 所需语言选项的问题。
  • 修复短提示 tooltip 视觉过重的问题。

破坏性变更 / 升级说明

  • 无。

开发者说明

  • 本次发布范围是 v2.11.3..HEAD
  • 版本同步已将根包、桌面包和扩展 manifest 更新到 2.11.4
  • 验证覆盖 pnpm test:gatenode scripts/release-notes.js check v2.11.4git diff --check

安装文档:English | 中文
仓库版本说明(中文)


macOS note: if macOS reports the app as damaged or cannot verify the developer, this is usually caused by the quarantine attribute on downloaded apps. See the installation guide, or remove it after installing with xattr -rd com.apple.quarantine /Applications/PromptOptimizer.app; for a downloaded DMG, you can run the same command on ~/Downloads/PromptOptimizer-*.dmg before installing.
macOS 备注:如果 macOS 提示“已损坏”或“无法验证开发者”,通常是下载文件的隔离属性导致。请参考安装文档;也可以在安装后执行 xattr -rd com.apple.quarantine /Applications/PromptOptimizer.app,或在安装前对 ~/Downloads/PromptOptimizer-*.dmg 执行同类命令。

Don't miss a new prompt-optimizer release

NewReleases is sending notifications on new releases.