fix(honcho): move context injection from system prompt to prefetch, fix honcho_context crash
- system_prompt_block() now returns static header only (matching ABC contract) All other providers already did this; Honcho was the only one baking live user data into system prompt, freezing it on turn 1 forever - prefetch() assembles two layers: Layer 1: base context (representation + card) from peer.context(), cached and refreshed on context_cadence (not frozen) Layer 2: dialectic supplement, refreshed on dialectic_cadence - Context and dialectic cadence now checked independently in queue_prefetch() Previously context refresh was gated behind dialectic cadence - Fix honcho_context tool crash: Honcho SDK Message objects use .peer_id not .role — was silently returning 'No context available yet' due to AttributeError caught by broad except
This commit is contained in:
@@ -942,7 +942,7 @@ class HonchoSessionManager:
|
||||
if ctx.messages:
|
||||
recent = ctx.messages[-10:] # last 10 messages
|
||||
result["recent_messages"] = [
|
||||
{"role": m.role, "content": m.content[:500]}
|
||||
{"role": getattr(m, "peer_id", "unknown"), "content": (m.content or "")[:500]}
|
||||
for m in recent
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user