Skip to content

Commit 630572b

Browse files
committed
Enable manual prompt selection for commit messages regardless of global configuration
- when [Fragment] is false, is the user shown the quick pick to let them select by hand? It should.
1 parent a03eb45 commit 630572b

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎apps/editor/src/commands/generate-commit-message-command/generate-commit-message-command.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export const generate_commit_message_command = (
216216
if (edited_message) {
217217
let selected_prompts = relevant_prompts
218218

219-
if (include_prompts_setting && relevant_prompts.length > 0) {
219+
if (relevant_prompts.length > 0) {
220220
const picked = await new Promise<
221221
typeof relevant_prompts | undefined
222222
>((resolve) => {
@@ -225,7 +225,11 @@ export const generate_commit_message_command = (
225225
label: simplify_prompt_symbols({ prompt: p.prompt }),
226226
prompt: p
227227
}))
228-
quick_pick.selectedItems = quick_pick.items
228+
if (include_prompts_setting) {
229+
quick_pick.selectedItems = quick_pick.items
230+
} else {
231+
quick_pick.selectedItems = []
232+
}
229233
quick_pick.canSelectMany = true
230234
quick_pick.title = 'Accepted Prompts'
231235
quick_pick.placeholder =
@@ -255,7 +259,7 @@ export const generate_commit_message_command = (
255259
}
256260

257261
const selected_prompts_text =
258-
include_prompts_setting && selected_prompts.length > 0
262+
selected_prompts.length > 0
259263
? '\n\n' +
260264
selected_prompts
261265
.map(

0 commit comments

Comments
 (0)