-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Configure Python Env tool #25091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure Python Env tool #25091
Conversation
} | ||
}, | ||
{ | ||
"name": "list_python_packages", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this tool, was disabled
@@ -103,10 +103,11 @@ export function registerCreateEnvironmentFeatures( | |||
registerCreateEnvironmentProvider(condaCreationProvider()), | |||
onCreateEnvironmentExited(async (e: EnvironmentDidCreateEvent) => { | |||
if (e.path && e.options?.selectEnvironment) { | |||
await interpreterPathService.update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karthiknadig Found that this is another place where user action results in updating the Python path.
Instead of injecting another dependency, I decided to use the more generic one that is responsible for all updates to python path
,
|
||
async activate(_resource: Resource, _startupStopWatch?: StopWatch): Promise<void> { | ||
this.extensionContext.subscriptions.push( | ||
commands.registerCommand('python.getRecommendedEnvironment', async (resource: Resource) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a command, I think command is simpler as Jupyter and Python Env extension will need this API.
@@ -569,7 +569,10 @@ export class SetInterpreterCommand extends BaseInterpreterSelectorCommand implem | |||
* @returns true when an interpreter was set, undefined if the user cancelled the quickpick. | |||
*/ | |||
@captureTelemetry(EventName.SELECT_INTERPRETER) | |||
public async setInterpreter(): Promise<true | undefined> { | |||
public async setInterpreter(options?: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karthiknadig I added back
button and actions
into the interpreter quick pick
resourcePath?: string; | ||
} | ||
|
||
export class ListPythonPackagesTool implements LanguageModelTool<IResourceReference> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not required
No description provided.