mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
fix: await checkpoint save before subtask delegation in Orchestrator mode
This ensures that the checkpoint message appears in the conversation history before the newTask tool message, making checkpoints visible to users in Orchestrator mode when delegating to subtasks. Fixes #10623
This commit is contained in:
parent
632b86cfbe
commit
20b557ac2f
1 changed files with 7 additions and 3 deletions
|
|
@ -118,11 +118,15 @@ export class NewTaskTool extends BaseTool<"new_task"> {
|
|||
}
|
||||
|
||||
// Provider is guaranteed to be defined here due to earlier check.
|
||||
|
||||
|
||||
// Create a checkpoint before delegating to subtask.
|
||||
// This allows users to restore to the state before the subtask was created.
|
||||
// We await this to ensure the checkpoint message appears in the history
|
||||
// before the delegation happens.
|
||||
if (task.enableCheckpoints) {
|
||||
task.checkpointSave(true)
|
||||
await task.checkpointSave(true)
|
||||
}
|
||||
|
||||
|
||||
// Delegate parent and open child as sole active task
|
||||
const child = await (provider as any).delegateParentAndOpenChild({
|
||||
parentTaskId: task.taskId,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue