fix(media): 修复 Core 视频模型被旧 Registry 误过滤 - #3452
Conversation
Signed-off-by: liugaowei <liugaowei@xd.com>
|
| Filename | Overview |
|---|---|
| apps/desktop/src/main/cindy-brain/cindyMediaCatalog.ts | 新增 Core 媒体模型筛选和旧执行通道配置收窄辅助函数,保持输入目录不可变。 |
| apps/desktop/src/main/cindy-brain/index.ts | Core 目录不再依赖 legacy alias,可执行性筛选与旧 cindy-request 偏好恢复被拆分到各自通道。 |
| apps/desktop/src/main/cindy-brain/tests/cindyMediaCatalog.test.ts | 增加 Core 视频筛选和旧配置默认值恢复的单元测试。 |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Gateway 与本地媒体模型] --> B[Core 类型及可执行性筛选]
B --> C[Core 媒体偏好与插件目录]
C --> D[Core 执行通道]
C --> E[旧 cindy-request 读取]
E --> F[Legacy Registry alias 筛选]
F --> G[失效默认恢复与持久化]
G --> H[旧 Registry 执行通道]
Reviews (5): Last reviewed commit: "fix(media): reconcile legacy video prefe..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9526534908
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: liugaowei <liugaowei@xd.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43f9e0f792
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@greptileai review the current head |
Signed-off-by: liugaowei <liugaowei@xd.com>
|
@greptileai review the current head e7a5084. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
这个 PR 改到了插件基座( 需要改的话请直接 Request Changes;作者改完再 Approve 即可。讨论细节写在关联的讨论 issue 里。 讨论 issue:#3457 |
|
@GaoWeiLiuXD 👋 这个 PR 目前与 请在本地 merge 最新的 |
…o-availability Signed-off-by: liugaowei <liugaowei@xd.com> # Conflicts: # apps/desktop/src/main/cindy-brain/index.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7018b7991d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@GaoWeiLiuXD 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/main/cindy-brain/index.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
|
@greptileai review the current head 7018b79. |
Signed-off-by: liugaowei <liugaowei@xd.com>
|
@greptileai review the current head 4897117. 本轮仅修复旧 cindy-request 的视频偏好恢复,Core Gateway 目录不再按 legacy alias 过滤;第三方本地视频仍由 Registry 执行,边界已在 PR 正文及上轮 thread 说明。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48971177a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
这次改了什么
摘要
Gateway 视频模型已有 modalities 与 Guide 可执行性预检,但 Core 媒体偏好和插件目录又按旧
VideoProviderRegistry过滤,导致无 legacy alias 的可用模型被隐藏。本 PR 去掉这层重复过滤,并隔离旧cindy-request的偏好解析。变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
cindy-request读取视频偏好时按实际执行通道筛选,复用既有失效配置恢复与持久化;补充相关行为测试。cindy-request的生成协议或 Registry 派发防线。listLocalProviderVideoModels()的 alias 检查保持不变;Gateway Core 视频不经过该函数。当前第三方 Provider Core runtime 仅注册图片能力,不把尚未接通的第三方视频冒充为可用模型。已确认的兼容策略
需求已明确:由于版本兼容导致当前插件无法执行保存的模型时,只要还有可执行候选,就自动恢复到可用选型;此恢复属于用户配置的兼容性更新,不要求用户重新配置。恢复后的 Provider + 模型写回原配置并记录迁移日志,后续配置读取与实际使用保持一致;不采用“执行时换模型、保存的配置仍指向另一模型”的分离口径。仍可执行的选择不改,无旧通道候选时不改写配置,也不绕过 Registry 发请求。
UI 变化
不涉及:没有修改 UI 代码,仅修正模型目录及旧执行入口的配置解析。
怎么验证的
自动验证
pnpm --filter desktop run --if-present typecheck通过。pnpm test:unit:related通过,实际范围为本 PR 的 3 个 Desktop 文件,耗时约 32 秒,未退化为全量测试。code-review复核完整 PR diff 及调用链:旧入口筛选结果传入既有resolveAndMigrateGhostMediaPreference,配置变更继续写入同一writeGhostCindyOverride存储。手工验证
本轮未启动 Desktop,未发起真实付费生成。
未执行的验证
本地未重跑全量单测或 Windows 实机;GitHub CI 负责 Linux/Windows 完整单测。纯目录筛选与现有持久化调用未新增平台相关行为。
风险
风险分类
影响与回滚
cindy-request的视频偏好恢复。提交前检查
git commit -s)