diff options
| author | soryu <soryu@soryu.co> | 2026-01-18 18:55:04 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-18 18:55:04 +0000 |
| commit | 9dbc2c3199047609a9f8496fec07ecdb10aee73d (patch) | |
| tree | c5a4e19b2a83cac1901e81f2ff1bc7a465f8a9ff /makima/src/server/state.rs | |
| parent | 273da072fa0573c935798dc723ed79fd71ab037a (diff) | |
| download | soryu-9dbc2c3199047609a9f8496fec07ecdb10aee73d.tar.gz soryu-9dbc2c3199047609a9f8496fec07ecdb10aee73d.zip | |
Add pushed heartbeats and multi-question select
Diffstat (limited to 'makima/src/server/state.rs')
| -rw-r--r-- | makima/src/server/state.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/makima/src/server/state.rs b/makima/src/server/state.rs index d022834..86f38c8 100644 --- a/makima/src/server/state.rs +++ b/makima/src/server/state.rs @@ -128,6 +128,9 @@ pub struct SupervisorQuestionNotification { pub pending: bool, /// When the question was asked pub created_at: chrono::DateTime<chrono::Utc>, + /// Whether multiple choices can be selected + #[serde(default)] + pub multi_select: bool, } /// Stored supervisor question for persistence @@ -141,6 +144,8 @@ pub struct PendingSupervisorQuestion { pub choices: Vec<String>, pub context: Option<String>, pub created_at: chrono::DateTime<chrono::Utc>, + /// Whether multiple choices can be selected + pub multi_select: bool, } /// Response to a supervisor question @@ -654,6 +659,7 @@ impl AppState { question: String, choices: Vec<String>, context: Option<String>, + multi_select: bool, ) -> Uuid { let question_id = Uuid::new_v4(); let now = chrono::Utc::now(); @@ -670,6 +676,7 @@ impl AppState { choices: choices.clone(), context: context.clone(), created_at: now, + multi_select, }, ); @@ -684,6 +691,7 @@ impl AppState { context, pending: true, created_at: now, + multi_select, }); tracing::info!( @@ -742,6 +750,7 @@ impl AppState { context: question.1.context, pending: false, created_at: question.1.created_at, + multi_select: question.1.multi_select, }); tracing::info!( |
