meta_workflows 0.9.3 → 0.9.5
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c3a448e6c2f705bada39a716fcca196e8af05426c958bfc3618b810ae5e0305
|
4
|
+
data.tar.gz: afb9a87720c7edcca9d333993de3fce7dc146fa40c151e2893b2514d11815ff4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa39226f6dfc489f83a297e84d6aa53ec6b7dd1839676ad969344f688ab2c04c7a7e8b06806e575a5035e9c2c93d6ccb9c8a0d57fe846da19c575b6f3205e48a
|
7
|
+
data.tar.gz: 8a887f14b18e7af835c5c32d46eeabacdaf11f89332b9f4381882cf178e7298eb294f061f9408b15a5a5439846a98aacf3e420c50ea31026b02e21179170b541
|
Binary file
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Controller } from '@hotwired/stimulus';
|
2
|
+
|
3
|
+
export default class extends Controller {
|
4
|
+
connect() {
|
5
|
+
this.element.addEventListener('keydown', this.handleKeyDown);
|
6
|
+
}
|
7
|
+
|
8
|
+
disconnect() {
|
9
|
+
this.element.removeEventListener('keydown', this.handleKeyDown);
|
10
|
+
}
|
11
|
+
|
12
|
+
handleKeyDown = (event) => {
|
13
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
14
|
+
event.preventDefault();
|
15
|
+
this.element.requestSubmit();
|
16
|
+
}
|
17
|
+
};
|
18
|
+
}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<%= turbo_frame_tag target_frame_id(record, form: true) do %>
|
2
2
|
<div>
|
3
|
-
<%= form_with url: (workflow_execution_id.present? ? meta_workflows.human_path(workflow_execution_id) : "#"),
|
3
|
+
<%= form_with url: (workflow_execution_id.present? ? meta_workflows.human_path(workflow_execution_id) : "#"),
|
4
|
+
method: :patch,
|
5
|
+
data: { controller: "meta-workflows--lexi-form-submit"},
|
6
|
+
id: "#{target_frame_id(record, form: true)}_lexi" do |form| %>
|
4
7
|
<%= form.hidden_field :chat_id, value: chat_id %>
|
5
8
|
<fieldset>
|
6
9
|
<div class="flex flex-col gap-1">
|
@@ -8,9 +11,9 @@
|
|
8
11
|
<div class="flex flex-col lexi-input-max-height border border-gray-300 rounded-lg bg-white/80 p-2">
|
9
12
|
<!-- Input area with icons -->
|
10
13
|
<div class="flex-1 relative">
|
11
|
-
|
14
|
+
<%= form.text_area :message, rows: 1, placeholder: random_chat_placeholder, disabled: local_assigns[:responding] || !local_assigns[:response_enabled], class: "w-full lexi-textarea-min-height border-0 resize-none focus:outline-none focus:ring-0 bg-transparent text-base overflow-y-auto" %>
|
12
15
|
</div>
|
13
|
-
|
16
|
+
|
14
17
|
<div class="flex justify-between">
|
15
18
|
<div class="flex gap-1 items-end justify-end">
|
16
19
|
<button type="button" class="p-2 rounded-xl hover:bg-gray-100" disabled>
|
@@ -52,4 +55,4 @@
|
|
52
55
|
</fieldset>
|
53
56
|
<% end %>
|
54
57
|
</div>
|
55
|
-
<% end %>
|
58
|
+
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module MetaWorkflows
|
4
4
|
MAJOR = 0
|
5
5
|
MINOR = 9
|
6
|
-
PATCH =
|
6
|
+
PATCH = 5 # 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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonid Medovyy
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- app/assets/images/lexi-collapsed.png
|
119
119
|
- app/assets/images/lexi-expanded.png
|
120
120
|
- app/assets/images/lexi_logo_color.png
|
121
|
+
- app/assets/javascripts/meta_workflows/controllers/lexi_form_submit_controller.js
|
121
122
|
- app/assets/javascripts/meta_workflows/controllers/loading_phrases_controller.js
|
122
123
|
- app/assets/javascripts/meta_workflows/controllers/meta_flash_controller.js
|
123
124
|
- app/assets/javascripts/meta_workflows/controllers/redirect_controller.js
|