Repository navigation
Commit 9987a68
committed
Defer context file prompts in commit message generation and filter ignored files
- In the commit message generation flow, we currently attach the full content of changed files (and context files) to the prompt even when those files would be excluded from normal chat context — e.g. lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, etc. via IGNORED_LOCK_FILES), files matched by codeWebChat.ignorePatterns, or gitignored files. Fix this so ignored files never get their full content attached, while keeping their diffs intact.
- Whether to include context files or skip, should be shown after selecting action (because it doesn't apply to 'enter manually' action)
├── apps
│ └── editor
│ └── src
│ ├── commands
│ │ ├── apply-response-command
│ │ │ └── utils
│ │ │ └── preview
│ │ │ ├── index.ts
│ │ │ └── vscode-ui.ts
│ │ └── generate-commit-message-commands
│ │ ├── actions
│ │ │ ├── get-prompt-data.ts
│ │ │ └── run-generate-action.ts
│ │ ├── generate-commit-message-commands.ts
│ │ ├── index.ts
│ │ └── utils
│ │ ├── build-commit-message-prompt.ts
│ │ ├── generate-commit-message-with-api.ts
│ │ ├── get-commit-message-config.ts
│ │ └── strip-wrapping-quotes.ts
│ ├── constants
│ │ ├── instructions.ts
│ │ ├── state-keys.ts
│ │ └── values.ts
│ ├── context
│ │ ├── context-initialization.ts
│ │ ├── helpers
│ │ │ ├── get-all-workspace-files.ts
│ │ │ └── get-selected-files.ts
│ │ ├── providers
│ │ │ ├── open-editors
│ │ │ │ └── open-editors-provider.ts
│ │ │ ├── selected-files
│ │ │ │ └── selected-files-provider.ts
│ │ │ └── workspace
│ │ │ ├── modules
│ │ │ │ ├── index.ts
│ │ │ │ └── token-calculator.ts
│ │ │ └── workspace-provider.ts
│ │ ├── shared-context-state.ts
│ │ └── utils
│ │ └── shrink-file
│ │ ├── index.ts
│ │ ├── languages
│ │ │ ├── c-style.ts
│ │ │ ├── css.ts
│ │ │ ├── html.ts
│ │ │ ├── jsx.ts
│ │ │ ├── python.ts
│ │ │ ├── ruby.ts
│ │ │ └── sql.ts
│ │ ├── shrink-file.spec.ts
│ │ ├── shrink-file.ts
│ │ └── test-cases
│ │ ├── c-style
│ │ │ ├── input.txt
│ │ │ └── output.txt
│ │ ├── css
│ │ │ ├── input.txt
│ │ │ └── output.txt
│ │ ├── html
│ │ │ ├── input.txt
│ │ │ └── output.txt
│ │ ├── jsx
│ │ │ ├── input.txt
│ │ │ └── output.txt
│ │ ├── python
│ │ │ ├── input.txt
│ │ │ └── output.txt
│ │ ├── ruby
│ │ │ ├── input.txt
│ │ │ └── output.txt
│ │ ├── scss
│ │ │ ├── input.txt
│ │ │ └── output.txt
│ │ └── sql
│ │ ├── input.txt
│ │ └── output.txt
│ ├── features
│ │ └── checkpoints
│ │ └── actions
│ │ ├── create-checkpoint.ts
│ │ └── index.ts
│ ├── i18n
│ │ └── index.ts
│ ├── services
│ │ ├── model-providers-manager.ts
│ │ └── websocket-manager.ts
│ ├── utils
│ │ ├── apply-reasoning-effort.ts
│ │ ├── ascii-tree
│ │ │ ├── ascii-tree.ts
│ │ │ └── index.ts
│ │ ├── commit-message-details.ts
│ │ ├── files-collector.ts
│ │ ├── git-repository-utils.ts
│ │ ├── normalize-path.ts
│ │ ├── prompt-builder.ts
│ │ ├── send-llm-message.ts
│ │ ├── show-configuration-quick-pick.ts
│ │ └── show-no-configurations-warning.ts
│ └── views
│ └── prompt
│ └── backend
│ └── prompt-view-provider.ts
└── packages
└── shared
└── src
├── constants
│ ├── chatbots.ts
│ └── dictionary.ts
└── utils
├── display-token-count.ts
└── logger.ts1 parent f5957b1 commit 9987a68
3 files changed
Lines changed: 212 additions & 197 deletions
File tree
- apps/editor/src/commands/generate-commit-message-commands
- actions
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
265 | 123 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
284 | 137 | | |
285 | 138 | | |
286 | | - | |
| 139 | + | |
| 140 | + | |
287 | 141 | | |
288 | | - | |
289 | | - | |
290 | 142 | | |
291 | 143 | | |
292 | 144 | | |
293 | 145 | | |
294 | 146 | | |
295 | | - | |
296 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
297 | 150 | | |
298 | | - | |
299 | | - | |
| 151 | + | |
300 | 152 | | |
301 | 153 | | |
0 commit comments