Skip to content

Commit dbf23ac

Browse files
Document feedback prompt claim marker
Clarify atomic claim acquisition, existing-marker behavior, and when the once-only marker is released. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f449e51d-c3f9-40cc-9e9d-1a24773e7712
1 parent 2e4b7cd commit dbf23ac

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/features/feedback/feedbackPromptService.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ export class FeedbackPromptService implements Disposable {
232232
}
233233
}
234234

235+
/**
236+
* Atomically creates the marker only when it does not already exist.
237+
* Success acquires the prompt claim; EEXIST means another extension host already claimed or displayed it.
238+
*/
235239
async function claimPrompt(globalStoragePath: string): Promise<boolean> {
236240
await fs.mkdir(globalStoragePath, { recursive: true });
237241
try {
@@ -246,6 +250,8 @@ async function claimPrompt(globalStoragePath: string): Promise<boolean> {
246250
}
247251
}
248252

253+
// Remove the claim only when display conditions change before the prompt is shown.
254+
// After the prompt is displayed or dismissed, the marker remains to enforce once-only behavior.
249255
async function releasePromptClaim(globalStoragePath: string): Promise<void> {
250256
try {
251257
await fs.unlink(path.join(globalStoragePath, PROMPT_CLAIM_FILE));

0 commit comments

Comments
 (0)