feat(todo-continuation): show remaining tasks list in continuation prompt
Include the list of incomplete todos with their status in the continuation prompt so the agent knows exactly what tasks remain.
This commit is contained in:
parent
6bcc3c33f0
commit
dbe1b25707
@ -231,7 +231,16 @@ export function createTodoContinuationEnforcer(
|
||||
return
|
||||
}
|
||||
|
||||
const prompt = `${CONTINUATION_PROMPT}\n\n[Status: ${todos.length - freshIncompleteCount}/${todos.length} completed, ${freshIncompleteCount} remaining]`
|
||||
const incompleteTodos = todos.filter(t => t.status !== "completed" && t.status !== "cancelled")
|
||||
const todoList = incompleteTodos
|
||||
.map(t => `- [${t.status}] ${t.content}`)
|
||||
.join("\n")
|
||||
const prompt = `${CONTINUATION_PROMPT}
|
||||
|
||||
[Status: ${todos.length - freshIncompleteCount}/${todos.length} completed, ${freshIncompleteCount} remaining]
|
||||
|
||||
Remaining tasks:
|
||||
${todoList}`
|
||||
|
||||
try {
|
||||
log(`[${HOOK_NAME}] Injecting continuation`, { sessionID, agent: agentName, model, incompleteCount: freshIncompleteCount })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user