meta_workflows 0.9.22 → 0.9.24
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/meta_workflows/controllers/lexi_form_submit_controller.js +7 -4
- data/app/views/meta_workflows/_lexi_chat_alpha_tray.html.erb +5 -1
- data/app/views/meta_workflows/_lexi_chat_right_tray.html.erb +7 -2
- data/app/views/meta_workflows/_response_form_lexi.html.erb +5 -5
- data/lib/meta_workflows/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e7f0a09068104b66aa144bbba29fdf13001e31f1707e1ea75ae0019a1bd79f8
|
4
|
+
data.tar.gz: 3367fd560e837fc18587e8d64f16966b8f4a5f052a036e2858f07bd6f94bcad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d3e70667bff359d97782cf779e77d09fb7d611d8f5d02c1bc8658a76388aaa06d38c34683c21c27760769b15ebf8d1e5f5bc6e302ca77eba7c2da83fcd3085
|
7
|
+
data.tar.gz: fa4f41bc5721c1d06ba691907dec518b6d13e85cb2c140657f40623123877fa932cf87b51c7f4894f1d016ec247f90b7ba9b1faa58e6e3ce918a3ca79438d53f
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Controller } from '@hotwired/stimulus';
|
2
2
|
|
3
3
|
export default class extends Controller {
|
4
|
-
static targets = ['textarea', 'form', 'structuredInputForm'];
|
4
|
+
static targets = ['textarea', 'form', 'structuredInputForm', 'submitButton'];
|
5
5
|
|
6
6
|
connect() {
|
7
7
|
this.submitted = false;
|
@@ -13,13 +13,16 @@ export default class extends Controller {
|
|
13
13
|
|
14
14
|
handleKeyDown(event) {
|
15
15
|
if (event.key === 'Enter' && !event.shiftKey) {
|
16
|
+
this.handleSubmit(event);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
handleSubmit(event) {
|
21
|
+
if (event) {
|
16
22
|
event.preventDefault();
|
17
23
|
event.stopPropagation();
|
18
|
-
this.handleSubmit();
|
19
24
|
}
|
20
|
-
}
|
21
25
|
|
22
|
-
handleSubmit() {
|
23
26
|
if (this.submitted) {
|
24
27
|
return;
|
25
28
|
}
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<% active_execution = local_assigns[:record]&.workflow_executions&.order(created_at: :desc)&.first %>
|
3
3
|
<% active_chat = active_execution&.workflow_steps&.last&.chat %>
|
4
4
|
<% chat_history = active_execution&.execution_chat_history %>
|
5
|
+
<% current_step_data = active_execution&.step_data(active_execution&.current_step) %>
|
6
|
+
<% step_structured_input_config = current_step_data&.dig('structured_input') %>
|
7
|
+
<% is_structured_input = step_structured_input_config.present? && current_step_data&.dig('action') == 'structured_human' %>
|
8
|
+
|
5
9
|
|
6
10
|
<div class="lexi-chat-alpha-tray">
|
7
11
|
<%# Header with Lexi logo left and close button right %>
|
@@ -47,7 +51,7 @@
|
|
47
51
|
<%= render meta_structured_input, record: local_assigns[:record], structured_input_config: false, is_structured_input: false %>
|
48
52
|
|
49
53
|
<!-- Regular Form Input (always present) -->
|
50
|
-
<%= render partial: meta_response_form, locals: {record: local_assigns[:record], response_enabled: true, workflow_execution_id: active_execution&.id, chat_id: active_execution&.workflow_steps&.last&.chat&.id, step_has_repetitions: true } %>
|
54
|
+
<%= render partial: meta_response_form, locals: {record: local_assigns[:record], response_enabled: true, workflow_execution_id: active_execution&.id, chat_id: active_execution&.workflow_steps&.last&.chat&.id, step_has_repetitions: true, is_structured_input: is_structured_input } %>
|
51
55
|
</div>
|
52
56
|
</div>
|
53
57
|
</div>
|
@@ -2,6 +2,9 @@
|
|
2
2
|
<% active_execution = local_assigns[:record]&.workflow_executions&.order(created_at: :desc)&.first %>
|
3
3
|
<% active_chat = active_execution&.workflow_steps&.last&.chat %>
|
4
4
|
<% chat_history = active_execution&.execution_chat_history %>
|
5
|
+
<% current_step_data = active_execution&.step_data(active_execution&.current_step) %>
|
6
|
+
<% step_structured_input_config = current_step_data&.dig('structured_input') %>
|
7
|
+
<% is_structured_input = step_structured_input_config.present? && current_step_data&.dig('action') == 'structured_human' %>
|
5
8
|
|
6
9
|
<div class="lexi-chat-tray lexi-chat-container-full">
|
7
10
|
<!-- Header with Lexi logo and action icons -->
|
@@ -36,8 +39,10 @@
|
|
36
39
|
<!-- Avatar and input area pinned to bottom -->
|
37
40
|
<div class="lexi-chat-bottom">
|
38
41
|
<%= image_tag("lexi-expanded.png", alt: "Lexi Avatar", class: "lexi-avatar") %>
|
39
|
-
<div class="lexi-input-wrapper">
|
40
|
-
<%= render
|
42
|
+
<div class="lexi-input-wrapper" data-controller="meta-workflows--lexi-form-submit">
|
43
|
+
<%= render meta_structured_input, record: local_assigns[:record], structured_input_config: false, is_structured_input: false %>
|
44
|
+
|
45
|
+
<%= render partial: meta_response_form, locals: {record: local_assigns[:record], response_enabled: true, workflow_execution_id: active_execution&.id, chat_id: active_execution&.workflow_steps&.last&.chat&.id, step_has_repetitions: true, is_structured_input: is_structured_input } %>
|
41
46
|
</div>
|
42
47
|
</div>
|
43
48
|
</div>
|
@@ -3,18 +3,18 @@
|
|
3
3
|
<%= form_with url: workflow_execution_id.present? ? meta_workflows.human_path(workflow_execution_id) : "#",
|
4
4
|
method: :patch,
|
5
5
|
id: "#{target_frame_id(record, form: true)}_lexi",
|
6
|
-
data: { "meta-workflows--lexi-form-submit-target": "form" } do |form| %>
|
6
|
+
data: { controller: "meta-workflows--lexi-form-submit", "meta-workflows--lexi-form-submit-target": "form", action: "submit->meta-workflows--lexi-form-submit#handleSubmit" } do |form| %>
|
7
7
|
<%= form.hidden_field :chat_id, value: chat_id %>
|
8
8
|
<% if local_assigns[:is_structured_input] %>
|
9
9
|
<%= form.hidden_field :auto_advance, value: true %>
|
10
10
|
<% end %>
|
11
|
-
<fieldset>
|
11
|
+
<fieldset></fieldset>
|
12
12
|
<div class="lexi-form-container">
|
13
13
|
<!-- Input Container -->
|
14
14
|
<div class="lexi-input-container lexi-input-max-height">
|
15
15
|
<!-- Text Input -->
|
16
16
|
<div class="lexi-textarea-wrapper">
|
17
|
-
<%= form.text_area :message, rows: 1, placeholder: random_chat_placeholder, disabled: local_assigns[:responding] || !local_assigns[:response_enabled], class: "lexi-textarea lexi-textarea-min-height", data: { action: "keypress.enter->meta-workflows--lexi-form-submit#handleKeyDown
|
17
|
+
<%= form.text_area :message, rows: 1, placeholder: random_chat_placeholder, disabled: local_assigns[:responding] || !local_assigns[:response_enabled], class: "lexi-textarea lexi-textarea-min-height", data: { action: "keypress.enter->meta-workflows--lexi-form-submit#handleKeyDown", "meta-workflows--lexi-form-submit-target": "textarea" } %>
|
18
18
|
</div>
|
19
19
|
|
20
20
|
<div class="lexi-input-controls">
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<i class="fa-solid fa-arrow-up text-lg"></i>
|
37
37
|
</button>
|
38
38
|
<% else %>
|
39
|
-
<%= form.button type: "submit", class: "lexi-send-button sm-btn sm-btn-primary" do %>
|
39
|
+
<%= form.button type: "submit", class: "lexi-send-button sm-btn sm-btn-primary", data: { "meta-workflows--lexi-form-submit-target": "submitButton", action: "click->meta-workflows--lexi-form-submit#handleSubmit" } do %>
|
40
40
|
<i class="fa-solid fa-arrow-up text-lg"></i>
|
41
41
|
<% end %>
|
42
42
|
<% end %>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<!-- Empty placeholder to prevent layout jank -->
|
52
52
|
<div aria-hidden="true"></div>
|
53
53
|
<% else %>
|
54
|
-
<%= form.button type: "submit", name: "manual_advance", value: "true", class: "lexi-advance-button #{'opacity-50 cursor-not-allowed' if local_assigns[:responding]}", disabled: local_assigns[:responding] do %>
|
54
|
+
<%= form.button type: "submit", name: "manual_advance", value: "true", class: "lexi-advance-button #{'opacity-50 cursor-not-allowed' if local_assigns[:responding]}", disabled: local_assigns[:responding], data: { "meta-workflows--lexi-form-submit-target": "submitButton", action: "click->meta-workflows--lexi-form-submit#handleSubmit" } do %>
|
55
55
|
<i class="fa-light fa-arrow-right"></i> Next
|
56
56
|
<% end %>
|
57
57
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module MetaWorkflows
|
4
4
|
MAJOR = 0
|
5
5
|
MINOR = 9
|
6
|
-
PATCH =
|
6
|
+
PATCH = 24 # this is automatically incremented by the build process
|
7
7
|
|
8
8
|
VERSION = "#{MetaWorkflows::MAJOR}.#{MetaWorkflows::MINOR}.#{MetaWorkflows::PATCH}".freeze
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta_workflows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonid Medovyy
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-07-
|
12
|
+
date: 2025-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|