refactor: eradicate deprecated tools (sticky_notes, pinned_files, context_workspaces, pr_checklist, preferences) and dead code

This commit is contained in:
Riz Ashraf committed 2026-10-07 11:12:42 +01:00
1 parent d80915635f
commit 79209da711
31 files changed
+1230 -3920

No files matched your search

+20 -3
View File
@@ -81,7 +81,7 @@ impl McpTool for TasksHandler {
crate::error::AppError::Internal("Missing required parameter 'id' for action 'update'. Next step: Provide task 'id' string in request and retry.".to_string())
})?;
let status = req.status.ok_or_else(|| {
crate::error::AppError::Internal("Missing required parameter 'status' for action 'update'. Next step: Provide valid 'status' ('pending', 'completed', or 'cancelled') in request and retry.".to_string())
crate::error::AppError::Internal("Missing required parameter 'status' for action 'update'. Next step: Provide valid 'status' ('pending', 'active', 'in_progress', 'blocked', 'completed', or 'cancelled') in request and retry.".to_string())
})?;
let target_status = status.to_lowercase();
let mut found = false;
@@ -113,6 +113,7 @@ impl McpTool for TasksHandler {
if let Some(dep_task) = tasks.iter().find(|dt| dt.id == *dep_id)
&& dep_task.status != "completed"
&& dep_task.status != "done"
&& dep_task.status != "cancelled"
{
uncompleted_deps.push(dep_task.title.as_str());
}
@@ -132,7 +133,10 @@ impl McpTool for TasksHandler {
.iter()
.filter(|t| t.parent_id.as_deref() == Some(target_id_ref))
{
if child.status != "completed" && child.status != "done" {
if child.status != "completed"
&& child.status != "done"
&& child.status != "cancelled"
{
uncompleted_children.push(child.title.as_str());
}
}
@@ -303,6 +307,7 @@ impl McpTool for TasksHandler {
crate::error::AppError::Internal("Missing required parameter 'criteria' for action 'set_criteria'. Next step: Provide array of acceptance criteria strings in request and retry.".to_string())
})?;
let mut success = false;
let mut updated_task: Option<Task> = None;
state.project.tasks.modify(|tasks| {
if let Some(task) = tasks.iter_mut().find(|t| t.id == id || t.title == id) {
task.acceptance_criteria = criteria_list
@@ -315,10 +320,15 @@ impl McpTool for TasksHandler {
})
.collect();
task.updated_at = crate::handlers::utils::now_secs();
updated_task = Some(task.clone());
success = true;
}
});
if success {
if let Some(ref ut) = updated_task {
let idx = state.get_search_index().await;
drop(idx.index_task(ut));
}
state.broadcast_task_event(TaskEvent {
task_id: id.clone(),
status: "criteria_set".to_string(),
@@ -343,6 +353,7 @@ impl McpTool for TasksHandler {
let proof_str = req.proof.unwrap_or_else(|| "Verified".to_string());
let mut success = false;
let mut already_met = false;
let mut updated_task: Option<Task> = None;
state.project.tasks.modify(|tasks| {
if let Some(task) = tasks.iter_mut().find(|t| t.id == id || t.title == id) {
if let Some(ac) = task.acceptance_criteria.iter_mut().next() {
@@ -351,7 +362,8 @@ impl McpTool for TasksHandler {
} else {
ac.is_met = true;
success = true;
task.updated_at = crate::handlers::utils::now_secs();
task.updated_at = crate::handlers::utils::now_secs();
updated_task = Some(task.clone());
}
} else {
task.acceptance_criteria
@@ -362,11 +374,16 @@ impl McpTool for TasksHandler {
..Default::default()
});
task.updated_at = crate::handlers::utils::now_secs();
updated_task = Some(task.clone());
success = true;
}
}
});
if success {
if let Some(ref ut) = updated_task {
let idx = state.get_search_index().await;
drop(idx.index_task(ut));
}
state.broadcast_task_event(TaskEvent {
task_id: id.clone(),
status: "verified".to_string(),