omniai 3.2.2 → 3.2.3

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: 20fb99d5f16d225a2f1107557c4a488341abf5c14e612a42e5091605a93592f2
4
- data.tar.gz: 41b178dee887827bb1197c7a6f21c1699a40f592120964d3b6c92983563e0119
3
+ metadata.gz: b3e745edbb32e4102309da753fb4ccdb4cec5b6ab69a4bebf7260a39d99b31b4
4
+ data.tar.gz: d8546d88f6c5cdc1c665d08bd7624f284c0e5baec04162f3a7ee29474f25beba
5
5
  SHA512:
6
- metadata.gz: 6572fd2a7453a1cf838781187f607fb92e5675c9a206e85a46379089576837724181bcc52792370f676d876860df791dda840881fab7df6e53d2f509830ff711
7
- data.tar.gz: 4de9bda7b59d8a2b529ad2c91fa5b4a930c2e00c8667907ba3e2a9a997d0b749f6221c6e72c47ea422caf2e7f6f15b10cc8bce1c9b388a9dcc9715fd73dc9460
6
+ metadata.gz: 59798981414c5fb32fd3f59fcc2d159c21b37cc1b6ce979424b91e7154147d05ba36e6e048ef3ff002f70022be5b02af0c7e66eb1c2e6dab6a434cb1be9ee794
7
+ data.tar.gz: 45f18be41f25a010810901fc9fe001f31698549fdfff6c0a1b59d5eae612f53ad6cd4ff9a857cb11b2a77fe50a1e8f0d000a388f836604e7e26d1d8212635258
@@ -96,6 +96,16 @@ module OmniAI
96
96
  !tool_call_list.nil?
97
97
  end
98
98
 
99
+ # Links this response chain to a parent response.
100
+ # Walks up to find the oldest response (no parent) and sets its parent.
101
+ #
102
+ # @param parent [Response]
103
+ def link_to(parent)
104
+ current = self
105
+ current = current.parent while current.parent
106
+ current.parent = parent
107
+ end
108
+
99
109
  # Returns the chain of responses from oldest (first) to newest (self).
100
110
  #
101
111
  # @return [Array<Response>]
data/lib/omniai/chat.rb CHANGED
@@ -120,7 +120,7 @@ module OmniAI
120
120
  end
121
121
  ).process!
122
122
 
123
- next_completion.parent = completion
123
+ next_completion.link_to(completion)
124
124
 
125
125
  next_completion
126
126
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = "3.2.2"
4
+ VERSION = "3.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.2
4
+ version: 3.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre