meta_workflows 0.8.18 → 0.8.20

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: bef4b8fc653594bf2fb53bbefc07c4f5d0e04f5a30718d9ad31179730f3a4ed5
4
- data.tar.gz: c6798c6aac52a642b7ee7e9e851a1b9ea4585b56d310f846fc7a3d1fadf143a3
3
+ metadata.gz: 1cc2c26e8d3a7d340b92a42d3ed25ba16c89a3fb4093fb43ed3a991547319eb8
4
+ data.tar.gz: 4191ea4cfff8a47c63a7b1fcd0eddcb7aefd696262b8248f8ed79079446e0977
5
5
  SHA512:
6
- metadata.gz: ebc7266b0b4e86f283c2dfa24e1ce2ec85174027479fc713a6875638e85aa92302adf3abe53f121c7ad25eb9678ed702fc6f7c8f0490a0d201a722daf8376784
7
- data.tar.gz: c41078aeeecd0e46d25366f37884c0f3a0021bd440754c54aa99ad37725502e3e1cd3189dfec80529454a1b9444803ca1d0b86cd21feab711475186b6f21fe90
6
+ metadata.gz: 33abfb80ff9dc144e61fd9039a2d48105dccb1e0aabe30e2c78f364d7660cf883e11a399dcdca6022963f489f29833c4eb063a5b414fdbbb98d9cdd70f980ebd
7
+ data.tar.gz: 4ccad587897bd29626f8629a2a7e30edd07d4727d1c40e9a8d2d9fd33fd73e0cb1dc4c4823af1b8aa0c34d1ae98051f0a169f5b7020cff79da0a2c2f20ff4746
@@ -141,7 +141,27 @@
141
141
  <%= execution_status_display(execution) %>
142
142
  </td>
143
143
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
144
- Step <%= execution.current_step + 1 %>
144
+ <% if execution.completed? %>
145
+ Step <%= execution.workflow.total_steps %>
146
+ <% else %>
147
+ Step <%= execution.current_step + 1 %>
148
+ <% current_step_obj = execution.workflow_steps.find_by(step: execution.current_step) %>
149
+ <% max_repetitions = execution.workflow.step_repetitions(execution.current_step) if current_step_obj %>
150
+ <% step_data = safe_step_data(execution.workflow, execution.current_step) %>
151
+
152
+ <% if current_step_obj&.repetition.present? && max_repetitions.present? %>
153
+ <br><span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800">
154
+ <svg class="w-3 h-3 mr-1" fill="currentColor" viewBox="0 0 20 20">
155
+ <path fill-rule="evenodd" d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z" clip-rule="evenodd"/>
156
+ </svg>
157
+ Repetition <%= current_step_obj.current_repetition %>/<%= max_repetitions %>
158
+ </span>
159
+ <% elsif max_repetitions.present? %>
160
+ <br><span class="text-xs text-gray-400">
161
+ (<%= max_repetitions %> Repetitions)
162
+ </span>
163
+ <% end %>
164
+ <% end %>
145
165
  </td>
146
166
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
147
167
  <%= execution.workflow_steps.count %> steps
@@ -83,7 +83,16 @@
83
83
  <div class="flex-1">
84
84
  <div class="flex items-center">
85
85
  <h3 class="text-sm font-medium text-gray-900">
86
- Step <%= workflow_step.step %>
86
+ Step <%= workflow_step.step + 1 %>
87
+ <% max_repetitions = @execution.workflow.step_repetitions(workflow_step.step) %>
88
+ <% if max_repetitions.present? %>
89
+ <span class="ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">
90
+ <svg class="w-3 h-3 mr-1" fill="currentColor" viewBox="0 0 20 20">
91
+ <path fill-rule="evenodd" d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z" clip-rule="evenodd"/>
92
+ </svg>
93
+ Repetition <%= workflow_step.current_repetition %>/<%= max_repetitions %>
94
+ </span>
95
+ <% end %>
87
96
  </h3>
88
97
  <%= workflow_step_status(workflow_step, @execution.current_step) %>
89
98
  <% if workflow_step.error? %>
@@ -97,6 +106,8 @@
97
106
  </div>
98
107
 
99
108
  <% step_data = safe_step_data(@execution.workflow, workflow_step.step) %>
109
+ <% max_repetitions = @execution.workflow.step_repetitions(workflow_step.step) %>
110
+
100
111
  <% if step_data %>
101
112
  <div class="mt-2 text-sm text-gray-600">
102
113
  <% if step_data['error'] %>
@@ -113,6 +124,38 @@
113
124
  </div>
114
125
  <% end %>
115
126
 
127
+ <!-- Repetition Context -->
128
+ <% if max_repetitions.present? %>
129
+ <div class="mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md">
130
+ <div class="flex items-start">
131
+ <div class="flex-shrink-0">
132
+ <svg class="h-5 w-5 text-yellow-400" fill="currentColor" viewBox="0 0 20 20">
133
+ <path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/>
134
+ </svg>
135
+ </div>
136
+ <div class="ml-3 flex-1">
137
+ <h4 class="text-sm font-medium text-yellow-800">
138
+ Step Repetition in Progress
139
+ </h4>
140
+ <div class="mt-1 text-sm text-yellow-700">
141
+ <p>
142
+ This <strong><%= step_data&.dig('action')&.humanize || 'step' %></strong> action
143
+ <% if step_data&.dig('name').present? %>
144
+ (<em><%= step_data['name'] %></em>)
145
+ <% end %>
146
+ is configured to repeat <strong><%= max_repetitions %> times</strong>.
147
+ <% if workflow_step.current_repetition > 0 %>
148
+ Currently on repetition <strong><%= workflow_step.current_repetition %></strong>.
149
+ <% else %>
150
+ This is the first execution attempt.
151
+ <% end %>
152
+ </p>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ <% end %>
158
+
116
159
  <!-- Error Information Display -->
117
160
  <% if workflow_step.error? %>
118
161
  <div class="mt-3 p-3 bg-red-50 border border-red-200 rounded-md">
@@ -161,7 +204,7 @@
161
204
  <div class="bg-gray-50 rounded-lg p-4 mt-4">
162
205
  <div class="flex items-center justify-between mb-3">
163
206
  <h4 class="text-sm font-medium text-gray-900">
164
- Chat Conversation for Step <%= workflow_step.step %>
207
+ Chat Conversation for Step <%= workflow_step.step + 1 %>
165
208
  </h4>
166
209
  <div class="text-xs text-gray-500">
167
210
  Chat #<%= workflow_step.chat.id %> |
@@ -3,7 +3,7 @@
3
3
  module MetaWorkflows
4
4
  MAJOR = 0
5
5
  MINOR = 8
6
- PATCH = 18 # this is automatically incremented by the build process
6
+ PATCH = 20 # 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.8.18
4
+ version: 0.8.20
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-06-27 00:00:00.000000000 Z
12
+ date: 2025-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails