Class: Ralph::Agents::Codex
- Inherits:
-
Base
- Object
- Base
- Ralph::Agents::Codex
show all
- Defined in:
- lib/ralph/agents/codex.rb
Instance Method Summary
collapse
Methods inherited from Base
#build_env, #collect_tool_counts, #detect_fatal_error, #execute, #extract_errors, #validate!
Methods included from Helpers
#check_completion, #escape_regex, #format_duration, #format_duration_long, #format_tool_summary, #now_ms, #strip_ansi, #which
Instance Method Details
#build_args(prompt, model, options) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/ralph/agents/codex.rb', line 11
def build_args(prompt, model, options)
args = ["exec"]
args.push("--model", model) if model && !model.empty?
args.push("--full-auto") if options && options[:allow_all_permissions]
args.push(prompt)
args
end
|
#command ⇒ Object
8
|
# File 'lib/ralph/agents/codex.rb', line 8
def command = "codex"
|
#config_name ⇒ Object
9
|
# File 'lib/ralph/agents/codex.rb', line 9
def config_name = "Codex"
|
19
20
21
22
|
# File 'lib/ralph/agents/codex.rb', line 19
def parse_tool_output(line)
match = strip_ansi(line).match(/(?:Tool:|Using|Calling|Running)\s+([A-Za-z0-9_-]+)/i)
match ? match[1] : nil
end
|
#type ⇒ Object
7
|
# File 'lib/ralph/agents/codex.rb', line 7
def type = :codex
|