File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
integration/vscode/ada/src Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 99 *--------------------------------------------------------------------------------------------*/
1010
1111/**
12- * This file is laregely based on the Quick Picker Sample project by Microsoft,
12+ * This file is largely based on the Quick Picker Sample project by Microsoft,
1313 * with some additions and fixes by AdaCore.
1414 */
1515
Original file line number Diff line number Diff line change @@ -39,6 +39,31 @@ interface SavedPickerState {
3939 */
4040const WS_STATE_KEY_PICKER = 'ada.spark.lastPickerState' ;
4141
42+ /**
43+ * Prompts the user to select GNATprove options through a multi-step input dialog.
44+ *
45+ * This function presents a two-step selection process:
46+ * 1. First step: Choose a proof level from available options
47+ * 2. Second step: Select additional SPARK options (multiple selection allowed)
48+ *
49+ * The function preserves user selections in workspace state for future use and
50+ * restores previously saved selections as defaults when the dialog is opened again.
51+ *
52+ * @returns A promise that resolves to an array of CLI arguments representing the selected options
53+ * @throws - {@link CancellationError} When the user cancels the selection process
54+ *
55+ * @example
56+ * ```typescript
57+ * try {
58+ * const sparkArgs = await askSPARKOptions();
59+ * console.log('Selected SPARK options:', sparkArgs);
60+ * } catch (error) {
61+ * if (error instanceof CancellationError) {
62+ * console.log('User cancelled the selection');
63+ * }
64+ * }
65+ * ```
66+ */
4267export async function askSPARKOptions ( ) : Promise < string [ ] > {
4368 const title = 'Select GNATprove Options' ;
4469 async function pickProofLevel ( input : MultiStepInput , state : Partial < PickerState > ) {
You can’t perform that action at this time.
0 commit comments