7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/legion/cli/do_command.rb', line 7
def run(intent, formatter, options)
if intent.strip.empty?
formatter.error('Usage: legion do "describe what you want"')
raise SystemExit, 1
end
formatter.detail("Routing intent: #{intent}")
result = try_daemon(intent, options) || try_in_process(intent) || try_llm_classify(intent)
if result.nil?
formatter.error('No matching tool found')
formatter.detail('Try: legion lex list (to see available extensions)')
raise SystemExit, 1
end
display_result(result, formatter, options)
end
|