33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# File 'lib/aia/utility.rb', line 33
def robot
indent = 18
spaces = " "*indent
width = TTY::Screen.width - indent - 2
mcp_version = defined?(RubyLLM::MCP::VERSION) ? " MCP v" + RubyLLM::MCP::VERSION : ''
model_display = if AIA.config&.model
models = AIA.config.model
if models.is_a?(String)
models
elsif models.is_a?(Array)
if models.first.is_a?(Hash)
models.map { |spec| spec[:model] }.join(', ')
else
models.join(', ')
end
else
models.to_s
end
else
'unknown-model'
end
mcp_line = mcp_servers? ? "MCP: #{mcp_server_names.join(', ')}" : ''
puts "\n , ,\n (\\\\____/) AI Assistant (v\#{AIA::VERSION}) is Online\n (_oo_) \#{model_display}\#{supports_tools? ? ' (supports tools)' : ''}\n (O) using \#{AIA.config&.adapter || 'unknown-adapter'} (v\#{RubyLLM::VERSION}\#{mcp_version})\n __||__ \\\\) model db was last refreshed on\n [/______\\\\] / \#{AIA.config&.last_refresh || 'unknown'}\n / \\\\__AI__/ \\\\/ \#{user_tools? ? 'I will also use your tools' : (tools? ? 'You can share my tools' : 'I did not bring any tools')}\n / /__\\\\ \#{mcp_line}\n (\\\\ /____\\\\ \#{user_tools? && tools? ? 'My Toolbox contains:' : ''}\n ROBOT\n if user_tools? && tools?\n tool_names = AIA.config.respond_to?(:tool_names) ? AIA.config.tool_names : AIA.config.tools\n if tool_names && !tool_names.to_s.empty?\n puts WordWrapper::MinimumRaggedness.new(\n width,\n tool_names.to_s # String of tool names, comma separated\n ).wrap\n .split(\"\\n\")\n .map{|s| spaces+s+\"\\n\"}\n .join\n end\n end\nend\n"
|