Class: RailsAiContext::Tools::Onboard

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/rails_ai_context/tools/onboard.rb

Constant Summary

Constants inherited from BaseTool

BaseTool::SESSION_CONTEXT, BaseTool::SHARED_CACHE

Class Method Summary collapse

Methods inherited from BaseTool

abstract!, abstract?, cache_key, cached_context, config, extract_method_source_from_file, extract_method_source_from_string, find_closest_match, fuzzy_find_key, inherited, not_found_response, paginate, rails_app, registered_tools, reset_all_caches!, reset_cache!, session_queries, session_record, session_reset!, set_call_params, text_response

Class Method Details

.call(detail: "standard", server_context: nil) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rails_ai_context/tools/onboard.rb', line 24

def self.call(detail: "standard", server_context: nil)
  ctx = cached_context

  case detail
  when "quick"
    text_response(compose_quick(ctx))
  when "full"
    text_response(compose_full(ctx))
  else
    text_response(compose_standard(ctx))
  end
rescue => e
  text_response("Onboard error: #{e.message}")
end