Skip to content

Trust prompting#193

Closed
eleanorjboyd wants to merge 8 commits intomicrosoft:mainfrom
eleanorjboyd:trust-prompting
Closed

Trust prompting#193
eleanorjboyd wants to merge 8 commits intomicrosoft:mainfrom
eleanorjboyd:trust-prompting

Conversation

@eleanorjboyd
Copy link
Copy Markdown
Member

@eleanorjboyd eleanorjboyd commented Feb 18, 2025

fixes #136

@eleanorjboyd eleanorjboyd added the feature-request Request for new features or functionality label Feb 18, 2025
@eleanorjboyd eleanorjboyd self-assigned this Feb 18, 2025
Comment thread src/features/pythonApi.ts
Comment thread src/features/pythonApi.ts Outdated
Comment thread src/features/utils.ts Outdated
export const YES_INSTALL = 'Yes, Install';
export const NO_INSTALL = 'Do Not Install';

export function promptForInstallPermissions(extensionName: string, packages: string): Thenable<string | undefined> {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karthiknadig what is the best way to handle all the string literals between the prompts and the decision cases? Is constants the right way?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be put in localize.ts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, I will move them over once we determine what they should say

cc @cwebster-99 @luabud

Comment thread package.json Outdated
"preview"
]
},
"python-envs.extensionPackageTrust": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really trust, it is more of automatic package management. So this should likely say, allowAutoPackageManagement

/cc @cwebster-99 @luabud

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switched it to this for now but very flexible on this name - don't have a strong preference at the moment

Comment thread src/features/pythonApi.ts
Comment thread src/features/pythonApi.ts Outdated
Comment thread src/features/utils.ts Outdated
export const YES_INSTALL = 'Yes, Install';
export const NO_INSTALL = 'Do Not Install';

export function promptForInstallPermissions(extensionName: string, packages: string): Thenable<string | undefined> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be put in localize.ts

Comment thread src/features/utils.ts Outdated
Comment thread src/features/utils.ts Outdated
return new Promise((resolve) => {
window
.showInformationMessage(
'Do you want to install the following package/s from the ' + extensionName + ' extension?',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we be referencing the package names in this message as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but if there are multiple then we may want to say something like pandas, … or “pandas and other packages”.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it in the detail: package/s: "${packages}", section. Is this what you mean? What is the best way to word it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see! I missed that part in the initial review

Copy link
Copy Markdown
Member

@cwebster-99 cwebster-99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments but the options may be too verbose for the UI they are shown in. If that is the case, we can iterate.

Comment thread src/features/utils.ts Outdated
Comment thread src/features/utils.ts Outdated
Comment thread src/features/utils.ts Outdated
Comment thread src/features/pythonApi.ts Outdated
Comment thread src/features/pythonApi.ts Outdated
eleanorjboyd and others added 4 commits February 18, 2025 15:47
Co-authored-by: Courtney Webster <60238438+cwebster-99@users.noreply.github.com>
Comment thread package.json
"alwaysAsk"
],
"default": "alwaysAsk",
"description": "Sets how installs by a given extension will be handled from the environment extension."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Sets how installs by a given extension will be handled from the environment extension."
"description": "Configures package installation permissions for a given extension."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-request Request for new features or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User Approval Flow for Package Installation

4 participants