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

Offen Anfängerfreundlich
#1,163 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
83/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
cli, testing

Rechercherichtung

Beginne mit den Resolvern für Agent-Links in cli/src/contexts/tools/domain/profiles/kilo/build.ts und cli/src/contexts/tools/domain/profiles/opencode/build.ts. Vergleiche anschließend deren Pfadbehandlung mit flatAgentPath der generischen Flat-Strategie. Füge für jedes Tool einen fehlschlagenden Test für einen verschachtelten Agenten hinzu und aktualisiere dann die Resolver entsprechend der Flat-Pfadregel. Fertig ist die Änderung, wenn beide Tests bestätigen, dass die Links auf die abgeflachten Agent-Dateien verweisen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
481
Forks
45
Ø Merge
23 Std. 18 Min.
Gemergte PRs (30 T.)
106

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ai-driven-dev/framework

Alle Issues in ai-driven-dev/framework

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.