Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/types/src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const toolNames = [
"new_task",
"fetch_instructions",
"codebase_search",
"manage_todo_list",
] as const

export const toolNamesSchema = z.enum(toolNames)
Expand Down
8 changes: 8 additions & 0 deletions src/core/assistant-message/presentAssistantMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { askFollowupQuestionTool } from "../tools/askFollowupQuestionTool"
import { switchModeTool } from "../tools/switchModeTool"
import { attemptCompletionTool } from "../tools/attemptCompletionTool"
import { newTaskTool } from "../tools/newTaskTool"
import { manageTodoListTool } from "../tools/manageTodoListTool"

import { checkpointSave } from "../checkpoints"

Expand Down Expand Up @@ -211,6 +212,10 @@ export async function presentAssistantMessage(cline: Task) {
const modeName = getModeBySlug(mode, customModes)?.name ?? mode
return `[${block.name} in ${modeName} mode: '${message}']`
}
case "manage_todo_list":
return `[${block.name} for '${block.params.todo_action}']`
default:
return `[${block.name}]`
}
}

Expand Down Expand Up @@ -504,6 +509,9 @@ export async function presentAssistantMessage(cline: Task) {
case "new_task":
await newTaskTool(cline, block, askApproval, handleError, pushToolResult, removeClosingTag)
break
case "manage_todo_list":
await manageTodoListTool(cline, block, askApproval, handleError, pushToolResult, removeClosingTag)
break
case "attempt_completion":
await attemptCompletionTool(
cline,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,54 @@ Example:
</new_task>


## manage_todo_list
Description: Manage a todo list to track progress during complex task execution. This tool helps ensure no steps are missed by maintaining a persistent list of tasks and their completion status. Use this tool to add items, mark them as complete, view the current list, or clear completed items.
Parameters:
- todo_action: (required) The action to perform. Valid values are:
- "add": Add a new item to the todo list
- "complete": Mark an item as completed
- "list": Display the current todo list with completion status
- "clear_completed": Remove all completed items from the list
- "clear_all": Clear the entire todo list
- todo_item: (required for "add" action) The description of the todo item to add
- item_id: (required for "complete" action) The ID of the item to mark as completed

Usage:
<manage_todo_list>
<todo_action>action_name</todo_action>
<todo_item>item description (for add action)</todo_item>
<item_id>item_id (for complete action)</item_id>
</manage_todo_list>

Examples:

1. Add a new todo item:
<manage_todo_list>
<todo_action>add</todo_action>
<todo_item>Create user authentication system</todo_item>
</manage_todo_list>

2. Mark an item as completed:
<manage_todo_list>
<todo_action>complete</todo_action>
<item_id>1</item_id>
</manage_todo_list>

3. View the current todo list:
<manage_todo_list>
<todo_action>list</todo_action>
</manage_todo_list>

4. Clear completed items:
<manage_todo_list>
<todo_action>clear_completed</todo_action>
</manage_todo_list>

5. Clear all items:
<manage_todo_list>
<todo_action>clear_all</todo_action>
</manage_todo_list>

# Tool Use Guidelines

1. In <thinking> tags, assess what information you already have and what information you need to proceed with the task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,54 @@ Example:
</new_task>


## manage_todo_list
Description: Manage a todo list to track progress during complex task execution. This tool helps ensure no steps are missed by maintaining a persistent list of tasks and their completion status. Use this tool to add items, mark them as complete, view the current list, or clear completed items.
Parameters:
- todo_action: (required) The action to perform. Valid values are:
- "add": Add a new item to the todo list
- "complete": Mark an item as completed
- "list": Display the current todo list with completion status
- "clear_completed": Remove all completed items from the list
- "clear_all": Clear the entire todo list
- todo_item: (required for "add" action) The description of the todo item to add
- item_id: (required for "complete" action) The ID of the item to mark as completed

Usage:
<manage_todo_list>
<todo_action>action_name</todo_action>
<todo_item>item description (for add action)</todo_item>
<item_id>item_id (for complete action)</item_id>
</manage_todo_list>

Examples:

1. Add a new todo item:
<manage_todo_list>
<todo_action>add</todo_action>
<todo_item>Create user authentication system</todo_item>
</manage_todo_list>

2. Mark an item as completed:
<manage_todo_list>
<todo_action>complete</todo_action>
<item_id>1</item_id>
</manage_todo_list>

3. View the current todo list:
<manage_todo_list>
<todo_action>list</todo_action>
</manage_todo_list>

4. Clear completed items:
<manage_todo_list>
<todo_action>clear_completed</todo_action>
</manage_todo_list>

5. Clear all items:
<manage_todo_list>
<todo_action>clear_all</todo_action>
</manage_todo_list>

# Tool Use Guidelines

1. In <thinking> tags, assess what information you already have and what information you need to proceed with the task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,54 @@ Example:
</new_task>


## manage_todo_list
Description: Manage a todo list to track progress during complex task execution. This tool helps ensure no steps are missed by maintaining a persistent list of tasks and their completion status. Use this tool to add items, mark them as complete, view the current list, or clear completed items.
Parameters:
- todo_action: (required) The action to perform. Valid values are:
- "add": Add a new item to the todo list
- "complete": Mark an item as completed
- "list": Display the current todo list with completion status
- "clear_completed": Remove all completed items from the list
- "clear_all": Clear the entire todo list
- todo_item: (required for "add" action) The description of the todo item to add
- item_id: (required for "complete" action) The ID of the item to mark as completed

Usage:
<manage_todo_list>
<todo_action>action_name</todo_action>
<todo_item>item description (for add action)</todo_item>
<item_id>item_id (for complete action)</item_id>
</manage_todo_list>

Examples:

1. Add a new todo item:
<manage_todo_list>
<todo_action>add</todo_action>
<todo_item>Create user authentication system</todo_item>
</manage_todo_list>

2. Mark an item as completed:
<manage_todo_list>
<todo_action>complete</todo_action>
<item_id>1</item_id>
</manage_todo_list>

3. View the current todo list:
<manage_todo_list>
<todo_action>list</todo_action>
</manage_todo_list>

4. Clear completed items:
<manage_todo_list>
<todo_action>clear_completed</todo_action>
</manage_todo_list>

5. Clear all items:
<manage_todo_list>
<todo_action>clear_all</todo_action>
</manage_todo_list>

# Tool Use Guidelines

1. In <thinking> tags, assess what information you already have and what information you need to proceed with the task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,54 @@ Example:
</new_task>


## manage_todo_list
Description: Manage a todo list to track progress during complex task execution. This tool helps ensure no steps are missed by maintaining a persistent list of tasks and their completion status. Use this tool to add items, mark them as complete, view the current list, or clear completed items.
Parameters:
- todo_action: (required) The action to perform. Valid values are:
- "add": Add a new item to the todo list
- "complete": Mark an item as completed
- "list": Display the current todo list with completion status
- "clear_completed": Remove all completed items from the list
- "clear_all": Clear the entire todo list
- todo_item: (required for "add" action) The description of the todo item to add
- item_id: (required for "complete" action) The ID of the item to mark as completed

Usage:
<manage_todo_list>
<todo_action>action_name</todo_action>
<todo_item>item description (for add action)</todo_item>
<item_id>item_id (for complete action)</item_id>
</manage_todo_list>

Examples:

1. Add a new todo item:
<manage_todo_list>
<todo_action>add</todo_action>
<todo_item>Create user authentication system</todo_item>
</manage_todo_list>

2. Mark an item as completed:
<manage_todo_list>
<todo_action>complete</todo_action>
<item_id>1</item_id>
</manage_todo_list>

3. View the current todo list:
<manage_todo_list>
<todo_action>list</todo_action>
</manage_todo_list>

4. Clear completed items:
<manage_todo_list>
<todo_action>clear_completed</todo_action>
</manage_todo_list>

5. Clear all items:
<manage_todo_list>
<todo_action>clear_all</todo_action>
</manage_todo_list>

# Tool Use Guidelines

1. In <thinking> tags, assess what information you already have and what information you need to proceed with the task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,54 @@ Example:
</new_task>


## manage_todo_list
Description: Manage a todo list to track progress during complex task execution. This tool helps ensure no steps are missed by maintaining a persistent list of tasks and their completion status. Use this tool to add items, mark them as complete, view the current list, or clear completed items.
Parameters:
- todo_action: (required) The action to perform. Valid values are:
- "add": Add a new item to the todo list
- "complete": Mark an item as completed
- "list": Display the current todo list with completion status
- "clear_completed": Remove all completed items from the list
- "clear_all": Clear the entire todo list
- todo_item: (required for "add" action) The description of the todo item to add
- item_id: (required for "complete" action) The ID of the item to mark as completed

Usage:
<manage_todo_list>
<todo_action>action_name</todo_action>
<todo_item>item description (for add action)</todo_item>
<item_id>item_id (for complete action)</item_id>
</manage_todo_list>

Examples:

1. Add a new todo item:
<manage_todo_list>
<todo_action>add</todo_action>
<todo_item>Create user authentication system</todo_item>
</manage_todo_list>

2. Mark an item as completed:
<manage_todo_list>
<todo_action>complete</todo_action>
<item_id>1</item_id>
</manage_todo_list>

3. View the current todo list:
<manage_todo_list>
<todo_action>list</todo_action>
</manage_todo_list>

4. Clear completed items:
<manage_todo_list>
<todo_action>clear_completed</todo_action>
</manage_todo_list>

5. Clear all items:
<manage_todo_list>
<todo_action>clear_all</todo_action>
</manage_todo_list>

# Tool Use Guidelines

1. In <thinking> tags, assess what information you already have and what information you need to proceed with the task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,54 @@ Example:
</new_task>


## manage_todo_list
Description: Manage a todo list to track progress during complex task execution. This tool helps ensure no steps are missed by maintaining a persistent list of tasks and their completion status. Use this tool to add items, mark them as complete, view the current list, or clear completed items.
Parameters:
- todo_action: (required) The action to perform. Valid values are:
- "add": Add a new item to the todo list
- "complete": Mark an item as completed
- "list": Display the current todo list with completion status
- "clear_completed": Remove all completed items from the list
- "clear_all": Clear the entire todo list
- todo_item: (required for "add" action) The description of the todo item to add
- item_id: (required for "complete" action) The ID of the item to mark as completed

Usage:
<manage_todo_list>
<todo_action>action_name</todo_action>
<todo_item>item description (for add action)</todo_item>
<item_id>item_id (for complete action)</item_id>
</manage_todo_list>

Examples:

1. Add a new todo item:
<manage_todo_list>
<todo_action>add</todo_action>
<todo_item>Create user authentication system</todo_item>
</manage_todo_list>

2. Mark an item as completed:
<manage_todo_list>
<todo_action>complete</todo_action>
<item_id>1</item_id>
</manage_todo_list>

3. View the current todo list:
<manage_todo_list>
<todo_action>list</todo_action>
</manage_todo_list>

4. Clear completed items:
<manage_todo_list>
<todo_action>clear_completed</todo_action>
</manage_todo_list>

5. Clear all items:
<manage_todo_list>
<todo_action>clear_all</todo_action>
</manage_todo_list>

# Tool Use Guidelines

1. In <thinking> tags, assess what information you already have and what information you need to proceed with the task.
Expand Down
Loading