class Clacky::Tools::ListTasks
Tool for listing task history (Time Machine feature)
def execute(agent:, limit: 10, **_args)
def execute(agent:, limit: 10, **_args) history = agent.get_task_history(limit: limit) if history.empty? return "No task history available." end lines = ["Task History:"] history.each do |task| indicator = case task[:status] when :current then "→" when :past then " " when :future then "↯" end branch_indicator = task[:has_branches] ? " ⎇" : "" lines << "#{indicator}#{branch_indicator} Task #{task[:task_id]}: #{task[:summary]}" end lines.join("\n") end
def format_call(limit: 10, **_args)
def format_call(limit: 10, **_args) "Listing task history (limit: #{limit})..." end
def format_result(result)
def format_result(result) result end