ruby_llm-agents 3.5.1 → 3.5.2

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: 125e23713ce0912e6ce129e66bd019f9a178ce77a2bd22af2dfba93e17911e42
4
- data.tar.gz: 583e35f0e9328c42b0a1f0627e629478ffea13fe881843c94e4a318d49261488
3
+ metadata.gz: 01a6fe7a4709265c6b982475bc1d6473b41a15446b4379621c818bfde3e6bf8b
4
+ data.tar.gz: 3b277c33d618d7d7ffb77da30e9739cf26b149b24fb3ef3e0ef7ad4abb582c01
5
5
  SHA512:
6
- metadata.gz: 28ab8fbe2ca38c575bcfdf8775e8a57f13308850a56b08aeaa1c76aacd541cc388958c89272c831d362859cf9334fac1892cfb672a2376aa6831a45f65f1d695
7
- data.tar.gz: ef48cffadc21245efc920d6990830f9db536da6fcaf02b36f9d1aa127a7d09f337832fa13c878f1d100414dd8064d627d3869f5b0b46f461cbec0f5b3eefe7cf
6
+ metadata.gz: 2e036a577393853fc5870485256284070039e80e53d59615ef81faac7ccb077be392f8fbf872b9ab90116085567698c38c5b306a115da6ddc4b3e11b02f218c1
7
+ data.tar.gz: 3dbdf95c3aa653db49ca17a4344847d051a24eb9375cb5406e729cdda8e62f11693083322ca12d3e4251965e96765d799304b32a369eb3f5b6ff91d3577f58f8
@@ -8,6 +8,9 @@ module RubyLLM
8
8
  # agent executions. Supports both HTML and Turbo Stream responses
9
9
  # for seamless filtering without full page reloads.
10
10
  #
11
+ # Turbo Stream support is optional — works in API-only apps or
12
+ # apps without turbo-rails installed.
13
+ #
11
14
  # @see Paginatable For pagination implementation
12
15
  # @see Filterable For filter parsing and validation
13
16
  # @api private
@@ -28,7 +31,7 @@ module RubyLLM
28
31
 
29
32
  respond_to do |format|
30
33
  format.html
31
- format.turbo_stream
34
+ format.turbo_stream if turbo_stream_available?
32
35
  end
33
36
  end
34
37
 
@@ -51,12 +54,14 @@ module RubyLLM
51
54
 
52
55
  respond_to do |format|
53
56
  format.html { render :index }
54
- format.turbo_stream do
55
- render turbo_stream: turbo_stream.replace(
56
- "executions_list",
57
- partial: "ruby_llm/agents/executions/list",
58
- locals: {executions: @executions, pagination: @pagination, filter_stats: @filter_stats}
59
- )
57
+ if turbo_stream_available?
58
+ format.turbo_stream do
59
+ render turbo_stream: turbo_stream.replace(
60
+ "executions_list",
61
+ partial: "ruby_llm/agents/executions/list",
62
+ locals: {executions: @executions, pagination: @pagination, filter_stats: @filter_stats}
63
+ )
64
+ end
60
65
  end
61
66
  end
62
67
  end
@@ -209,6 +214,13 @@ module RubyLLM
209
214
  # Eager load children for grouping
210
215
  scope.includes(:child_executions)
211
216
  end
217
+
218
+ # Checks whether turbo-rails is available in the host application
219
+ #
220
+ # @return [Boolean]
221
+ def turbo_stream_available?
222
+ defined?(Turbo)
223
+ end
212
224
  end
213
225
  end
214
226
  end
@@ -4,6 +4,6 @@ module RubyLLM
4
4
  module Agents
5
5
  # Current version of the RubyLLM::Agents gem
6
6
  # @return [String] Semantic version string
7
- VERSION = "3.5.1"
7
+ VERSION = "3.5.2"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_llm-agents
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - adham90