π OpenHands: AI-Driven Development
fix: LLM summarization prompt handles user messages (#6837)
Calvin Smith74c942c91110
diff --git a/openhands/memory/condenser/impl/llm_summarizing_condenser.py b/openhands/memory/condenser/impl/llm_summarizing_condenser.pyindex 276d1c1e87..54068f0454 100644--- a/openhands/memory/condenser/impl/llm_summarizing_condenser.py+++ b/openhands/memory/condenser/impl/llm_summarizing_condenser.py@@ -57,22 +57,29 @@ class LLMSummarizingCondenser(RollingCondenser):# Construct prompt for summarizationprompt = """You are maintaining state history for an LLM-based code agent. Track:+USER_CONTEXT: (Preserve essential user requirements, problem descriptions, and clarifications in concise form)+STATE: {File paths, function signatures, data structures}TESTS: {Failing cases, error messages, outputs}CHANGES: {Code edits, variable updates}DEPS: {Dependencies, imports, external calls}INTENT: {Why changes were made, acceptance criteria}-SKIP: {Git clones, build logs}-SUMMARIZE: {File listings}-MAX_LENGTH: Keep summaries under 1000 words+PRIORITIZE:+1. Capture key user requirements and constraints+2. Maintain critical problem context+3. Keep all sections concise++SKIP: {Git clones, build logs, file listings}Example history format:+USER_CONTEXT: Fix FITS card float representation - "0.009125" becomes "0.009124999999999999" causing comment truncation. Use Python's str() when possible while maintaining FITS compliance.+STATE: mod_float() in card.py updatedTESTS: test_format() passedCHANGES: str(val) replaces f"{val:.16G}"DEPS: None modified-INTENT: Fix float precision overflow"""+INTENT: Fix precision while maintaining FITS compliance"""prompt + '\n\n'