fix(cli): settings propagation to an IDE keeps only the last settings file's manifest entry

Offen Anfängerfreundlich
#1,311 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
86/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
cli

Rechercherichtung

Beginne mit cli/src/contexts/framework/application/install/install-ide-tool-use-case.ts und verfolge, wie existingEntries von mergeAndTrack verwendet wird; der Issue beschreibt dasselbe Muster in cli/src/contexts/installation/application/install/propagate-ai-settings-to-ide.ts. Füge zuerst den fehlschlagenden Test hinzu, der im Issue beschrieben wird: Beginne mit einem vorhandenen Manifest-Eintrag und übertrage zwei Einstellungsdateien, die dieselbe IDE erfordern. Fertig, wenn das Manifest den vorhandenen Eintrag behält und beide neuen Einträge erfasst.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Description

When an AI tool has several settings files that require the same IDE, propagating the settings to that IDE keeps only the last file's manifest entry. Each iteration filters the original merge entries, not the ones the previous iteration produced.

Affected file(s)
  • next: cli/src/contexts/framework/application/install/install-ide-tool-use-case.ts (existingEntries captured once, mergeAndTrack builds updated from it and calls manifest.updateToolMergeFiles per file).
  • refactor/cli-target: cli/src/contexts/installation/application/install/propagate-ai-settings-to-ide.ts (mergeAiToolSettings, replacing(existingEntries, entry)).
Expected behaviour

After propagation the manifest holds one merge entry per settings file written.

Observed behaviour

Every iteration computes [...existingEntries.filter(not this path), entry] from the same original list, then overwrites the tool's merge files with it. The entry of file 1 is dropped when file 2 is tracked. Limit: on next only Copilot declares a settings file with requiresTool (.vscode/settings.json), so the loss is latent until a tool declares a second one. The files themselves are still written; only their tracking is lost, which hides them from clean, doctor and status.

AI tool

All (latent, no shipped tool has two such files today)

aidd-cli version

unreleased, next

OS

Any

Additional context

Red-first test: a tool profile with two settings files requiring the same IDE, a manifest with one pre-existing merge entry, then propagate. Assert the manifest holds the pre-existing entry plus both new entries. Fix direction: carry the updated list across iterations.

Vorherrschende Sprache
TypeScript
Sterne
481
Forks
45
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
91

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.