MCPcopy Create free account
hub / github.com/AI45Lab/Code / tasks_to_ahp_items

Function tasks_to_ahp_items

core/src/ahp/contract.rs:76–92  ·  view source on GitHub ↗
(tasks: &[crate::planning::Task])

Source from the content-addressed store, hash-verified

74}
75
76pub fn tasks_to_ahp_items(tasks: &[crate::planning::Task]) -> Vec<a3s_ahp::TaskItem> {
77 tasks
78 .iter()
79 .map(|task| a3s_ahp::TaskItem {
80 id: task.id.clone(),
81 title: task.content.clone(),
82 status: task_status_to_ahp(task.status),
83 depends_on: task.dependencies.clone(),
84 evidence: Vec::new(),
85 artifacts: Vec::new(),
86 error: (task.status == crate::planning::TaskStatus::Failed)
87 .then(|| "task failed".to_string()),
88 updated_at: Some(now()),
89 metadata: task_metadata(task),
90 })
91 .collect()
92}
93
94pub fn cancelled_run_event(
95 run_id: &str,

Callers 1

task_list_eventFunction · 0.85

Calls 4

task_status_to_ahpFunction · 0.85
nowFunction · 0.85
task_metadataFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected