Class: Relay::Routes::ListMCP

Inherits:
Base
  • Object
show all
Includes:
Hooks::RequireUser
Defined in:
app/routes/list_mcp.rb

Instance Method Summary collapse

Methods inherited from Base

#cache, #htmx?, #params, #root

Methods included from Concerns::View

#cancellable?, #context_window, #format_cost, #format_name, #initials, #markdown, #status_bar, #theme, #theme_href

Methods included from Concerns::Roda

#initialize, #method_missing, #r, #respond_to_missing?

Methods included from Concerns::Context

#contexts, #ctx, #current_context, #default_context, #default_model, #llm, #llms, #mcps, #model, #models, #normalize_model, #provider, #sync_context!, #user, #valid_model?

Methods included from Concerns::Attachment

#attachment

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Relay::Concerns::Roda

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
# File 'app/routes/list_mcp.rb', line 7

def call
  if htmx?
    partial("fragments/mcp/workspace", locals: {form: Relay::Forms::MCP.build(preset: "github"), mcps:, selected_id: nil})
  else
    form = Relay::Forms::MCP.build(preset: "github")
    Relay::Pages::MCP.new(self).call(form:)
  end
end