126 Commits

Author SHA1 Message Date
linshen
272238dd6c docs: correct SSRF issue reference 2026-07-15 21:37:42 +08:00
linshen
c7d97d5018 docs: refine deployment guidance
- Align Cloudflare Workers setup across README and user docs
- Clarify build command cleanup and deployment context notes
- Keep frontend API key exposure warnings concise across providers
2026-05-27 23:17:46 +08:00
linshen
c06cf8adf6 docs: clarify docker compose env file usage 2026-05-18 22:54:46 +08:00
linshen
ce73ae0c8c chore: tidy root project files 2026-05-17 15:36:52 +08:00
linshen
2c08e28ade docs: add cloudflare pages deployment guide 2026-05-16 11:23:41 +08:00
linshen
684a7bf4c1 feat(provider): add Grok text and image support
- Add first-class xAI/Grok text and image adapters with dynamic model fallback.
- Register defaults, env mapping, docs, locale labels, and legacy converter handling.
- Cover Grok request payloads, image defaults, registry behavior, and input image limit checks.
2026-05-15 20:43:18 +08:00
linshen
b252168e04 chore(release): prepare v2.11.2 2026-05-13 23:07:36 +08:00
SamCheng0717
1df08bc2e5 fix(model): support JSON custom parameter values
- Parse Python-style JSON literals for custom model parameters

- Add JSON/string format controls for custom parameter inputs

- Add model parameter docs and locale strings
2026-05-13 21:03:26 +08:00
linshen
69db225a1a feat(model): support headers and text quick switching
- Add custom request header parsing and provider metadata resolution

- Add quick switching controls for text model workspaces

- Keep model UI labels and custom header output tidy
2026-05-10 23:08:14 +08:00
linshen
3f6c460154 feat(garden): add inspiration and import polish
- Add prompt garden inspiration suggestions for image workspaces

- Use public API paths and locale-aware suggestion loading

- Preserve category paths when importing favorites from Prompt Garden
2026-05-10 21:23:37 +08:00
linshen
b34ca68898 chore(release): move macOS note to release body footer 2026-05-10 15:57:12 +08:00
linshen
9e4d60fc9c docs: sync documentation with v2.10.0 features
- Update site/src/main.js with image generation, Prompt Garden, Smart Favorites
- Update README.md and README.zh-CN.md with new features
- Update docs/project/ to v2.10.0 (project-status, prd, README)
- Update docs/README.md timestamp
2026-05-03 21:08:50 +08:00
linshen
6d75528793 feat(prompt-garden): integrate import and favorite flow
Wire Prompt Garden imports into workspace and favorite flows, add the import dialog/panel affordances, persist Garden metadata/media into favorites, and document the external import contract.
2026-05-03 13:15:16 +08:00
linshen
0b9cd227d9 docs(prompt-model): consolidate standardization status 2026-05-03 13:15:14 +08:00
linshen
4accdf1417 feat(prompt-garden): add discovery import entry
- Add environment defaults and Vite proxy configuration for Prompt Garden discovery
- Expose discovery import controls from workspace utility surfaces
- Wire image text-to-image import affordances and localized copy
- Document configuration and cover environment/UI behavior with tests
2026-05-02 22:20:01 +08:00
linshen
23848a840d feat(favorites): refine prompt asset workspace flows
- Bind favorites to source assets and save targets throughout workspace actions
- Share the favorite editor/detail surfaces across dialogs and workspace panels
- Add provenance badges, utility-menu apply actions, and themed favorite panels
- Expand unit and integration coverage for favorite source and editor flows
2026-05-01 14:36:12 +08:00
linshen
93377e1b70 feat(favorites): standardize prompt asset sessions
- Add prompt-model services for content, examples, modes, sessions, and history
- Persist richer favorite prompt-asset metadata and session projections
- Wire favorite save/apply paths across supported workspaces
- Cover the new prompt-asset contract with core and UI regressions
2026-05-01 10:24:18 +08:00
linshen
2e119a6d83 fix(core): align seedream image model capabilities 2026-04-20 22:26:52 +08:00
linshen
c75afa89e9 feat(i18n): establish english-first locale baseline
- split UI locale packs into en-US, zh-CN, and zh-TW modules
- switch runtime defaults, docs, and repository guidance toward an English-first baseline
- update core, MCP, and UI runtime copy to remove hardcoded Chinese fallbacks
- add locale parity and no-hardcoded-runtime guardrails across the repo
2026-04-08 20:18:27 +08:00
linshen
8cf43a3e3d test(e2e): streamline gated suites and replay stability 2026-04-06 14:13:29 +08:00
linshen
d0f1d45c17 fix(storage): harden startup safety and favorite asset handling 2026-04-06 14:13:28 +08:00
linshen
bd546ebe0f build(release): add repo-driven bilingual release notes 2026-04-05 08:24:26 +08:00
linshen
fe62586b19 fix(ci): remove repo-level electron mirror defaults 2026-04-03 00:42:00 +08:00
linshen
46d7d0552d feat(image): refine reference style migration flow
- Strengthen the style migration contract around natural subject integration and visual hierarchy
- Remove the image2image reference extraction entry from the migrated UI flow
- Normalize migration placeholders and document the updated migration design
2026-04-01 23:24:51 +08:00
linshen
c33f5973a3 refactor(image): rebuild reference prompt pipeline
- Introduce the new reference prompt composition and migration template pipeline
- Replace the legacy image prompt extraction path and align template loading contracts
- Update text2image workspace integration and add reference pipeline coverage
2026-03-30 22:08:41 +08:00
linshen
cd7fd6bc88 docs(developer): sync prompt garden integration contract 2026-03-29 21:17:23 +08:00
linshen
e69086f075 build(deps): refresh workspace dependency baselines
- refresh direct dependency baselines across workspace packages
- require Node 22 consistently in docs, Docker, and package engines
- update lint/build tooling configs to match the new workspace baseline
- keep package manifests and lockfile aligned after the dependency refresh
2026-03-27 20:41:18 +08:00
linshen
9909abf58f docs: archive outdated workspace documents 2026-03-26 21:23:46 +08:00
linshen
1a307fa0c7 chore(repo): remove bmad and local ai tool artifacts 2026-03-26 20:47:18 +08:00
linshen
414ec28d7e feat(evaluation): migrate compare rewrite protocol and add calibration artifacts 2026-03-22 14:28:53 +08:00
linshen
f0c7476792 docs(compare): refine compare design docs and template scope 2026-03-21 20:43:28 +08:00
linshen
2cdd095c2b docs(workspace): consolidate compare evaluation specs and acceptance evidence
- fold earlier planning notes into a single current-spec and archived history structure
- keep manual acceptance steps and real API samples aligned with the refactored analysis/result/compare model
- retain supporting workspace notes needed to review version-selection and evaluation behavior changes
2026-03-18 09:35:44 +08:00
SuperDuckGOGOGO
98a6b4f398 feat(core): support custom model params from env (#273)
Allow Docker and other runtime environments to inject JSON request parameters for suffixed custom models so provider-specific defaults like NVIDIA NIM thinking flags persist outside the UI. Add parsing, sanitization, tests, and docs for the new VITE_CUSTOM_API_PARAMS_<suffix> flow.
2026-03-13 13:51:06 +08:00
linshen
c916d9eef3 fix(config): add missing provider env mappings
Enable Anthropic env-based default model creation and align provider lists/matching across desktop logs, MCP selection, and docs.
2026-02-10 18:04:29 +08:00
linshen
01ff1435f6 docs(user): add context mode guides 2026-02-02 20:12:51 +08:00
linshen
89a6f0de9c feat(ui): require prompt-garden v1 import schema
Require v1-only response schema (no legacy content/title), support text/messages prompts, import variables into submode temporary variables, and document Mustache-only placeholders.
2026-01-29 21:30:00 +08:00
linshen
ce3af34d9b feat(ui): add multi-column basic-user test variants
Enable 2-4 column comparisons with per-variant version/model selection, persisted layout/results, and evaluation actions aligned to output.
2026-01-24 12:44:33 +08:00
linshen
ba3c4b7c88 fix(ui): persist manual prompt edits to history
Ensure Save Changes creates a new version across basic and image workspaces.
2026-01-22 21:47:20 +08:00
linshen
7163464097 fix(ui): 实现 UI 持久化和模板选择统一
- 实现 session selections 跨刷新持久化
- 统一 template default 选择逻辑
- 对齐 image template 和 model 布局
- 验证 template defaults 和 mode-switch persistence
2026-01-11 19:34:00 +08:00
linshen
8467b96263 feat(test): 实现智能测试系统并改进测试策略
- 实现智能测试系统,统一测试入口
- 完成 Pro 路由重构和 Image 模式评估测试
- 为 Image 模式添加 data-testid 支持
- 完善 E2E 测试并修复选择器策略
- 优化 Seedream、OpenAI 和 SiliconFlow 适配器
- 移除调试日志,保留错误和警告日志
- 重命名 Pro 模式子模式(system/user → multi/variable)
- 清理测试代码并改进稳定性
2026-01-10 11:23:00 +08:00
linshen
63ab9e66cd feat(test): 建立完整的测试基础设施和集成测试
- 建立 VCR 测试基础设施,支持 LLM API 回放
- 添加错误门禁和冒烟测试
- 添加 LLM 服务集成测试(P0)
- 记录测试进展并更新任务计划
2026-01-03 21:08:00 +08:00
linshen
69bffd4260 refactor(ui): 完善单一真源架构解决跨模式状态污染
- 修复跨模式状态污染问题,实现单一真源架构
- 完善单一真源架构并优化代码分割
- 归档 Session Store 单一真源重构文档
- 将未完成的迁移指南移回 workspace
2026-01-02 16:52:00 +08:00
linshen
6d21babfdd refactor(ui): 引入 Pinia 状态管理并重构服务访问
- 引入 Pinia 状态管理:创建 promptDraft store 和多个 session stores
- 重构服务访问:移除 $services 插件,统一服务访问方式
- 修复 session 存储竞态条件:使用 Pinia 的响应式系统
- 归档 Pinia 重构文档:记录完整的迁移过程
- 修正 MCP server bin 入口配置
2026-01-01 14:23:00 +08:00
linshen
edf6170177 refactor(ui): 统一代码规范和用户界面文案
- 事件监听:统一使用camelCase,与emit事件名保持一致
- 按钮文案:简化为动词形式(开始优化→优化、开始测试→测试)
2025-12-28 16:15:00 +08:00
linshen
8e1b00e2f7 feat(evaluation): 新增 prompt-only 和 prompt-iterate 评估类型
主要变更:
- 扩展 EvaluationType 联合类型,新增 prompt-only 和 prompt-iterate
- 新增 16 个评估模板(basic/pro × system/user × zh/en × prompt-only/prompt-iterate)
- 实现 Provider 路由模式,全局 EvaluationPanel 事件正确路由到各模式
- 新增 useEvaluationContext 和 useProContext 上下文注入
- Context Workspaces 通过 defineExpose 暴露 reEvaluateActive 和 openIterateDialog
- 模式/子模式切换时自动清理评估状态
- EvaluationPanel 标题支持新评估类型
- 新增评估服务单元测试
2025-12-23 21:43:00 +08:00
linshen
390545bb80 docs(arch): 归档多轮对话与上下文模式重构设计文档
- 新增多轮对话模式优化设计文档 (127)
- 新增上下文 UI 与变量系统重构文档 (128)
- 更新归档索引与 README 分类结构
2025-12-19 20:51:26 +08:00
linshen
b7cab01197 fix(evaluation): 修复代码审查报告中的多项问题
修复项:
- §4.1: 使用 jsonrepair 库优化 JSON 解析鲁棒性
- §4.2: 规范化 isOptimizedBetter 字段为 boolean 类型
- §4.4: 支持中文变量名回退扫描(正则改为 [^{}]+)
- §4.5: 为单例模式添加架构约束注释说明
- §4.6: 移除 useEvaluation 和 useFunctionModelManager 中的 as any
- §4.8: 复用 createApplyImprovementHandler 工厂方法
- §4.9: 确认 UI 包导出变更无外部依赖影响

延后处理:
- §4.7: Extension App.vue 拆分(大工程)

不修复:
- §4.3: 默认打开面板策略(计划移除详情面板)
2025-12-19 11:29:35 +08:00
linshen
fb29b61bde **refactor(ui): 统一优化与测试架构,实现 ContextUser 和 ContextSystem 的完全解耦**
为提升架构对称性与模块独立性,全面重构会话管理与测试逻辑,彻底消除 `App.vue` 的中心化依赖:

- **架构解耦**:
  - 实现 `ContextUserWorkspace` 完全独立,不再依赖 `App.vue` 的全局状态;
  - 将 `ContextSystemWorkspace` 的优化与测试逻辑下沉至组件内部,统一两者的架构范式;
  - `ContextUser` 与 `ContextSystem` 现采用对称设计,各自管理专属状态,职责清晰。

- **Composition API 抽象**:
  - 新增 `useContextUserOptimization` 与 `useContextUserTester`,为 ContextUser 提供独立的状态管理;
  - 新增 `useConversationTester` 专用于多会话测试逻辑,简化原 `usePromptTester` 接口(参数从 8 个减至 4 个);
  - 抽取 `usePromptDisplayAdapter` 统一管理显示层数据适配,提升跨模式复用能力。

- **代码优化与清理**:
  - 移除 `App.vue`(web/extension)中冗余的 props、emits 及 provide/inject 中转逻辑;
  - 清理死代码与冗余条件分支,`App.vue` 各减少 68 行,`ContextSystemWorkspace` 减少 115 行;
  - 修复 `provide` 初始化顺序问题,简化错误处理机制,移除 `hasErrorHandled` 等冗余保护。

- **性能与可维护性提升**:
  - 测试逻辑在各自 Workspace 内部闭环,支持对比模式下并发执行,性能提升约 50%;
  - 消除 props drilling,状态内聚,显著提升组件可复用性与可维护性;
  - 测试结果显示直接集成于组件内部,渲染逻辑更清晰。

**变更文件**:
- 新增:`useContextUserOptimization.ts`(290行)、`useContextUserTester.ts`(235行)、`useConversationTester.ts`、`usePromptDisplayAdapter.ts`
- 重构:`ContextUserWorkspace.vue`、`ContextSystemWorkspace.vue`、`App.vue`(web/extension)
- 新增架构设计文档 2 份

**影响范围**:
仅限 ContextUser 模式与 ContextSystem 模式内部重构,基础模式不变,行为向后兼容。

**测试验证**:
-  Lint:0 错误,0 警告
-  UI Tests:237 通过
-  Core Tests:724 通过

> 架构目标达成:组件高内聚、低耦合,`App.vue` 职责简化,系统整体可扩展性增强。
2025-11-16 18:30:25 +08:00
linshen
21368fa678 fix(conversation): 修复多轮对话历史记录恢复问题并全面优化版本管理
核心修复:
- 修复多轮对话模式下 V2 及以上迭代版本无法正确恢复的 bug
- 修复消息顺序优化后历史记录恢复时,部分消息错误回溯到原始 (V0) 状态的 bug
- 在 iterateMessage 中手动预计算版本号,确保快照中的 appliedVersion 与实际保存的版本号一致
- 重构 useConversationOptimization.ts 中 getMessageAppliedVersion 函数,统一版本语义,使用 record.version 属性而非数组索引进行匹配
- 修正优化快照 (conversationSnapshot) 构建逻辑,确保当前优化消息的 appliedVersion 和 content 始终准确无误
- 改进 conversation optimizer 中的版本匹配机制,使用修剪后的字符串比较防止错误版本不匹配

功能增强:
- 新增完整的 iterateMessage 方法,支持多轮对话的消息级迭代优化
- 传递完整上下文数据(messages、selectedMessageId)给底层服务
- 对比测试时分别维护 originalToolCalls 和 optimizedToolCalls,确保工具调用结果互不干扰
- 在 prompt optimizer 历史元数据中添加 conversationSnapshot 以支持准确的状态恢复
- 重构优化流程,optimizeMessage 现在强制重置状态,避免状态污染

UI 优化:
- 调整版本标签显示顺序为 v3 v2 v1 v0(最新版本在前,v0 固定在最后)
- 优化版本切换交互体验

国际化支持:
- 修复 prompt optimizer 中的硬编码中文字符串,替换为 i18n 键
- 为多轮对话优化添加缺失的 i18n 键

代码质量:
- 删除所有调试日志(console.log)
- 添加模板处理边界情况注释(Mustache 空数组 vs undefined)
- 更新 App.vue (Web 和 Extension) 的历史记录恢复逻辑,通过 record.version 精确查找版本,增强了对历史记录删除(导致版本数组稀疏)的健壮性
- 为对话优化功能暂存未跟踪的新文件
2025-11-16 15:42:18 +08:00
linshen
3832c1a6e9 feat(ui): 将 selectedOptimizationMode 改为 computed,动态计算优化模式
- 将 selectedOptimizationMode 从 ref 改为 computed,基于 functionMode 动态返回对应的 subMode 值
- 更新相关逻辑以确保在不同模式下自动同步优化模式
- 修改 useContextManagement 和 usePromptOptimizer 接口,建议传入 computed 值以提高灵活性
- 保持向后兼容性,确保现有功能正常运行

此更改提升了代码的可维护性和响应性,确保优化模式的动态计算与功能模式一致。
2025-11-15 14:45:32 +08:00