From 0b0556f34a1a6e0b2ae4245059b97e74b3613521 Mon Sep 17 00:00:00 2001 From: Tomohisa Igarashi Date: Thu, 3 Oct 2024 08:26:14 -0400 Subject: [PATCH] chore: Add askUserForFileSelection() in KaotoEditorChannelApi --- .../KaotoEditorChannelApi.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/ui/src/multiplying-architecture/KaotoEditorChannelApi.ts b/packages/ui/src/multiplying-architecture/KaotoEditorChannelApi.ts index ab9b277d6..3cfc82fcb 100644 --- a/packages/ui/src/multiplying-architecture/KaotoEditorChannelApi.ts +++ b/packages/ui/src/multiplying-architecture/KaotoEditorChannelApi.ts @@ -45,4 +45,16 @@ export interface KaotoEditorChannelApi extends KogitoEditorChannelApi { * @return If the deletion was done succesfully */ deleteResource(path: string): Promise; + + /** + * Show a file picker and ask the user to select one or more files available. + * @param include The filter expression for the files to include + * @param exclude The filter expression for the files to exclude + * @param options The options to pass over. In VS Code, it is directly delivered as QuickPickOptions + */ + askUserForFileSelection( + include: string, + exclude?: string, + options?: Record, + ): Promise; }