Class: Assistant::SeoToolBuilder

Inherits:
Object
  • Object
show all
Defined in:
app/services/assistant/seo_tool_builder.rb

Overview

Builds RubyLLM::Tool subclasses for SEO audit operations.
Provides tools for page analysis, internal link management,
and action item tracking.

Usage (via ChatToolBuilder):
tools = Assistant::SeoToolBuilder.tools

Class Method Summary collapse

Class Method Details

.crm_url_for_source(source) ⇒ Object

Build the CRM URL where a Sunny user can visually confirm a content link
was placed. Used by seo_create_content_link / seo_get_content_links
responses so Sunny can quote a verification link to the user instead of
only saying "I added the link" (see /assistant/1639 — Julia couldn't
find the showcases Sunny said it added).



22
23
24
25
26
27
28
29
30
31
# File 'app/services/assistant/seo_tool_builder.rb', line 22

def crm_url_for_source(source)
  case source
  when ArticleTechnical then "#{CRM_URL}/article_technicals/#{source.id}"
  when Post             then "#{Assistant::BlogToolBuilder::CRM_POST_URL}/#{source.id}/edit"
  when Article          then "#{Assistant::BlogToolBuilder::CRM_POST_URL}/#{source.id}/edit"
  when Video            then "#{CRM_URL}/en-US/videos/#{source.id}/edit"
  end
rescue StandardError
  nil
end

.toolsObject



13
14
15
# File 'app/services/assistant/seo_tool_builder.rb', line 13

def tools
  @tools ||= build_tools
end