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

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 cli/src/contexts/framework/application/install/install-ide-tool-use-case.ts 开始,追踪 mergeAndTrack 如何使用 existingEntries;issue 描述了 cli/src/contexts/installation/application/install/propagate-ai-settings-to-ide.ts 中的相同模式。先添加 issue 中描述的失败测试:从一个现有 manifest 条目开始,并传播两个需要同一 IDE 的设置文件。完成条件是 manifest 保留现有条目,并记录两个新条目。

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

描述

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.

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

环境准备

从这里开始

  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 摘要。