openclacky 0.5.4 → 0.5.6

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.
@@ -32,7 +32,7 @@ module Clacky
32
32
  def user_message(content)
33
33
  symbol = @pastel.bright_blue(SYMBOLS[:user])
34
34
  text = @pastel.blue(content)
35
- puts "\n#{symbol} #{text}"
35
+ print "\n#{symbol} #{text}"
36
36
  end
37
37
 
38
38
  # Format assistant message
@@ -45,14 +45,12 @@ module Clacky
45
45
  status_line = " " + parts.join(separator)
46
46
 
47
47
  puts status_line
48
- puts @pastel.dim("─" * [TTY::Screen.width, 80].min)
49
48
  end
50
49
 
51
50
  # Display minimal status for non-interactive mode
52
51
  def display_minimal(working_dir:, mode:)
53
52
  dir_display = shorten_path(working_dir)
54
53
  puts " #{@pastel.bright_cyan(dir_display)} #{@pastel.dim('│')} #{@pastel.yellow(mode)}"
55
- puts @pastel.dim("─" * [TTY::Screen.width, 80].min)
56
54
  end
57
55
 
58
56
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clacky
4
- VERSION = "0.5.4"
4
+ VERSION = "0.5.6"
5
5
  end
data/lib/clacky.rb CHANGED
@@ -3,9 +3,9 @@
3
3
  require_relative "clacky/version"
4
4
  require_relative "clacky/config"
5
5
  require_relative "clacky/client"
6
- require_relative "clacky/conversation"
7
6
 
8
7
  # Agent system
8
+ require_relative "clacky/model_pricing"
9
9
  require_relative "clacky/agent_config"
10
10
  require_relative "clacky/hook_manager"
11
11
  require_relative "clacky/tool_registry"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openclacky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - windy
@@ -136,9 +136,9 @@ files:
136
136
  - lib/clacky/cli.rb
137
137
  - lib/clacky/client.rb
138
138
  - lib/clacky/config.rb
139
- - lib/clacky/conversation.rb
140
139
  - lib/clacky/gitignore_parser.rb
141
140
  - lib/clacky/hook_manager.rb
141
+ - lib/clacky/model_pricing.rb
142
142
  - lib/clacky/progress_indicator.rb
143
143
  - lib/clacky/session_manager.rb
144
144
  - lib/clacky/thinking_verbs.rb
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Clacky
4
- class Conversation
5
- attr_reader :messages
6
-
7
- def initialize(api_key, model:, base_url:, max_tokens:)
8
- @client = Client.new(api_key, base_url: base_url)
9
- @model = model
10
- @max_tokens = max_tokens
11
- @messages = []
12
- end
13
-
14
- def send_message(content)
15
- # Add user message to history
16
- @messages << {
17
- role: "user",
18
- content: content
19
- }
20
-
21
- # Get response from Claude
22
- response_text = @client.send_messages(@messages, model: @model, max_tokens: @max_tokens)
23
-
24
- # Add assistant response to history
25
- @messages << {
26
- role: "assistant",
27
- content: response_text
28
- }
29
-
30
- response_text
31
- end
32
-
33
- def clear
34
- @messages = []
35
- end
36
-
37
- def history
38
- @messages.dup
39
- end
40
- end
41
- end