@d34dman/flowdrop 0.0.38 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Shibin Das (d34dman)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -89,6 +89,10 @@
89
89
  * This effect runs when messages change and adds any new interrupt messages
90
90
  * to the interrupt store. We do this in an effect rather than during render
91
91
  * to avoid Svelte 5's state_unsafe_mutation error.
92
+ *
93
+ * If a message has status 'completed', the interrupt is marked as resolved
94
+ * to show the "Confirmation Submitted" header, disabled buttons, and
95
+ * "Response submitted" indicator.
92
96
  */
93
97
  $effect(() => {
94
98
  // Get all messages that are interrupt requests
@@ -105,6 +109,15 @@
105
109
  if (metadata) {
106
110
  const interrupt = metadataToInterrupt(metadata, message.id, message.content);
107
111
  interruptActions.addInterrupt(interrupt);
112
+
113
+ // If the message status is 'completed', mark the interrupt as resolved
114
+ // This ensures completed interrupts show proper UI state:
115
+ // - "Confirmation Submitted" header
116
+ // - Disabled buttons
117
+ // - "Response submitted" indicator
118
+ if (message.status === 'completed') {
119
+ interruptActions.resolveInterrupt(interrupt.id, metadata.response_value);
120
+ }
108
121
  }
109
122
  }
110
123
  }
@@ -244,6 +244,8 @@ export interface InterruptMessageMetadata {
244
244
  options?: InterruptChoice[];
245
245
  /** Default value for pre-filling */
246
246
  default_value?: unknown;
247
+ /** Response value when interrupt has been resolved */
248
+ response_value?: unknown;
247
249
  /** Node ID that triggered the interrupt */
248
250
  node_id?: string;
249
251
  /** Execution ID */
@@ -36,6 +36,7 @@ export function extractInterruptMetadata(metadata) {
36
36
  schema: metadata.schema,
37
37
  options: metadata.options,
38
38
  default_value: metadata.default_value,
39
+ response_value: metadata.response_value,
39
40
  node_id: metadata.node_id,
40
41
  execution_id: metadata.execution_id,
41
42
  allow_cancel: metadata.allow_cancel,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@d34dman/flowdrop",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.0.38",
5
+ "version": "0.0.39",
6
6
  "scripts": {
7
7
  "dev": "vite dev",
8
8
  "build": "vite build && npm run prepack",