Skip to content

fix(cindy-art): prioritize Art media handling - #100

Open
GaoWeiLiuXD wants to merge 1 commit into
makecindy:mainfrom
GaoWeiLiuXD:fix/art-media-agent-guidance
Open

fix(cindy-art): prioritize Art media handling#100
GaoWeiLiuXD wants to merge 1 commit into
makecindy:mainfrom
GaoWeiLiuXD:fix/art-media-agent-guidance

Conversation

@GaoWeiLiuXD

Copy link
Copy Markdown
Collaborator

What changed / 改了什么

  • 提高 Art 的召回优先级:用户需要生成或编辑图片、生成视频且未明确指定其他媒体渠道时,优先选择 Art。
  • 同步 zh-CN、en、ja、ko 四种语言的 whenToUse
  • Art 返回创作参数时明确指导 Agent:受管 URI 可直接展示、改图和附件交接;图片只展示一次;仅在用户明确询问本地路径时调用 resolve_local_path;禁止猜测路径或扫描磁盘。
  • 基于最新官方 main 保留订阅专属模型转发修复,并将 Art 版本从 1.13.4 递增到 1.13.5。

Why / 为什么

默认生图请求可能被下游 harness 自带图片工具抢占,从而绕过用户在 Art 中配置的模型;同时,工具结果自动渲染与 Agent 最终回复重复嵌图会造成同一图片展示两次。Agent 在只拿到受管 URI 时还可能误以为必须扫描磁盘才能找到源文件。

本改动把 Art 设为未指定其他渠道时的首选,并把展示、改图与显式路径查询三种语义写清。

Checklist

  • Reviewed the complete diff — no credentials, tokens, authorization codes,
    real user data, unrelated generated files, or node_modules.
    已 review 完整 diff —— 无凭证、令牌、授权码、真实用户数据、无关生成文件或 node_modules
  • ghost.json declares only capabilities actually used (network hosts /
    slots / secrets); any new capability is justified in this PR description.
    ghost.json 只声明实际用到的能力;本 PR 未新增 capability。
  • Tools with irreversible external side effects handle every failure path.
    本插件四个工具只整理参数,不直接执行不可逆外部动作。
  • Every changed tool description still matches actual behavior; SKILL.md
    and settings copy stay consistent with it.
    本 PR 未修改 tools[].description 或 parameters。
  • Bumped ghost.json version to a SemVer greater than main.
  • minCindyVersion 未新增或提高。
  • 不涉及新插件。
  • Ran localization checks.
  • 不涉及 src/node/worker.cjs
  • 未新增或升级内嵌依赖。
  • Every commit is signed off with git commit -s.

Tool declaration changes / 工具声明改动

不涉及 tools[].description 或 parameters。仅修改顶层 whenToUse,使未显式选择其他媒体渠道的生图、改图和视频请求优先召回 Art;并修改运行时 result note,指导 Agent 正确处理受管媒体地址。

Verification / 验证

node --test .tests/localization.test.mjs .tests/provisioning.test.mjs .tests/publish-workflows.test.mjs .tests/cindy-art.test.mjs
结果:21 passed

BASE_SHA=1ffa61d... HEAD_SHA=51bdf99... node --test .tests/plugin-contract.test.mjs
结果:2 passed

.github/scripts/package-plugin.sh cindy-art /private/tmp/cindy-art-51bdf99.cindy
结果:通过;归档包含 LICENSE / NOTICE / TRADEMARKS,包内 ghost.json 版本为 1.13.5

本地 macOS Desktop E2E:普通“生成一张夏天的图”命中 Art → Cindy Core media,没有调用 harness 自带 image tool;结果只展示一次;显式询问路径时调用 resolve_local_path;后续改图直接复用原始 cindy-media:// 地址。该 E2E 使用了包含同一组 Agent 指引变更的预合并包;对齐最新 main 后的最终 1.13.5 包已完成契约与发布同款打包校验。

Sensitive changes / 敏感变更

None / 无。未改依赖、vendor、二进制资源、OAuth/API scope、凭证或鉴权边界、network/secret/slot/tool/Node capability、provisioning audience、minCindyVersion 或发布策略。

Signed-off-by: liugaowei <liugaowei@xd.com>
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown

Greptile Summary

本 PR 将 Art 设为未明确指定其他媒体渠道时的图片与视频请求首选,并补充受管媒体 URI 的展示、复用、附件交接及本地路径解析指引。

  • 同步更新 zh-CN、en、ja、ko 四种语言的 whenToUse
  • 指导 Agent 保持媒体地址原样、图片仅嵌入一次,并仅在用户明确询问本地路径时调用 resolve_local_path
  • 将插件版本从 1.13.4 更新到 1.13.5,并增加对应契约测试

Confidence Score: 5/5

未发现需要阻止合并的具体问题,当前变更看起来可以安全合并。

四语言路由语义、版本递增和运行时媒体指引保持一致,现有证据未显示新增指引会破坏当前插件或发布契约。

Important Files Changed

Filename Overview
cindy-art/main.js 扩展所有 Art 参数整理结果的 Agent 指引,明确受管 URI 的展示、复用和按需路径解析方式;未发现可确认的行为缺陷。
cindy-art/ghost.json 扩大 Art 的默认媒体召回优先级并正确递增补丁版本,现有能力和最低客户端版本声明保持不变。
cindy-art/locales/en.json 英文 whenToUse 与主清单新增的 Art 优先路由语义一致。
cindy-art/locales/ja.json 日文 whenToUse 与其他语言保持相同的媒体范围和优先条件。
cindy-art/locales/ko.json 韩文 whenToUse 与其他语言保持相同的媒体范围和优先条件。
cindy-art/locales/zh-CN.json 中文本地化同步主清单的媒体范围和 Art 优先路由条件。
.tests/cindy-art.test.mjs 更新版本断言并覆盖新增路由及媒体处理指引文本;测试与实现一致。

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  U[用户图片或视频请求] --> R{明确指定其他媒体渠道?}
  R -->|是| O[使用指定渠道]
  R -->|否| A[优先调用 Art]
  A --> P[返回创作参数与模型来源]
  P --> C[Cindy Core media]
  C --> M[返回受管媒体 URI]
  M --> D[最终回复中展示一次]
  M --> L{用户明确询问本地路径?}
  L -->|是| X[调用 resolve_local_path]
  L -->|否| N[直接展示、复用或附件交接]
Loading

Reviews (1): Last reviewed commit: "fix(cindy-art): prioritize Art media han..." | Re-trigger Greptile

@nanaco666

Copy link
Copy Markdown
Collaborator

当前合并门禁未通过(head 51bdf99

新 PR 已进入巡检,当前状态:

  • Greptile 已对当前 head 复审为 5/5(Last reviewed commit 即当前 head)并自动 Approve;无未解决 review thread;Repository-wide gates、changed-plugin packaging、DCO 全部 success。
  • 尚无维护者人工 approving review(当前 approving review 仅来自 Greptile 自动审批;按仓库规则自动审批不替代人工门禁)。

请完成人工 review 后正式 Approve;完成前请勿合并。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants