meta_workflows 0.9.41 → 0.9.42
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/onboarding_controller.js +1 -0
- data/app/assets/javascripts/meta_workflows/controllers/tray_controller.js +0 -3
- data/app/controllers/concerns/meta_workflows/streamable.rb +2 -2
- data/app/controllers/meta_workflows/meta_controller.rb +4 -5
- data/app/helpers/meta_workflows/ui_state_helper.rb +1 -5
- data/app/jobs/meta_workflows/meta_job.rb +1 -1
- data/app/models/concerns/recipe_accessible.rb +14 -0
- data/app/models/meta_workflows/workflow_execution.rb +4 -2
- data/app/views/meta_workflows/_loader_message.html.erb +2 -2
- data/app/views/meta_workflows/debug/executions.html.erb +2 -2
- data/lib/meta_workflows/version.rb +1 -1
- data/lib/services/meta_workflows/meta_workflow_service.rb +2 -4
- 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: 17087d9bb5946f3d426537a21fb156086ad445b4d432769e14b98bce48a9d181
|
4
|
+
data.tar.gz: 105d398ab5baaa0bede2ab9adb322a18a99cb628d1faf54070302191d61ef534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebfb5b1173398b8b6f76cfec4f84ec08c75fd24f95dd494dab55e1fe98243d939f443d3aea546215dd06dc12be141679c89ed3bbdee070fb91362e50c34974fb
|
7
|
+
data.tar.gz: '0986c1b0d0577f2b28a22861234bd59c3f8e0a60651a7c5042e3349eadd3652fbc2afa410b448dbbff9791d1228076dd8d56c0943d386b1af4bd308d98030374'
|
@@ -135,15 +135,12 @@ export default class extends Controller {
|
|
135
135
|
}
|
136
136
|
|
137
137
|
updateGammaTray(hasChevron, trayElement) {
|
138
|
-
console.log(`Updating gamma tray - expanded: ${this.expanded}`);
|
139
138
|
// Gamma: open=right, collapsed=left
|
140
139
|
if (this.expanded) {
|
141
|
-
console.log('Expanding gamma tray');
|
142
140
|
trayElement.classList.remove("collapsed");
|
143
141
|
trayElement.classList.add("w-[300px]");
|
144
142
|
this.updateChevronClasses(hasChevron, "fa-chevron-left", "fa-chevron-right");
|
145
143
|
} else {
|
146
|
-
console.log('Collapsing gamma tray');
|
147
144
|
trayElement.classList.remove("w-[300px]");
|
148
145
|
trayElement.classList.add("collapsed");
|
149
146
|
this.updateChevronClasses(hasChevron, "fa-chevron-right", "fa-chevron-left");
|
@@ -12,7 +12,7 @@ module MetaWorkflows
|
|
12
12
|
|
13
13
|
# Broadcasts loader message with step progress
|
14
14
|
def broadcast_loader_stream(workflow_execution)
|
15
|
-
step_progress = workflow_execution.
|
15
|
+
step_progress = workflow_execution.current_step_progress
|
16
16
|
record = workflow_execution.record
|
17
17
|
|
18
18
|
Turbo::StreamsChannel.broadcast_replace_to(
|
@@ -86,7 +86,7 @@ module MetaWorkflows
|
|
86
86
|
locals: {
|
87
87
|
record: record,
|
88
88
|
show_loader: show_loader,
|
89
|
-
step_progress: step_progress ||
|
89
|
+
step_progress: step_progress || RecipeAccessible::DEFAULT_STEP_PROGRESS,
|
90
90
|
full_response: nil
|
91
91
|
}
|
92
92
|
)
|
@@ -9,19 +9,18 @@ module MetaWorkflows
|
|
9
9
|
@workflow_execution = MetaWorkflows::WorkflowExecution.includes(:record, :workflow,
|
10
10
|
:workflow_steps).find(params[:id])
|
11
11
|
@record = @workflow_execution.record
|
12
|
-
@workflow_step = @workflow_execution.
|
13
|
-
@prompt_id = @workflow_execution.
|
12
|
+
@workflow_step = @workflow_execution.current_workflow_step
|
13
|
+
@prompt_id = @workflow_execution.current_prompt_id
|
14
14
|
end
|
15
15
|
|
16
16
|
protected
|
17
17
|
|
18
18
|
def fetch_step_progress
|
19
|
-
@workflow_execution.
|
19
|
+
@workflow_execution.current_step_progress
|
20
20
|
end
|
21
21
|
|
22
22
|
def current_step_repetitions
|
23
|
-
|
24
|
-
@workflow_execution.step_repetitions(@workflow_execution.current_step)
|
23
|
+
@workflow_execution.current_step_repetitions
|
25
24
|
end
|
26
25
|
|
27
26
|
def append_user_message_to_history(user_message)
|
@@ -31,10 +31,6 @@ module MetaWorkflows
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
def default_step_progress
|
35
|
-
['Thinking']
|
36
|
-
end
|
37
|
-
|
38
34
|
def show_next_button?(workflow_execution)
|
39
35
|
return false if current_step_has_repetitions?(workflow_execution)
|
40
36
|
|
@@ -57,7 +53,7 @@ module MetaWorkflows
|
|
57
53
|
private
|
58
54
|
|
59
55
|
def current_step_has_repetitions?(workflow_execution)
|
60
|
-
workflow_execution.
|
56
|
+
workflow_execution.current_step_repetitions.present?
|
61
57
|
end
|
62
58
|
end
|
63
59
|
end
|
@@ -93,7 +93,7 @@ module MetaWorkflows
|
|
93
93
|
def current_workflow_step(workflow_execution)
|
94
94
|
return nil unless workflow_execution
|
95
95
|
|
96
|
-
workflow_execution.
|
96
|
+
workflow_execution.current_workflow_step
|
97
97
|
end
|
98
98
|
|
99
99
|
def broadcast_form(chat)
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module RecipeAccessible
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
+
DEFAULT_STEP_PROGRESS = ['Thinking'].freeze
|
7
|
+
|
6
8
|
def step_progress(step)
|
7
9
|
recipe&.dig('steps', step, 'step_progress')
|
8
10
|
end
|
@@ -23,6 +25,18 @@ module RecipeAccessible
|
|
23
25
|
recipe&.dig('steps', step, 'repetitions')
|
24
26
|
end
|
25
27
|
|
28
|
+
def current_step_repetitions
|
29
|
+
step_repetitions(current_step)
|
30
|
+
end
|
31
|
+
|
32
|
+
def current_step_progress
|
33
|
+
step_progress(current_step) || DEFAULT_STEP_PROGRESS
|
34
|
+
end
|
35
|
+
|
36
|
+
def current_prompt_id
|
37
|
+
prompt_id(current_step)
|
38
|
+
end
|
39
|
+
|
26
40
|
def step_advanceable?(step)
|
27
41
|
recipe&.dig('steps', step, 'advanceable') || false
|
28
42
|
end
|
@@ -22,14 +22,16 @@ module MetaWorkflows
|
|
22
22
|
update(current_step: current_step + 1)
|
23
23
|
end
|
24
24
|
|
25
|
-
# Get the latest workflow step with its chat (optimized for preloaded data)
|
26
25
|
def latest_workflow_step
|
27
26
|
workflow_steps.max_by(&:step)
|
28
27
|
end
|
29
28
|
|
30
|
-
# Get the chat from the latest step (optimized for preloaded data)
|
31
29
|
def latest_chat
|
32
30
|
latest_workflow_step&.chat
|
33
31
|
end
|
32
|
+
|
33
|
+
def current_workflow_step
|
34
|
+
workflow_steps.find_by(step: current_step)
|
35
|
+
end
|
34
36
|
end
|
35
37
|
end
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<div class="lexi-loader-bubble">
|
4
4
|
<div class="lexi-message-content-assistant"
|
5
5
|
data-controller="loading-phrases"
|
6
|
-
data-loading-phrases-phrases-value="<%= (local_assigns[:step_progress]
|
6
|
+
data-loading-phrases-phrases-value="<%= (local_assigns[:step_progress]).to_json %>">
|
7
7
|
<span data-loading-phrases-target="message" class="lexi-loader-text">
|
8
|
-
<%=
|
8
|
+
<%= local_assigns[:step_progress].first %>
|
9
9
|
</span>
|
10
10
|
<span class="lexi-loader-ellipses">
|
11
11
|
<span class="lexi-dot lexi-dot-1">.</span>
|
@@ -145,8 +145,8 @@
|
|
145
145
|
Step <%= execution.total_steps %>
|
146
146
|
<% else %>
|
147
147
|
Step <%= execution.current_step + 1 %>
|
148
|
-
<% current_step_obj = execution.
|
149
|
-
<% max_repetitions = execution.
|
148
|
+
<% current_step_obj = execution.current_workflow_step %>
|
149
|
+
<% max_repetitions = execution.current_step_repetitions if current_step_obj %>
|
150
150
|
<% step_data = safe_step_data(execution, execution.current_step) %>
|
151
151
|
|
152
152
|
<% if current_step_obj&.repetition.present? && max_repetitions.present? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module MetaWorkflows
|
4
4
|
MAJOR = 0
|
5
5
|
MINOR = 9
|
6
|
-
PATCH =
|
6
|
+
PATCH = 42 # this is automatically incremented by the build process
|
7
7
|
|
8
8
|
VERSION = "#{MetaWorkflows::MAJOR}.#{MetaWorkflows::MINOR}.#{MetaWorkflows::PATCH}".freeze
|
9
9
|
end
|
@@ -11,9 +11,7 @@ module Services
|
|
11
11
|
|
12
12
|
attr_reader :record, :workflow_name, :user, :inputs, :workflow_params
|
13
13
|
|
14
|
-
|
15
|
-
# Once everything is working we can change the default value from nil to {}
|
16
|
-
def initialize(record:, workflow_name: nil, user: nil, inputs: nil, workflow_params: nil)
|
14
|
+
def initialize(record:, workflow_name: nil, user: nil, inputs: {}, workflow_params: nil)
|
17
15
|
@record = record
|
18
16
|
@workflow_name = workflow_name
|
19
17
|
@user = user
|
@@ -73,7 +71,7 @@ module Services
|
|
73
71
|
end
|
74
72
|
|
75
73
|
def find_workflow_step(workflow_execution)
|
76
|
-
workflow_execution.
|
74
|
+
workflow_execution.current_workflow_step
|
77
75
|
end
|
78
76
|
|
79
77
|
def clear_previous_errors(workflow_step)
|
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.42
|
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-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|