@@ -316,6 +316,18 @@ export type DidChangeEnvironmentsEventArgs = {
316316 */
317317export type ResolveEnvironmentContext = Uri ;
318318
319+ export interface QuickCreateConfig {
320+ /**
321+ * The description of the quick create step.
322+ */
323+ readonly description : string ;
324+
325+ /**
326+ * The detail of the quick create step.
327+ */
328+ readonly detail ?: string ;
329+ }
330+
319331/**
320332 * Interface representing an environment manager.
321333 */
@@ -360,12 +372,19 @@ export interface EnvironmentManager {
360372 */
361373 readonly log ?: LogOutputChannel ;
362374
375+ /**
376+ * The quick create details for the environment manager. Having this method also enables the quick create feature
377+ * for the environment manager.
378+ */
379+ quickCreateConfig ?( ) : QuickCreateConfig | undefined ;
380+
363381 /**
364382 * Creates a new Python environment within the specified scope.
365383 * @param scope - The scope within which to create the environment.
384+ * @param options - Optional parameters for creating the Python environment.
366385 * @returns A promise that resolves to the created Python environment, or undefined if creation failed.
367386 */
368- create ?( scope : CreateEnvironmentScope ) : Promise < PythonEnvironment | undefined > ;
387+ create ?( scope : CreateEnvironmentScope , options ?: CreateEnvironmentOptions ) : Promise < PythonEnvironment | undefined > ;
369388
370389 /**
371390 * Removes the specified Python environment.
@@ -705,6 +724,9 @@ export interface DidChangePythonProjectsEventArgs {
705724 removed : PythonProject [ ] ;
706725}
707726
727+ /**
728+ * Options for package management.
729+ */
708730export type PackageManagementOptions =
709731 | {
710732 /**
@@ -747,6 +769,28 @@ export type PackageManagementOptions =
747769 uninstall : string [ ] ;
748770 } ;
749771
772+ /**
773+ * Options for creating a Python environment.
774+ */
775+ export interface CreateEnvironmentOptions {
776+ /**
777+ * Provides some context about quick create based on user input.
778+ * - if true, the environment should be created without any user input or prompts.
779+ * - if false, the environment creation can show user input or prompts.
780+ * This also means user explicitly skipped the quick create option.
781+ * - if undefined, the environment creation can show user input or prompts.
782+ * You can show quick create option to the user if you support it.
783+ */
784+ quickCreate ?: boolean ;
785+ /**
786+ * Packages to install in addition to the automatically picked packages as a part of creating environment.
787+ */
788+ additionalPackages ?: string [ ] ;
789+ }
790+
791+ /**
792+ * Object representing the process started using run in background API.
793+ */
750794export interface PythonProcess {
751795 /**
752796 * The process ID of the Python process.
@@ -807,9 +851,13 @@ export interface PythonEnvironmentManagementApi {
807851 * Create a Python environment using environment manager associated with the scope.
808852 *
809853 * @param scope Where the environment is to be created.
854+ * @param options Optional parameters for creating the Python environment.
810855 * @returns The Python environment created. `undefined` if not created.
811856 */
812- createEnvironment ( scope : CreateEnvironmentScope ) : Promise < PythonEnvironment | undefined > ;
857+ createEnvironment (
858+ scope : CreateEnvironmentScope ,
859+ options ?: CreateEnvironmentOptions ,
860+ ) : Promise < PythonEnvironment | undefined > ;
813861
814862 /**
815863 * Remove a Python environment.
0 commit comments