Class: RubynCode::IDE::Handlers::ConfigGetHandler
- Inherits:
-
Object
- Object
- RubynCode::IDE::Handlers::ConfigGetHandler
- Defined in:
- lib/rubyn_code/ide/handlers/config_get_handler.rb
Overview
Handles "config/get" JSON-RPC requests from the IDE extension.
When a key is provided, returns that single setting with its source. When no key is provided, returns all configurable settings plus provider definitions so the extension can populate its UI.
Constant Summary collapse
- EXPOSED_KEYS =
%w[ provider model model_mode max_iterations max_sub_agent_iterations max_output_chars context_threshold_tokens session_budget_usd daily_budget_usd permission_mode ].freeze
Instance Method Summary collapse
- #call(params) ⇒ Object
-
#initialize(server) ⇒ ConfigGetHandler
constructor
A new instance of ConfigGetHandler.
Constructor Details
#initialize(server) ⇒ ConfigGetHandler
Returns a new instance of ConfigGetHandler.
17 18 19 |
# File 'lib/rubyn_code/ide/handlers/config_get_handler.rb', line 17 def initialize(server) @server = server end |
Instance Method Details
#call(params) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rubyn_code/ide/handlers/config_get_handler.rb', line 21 def call(params) settings = Config::Settings.new key = params['key'] if key single_key_response(settings, key) else all_settings_response(settings) end end |