編集部セレクト
VS Codeで開いているファイルが、選んでいなくても毎回Claudeに渡っていませんか。
拡張機能の設定Attach Open Fileは既定で有効で、開いているファイルがそのままメッセージに足されます。
切ると、渡るのは自分が選んだ文字だけになります。
この設定はv2.1.271以降で使えます。
今日はVS Codeの設定を開いて、Attach Open Fileを切るかどうかを決めてください。
出典の原文(引用)
attachOpenFile | true | Add the file that is open in the editor to your messages and show it in the prompt box. When off, only your selected text is added. Requires Claude Code v2.1.271 or later. / Claude also sees which file you have open in the editor, even when nothing is selected, and the prompt box shows its name.— code.claude.com
この話題のきっかけ
https://github.com/anthropics/claude-code/issues/24726
題材を見つけた場所です。記事の根拠は上の出典です。
