diff --git a/packages/core/src/tools/tool-names.ts b/packages/core/src/tools/tool-names.ts index e0f09487c0..212080243d 100644 --- a/packages/core/src/tools/tool-names.ts +++ b/packages/core/src/tools/tool-names.ts @@ -9,6 +9,7 @@ // need to reference a tool's name without importing the tool's implementation. export const GLOB_TOOL_NAME = 'glob'; +export const WRITE_TODOS_TOOL_NAME = 'write_todos'; // TODO: Migrate other tool names here to follow this pattern and prevent future circular dependencies. // Candidates for migration: diff --git a/packages/core/src/tools/write-todos.ts b/packages/core/src/tools/write-todos.ts index 70e46522a4..eb7664c774 100644 --- a/packages/core/src/tools/write-todos.ts +++ b/packages/core/src/tools/write-todos.ts @@ -11,8 +11,9 @@ import { Kind, type ToolResult, } from './tools.js'; +import { WRITE_TODOS_TOOL_NAME } from './tool-names.js'; -// Insprired by langchain/deepagents. +// Inspired by langchain/deepagents. export const WRITE_TODOS_DESCRIPTION = `This tool can help you list out the current subtasks that are required to be completed for a given user request. The list of subtasks helps you keep track of the current task, organize complex queries and help ensure that you don't miss any steps. With this list, the user can also see the current progress you are making in executing a given task. Depending on the task complexity, you should first divide a given task into subtasks and then use this tool to list out the subtasks that are required to be completed for a given user request. @@ -26,7 +27,7 @@ DO NOT use this tool for simple tasks that can be completed in less than 2 steps - pending: Work has not begun on a given subtask. - in_progress: Marked just prior to beginning work on a given subtask. You should only have one subtask as in_progress at a time. -- completed: Subtask was succesfully completed with no errors or issues. If the subtask required more steps to complete, update the todo list with the subtasks. All steps should be identified as completed only when they are completed. +- completed: Subtask was successfully completed with no errors or issues. If the subtask required more steps to complete, update the todo list with the subtasks. All steps should be identified as completed only when they are completed. - cancelled: As you update the todo list, some tasks are not required anymore due to the dynamic nature of the task. In this case, mark the subtasks as cancelled. @@ -131,7 +132,7 @@ export class WriteTodosTool extends BaseDeclarativeTool< WriteTodosToolParams, ToolResult > { - static readonly Name: string = 'write_todos_list'; + static readonly Name: string = WRITE_TODOS_TOOL_NAME; constructor() { super(