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

Aperta Adatta ai principianti
#1,311 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Inizia da cli/src/contexts/framework/application/install/install-ide-tool-use-case.ts e segui come mergeAndTrack utilizza existingEntries; la issue descrive lo stesso schema in cli/src/contexts/installation/application/install/propagate-ai-settings-to-ide.ts. Aggiungi per prima cosa il test che fallisce descritto nella issue: parti da una voce esistente nel manifest e propaga due file di impostazioni che richiedono lo stesso IDE. Il lavoro è completato quando il manifest mantiene la voce esistente e registra entrambe le nuove voci.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
481
Fork
45
Merge medio
1g 13h
PR unite (30g)
91

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ai-driven-dev/framework

Tutte le issue di ai-driven-dev/framework

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.