Skip to content

Commit 7585480

Browse files
committed
improve doc comments
1 parent c6b1d6d commit 7585480

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ export const askToSelectPrompt = async (
117117

118118
/**
119119
* If still no active item present, fall back to the first item in the list.
120+
* This can happen only if command was invoked not from a focused prompt file
121+
* (hence the `resource` is not provided in the options).
122+
*
123+
* Fixes the two main cases:
124+
* - when no prompt files found it, pre-selects the documentation link
125+
* - when there is only a single prompt file, pre-selects it
120126
*/
121127
if (!activeItem) {
122128
activeItem = fileOptions[0];

0 commit comments

Comments
 (0)