新任务工具与上下文管理策略
Cline includes a powerful internal tool, new_task
, designed to help manage workflow continuity and context preservation, especially during complex or long-running tasks. This tool, combined with Cline's awareness of its own context window usage and the flexibility of .clinerules
, enables sophisticated strategies for breaking down work and ensuring seamless transitions between task sessions.
Cline 包含一个强大的内部工具 new_task
,旨在帮助管理工作流的连续性和上下文的保留,特别是在复杂或长时间运行的任务中。这个工具结合了 Cline 对自身上下文窗口使用的意识和 .clinerules
的灵活性,使得在分解工作和确保任务会话之间的无缝过渡方面能够采用复杂的策略。
Understanding the core capabilities and how they interact with custom rules is key to leveraging this feature effectively.
理解核心能力及其与自定义规则的互动是有效利用此功能的关键。
Two fundamental capabilities enable advanced context management:
两个基本能力使高级上下文管理成为可能:
Using the /newtask
Slash Command
使用 /newtask
斜杠命令
As a quick alternative to Cline suggesting the newtask
tool or defining complex rules, you can directly initiate the process using a Slash Command.
作为 Cline 建议 newtask
工具或定义复杂规则的快速替代方案,您可以直接使用斜杠命令启动该过程。
-
How: Simply type
/newtask
in the chat input field.如何:只需在聊天输入框中输入
/newtask
。 -
Action: Cline will propose creating a new task, typically suggesting context based on the current session (similar to its default behavior when using the tool). You will still get the
ask_followup_question
prompt to confirm and potentially modify the context before the new task is created.操作: Cline 将建议创建一个新任务,通常会根据当前会话建议上下文(类似于使用该工具时的默认行为)。在创建新任务之前,您仍然会收到
ask_followup_question
提示,以确认并可能修改上下文。 -
Benefit: Provides a fast, user-initiated way to leverage the
new_task
functionality for branching explorations or managing long sessions without waiting for Cline to suggest it.好处:提供了一种快速的用户启动方式,以利用
new_task
功能进行分支探索或管理长时间会话,而无需等待Cline的建议。
Default Behavior (Without .clinerules
)
默认行为(没有 .clinerules
)
By default, without specific .clinerules
dictating its behavior:
默认情况下,没有特定的.clinerules
来指示其行为:
-
Tool Availability: The
new_task
tool exists, and Cline can choose to use it.工具可用性:
new_task
工具存在,Cline 可以 选择使用它。 -
Context Awareness: Cline is awar...