fantasy-cli 1.2.8 → 1.2.10

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: b21d6b0bc759338260d8652eb5e017738a251d453438561fbdd9ae0b15108f8f
4
- data.tar.gz: 3959bba1608124afffe0427f916d58f87875dec563a467df6d4d48c8072f01cb
3
+ metadata.gz: 97769253f39b85a122d12008484a7605a706c5a496b439bae2bacf3e775a82c6
4
+ data.tar.gz: f24db3335249ce2c18187778aedfbfce6634d6c862704efcad6145189e85578f
5
5
  SHA512:
6
- metadata.gz: 95f9f883c6af8103c696313f727a36c4da7894a3e013d8fa92de481f7327a6d64765c1edd493144d16fe41f059f856c74a9c8228f90991e88a71e95c98577811
7
- data.tar.gz: 7b5bb8e32c75db325d3a459769bf00d744fec078957aec11fadb9fb7abde1adcd6d1e02a9d6e36fe8651175ebcf1ec88c0c8e53c5896debce962f71995b3d75c
6
+ metadata.gz: c82bb104a336a2134e14ec6e80f008738ce87eb94cde02cb3195cd91bf6f46ac81ca9dacbc79341caf36bab14071124e995df3179e1e55d1507e08882dce4e11
7
+ data.tar.gz: 26556e231d6d5b3465ed3dc245b06835c139fbcff7525dd99c49d0cac13dbf4ef989b0911c330fbae33cc9b8ba7627327635f17cb775e516a7f857922663a830
data/lib/gsd/ai/chat.rb CHANGED
@@ -311,6 +311,7 @@ module Gsd
311
311
  when 'cost' then Commands::Cost
312
312
  when 'context' then Commands::Context
313
313
  when 'export' then Commands::Export
314
+ when 'api' then Commands::Api
314
315
  else nil
315
316
  end
316
317
 
@@ -71,7 +71,7 @@ module Gsd
71
71
  add_message(:error, "Erro: #{e.message}")
72
72
  ensure
73
73
  @spinner.stop
74
- render
74
+ full_render
75
75
  end
76
76
  end
77
77
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'gsd/ai/commands/base'
4
+
5
+ module Gsd
6
+ module AI
7
+ module Commands
8
+ # /api - Mostra informações da API do provider
9
+ class Api < Base
10
+ DESCRIPTION = 'Mostra informações da API do provider atual'
11
+ USAGE = '/api'
12
+
13
+ def execute
14
+ provider = @chat.provider
15
+ model = provider.model
16
+
17
+ <<~API
18
+ 🤖 API Provider Info
19
+
20
+ Provider: #{provider.class::PROVIDER_NAME rescue provider.class.to_s.split('::').last}
21
+ Modelo: #{model}
22
+
23
+ Para trocar de provider:
24
+ /model anthropic - Claude (padrão)
25
+ /model openai - GPT
26
+ /model ollama - Local
27
+ /model openrouter - Gratuito
28
+ API
29
+ rescue => e
30
+ "Erro ao obter info da API: #{e.message}"
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -18,7 +18,8 @@ module Gsd
18
18
  'model' => 'Muda ou lista modelos',
19
19
  'cost' => 'Mostra estatísticas de custo',
20
20
  'context' => 'Mostra tamanho do contexto',
21
- 'export' => 'Exporta histórico para arquivo'
21
+ 'export' => 'Exporta histórico para arquivo',
22
+ 'api' => 'Mostra info da API do provider'
22
23
  }.freeze
23
24
 
24
25
  def execute
data/lib/gsd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gsd
4
- VERSION = '1.2.8'
4
+ VERSION = '1.2.10'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fantasy-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fantasy Team
@@ -105,6 +105,7 @@ files:
105
105
  - lib/gsd/ai/chat_tui.rb
106
106
  - lib/gsd/ai/cli.rb
107
107
  - lib/gsd/ai/command_parser.rb
108
+ - lib/gsd/ai/commands/api.rb
108
109
  - lib/gsd/ai/commands/base.rb
109
110
  - lib/gsd/ai/commands/clear.rb
110
111
  - lib/gsd/ai/commands/context.rb