llm.rb 12.3.0 → 12.3.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: ae69643ba5cddb3b39899ca27deabd69071c23fb30d787b99630d97b64ef0dcc
4
- data.tar.gz: cdcb6eee3f60742d2cf37f22518e10eab3b4fe3eabd5d0e0958d5d4116cd63d4
3
+ metadata.gz: a1be1cd2af0cc8a817e510b04d1d74efd08cedf714b3faff4bdb7a58345fe14f
4
+ data.tar.gz: 3768fdf7f131d30c04d0ba83514bec31eb8d64de661980aa811a4e804a4df1e5
5
5
  SHA512:
6
- metadata.gz: 8817934bdc50e10ab8387df49d77811a397ef1f4c0a78f3ae7475b26fd2494e4404bc365d746fdba22cb3102f4fb3238b51a8253f9abd7b7882066b098dbe748
7
- data.tar.gz: 68315c12c2f73c4314e1baf972498bd041952ec8591ebe8b51c6084e70cbf183427314cf04c4025d94dedd85c985c0db1ae5d7ef3473618484a679c11daa68c6
6
+ metadata.gz: 667c546559bb199c7381fbea97171b5e82e874098c40a763004db85667038aa430fa98592c4d42b1426e4536e288e70c018278b9e7af9fcf9b6d972eabd65cbe
7
+ data.tar.gz: 0163f85848ce7292905396458755d9ccb23298c6f7c6f06cf0532fb3bdb3517e1b188a022937eb540b823d82d7bc8d869549bc17c8d79767c5efe027bf5ae9be
data/CHANGELOG.md CHANGED
@@ -15,8 +15,28 @@
15
15
 
16
16
  ## What's next
17
17
 
18
+ Changes since `v12.3.1`.
19
+
20
+ ## v12.3.1
21
+
18
22
  Changes since `v12.3.0`.
19
23
 
24
+ This release fixes a flickering issue in the curses-based REPL redraw.
25
+ The full-screen clear that caused visible flickering has been replaced
26
+ with a targeted cursor-hide approach, and stale rows from a larger
27
+ transcript are now explicitly cleared to prevent ghost text from
28
+ lingering when the transcript shrinks.
29
+
30
+ ### Fix
31
+
32
+ * **repl: fix redraw flicker** <br>
33
+ Replace `Curses.clear` with `Curses.curs_set(0)` in the REPL redraw
34
+ method to avoid a full screen clear that caused visible flickering
35
+ during redraws. The drawing order is also adjusted so the status line
36
+ is drawn before the divider, and stale rows left over from a larger
37
+ transcript are now explicitly cleared to prevent ghost text from
38
+ lingering when the transcript shrinks.
39
+
20
40
  ## v12.3.0
21
41
 
22
42
  Changes since `v12.2.0`.
@@ -46,9 +46,9 @@ class LLM::Repl
46
46
  ##
47
47
  # @return [void]
48
48
  def redraw
49
- Curses.clear
50
- draw_divider(offset: 5)
49
+ Curses.curs_set(0)
51
50
  draw_status(offset: input.height + 1)
51
+ draw_divider(offset: 5)
52
52
  draw_transcript(offset: 0)
53
53
  draw_input
54
54
  Curses.refresh
@@ -122,6 +122,11 @@ class LLM::Repl
122
122
  Curses.attroff(attrs) if attrs
123
123
  end
124
124
  end
125
+ last_drawn = offset + rows.size
126
+ (last_drawn...self.rows).each do |line|
127
+ Curses.setpos(line, 0)
128
+ Curses.clrtoeol
129
+ end
125
130
  end
126
131
 
127
132
  ##
data/lib/llm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LLM
4
- VERSION = "12.3.0"
4
+ VERSION = "12.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llm.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.3.0
4
+ version: 12.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - robert