ai-chat 0.8.0 → 0.8.1

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: 177299f56fc875c484f3b0552e93858c3f8da072ded5b81a67d891d9b7f7df3e
4
- data.tar.gz: c31a180346f098d9c70fc135bdd6556ae12d23f4a85a5618a1907a8f660c0996
3
+ metadata.gz: bc97776343765eccd577dce51e9988f4166971b745e5d9c37dd91d4a0bd8d67c
4
+ data.tar.gz: a33c87723c355331c0b416872e7c788b68b53c8240ed1ebe9b9ab5d73e98ee08
5
5
  SHA512:
6
- metadata.gz: a4adf79c5e126ee642511bd8a8d2fdbab92fef5d9a596cae6a416bed82861764c61ed80f17f5762e879dae4e8c604475e9c7f5bf82c70224b9bdc60552b936ad
7
- data.tar.gz: ca02e9d88b13569899ce3787159862b8f55d2c822e54d41851f43b7a94d22a35bf25794e6dbff25e71d04dc6cdf0d4da6b74c53b9b40476d68d42d8645a97268
6
+ metadata.gz: 639236eb1189cf3fdb254044f5e372ccd2067f931f9dab953dc26eafe324e751b957c476703a1e67cfdc9f2327e822ffe1701b1cfad35d122b2b5527ea4f718f
7
+ data.tar.gz: 2f6d191c96cc6011a077252042ebbed48032f4652d4605ae199de2c63cf4b4742f0b0155e1a0c56959020834af4386f8d36fed19f6d3d9bdf3e090d39797a50a
data/ai-chat.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "ai-chat"
5
- spec.version = "0.8.0"
5
+ spec.version = "0.8.1"
6
6
  spec.authors = ["Raghu Betina", "Jelani Woods"]
7
7
  spec.email = ["raghu@firstdraft.com", "jelani@firstdraft.com"]
8
8
  spec.homepage = "https://github.com/firstdraft/ai-chat"
data/lib/ai/items.rb CHANGED
@@ -35,7 +35,9 @@ module AI
35
35
  "#{inspect}\n"
36
36
  end
37
37
 
38
+ # Same direct write as AI::Message#pretty_print, for the same reasons.
38
39
  def pretty_print(q)
40
+ q.flush
39
41
  q.output << inspect
40
42
  end
41
43
 
data/lib/ai/message.rb CHANGED
@@ -11,8 +11,11 @@ module AI
11
11
  end
12
12
 
13
13
  # IRB's ColorPrinter calls pretty_print and re-colorizes text,
14
- # which escapes our ANSI codes. Write directly to output to bypass.
14
+ # which escapes our ANSI codes. Write directly to output to bypass,
15
+ # but flush first: inside an Array, PP is still buffering the "[" and
16
+ # earlier separators, so an unflushed write lands ahead of them.
15
17
  def pretty_print(q)
18
+ q.flush
16
19
  q.output << inspect
17
20
  end
18
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ai-chat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raghu Betina