Skip to content

Commit 065d4c1

Browse files
authored
Do not show parent checkbox contents for ai generated workspaces (microsoft#191933)
1 parent eec2fc7 commit 065d4c1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,12 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon
311311
this._register(this.workspaceTrustRequestService.onDidInitiateWorkspaceTrustRequestOnStartup(async () => {
312312

313313
let titleString: string | undefined;
314-
let checkboxString: string | undefined;
315314
let learnMoreString: string | undefined;
316315
let trustOption: string | undefined;
317316
let dontTrustOption: string | undefined;
318-
if (await this.isAiGeneratedWorkspace() && this.productService.aiGeneratedWorkspaceTrust) {
317+
const isAiGeneratedWorkspace = await this.isAiGeneratedWorkspace();
318+
if (isAiGeneratedWorkspace && this.productService.aiGeneratedWorkspaceTrust) {
319319
titleString = this.productService.aiGeneratedWorkspaceTrust.title;
320-
checkboxString = this.productService.aiGeneratedWorkspaceTrust.checkboxText;
321320
learnMoreString = this.productService.aiGeneratedWorkspaceTrust.startupTrustRequestLearnMore;
322321
trustOption = this.productService.aiGeneratedWorkspaceTrust.trustOption;
323322
dontTrustOption = this.productService.aiGeneratedWorkspaceTrust.dontTrustOption;
@@ -333,9 +332,9 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon
333332
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace());
334333
const isSingleFolderWorkspace = isSingleFolderWorkspaceIdentifier(workspaceIdentifier);
335334
const isEmptyWindow = isEmptyWorkspaceIdentifier(workspaceIdentifier);
336-
if (this.workspaceTrustManagementService.canSetParentFolderTrust()) {
335+
if (!isAiGeneratedWorkspace && this.workspaceTrustManagementService.canSetParentFolderTrust()) {
337336
const name = basename(uriDirname((workspaceIdentifier as ISingleFolderWorkspaceIdentifier).uri));
338-
checkboxText = checkboxString ?? localize('checkboxString', "Trust the authors of all files in the parent folder '{0}'", name);
337+
checkboxText = localize('checkboxString', "Trust the authors of all files in the parent folder '{0}'", name);
339338
}
340339

341340
// Show Workspace Trust Start Dialog

0 commit comments

Comments
 (0)