Skip to main content

manabrew_protocol/prompts/
choose_from_selection.rs

1use serde::{Deserialize, Serialize};
2use ts_rs::TS;
3
4use crate::prompts::common::PromptPresentation;
5
6#[derive(Debug, Clone, Serialize, Deserialize, TS)]
7#[serde(rename_all = "camelCase")]
8#[ts(export, export_to = "prompts/chooseFromSelection.ts")]
9pub struct ChooseFromSelectionInput {
10    pub presentation: PromptPresentation,
11    pub options: Vec<String>,
12    pub min_choices: usize,
13    pub max_choices: usize,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize, TS)]
17#[serde(
18    tag = "type",
19    rename_all = "camelCase",
20    rename_all_fields = "camelCase"
21)]
22#[ts(export, export_to = "prompts/chooseFromSelection.ts")]
23pub enum ChooseFromSelectionOutput {
24    SelectionDecision { chosen_indices: Vec<usize> },
25}