fix(cli): a link to a nested agent lands on the wrong file in Kilo and OpenCode builds

未关闭 适合新手
#1,163 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
83/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
cli, testing

调研方向

先检查 cli/src/contexts/tools/domain/profiles/kilo/build.ts 和 cli/src/contexts/tools/domain/profiles/opencode/build.ts 中的 agent 链接解析器,然后将它们的路径处理方式与通用扁平策略中的 flatAgentPath 进行比较。为每个工具中的嵌套 agent 添加一个会失败的测试,然后更新解析器,使其符合扁平路径规则。两个测试都确认链接指向扁平化后的 agent 文件时,即为完成。

由索引模型根据 Issue 内容生成。

描述

Description

In Kilo and OpenCode builds, a link from one agent's text to an agent nested under agents/<folder>/ resolves to a path that keeps the folder, while the agent file itself is written flattened. The link lands on a file that does not exist.

Affected file(s)

cli/src/contexts/tools/domain/profiles/kilo/build.ts, cli/src/contexts/tools/domain/profiles/opencode/build.ts (their own agent link resolvers)

Expected behaviour

A link to a nested agent resolves to the file the build writes, through the same rule as the generic flat strategy's flatAgentPath.

Observed behaviour

The generic flat strategy was aligned in #1158 (agent writer, command naming an agent, markdown link). The Kilo and OpenCode agent transforms still resolve links through their own resolvers, which do not drop the folder.

AI tool

Other: Kilo, OpenCode.

OS

macOS, Linux, Windows.

Additional context

No shipped plugin nests agents today, so no user is affected yet. The fix is a test with a nested agent on each of the two tools, red first.

主要语言
TypeScript
星标
481
派生
45
平均合并
1 天 1 小时
30 天内合并 PR
106

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ai-driven-dev/framework 的其他 Issue

查看 ai-driven-dev/framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。