mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
fix: Linking condensation and task tracking prompts (#10656)
Co-authored-by: Calvin Smith <calvin@all-hands.dev>
This commit is contained in:
@@ -38,3 +38,9 @@
|
||||
[Assistant proceeds with implementation step by step, updating tasks to in_progress and done as work progresses]
|
||||
```
|
||||
</TASK_MANAGEMENT>
|
||||
|
||||
<TASK_TRACKING_PERSISTENCE>
|
||||
* IMPORTANT: If you were using the task_tracker tool before a condensation event, continue using it after condensation
|
||||
* Check condensation summaries for TASK_TRACKING sections to maintain continuity
|
||||
* If you see a condensation event with TASK_TRACKING, immediately use task_tracker to view and continue managing them
|
||||
</TASK_TRACKING_PERSISTENCE>
|
||||
|
||||
@@ -69,10 +69,17 @@ class LLMSummarizingCondenser(RollingCondenser):
|
||||
forgotten_events.append(event)
|
||||
|
||||
# Construct prompt for summarization
|
||||
prompt = """You are maintaining a context-aware state summary for an interactive agent. You will be given a list of events corresponding to actions taken by the agent, and the most recent previous summary if one exists. Track:
|
||||
prompt = """You are maintaining a context-aware state summary for an interactive agent.
|
||||
You will be given a list of events corresponding to actions taken by the agent, and the most recent previous summary if one exists.
|
||||
If the events being summarized contain ANY task-tracking, you MUST include a TASK_TRACKING section to maintain continuity.
|
||||
When referencing tasks make sure to preserve exact task IDs and statuses.
|
||||
|
||||
Track:
|
||||
|
||||
USER_CONTEXT: (Preserve essential user requirements, goals, and clarifications in concise form)
|
||||
|
||||
TASK_TRACKING: {Active tasks, their IDs and statuses - PRESERVE TASK IDs}
|
||||
|
||||
COMPLETED: (Tasks completed so far, with brief results)
|
||||
PENDING: (Tasks that still need to be done)
|
||||
CURRENT_STATE: (Current variables, data structures, or relevant state)
|
||||
|
||||
Reference in New Issue
Block a user